From 9908b296c8109293a15db529e23468513cb7e806 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 10 Dec 2017 16:03:25 -0800 Subject: [PATCH 001/724] test: add an istanbul bootstrap script When the test script is loaded it is already too late, and we are missing a lot of information for coverage. This makes sure we get coverage for everything (except bootstrap itself). --- lib/bootstrap-local.js | 12 ++++--- lib/istanbul-local.js | 57 +++++++++++++++++++++++++++++++++ scripts/test.ts | 72 +++++------------------------------------- 3 files changed, 73 insertions(+), 68 deletions(-) create mode 100644 lib/istanbul-local.js diff --git a/lib/bootstrap-local.js b/lib/bootstrap-local.js index 237e2a49c4..fefb8cffc3 100644 --- a/lib/bootstrap-local.js +++ b/lib/bootstrap-local.js @@ -13,6 +13,12 @@ const path = require('path'); const ts = require('typescript'); +let _istanbulRequireHook = null; +if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !== -1) { + _istanbulRequireHook = require('./istanbul-local').istanbulRequireHook; +} + + // Check if we need to profile this CLI run. let profiler = null; if (process.env['DEVKIT_PROFILING']) { @@ -45,8 +51,6 @@ Error.stackTraceLimit = Infinity; global._DevKitIsLocal = true; global._DevKitRoot = path.resolve(__dirname, '..'); -global._DevKitRequireHook = null; - const compilerOptions = ts.readConfigFile(path.join(__dirname, '../tsconfig.json'), p => { return fs.readFileSync(p, 'utf-8'); @@ -71,8 +75,8 @@ require.extensions['.ts'] = function (m, filename) { try { let result = ts.transpile(source, compilerOptions['compilerOptions'], filename); - if (global._DevKitRequireHook) { - result = global._DevKitRequireHook(result, filename); + if (_istanbulRequireHook) { + result = _istanbulRequireHook(result, filename); } // Send it to node to execute. diff --git a/lib/istanbul-local.js b/lib/istanbul-local.js new file mode 100644 index 0000000000..ce062344de --- /dev/null +++ b/lib/istanbul-local.js @@ -0,0 +1,57 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +const { SourceMapConsumer } = require('source-map'); +const Istanbul = require('istanbul'); + +const inlineSourceMapRe = /\/\/# sourceMappingURL=data:application\/json;base64,(\S+)$/; + + +// Use the internal DevKit Hook of the require extension installed by our bootstrapping code to add +// Istanbul (not Constantinople) collection to the code. +const codeMap = new Map(); +exports.codeMap = codeMap; + +exports.istanbulRequireHook = function(code, filename) { + // Skip spec files. + if (filename.match(/_spec\.ts$/)) { + return code; + } + const codeFile = codeMap.get(filename); + if (codeFile) { + return codeFile.code; + } + + const instrumenter = new Istanbul.Instrumenter({ + esModules: true, + codeGenerationOptions: { + sourceMap: filename, + sourceMapWithCode: true, + }, + }); + let instrumentedCode = instrumenter.instrumentSync(code, filename); + const match = code.match(inlineSourceMapRe); + + if (match) { + const sourceMapGenerator = instrumenter.sourceMap; + // Fix source maps for exception reporting (since the exceptions happen in the instrumented + // code. + const sourceMapJson = JSON.parse(Buffer.from(match[1], 'base64').toString()); + const consumer = new SourceMapConsumer(sourceMapJson); + sourceMapGenerator.applySourceMap(consumer, filename); + + instrumentedCode = instrumentedCode.replace(inlineSourceMapRe, '') + + '//# sourceMappingURL=data:application/json;base64,' + + new Buffer(sourceMapGenerator.toString()).toString('base64'); + + // Keep the consumer from the original source map, because the reports from Istanbul (not + // Constantinople) are already mapped against the code. + codeMap.set(filename, { code: instrumentedCode, map: consumer }); + } + + return instrumentedCode; +}; diff --git a/scripts/test.ts b/scripts/test.ts index 64ca18c77f..cb14d2b54e 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -12,11 +12,11 @@ import 'jasmine'; import { SpecReporter as JasmineSpecReporter } from 'jasmine-spec-reporter'; import { ParsedArgs } from 'minimist'; import { join, relative } from 'path'; -import { Position, SourceMapConsumer, SourceMapGenerator } from 'source-map'; +import { Position, SourceMapConsumer } from 'source-map'; import * as ts from 'typescript'; import { packages } from '../lib/packages'; - +const codeMap = require('../lib/istanbul-local').codeMap; const Jasmine = require('jasmine'); const projectBaseDir = join(__dirname, '..'); @@ -25,70 +25,15 @@ require('source-map-support').install({ }); -declare const global: { - _DevKitRequireHook: Function, - __coverage__: CoverageType; -}; - - -interface Instrumenter extends Istanbul.Instrumenter { - sourceMap: SourceMapGenerator; -} - - interface CoverageLocation { start: Position; end: Position; } -type CoverageType = any; // tslint:disable-line:no-any - - -const inlineSourceMapRe = /\/\/# sourceMappingURL=data:application\/json;base64,(\S+)$/; - - -// Use the internal DevKit Hook of the require extension installed by our bootstrapping code to add -// Istanbul (not Constantinople) collection to the code. -const codeMap = new Map(); -function istanbulDevKitRequireHook(code: string, filename: string) { - // Skip spec files. - if (filename.match(/_spec\.ts$/)) { - return code; - } - const codeFile = codeMap.get(filename); - if (codeFile) { - return codeFile.code; - } - - const instrumenter = new Istanbul.Instrumenter({ - esModules: true, - codeGenerationOptions: { - sourceMap: filename, - sourceMapWithCode: true, - }, - }) as Instrumenter; - let instrumentedCode = instrumenter.instrumentSync(code, filename); - const match = code.match(inlineSourceMapRe); - - if (match) { - const sourceMapGenerator: SourceMapGenerator = instrumenter.sourceMap; - // Fix source maps for exception reporting (since the exceptions happen in the instrumented - // code. - const sourceMapJson = JSON.parse(Buffer.from(match[1], 'base64').toString()); - const consumer = new SourceMapConsumer(sourceMapJson); - sourceMapGenerator.applySourceMap(consumer, filename); - - instrumentedCode = instrumentedCode.replace(inlineSourceMapRe, '') - + '//# sourceMappingURL=data:application/json;base64,' - + new Buffer(sourceMapGenerator.toString()).toString('base64'); - - // Keep the consumer from the original source map, because the reports from Istanbul (not - // Constantinople) are already mapped against the code. - codeMap.set(filename, { code: instrumentedCode, map: consumer }); - } - - return instrumentedCode; -} +type CoverageType = any; // tslint:disable-line:no-any +declare const global: { + __coverage__: CoverageType; +}; // Add the Istanbul (not Constantinople) reporter. @@ -158,9 +103,9 @@ class IstanbulReporter implements jasmine.CustomReporter { if (global.__coverage__) { this._updateCoverageJsonSourceMap(global.__coverage__); istanbulCollector.add(global.__coverage__); - } - istanbulReporter.write(istanbulCollector, true, () => {}); + istanbulReporter.write(istanbulCollector, true, () => {}); + } } } @@ -212,7 +157,6 @@ export default function (args: ParsedArgs, logger: logging.Logger) { } if (args['code-coverage']) { - global._DevKitRequireHook = istanbulDevKitRequireHook; runner.env.addReporter(new IstanbulReporter()); } From 606c7859f6cc46767dbf4f4e664bf4f27255fc89 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 16 Nov 2017 14:57:37 -0800 Subject: [PATCH 002/724] feat(@angular-devkit/schematics): change schema validation to AJV --- package-lock.json | 32 +- package.json | 1 + .../angular_devkit/schematics/package.json | 3 +- .../schematics/src/engine/engine.ts | 11 +- .../schematics/src/engine/interface.ts | 4 +- .../schematics/src/engine/schematic.ts | 15 +- .../schematics/src/engine/schematic_spec.ts | 2 +- .../angular_devkit/schematics/src/index.ts | 2 +- .../schematics/src/rules/call.ts | 49 +-- .../schematics/src/tree/interface.ts | 7 + .../testing/schematic-test-runner.ts | 24 +- .../schematics/tools/ajv-option-transform.ts | 278 ++++++++++++++++++ .../tools/ajv-option-transform_spec.ts | 76 +++++ .../schematics/tools/fallback-engine-host.ts | 15 +- .../tools/file-system-engine-host-base.ts | 12 +- .../angular_devkit/schematics/tools/index.ts | 3 + .../tools/schema-option-transform.ts | 84 ++++++ .../schematics_cli/bin/schematics.ts | 18 +- 18 files changed, 542 insertions(+), 94 deletions(-) create mode 100644 packages/angular_devkit/schematics/tools/ajv-option-transform.ts create mode 100644 packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts create mode 100644 packages/angular_devkit/schematics/tools/schema-option-transform.ts diff --git a/package-lock.json b/package-lock.json index 092434d58a..abebd35541 100644 --- a/package-lock.json +++ b/package-lock.json @@ -106,12 +106,14 @@ "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" }, "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz", + "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=", "requires": { "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "align-text": { @@ -932,6 +934,16 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -1972,7 +1984,6 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "requires": { - "ajv": "4.11.8", "har-schema": "1.0.5" } }, @@ -2320,13 +2331,10 @@ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "0.0.0" - } + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, "json-stringify-safe": { "version": "5.0.1", diff --git a/package.json b/package.json index 0288ae7270..cd8b3c1cac 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@types/source-map": "^0.5.0", "@types/webpack": "^3.0.2", "@types/webpack-sources": "^0.1.3", + "ajv": "^5.5.1", "chokidar": "^1.7.0", "conventional-changelog": "^1.1.0", "glob": "^7.0.3", diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index a2ffb6ee96..542eb45824 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,7 +17,8 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "@ngtools/json-schema": "^1.1.0" + "@ngtools/json-schema": "^1.1.0", + "ajv": "~5.5.1" }, "peerDependencies": { "rxjs": "^5.5.2" diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index 9e40b80a5a..12f8e1d7a6 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -7,7 +7,7 @@ */ import { BaseException, logging } from '@angular-devkit/core'; import { CollectionDescription, TypedSchematicContext } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/map'; +import { Observable } from 'rxjs/Observable'; import { Url } from 'url'; import { MergeStrategy } from '../tree/interface'; import { NullTree } from '../tree/null'; @@ -124,11 +124,10 @@ export class SchematicEngine( - schematic: Schematic, options: OptionT): ResultT { - return this._host.transformOptions( - schematic.description, - options, - ); + schematic: Schematic, + options: OptionT, + ): Observable { + return this._host.transformOptions(schematic.description, options); } createSourceFromUrl(url: Url, context: TypedSchematicContext): Source { diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index c1293ab1e4..3b340f75b8 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -55,7 +55,7 @@ export interface EngineHost( schematic: SchematicDescription, options: OptionT, - ): ResultT; + ): Observable; readonly defaultMergeStrategy?: MergeStrategy; } @@ -88,7 +88,7 @@ export interface Engine( schematic: Schematic, options: OptionT, - ): ResultT; + ): Observable; readonly defaultMergeStrategy: MergeStrategy; } diff --git a/packages/angular_devkit/schematics/src/engine/schematic.ts b/packages/angular_devkit/schematics/src/engine/schematic.ts index a0ca25e322..5f1d8d4465 100644 --- a/packages/angular_devkit/schematics/src/engine/schematic.ts +++ b/packages/angular_devkit/schematics/src/engine/schematic.ts @@ -9,6 +9,9 @@ import { BaseException } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/of'; import 'rxjs/add/operator/concatMap'; +import { concatMap } from 'rxjs/operators/concatMap'; +import { first } from 'rxjs/operators/first'; +import { map } from 'rxjs/operators/map'; import { callRule } from '../rules/call'; import { Tree } from '../tree/interface'; import { @@ -49,8 +52,16 @@ export class SchematicImpl>, ): Observable { const context = this._engine.createContext(this, parentContext); - const transformedOptions = this._engine.transformOptions(this, options); - return callRule(this._factory(transformedOptions), host, context); + return host + .pipe( + first(), + concatMap(tree => this._engine.transformOptions(this, options).pipe( + map(o => [tree, o]), + )), + concatMap(([tree, transformedOptions]: [Tree, OptionT]) => { + return callRule(this._factory(transformedOptions), Observable.of(tree), context); + }), + ); } } diff --git a/packages/angular_devkit/schematics/src/engine/schematic_spec.ts b/packages/angular_devkit/schematics/src/engine/schematic_spec.ts index b6f77c9103..85798203ea 100644 --- a/packages/angular_devkit/schematics/src/engine/schematic_spec.ts +++ b/packages/angular_devkit/schematics/src/engine/schematic_spec.ts @@ -33,7 +33,7 @@ const context = { }; const engine: Engine = { createContext: (schematic: Schematic<{}, {}>) => ({ engine, schematic, ...context }), - transformOptions: (_: {}, options: {}) => options, + transformOptions: (_: {}, options: {}) => Observable.of(options), defaultMergeStrategy: MergeStrategy.Default, } as {} as Engine; const collection = { diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index dd584f391d..60c9cc706f 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { FilePredicate, MergeStrategy } from './tree/interface'; -import {Tree as TreeInterface } from './tree/interface'; +import { Tree as TreeInterface } from './tree/interface'; import { branch, empty, merge, optimize, partition } from './tree/static'; diff --git a/packages/angular_devkit/schematics/src/rules/call.ts b/packages/angular_devkit/schematics/src/rules/call.ts index cf3a0009cb..a0d703d0d7 100644 --- a/packages/angular_devkit/schematics/src/rules/call.ts +++ b/packages/angular_devkit/schematics/src/rules/call.ts @@ -9,6 +9,7 @@ import { BaseException } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { _throw } from 'rxjs/observable/throw'; import { last } from 'rxjs/operators/last'; +import { mergeMap } from 'rxjs/operators/mergeMap'; import { tap } from 'rxjs/operators/tap'; import { Rule, SchematicContext, Source } from '../engine/interface'; import { Tree, TreeSymbol } from '../tree/interface'; @@ -83,29 +84,31 @@ export function callSource(source: Source, context: SchematicContext): Observabl export function callRule(rule: Rule, input: Observable, context: SchematicContext): Observable { - return input.mergeMap(inputTree => { - const result = rule(inputTree, context) as object; + return input.pipe( + mergeMap(inputTree => { + const result = rule(inputTree, context) as object; - if (result === undefined) { - return Observable.of(inputTree); - } else if (TreeSymbol in result) { - return Observable.of(result as Tree); - } else if (Symbol.observable in result) { - const obs = result as Observable; + if (result === undefined) { + return Observable.of(inputTree); + } else if (TreeSymbol in result) { + return Observable.of(result as Tree); + } else if (Symbol.observable in result) { + const obs = result as Observable; - // Only return the last Tree, and make sure it's a Tree. - return obs.pipe( - last(), - tap(inner => { - if (!(TreeSymbol in inner)) { - throw new InvalidRuleResultException(inner); - } - }), - ); - } else if (result === undefined) { - return Observable.of(inputTree); - } else { - return _throw(new InvalidRuleResultException(result)); - } - }); + // Only return the last Tree, and make sure it's a Tree. + return obs.pipe( + last(), + tap(inner => { + if (!(TreeSymbol in inner)) { + throw new InvalidRuleResultException(inner); + } + }), + ); + } else if (result === undefined) { + return Observable.of(inputTree); + } else { + return _throw(new InvalidRuleResultException(result)); + } + }), + ); } diff --git a/packages/angular_devkit/schematics/src/tree/interface.ts b/packages/angular_devkit/schematics/src/tree/interface.ts index ee20d0a546..a43d5f0005 100644 --- a/packages/angular_devkit/schematics/src/tree/interface.ts +++ b/packages/angular_devkit/schematics/src/tree/interface.ts @@ -105,6 +105,13 @@ export interface Tree { } +namespace Tree { + export function isTree(maybeTree: object): maybeTree is Tree { + return TreeSymbol in maybeTree; + } +} + + export interface UpdateRecorder { // These just record changes. insertLeft(index: number, content: Buffer | string): UpdateRecorder; diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 332d115a8e..c8a059b7f8 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { logging, schema } from '@angular-devkit/core'; +import { logging } from '@angular-devkit/core'; import { Collection, DelegateTree, @@ -17,8 +17,9 @@ import { VirtualTree, } from '@angular-devkit/schematics'; import { - FileSystemSchematicDesc, + AjvSchemaRegistry, NodeModulesTestEngineHost, + validateOptionsWithSchema, } from '@angular-devkit/schematics/tools'; import { Observable } from 'rxjs/Observable'; import { callRule } from '../src/rules/call'; @@ -38,29 +39,12 @@ export class SchematicTestRunner { private _engine: SchematicEngine<{}, {}> = new SchematicEngine(this._engineHost); private _collection: Collection<{}, {}>; private _logger: logging.Logger; - private _registry: schema.JsonSchemaRegistry; constructor(private _collectionName: string, collectionPath: string) { this._engineHost.registerCollection(_collectionName, collectionPath); this._logger = new logging.Logger('test'); - this._registry = new schema.JsonSchemaRegistry(); - - this._engineHost.registerOptionsTransform((schematicDescription: {}, opts: object) => { - const schematic: FileSystemSchematicDesc = schematicDescription as FileSystemSchematicDesc; - - if (schematic.schema && schematic.schemaJson) { - const schemaJson = schematic.schemaJson as schema.JsonSchemaObject; - const name = schemaJson.id || schematic.name; - this._registry.addSchema(name, schemaJson); - const serializer = new schema.serializers.JavascriptSerializer(); - const fn = serializer.serialize(name, this._registry); - - return fn(opts); - } - - return opts; - }); + this._engineHost.registerOptionsTransform(validateOptionsWithSchema(new AjvSchemaRegistry())); this._collection = this._engine.createCollection(this._collectionName); } diff --git a/packages/angular_devkit/schematics/tools/ajv-option-transform.ts b/packages/angular_devkit/schematics/tools/ajv-option-transform.ts new file mode 100644 index 0000000000..398fdc741b --- /dev/null +++ b/packages/angular_devkit/schematics/tools/ajv-option-transform.ts @@ -0,0 +1,278 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonArray, JsonObject } from '@angular-devkit/core'; +import * as ajv from 'ajv'; +import * as http from 'http'; +import { Observable } from 'rxjs/Observable'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { map } from 'rxjs/operators/map'; +import { + OptionsSchemaRegistry, + OptionsSchemaValidator, + OptionsSchemaValidatorResult, +} from './schema-option-transform'; + + +function _parseJsonPointer(pointer: string): string[] { + if (pointer === '') { return []; } + if (pointer.charAt(0) !== '/') { throw new Error('Invalid JSON pointer: ' + pointer); } + + return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); +} + + +interface JsonVisitor { + ( + current: JsonObject | JsonArray, + pointer: string, + parentSchema?: JsonObject | JsonArray, + index?: string, + ): void; +} + + +function _visitJsonSchema(schema: JsonObject, visitor: JsonVisitor) { + const keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true, + }; + + const propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true, + }; + + function _traverse( + schema: JsonObject | JsonArray, + jsonPtr: string, + rootSchema: JsonObject, + parentSchema?: JsonObject | JsonArray, + keyIndex?: string, + ) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + visitor(schema, jsonPtr, parentSchema, keyIndex); + + for (const key of Object.keys(schema)) { + const sch = schema[key]; + if (Array.isArray(sch)) { + if (key == 'items') { + for (let i = 0; i < sch.length; i++) { + _traverse( + sch[i] as JsonArray, + jsonPtr + '/' + key + '/' + i, + rootSchema, + schema, + '' + i, + ); + } + } + } else if (key in propsKeywords) { + if (sch && typeof sch == 'object') { + for (const prop of Object.keys(sch)) { + _traverse( + sch[prop] as JsonObject, + jsonPtr + '/' + key + '/' + prop.replace(/~/g, '~0').replace(/\//g, '~1'), + rootSchema, + schema, + prop, + ); + } + } + } else if (key in keywords) { + _traverse(sch as JsonObject, jsonPtr + '/' + key, rootSchema, schema, key); + } + } + } + } + + _traverse(schema, '', schema); +} + + +export class AjvSchemaRegistry implements OptionsSchemaRegistry { + private _ajv: ajv.Ajv; + private _uriCache = new Map(); + + constructor() { + /** + * Build an AJV instance that will be used to validate schemas. + */ + this._ajv = ajv({ + removeAdditional: 'all', + useDefaults: true, + loadSchema: (uri: string) => this._fetch(uri) as ajv.Thenable, + }); + + this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); + } + + private _clean( + data: any, // tslint:disable-line:no-any + schema: JsonObject, + validate: ajv.ValidateFunction, + parentDataCache: WeakMap, // tslint:disable-line:no-any + ) { + _visitJsonSchema( + schema, + (currentSchema: object, pointer: string, parentSchema?: object, index?: string) => { + // If we're at the root, skip. + if (parentSchema === undefined || index === undefined) { + return; + } + + const parsedPointer = _parseJsonPointer(pointer); + // Every other path fragment is either 'properties', 'items', 'allOf', ... + const nonPropertyParsedPP = parsedPointer.filter((_, i) => !(i % 2)); + // Skip if it's part of a definitions or too complex for us to analyze. + if (nonPropertyParsedPP.some(f => f == 'definitions' || f == 'allOf' || f == 'anyOf')) { + return; + } + + let maybeParentData = parentDataCache.get(parentSchema); + if (!maybeParentData) { + // Every other path fragment is either 'properties' or 'items' in this model. + const parentDataPointer = parsedPointer.filter((_, i) => i % 2); + + // Find the parentData from the list. + maybeParentData = data; + for (const index of parentDataPointer.slice(0, -1)) { + if (maybeParentData[index] === undefined) { + // tslint:disable-next-line:no-any + if (parentSchema.hasOwnProperty('items') || (parentSchema as any)['type'] == 'array') { + maybeParentData[index] = []; + } else { + maybeParentData[index] = {}; + } + } + maybeParentData = maybeParentData[index]; + } + parentDataCache.set(parentSchema, maybeParentData); + } + + if (currentSchema.hasOwnProperty('$ref')) { + const $ref = (currentSchema as { $ref: string })['$ref']; + const refHash = $ref.split('#', 2)[1]; + const refUrl = $ref.startsWith('#') ? $ref : $ref.split('#', 1); + + let refVal = validate; + if (!$ref.startsWith('#')) { + // tslint:disable-next-line:no-any + refVal = (validate.refVal as any)[(validate.refs as any)[refUrl[0]]]; + } + if (refHash) { + // tslint:disable-next-line:no-any + refVal = (refVal.refVal as any)[(refVal.refs as any)['#' + refHash]]; + } + + maybeParentData[index] = {}; + this._clean(maybeParentData[index], refVal.schema as JsonObject, refVal, parentDataCache); + + return; + } else if (!maybeParentData.hasOwnProperty(index)) { + maybeParentData[index] = undefined; + } + }); + } + + private _fetch(uri: string): Promise { + const maybeSchema = this._uriCache.get(uri); + + if (maybeSchema) { + return Promise.resolve(maybeSchema); + } + + return new Promise((resolve, reject) => { + http.get(uri, res => { + if (!res.statusCode || res.statusCode >= 300) { + // Consume the rest of the data to free memory. + res.resume(); + reject(`Request failed. Status Code: ${res.statusCode}`); + } else { + res.setEncoding('utf8'); + let data = ''; + res.on('data', chunk => { + data += chunk; + }); + res.on('end', () => { + try { + const json = JSON.parse(data); + this._uriCache.set(uri, json); + resolve(json); + } catch (err) { + reject(err); + } + }); + } + }); + }); + } + + compile(schema: Object): Observable { + // Supports both synchronous and asynchronous compilation, by trying the synchronous + // version first, then if refs are missing this will fails. + // We also add any refs from external fetched schemas so that those will also be used + // in synchronous (if available). + let validator: Observable; + try { + const maybeFnValidate = this._ajv.compile(schema); + validator = Observable.of(maybeFnValidate); + } catch (e) { + // Propagate the error. + if (!(e instanceof (ajv.MissingRefError as {} as Function))) { + throw e; + } + + validator = new Observable(obs => { + this._ajv.compileAsync(schema) + .then(validate => { + obs.next(validate); + obs.complete(); + }, err => { + obs.error(err); + }); + }); + } + + return validator + .pipe( + // tslint:disable-next-line:no-any + map(validate => (data: any): Observable => { + const result = validate(data); + const resultObs = typeof result == 'boolean' + ? Observable.of(result) + : fromPromise(result as PromiseLike); + + return resultObs + .pipe( + map(result => { + if (result) { + // tslint:disable-next-line:no-any + const schemaDataMap = new WeakMap(); + schemaDataMap.set(schema, data); + + this._clean(data, schema as JsonObject, validate, schemaDataMap); + + return { success: true } as OptionsSchemaValidatorResult; + } + + return { + success: false, + errors: (validate.errors || []).map((err: ajv.ErrorObject) => err.message), + } as OptionsSchemaValidatorResult; + }), + ); + }), + ); + } +} diff --git a/packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts b/packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts new file mode 100644 index 0000000000..3c4978462f --- /dev/null +++ b/packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts @@ -0,0 +1,76 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-any +import 'rxjs/add/operator/mergeMap'; +import { AjvSchemaRegistry } from './ajv-option-transform'; + + +describe('AjvSchemaRegistry', () => { + it('works asynchronously', done => { + const registry = new AjvSchemaRegistry(); + const data: any = {}; // tslint:disable:no-any + + registry + .compile({ + properties: { + bool: { type: 'boolean' }, + str: { type: 'string', default: 'someString' }, + obj: { + properties: { + num: { type: 'number' }, + other: { type: 'number', default: 0 }, + }, + }, + tslint: { + $ref: 'http://json.schemastore.org/tslint#', + }, + }, + }) + .mergeMap(validator => validator(data)) + .map(result => { + expect(result.success).toBe(true); + expect(data.obj.num).toBeUndefined(); + expect(data.tslint).not.toBeUndefined(); + }) + .subscribe(done, done.fail); + }); + + // Synchronous failure is only used internally. + // If it's meant to be used externally then this test should change to truly be synchronous + // (i.e. not relyign on the observable). + it('works synchronously', done => { + const registry = new AjvSchemaRegistry(); + const data: any = {}; // tslint:disable:no-any + let isDone = false; + + registry + .compile({ + properties: { + bool: { type: 'boolean' }, + str: { type: 'string', default: 'someString' }, + obj: { + properties: { + num: { type: 'number' }, + other: { type: 'number', default: 0 }, + }, + }, + }, + }) + .mergeMap(validator => validator(data)) + .map(result => { + expect(result.success).toBe(true); + expect(data.obj.num).toBeUndefined(); + }) + .subscribe(() => { + isDone = true; + }, done.fail); + + expect(isDone).toBe(true); + done(); + }); +}); diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index b7eec28015..ffd7704eeb 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -13,6 +13,8 @@ import { Source, TypedSchematicContext, UnknownCollectionException, } from '@angular-devkit/schematics'; +import { Observable } from 'rxjs/Observable'; +import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; @@ -26,7 +28,7 @@ export type FallbackSchematicDescription = { export declare type OptionTransform = ( schematic: SchematicDescription, options: T, -) => R; +) => Observable; /** @@ -35,7 +37,6 @@ export declare type OptionTransform = ( */ export class FallbackEngineHost implements EngineHost<{}, {}> { private _hosts: EngineHost<{}, {}>[] = []; - private _transforms: OptionTransform[] = []; constructor() {} @@ -45,10 +46,6 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { this._hosts.push(host); } - registerOptionsTransform(t: OptionTransform) { - this._transforms.push(t); - } - createCollectionDescription(name: string): CollectionDescription { for (const host of this._hosts) { try { @@ -87,8 +84,10 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { transformOptions( schematic: SchematicDescription, options: OptionT, - ): ResultT { - return this._transforms.reduce((acc: ResultT, t) => t(schematic, acc), options) as ResultT; + ): Observable { + return (Observable.of(options) + .pipe(...this._hosts.map(host => mergeMap(opt => host.transformOptions(schematic, opt)))) + ) as {} as Observable; } listSchematicNames(collection: CollectionDescription): string[] { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 037e45b750..89605833de 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -14,6 +14,8 @@ import { UnknownSchematicException, } from '@angular-devkit/schematics'; import { dirname, isAbsolute, join, resolve } from 'path'; +import { Observable } from 'rxjs/Observable'; +import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; import { FileSystemCollectionDesc, @@ -27,7 +29,7 @@ import { readJsonFile } from './file-system-utility'; export declare type OptionTransform - = (schematic: FileSystemSchematicDescription, options: T) => R; + = (schematic: FileSystemSchematicDescription, options: T) => Observable; export class CollectionCannotBeResolvedException extends BaseException { @@ -230,8 +232,12 @@ export abstract class FileSystemEngineHostBase implements } transformOptions( - schematic: FileSystemSchematicDesc, options: OptionT): ResultT { - return this._transforms.reduce((acc: ResultT, t) => t(schematic, acc), options) as ResultT; + schematic: FileSystemSchematicDesc, + options: OptionT, + ): Observable { + return (Observable.of(options) + .pipe(...this._transforms.map(tFn => mergeMap(opt => tFn(schematic, opt)))) + ) as {} as Observable; } getSchematicRuleFactory( diff --git a/packages/angular_devkit/schematics/tools/index.ts b/packages/angular_devkit/schematics/tools/index.ts index 8df237b12f..d2fac31bff 100644 --- a/packages/angular_devkit/schematics/tools/index.ts +++ b/packages/angular_devkit/schematics/tools/index.ts @@ -13,3 +13,6 @@ export { FallbackEngineHost } from './fallback-engine-host'; export { FileSystemEngineHost } from './file-system-engine-host'; export { NodeModulesEngineHost } from './node-module-engine-host'; export { NodeModulesTestEngineHost } from './node-modules-test-engine-host'; + +export { AjvSchemaRegistry } from './ajv-option-transform'; +export { validateOptionsWithSchema } from './schema-option-transform'; diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts new file mode 100644 index 0000000000..d3136c484a --- /dev/null +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -0,0 +1,84 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { BaseException } from '@angular-devkit/core'; +import { SchematicDescription } from '@angular-devkit/schematics'; +import { Observable } from 'rxjs/Observable'; +import { first } from 'rxjs/operators/first'; +import { map } from 'rxjs/operators/map'; +import { mergeMap } from 'rxjs/operators/mergeMap'; +import { FileSystemCollectionDescription, FileSystemSchematicDescription } from './description'; + +export type SchematicDesc = + SchematicDescription; + + +export class InvalidInputOptions extends BaseException { + // tslint:disable-next-line:no-any + constructor(options: any, errors: string[]) { + super(`Schematic input does not validate against the Schema: ${JSON.stringify(options)}\n` + + `Errors:\n ${errors.join('\n ')}`); + } +} + + +export interface OptionsSchemaValidatorResult { + success: boolean; + errors?: string[]; +} + +export interface OptionsSchemaValidator { + // tslint:disable-next-line:no-any + (data: any): Observable; +} + +export interface OptionsSchemaRegistry { + compile(schema: Object): Observable; +} + +// tslint:disable-next-line:no-any +function _deepCopy(object: T): T { + const copy = {} as T; + for (const key of Object.keys(object)) { + if (typeof object[key] == 'object') { + copy[key] = _deepCopy(object[key]); + break; + } else { + copy[key] = object[key]; + } + } + + return copy; +} + + +// This can only be used in NodeJS. +export function validateOptionsWithSchema(registry: OptionsSchemaRegistry) { + return (schematic: SchematicDesc, options: T): Observable => { + // Prevent a schematic from changing the options object by making a copy of it. + options = _deepCopy(options); + + if (schematic.schema && schematic.schemaJson) { + // Make a deep copy of options. + return registry + .compile(schematic.schemaJson) + .pipe( + mergeMap(validator => validator(options)), + first(), + map(result => { + if (!result.success) { + throw new InvalidInputOptions(options, result.errors || ['Unknown reason.']); + } + + return options; + }), + ); + } + + return Observable.of(options); + }; +} diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index ed0ad9047a..b1f5b632fe 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -17,9 +17,10 @@ import { Tree, } from '@angular-devkit/schematics'; import { + AjvSchemaRegistry, FileSystemHost, - FileSystemSchematicDesc, NodeModulesEngineHost, + validateOptionsWithSchema, } from '@angular-devkit/schematics/tools'; import * as minimist from 'minimist'; import { Observable } from 'rxjs/Observable'; @@ -122,22 +123,9 @@ const isLocalCollection = collectionName.startsWith('.') || collectionName.start const engineHost = new NodeModulesEngineHost(); const engine = new SchematicEngine(engineHost); -const schemaRegistry = new schema.JsonSchemaRegistry(); // Add support for schemaJson. -engineHost.registerOptionsTransform((schematic: FileSystemSchematicDesc, options: {}) => { - if (schematic.schema && schematic.schemaJson) { - const schemaJson = schematic.schemaJson as schema.JsonSchemaObject; - const ref = schemaJson.$id || ('/' + schematic.collection.name + '/' + schematic.name); - schemaRegistry.addSchema(ref, schemaJson); - const serializer = new schema.serializers.JavascriptSerializer(); - const fn = serializer.serialize(ref, schemaRegistry); - - return fn(options); - } - - return options; -}); +engineHost.registerOptionsTransform(validateOptionsWithSchema(new AjvSchemaRegistry())); /** From 9e709f19f52bd66dea82496a6562ce13cd2522a0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 18 Dec 2017 13:32:32 +0000 Subject: [PATCH 003/724] feat(@angular-devkit/core): move AJV schema validation to core --- packages/angular_devkit/core/package.json | 1 + .../core/src/json/schema/index.ts | 11 +- .../core/src/json/schema/interface.ts | 25 ++ .../core/src/json/schema/registry.ts | 268 ++++++++++++++++- .../src/json/schema/registry_spec.ts} | 8 +- .../core/src/json/schema/schema.ts | 109 ------- .../src/json/schema/serializers/interface.ts | 13 - .../src/json/schema/serializers/javascript.ts | 105 ------- .../serializers/javascript_benchmark.ts | 52 ---- .../schema/serializers/serializers_spec.ts | 46 --- .../serializers/templates/javascript/index.ts | 21 -- .../templates/javascript/prop-any.ejs | 14 - .../templates/javascript/prop-array.ejs | 122 -------- .../templates/javascript/prop-boolean.ejs | 22 -- .../templates/javascript/prop-number.ejs | 47 --- .../templates/javascript/prop-object.ejs | 153 ---------- .../templates/javascript/prop-string.ejs | 39 --- .../serializers/templates/javascript/root.ejs | 20 -- .../templates/javascript/subschema.ejs | 38 --- .../angular_devkit/schematics/package.json | 3 +- .../testing/schematic-test-runner.ts | 6 +- .../schematics/tools/ajv-option-transform.ts | 278 ------------------ .../angular_devkit/schematics/tools/index.ts | 1 - .../tools/schema-option-transform.ts | 21 +- .../schematics_cli/bin/schematics.ts | 22 +- 25 files changed, 301 insertions(+), 1144 deletions(-) create mode 100644 packages/angular_devkit/core/src/json/schema/interface.ts rename packages/angular_devkit/{schematics/tools/ajv-option-transform_spec.ts => core/src/json/schema/registry_spec.ts} (91%) delete mode 100644 packages/angular_devkit/core/src/json/schema/schema.ts delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/interface.ts delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/javascript.ts delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/javascript_benchmark.ts delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/serializers_spec.ts delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/index.ts delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-any.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-array.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-boolean.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-number.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-object.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-string.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/root.ejs delete mode 100644 packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/subschema.ejs delete mode 100644 packages/angular_devkit/schematics/tools/ajv-option-transform.ts diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 946165a90b..fb7a470a19 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -11,6 +11,7 @@ "core" ], "dependencies": { + "ajv": "~5.5.1", "chokidar": "^1.7.0", "source-map": "^0.5.6" } diff --git a/packages/angular_devkit/core/src/json/schema/index.ts b/packages/angular_devkit/core/src/json/schema/index.ts index b0120254d0..3eabe58ebc 100644 --- a/packages/angular_devkit/core/src/json/schema/index.ts +++ b/packages/angular_devkit/core/src/json/schema/index.ts @@ -5,14 +5,5 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import * as javascript from './serializers/javascript'; - +export * from './interface'; export * from './registry'; -export * from './schema'; - - -export { javascript }; - -export const serializers = { - JavascriptSerializer: javascript.JavascriptSerializer, -}; diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts new file mode 100644 index 0000000000..a634354046 --- /dev/null +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -0,0 +1,25 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Observable } from 'rxjs/Observable'; + + +export interface SchemaValidatorResult { + success: boolean; + errors?: string[]; +} + + +export interface SchemaValidator { + // tslint:disable-next-line:no-any + (data: any): Observable; +} + + +export interface SchemaRegistry { + compile(schema: Object): Observable; +} diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 703f68c8bd..4caeeda6bc 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -5,35 +5,271 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '../../exception/exception'; -import { JsonSchema } from './schema'; +import * as ajv from 'ajv'; +import * as http from 'http'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/observable/of'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { map } from 'rxjs/operators/map'; +import { JsonArray, JsonObject } from '../interface'; +import { SchemaRegistry, SchemaValidator, SchemaValidatorResult } from './interface'; -export class JsonSchemaNotFoundException extends BaseException { - constructor(ref: string) { super(`Reference "${ref}" could not be found in registry.`); } +function _parseJsonPointer(pointer: string): string[] { + if (pointer === '') { return []; } + if (pointer.charAt(0) !== '/') { throw new Error('Invalid JSON pointer: ' + pointer); } + + return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); +} + + +interface JsonVisitor { + ( + current: JsonObject | JsonArray, + pointer: string, + parentSchema?: JsonObject | JsonArray, + index?: string, + ): void; } -export class JsonSchemaRegistry { - private _cache = new Map(); +function _visitJsonSchema(schema: JsonObject, visitor: JsonVisitor) { + const keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true, + }; - constructor() {} + const propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true, + }; - addSchema(ref: string, schema: JsonSchema) { - this._cache.set(ref, schema); + function _traverse( + schema: JsonObject | JsonArray, + jsonPtr: string, + rootSchema: JsonObject, + parentSchema?: JsonObject | JsonArray, + keyIndex?: string, + ) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + visitor(schema, jsonPtr, parentSchema, keyIndex); + + for (const key of Object.keys(schema)) { + const sch = schema[key]; + if (Array.isArray(sch)) { + if (key == 'items') { + for (let i = 0; i < sch.length; i++) { + _traverse( + sch[i] as JsonArray, + jsonPtr + '/' + key + '/' + i, + rootSchema, + schema, + '' + i, + ); + } + } + } else if (key in propsKeywords) { + if (sch && typeof sch == 'object') { + for (const prop of Object.keys(sch)) { + _traverse( + sch[prop] as JsonObject, + jsonPtr + '/' + key + '/' + prop.replace(/~/g, '~0').replace(/\//g, '~1'), + rootSchema, + schema, + prop, + ); + } + } + } else if (key in keywords) { + _traverse(sch as JsonObject, jsonPtr + '/' + key, rootSchema, schema, key); + } + } + } } - hasSchema(ref: string) { - return this._cache.has(ref); + _traverse(schema, '', schema); +} + + +export class CoreSchemaRegistry implements SchemaRegistry { + private _ajv: ajv.Ajv; + private _uriCache = new Map(); + + constructor() { + /** + * Build an AJV instance that will be used to validate schemas. + */ + this._ajv = ajv({ + removeAdditional: 'all', + useDefaults: true, + loadSchema: (uri: string) => this._fetch(uri) as ajv.Thenable, + }); + + this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); } - getSchemaFromRef(ref: string): JsonSchema { - const schemaCache = this._cache.get(ref); + private _clean( + data: any, // tslint:disable-line:no-any + schema: JsonObject, + validate: ajv.ValidateFunction, + parentDataCache: WeakMap, // tslint:disable-line:no-any + ) { + _visitJsonSchema( + schema, + (currentSchema: object, pointer: string, parentSchema?: object, index?: string) => { + // If we're at the root, skip. + if (parentSchema === undefined || index === undefined) { + return; + } + + const parsedPointer = _parseJsonPointer(pointer); + // Every other path fragment is either 'properties', 'items', 'allOf', ... + const nonPropertyParsedPP = parsedPointer.filter((_, i) => !(i % 2)); + // Skip if it's part of a definitions or too complex for us to analyze. + if (nonPropertyParsedPP.some(f => f == 'definitions' || f == 'allOf' || f == 'anyOf')) { + return; + } + + let maybeParentData = parentDataCache.get(parentSchema); + if (!maybeParentData) { + // Every other path fragment is either 'properties' or 'items' in this model. + const parentDataPointer = parsedPointer.filter((_, i) => i % 2); + + // Find the parentData from the list. + maybeParentData = data; + for (const index of parentDataPointer.slice(0, -1)) { + if (maybeParentData[index] === undefined) { + // tslint:disable-next-line:no-any + if (parentSchema.hasOwnProperty('items') || (parentSchema as any)['type'] == 'array') { + maybeParentData[index] = []; + } else { + maybeParentData[index] = {}; + } + } + maybeParentData = maybeParentData[index]; + } + parentDataCache.set(parentSchema, maybeParentData); + } + + if (currentSchema.hasOwnProperty('$ref')) { + const $ref = (currentSchema as { $ref: string })['$ref']; + const refHash = $ref.split('#', 2)[1]; + const refUrl = $ref.startsWith('#') ? $ref : $ref.split('#', 1); - if (!schemaCache) { - throw new JsonSchemaNotFoundException(ref); + let refVal = validate; + if (!$ref.startsWith('#')) { + // tslint:disable-next-line:no-any + refVal = (validate.refVal as any)[(validate.refs as any)[refUrl[0]]]; + } + if (refHash) { + // tslint:disable-next-line:no-any + refVal = (refVal.refVal as any)[(refVal.refs as any)['#' + refHash]]; + } + + maybeParentData[index] = {}; + this._clean(maybeParentData[index], refVal.schema as JsonObject, refVal, parentDataCache); + + return; + } else if (!maybeParentData.hasOwnProperty(index)) { + maybeParentData[index] = undefined; + } + }); + } + + private _fetch(uri: string): Promise { + const maybeSchema = this._uriCache.get(uri); + + if (maybeSchema) { + return Promise.resolve(maybeSchema); + } + + return new Promise((resolve, reject) => { + http.get(uri, res => { + if (!res.statusCode || res.statusCode >= 300) { + // Consume the rest of the data to free memory. + res.resume(); + reject(`Request failed. Status Code: ${res.statusCode}`); + } else { + res.setEncoding('utf8'); + let data = ''; + res.on('data', chunk => { + data += chunk; + }); + res.on('end', () => { + try { + const json = JSON.parse(data); + this._uriCache.set(uri, json); + resolve(json); + } catch (err) { + reject(err); + } + }); + } + }); + }); + } + + compile(schema: Object): Observable { + // Supports both synchronous and asynchronous compilation, by trying the synchronous + // version first, then if refs are missing this will fails. + // We also add any refs from external fetched schemas so that those will also be used + // in synchronous (if available). + let validator: Observable; + try { + const maybeFnValidate = this._ajv.compile(schema); + validator = Observable.of(maybeFnValidate); + } catch (e) { + // Propagate the error. + if (!(e instanceof (ajv.MissingRefError as {} as Function))) { + throw e; + } + + validator = new Observable(obs => { + this._ajv.compileAsync(schema) + .then(validate => { + obs.next(validate); + obs.complete(); + }, err => { + obs.error(err); + }); + }); } - return schemaCache; + return validator + .pipe( + // tslint:disable-next-line:no-any + map(validate => (data: any): Observable => { + const result = validate(data); + const resultObs = typeof result == 'boolean' + ? Observable.of(result) + : fromPromise(result as PromiseLike); + + return resultObs + .pipe( + map(result => { + if (result) { + // tslint:disable-next-line:no-any + const schemaDataMap = new WeakMap(); + schemaDataMap.set(schema, data); + + this._clean(data, schema as JsonObject, validate, schemaDataMap); + + return { success: true } as SchemaValidatorResult; + } + + return { + success: false, + errors: (validate.errors || []).map((err: ajv.ErrorObject) => err.message), + } as SchemaValidatorResult; + }), + ); + }), + ); } } diff --git a/packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts similarity index 91% rename from packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts rename to packages/angular_devkit/core/src/json/schema/registry_spec.ts index 3c4978462f..917cf6bde8 100644 --- a/packages/angular_devkit/schematics/tools/ajv-option-transform_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -7,12 +7,12 @@ */ // tslint:disable:no-any import 'rxjs/add/operator/mergeMap'; -import { AjvSchemaRegistry } from './ajv-option-transform'; +import { CoreSchemaRegistry } from './registry'; -describe('AjvSchemaRegistry', () => { +describe('CoreSchemaRegistry', () => { it('works asynchronously', done => { - const registry = new AjvSchemaRegistry(); + const registry = new CoreSchemaRegistry(); const data: any = {}; // tslint:disable:no-any registry @@ -44,7 +44,7 @@ describe('AjvSchemaRegistry', () => { // If it's meant to be used externally then this test should change to truly be synchronous // (i.e. not relyign on the observable). it('works synchronously', done => { - const registry = new AjvSchemaRegistry(); + const registry = new CoreSchemaRegistry(); const data: any = {}; // tslint:disable:no-any let isDone = false; diff --git a/packages/angular_devkit/core/src/json/schema/schema.ts b/packages/angular_devkit/core/src/json/schema/schema.ts deleted file mode 100644 index 99e08886dd..0000000000 --- a/packages/angular_devkit/core/src/json/schema/schema.ts +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { JsonArray, JsonObject, JsonValue } from '../interface'; - - -export interface JsonSchemaBase extends Partial { - $schema?: string; - $id?: string; - - // Metadata. - id?: string; - title?: string; - description?: string; - readonly?: boolean; - - // Reference properties. - $ref?: string; - allOf?: (JsonObject & JsonSchema)[]; - anyOf?: (JsonObject & JsonSchema)[]; - oneOf?: (JsonObject & JsonSchema)[]; - - // Structural properties. - definitions?: { [name: string]: (JsonObject & JsonSchema) }; -} - -export interface JsonSchemaString { - type: 'string'; - default?: string; - - minLength?: number; - maxLength?: number; - pattern?: string; - format?: string; -} - -export interface JsonSchemaNumberBase { - default?: number; - multipleOf?: number; - - // Range. - minimum?: number; - maximum?: number; - exclusiveMinimum?: boolean; - exclusiveMaximum?: boolean; -} - -export interface JsonSchemaNumber extends JsonSchemaNumberBase { - type: 'number'; -} - -export interface JsonSchemaInteger extends JsonSchemaNumberBase { - type: 'integer'; -} - -export interface JsonSchemaBoolean { - type: 'boolean'; - default?: boolean; -} - -export interface JsonSchemaObject extends JsonSchemaBase { - type: 'object'; - - // Object properties. - properties?: { [name: string]: (JsonObject & JsonSchema) }; - patternProperties?: { [pattern: string]: (JsonObject & JsonSchema) }; - required?: string[]; - minProperties?: number; - maxProperties?: number; - - dependencies?: { [name: string]: (string & JsonSchema) | string[]; }; - - additionalProperties?: boolean | (JsonObject & JsonSchema); -} - -export interface JsonSchemaArray extends JsonSchemaBase { - type: 'array'; - - additionalItems?: boolean | (JsonObject & JsonSchema); - items?: JsonArray; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; -} - -export interface JsonSchemaOneOfType extends JsonSchemaBase { - type: JsonArray & (JsonSchemaBaseType[]); -} - -export interface JsonSchemaAny { - // Type related properties. - type: undefined; - default?: JsonValue; - enum?: JsonArray; -} - - -export type JsonSchema = JsonSchemaString - | JsonSchemaNumber - | JsonSchemaInteger - | JsonSchemaObject - | JsonSchemaArray - | JsonSchemaOneOfType - | JsonSchemaAny; -export type JsonSchemaBaseType = undefined | 'string' | 'number' | 'object' | 'array' | 'boolean'; diff --git a/packages/angular_devkit/core/src/json/schema/serializers/interface.ts b/packages/angular_devkit/core/src/json/schema/serializers/interface.ts deleted file mode 100644 index a1bd731ca2..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/interface.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { JsonSchemaRegistry } from '../registry'; - - -export abstract class JsonSchemaSerializer { - abstract serialize(ref: string, registry: JsonSchemaRegistry): T; -} diff --git a/packages/angular_devkit/core/src/json/schema/serializers/javascript.ts b/packages/angular_devkit/core/src/json/schema/serializers/javascript.ts deleted file mode 100644 index 53769cea4d..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/javascript.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { BaseException } from '../../../exception/exception'; -import { camelize, classify } from '../../../utils/strings'; -import { JsonSchemaRegistry } from '../registry'; -import { JsonSchema } from '../schema'; -import { JsonSchemaSerializer } from './interface'; - - -export class InvalidRangeException extends BaseException { - constructor(name: string, value: T, comparator: string, expected: T) { - super(`Property ${JSON.stringify(name)} expected a value ` - + `${comparator} ${JSON.stringify(expected)}, received ${JSON.stringify(value)}.`); - } -} -export class InvalidValueException extends BaseException { - constructor(name: string, value: {}, expected: string) { - super(`Property ${JSON.stringify(name)} expected a value of type ${expected}, ` - + `received ${value}.`); - } -} -export class InvalidSchemaException extends BaseException { - constructor(schema: JsonSchema) { - super(`Invalid schema: ${JSON.stringify(schema)}`); - } -} -export class InvalidPropertyNameException extends BaseException { - constructor(public readonly path: string) { - super(`Property ${JSON.stringify(path)} does not exist in the schema, and no additional ` - + `properties are allowed.`); - } -} -export class RequiredValueMissingException extends BaseException { - constructor(public readonly path: string) { - super(`Property ${JSON.stringify(path)} is required but missing.`); - } -} - - -export const exceptions = { - InvalidRangeException, - InvalidSchemaException, - InvalidValueException, - InvalidPropertyNameException, - RequiredValueMissingException, -}; - - -const symbols = { - Schema: Symbol('schema'), -}; - - -export interface JavascriptSerializerOptions { - // Do not throw an exception if an extra property is passed, simply ignore it. - ignoreExtraProperties?: boolean; - // Allow accessing undefined objects, which might have default property values. - allowAccessUndefinedObjects?: boolean; -} - - -export class JavascriptSerializer extends JsonSchemaSerializer<(value: T) => T> { - private _uniqueSet = new Set(); - - constructor(private _options?: JavascriptSerializerOptions) { super(); } - - protected _unique(name: string) { - let i = 1; - let result = name; - while (this._uniqueSet.has(result)) { - result = name + i; - i++; - } - this._uniqueSet.add(result); - - return result; - } - - serialize(ref: string, registry: JsonSchemaRegistry) { - const rootSchema = registry.getSchemaFromRef(ref); - const { root, templates } = require('./templates/javascript'); - - const source = root({ - exceptions, - name: '', - options: this._options || {}, - schema: rootSchema, - strings: { - classify, - camelize, - }, - symbols, - templates, - }); - - const fn = new Function('registry', 'exceptions', 'symbols', 'value', source); - - return (value: T) => fn(registry, exceptions, symbols, value); - } -} diff --git a/packages/angular_devkit/core/src/json/schema/serializers/javascript_benchmark.ts b/packages/angular_devkit/core/src/json/schema/serializers/javascript_benchmark.ts deleted file mode 100644 index b38822b398..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/javascript_benchmark.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// tslint:disable:no-any -import { benchmark } from '@_/benchmark'; -import { SchemaClassFactory } from '@ngtools/json-schema'; -import * as fs from 'fs'; -import * as path from 'path'; -import { JsonSchemaRegistry } from '../registry'; -import { JsonSchema } from '../schema'; -import { JavascriptSerializer } from './javascript'; - -describe('JavaScript Serializer', () => { - // Schema for the Angular-CLI config. - const jsonPath = path.join( - (global as any)._DevKitRoot, - 'tests/@angular_devkit/core/json/schema/serializers/schema_benchmark.json', - ); - const jsonContent = fs.readFileSync(jsonPath).toString(); - const complexSchema: JsonSchema = JSON.parse(jsonContent); - - const registry = new JsonSchemaRegistry(); - registry.addSchema('', complexSchema); - - benchmark('schema parsing', () => { - new JavascriptSerializer().serialize('', registry)({}); - }, () => { - const SchemaMetaClass = SchemaClassFactory(complexSchema); - const schemaClass = new SchemaMetaClass({}); - schemaClass.$$root(); - }); - - (function() { - const registry = new JsonSchemaRegistry(); - registry.addSchema('', complexSchema); - const coreRoot = new JavascriptSerializer().serialize('', registry)({}); - - const SchemaMetaClass = SchemaClassFactory(complexSchema); - const schemaClass = new SchemaMetaClass({}); - const ngtoolsRoot = schemaClass.$$root(); - - benchmark('schema access', () => { - coreRoot.project = { name: 'abc' }; - }, () => { - ngtoolsRoot.project = { name: 'abc' }; - }); - })(); -}); diff --git a/packages/angular_devkit/core/src/json/schema/serializers/serializers_spec.ts b/packages/angular_devkit/core/src/json/schema/serializers/serializers_spec.ts deleted file mode 100644 index 08cd8af44d..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/serializers_spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// tslint:disable:no-any -import * as fs from 'fs'; -import * as path from 'path'; -import { JsonSchemaRegistry } from '../registry'; - -describe('serializers', () => { - const devkitRoot = (global as any)._DevKitRoot; - const root = path.join(devkitRoot, 'tests/@angular_devkit/core/json/schema/serializers'); - const allFiles = fs.readdirSync(root); - const schemas = allFiles.filter(x => x.match(/^\d+\.schema\.json$/)); - - for (const schemaName of schemas) { - // tslint:disable-next-line:non-null-operator - const schemaN = schemaName.match(/^\d+/) ![0] || '0'; - const schema = JSON.parse(fs.readFileSync(path.join(root, schemaName)).toString()); - - const serializers = allFiles.filter(x => { - return x.startsWith(schemaN + '.') && x.match(/^\d+\.\d+\..*_spec\.[jt]s$/); - }); - - for (const serializerName of serializers) { - // tslint:disable-next-line:non-null-operator - const [, indexN, serializerN] = serializerName.match(/^\d+\.(\d+)\.(.*)_spec/) !; - const serializer = require(path.join(root, serializerName)); - - const registry = new JsonSchemaRegistry(); - - for (const fnName of Object.keys(serializer)) { - if (typeof serializer[fnName] != 'function') { - continue; - } - - it(`${JSON.stringify(serializerN)} (${schemaN}.${indexN}.${fnName})`, () => { - serializer[fnName](registry, schema); - }); - } - } - } -}); diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/index.ts b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/index.ts deleted file mode 100644 index 13686cc191..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -export const templates: { [name: string]: (value: {}) => string } = { - subschema: require('./subschema').default, - - prop_any: require('./prop-any').default, - prop_array: require('./prop-array').default, - prop_boolean: require('./prop-boolean').default, - prop_number: require('./prop-number').default, - prop_integer: require('./prop-number').default, - prop_object: require('./prop-object').default, - prop_string: require('./prop-string').default, -}; - -export const root = require('./root').default as (value: {}) => string; diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-any.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-any.ejs deleted file mode 100644 index 66191f8333..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-any.ejs +++ /dev/null @@ -1,14 +0,0 @@ -{ - value: undefined, - get() { return this.value === undefined ? <%= 'default' in schema ? JSON.stringify(schema.default) : 'undefined' %> : this.value; }, - set(v) { - if (v === undefined && <%= !required %>) { - this.value = undefined; - return; - } - this.value = v; - }, - isDefined() { return this.value !== undefined; }, - remove() { this.set(undefined); }, - schema() { return <%= JSON.stringify(schema) %>; }, -} diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-array.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-array.ejs deleted file mode 100644 index 18acac6729..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-array.ejs +++ /dev/null @@ -1,122 +0,0 @@ -(function() { -<% - if ('default' in schema && !Array.isArray(schema.default) - || 'minItems' in schema && (typeof schema.minItems != 'number' || schema.minItems < 0) - || 'maxItems' in schema && (typeof schema.maxItems != 'number' || schema.maxItems < 0) - || 'uniqueItems' in schema && typeof schema.uniqueItems != 'boolean') { - throw new exceptions.InvalidSchemaException(schema); - } - - const required = (schema.required || []); - const extras = { - exceptions: exceptions, - options: options, - path: path, - strings: strings, - symbols: symbols, - templates: templates, - }; -%> - -const itemHandler = function() { return (<%= - templates.subschema(Object.assign({ - name: '???', - required: false, - schema: schema.additionalProperties, - }, extras)) -%>); }; - - -const items = []; -const arrayFunctions = { - get length() { return items.length; }, - push() { items.push.apply(items, arguments); }, - pop() { return items.pop(); }, - shift() { return items.shift(); }, - unshift() { return items.unshift(); }, - slice(start, end) { return items.slice(start, end); }, -}; - - -let defined = false; -const proxy = new Proxy({}, { - isExtensible() { return false; }, - has(target, prop) { - return (prop in items); - }, - get(target, prop) { - if (prop === symbols.Schema) { - return arrayHandler.schema; - } - - if (prop >= 0 && prop in value) { - return value[prop].get(); - } - if (prop in arrayFunctions) { - return arrayFunctions[prop]; - } - return undefined; - }, - set(target, prop, v) { - if (prop >= 0) { - if (!(prop in items)) { - items[prop] = itemHandler(); - } - items[prop].set(v); - return true; - } - return false; - }, - deleteProperty(target, prop) { - if (prop >= 0 && prop in value) { - value[prop].remove(); - return true; - } - return false; - }, - defineProperty(target, prop, descriptor) { - return false; - }, - getOwnPropertyDescriptor(target, prop) { - if (prop >= 0 && prop in value) { - return { configurable: true, enumerable: true }; - } - }, - ownKeys(target) { - return Object.keys(items); - }, -}); - -const arrayHandler = { - set(v) { - if (v === undefined) { - defined = false; - return; - } - - defined = true; - for (const key of Object.keys(v)) { - proxy[key] = v[key]; - } - - // Validate required fields. - <% for (const key of required) { %> - if (!(<%= JSON.stringify(key) %> in v)) { - throw new exceptions.RequiredValueMissingException(<%= JSON.stringify(path) %> + '/' + <%= JSON.stringify(key) %>); - }<% } %> - }, - get() { - if (defined) { - return proxy; - } else { - return <%= 'default' in schema ? JSON.stringify(schema.default) : 'undefined' %>; - } - }, - isDefined() { return defined; }, - remove() { this.set(undefined); }, - schema: <%= JSON.stringify(schema) %>, -}; - -return arrayHandler; - -})() diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-boolean.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-boolean.ejs deleted file mode 100644 index 1294e09863..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-boolean.ejs +++ /dev/null @@ -1,22 +0,0 @@ -{ -<% - if ('default' in schema && typeof schema.default != 'boolean') { - throw new exceptions.InvalidSchemaException(schema); - } -%> - value: undefined, - get() { return this.value === undefined ? <%= schema.default || 'undefined' %> : this.value; }, - set(v) { - if (v === undefined && <%= !required %>) { - this.value = undefined; - return; - } - if (typeof v != 'boolean') { - throw new exceptions.InvalidValueException(<%= JSON.stringify(name) %>, typeof v, 'boolean'); - } - this.value = v; - }, - isDefined() { return this.value !== undefined; }, - remove() { this.set(undefined); }, - schema() { return <%= JSON.stringify(schema) %>; }, -} diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-number.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-number.ejs deleted file mode 100644 index 3b76609ec4..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-number.ejs +++ /dev/null @@ -1,47 +0,0 @@ -{ -<% - if ('default' in schema && typeof schema.default != 'number' - || 'minimum' in schema && typeof schema.minimum != 'number' - || 'maximum' in schema && typeof schema.maximum != 'number' - || 'multipleOf' in schema && typeof schema.multipleOf != 'number' - || (!('minimum' in schema) && 'exclusiveMinimum' in schema) - || (!('maximum' in schema) && 'exclusiveMaximum' in schema)) { - throw new exceptions.InvalidSchemaException(schema); - } -%> - value: undefined, - get() { return this.value === undefined ? <%= schema.default || 'undefined' %> : this.value; }, - set(v) { - if (v === undefined && <%= !required %>) { - this.value = undefined; - return; - } - if (typeof v != 'number') { - throw new exceptions.InvalidValueException(<%= JSON.stringify(name) %>, typeof v, 'number'); - }<% -if (schema.type == 'integer') { %> - if (v % 1 != 0) { - throw new exceptions.InvalidValueException(<%= JSON.stringify(name) %>, v, 'integer'); - }<% -} -if ('minimum' in schema) { %> - if (v <%= schema.exclusiveMinimum ? '<=' : '<' %> <%= schema.minimum %>) { - throw new exceptions.InvalidRangeException(<%= JSON.stringify(name) %>, v, '>=', <%= schema.minimum %>); - }<% -} -if ('maximum' in schema) { %> - if (v <%= schema.exclusiveMaximum ? '>=' : '>' %> <%= schema.maximum %>) { - throw new exceptions.InvalidRangeException(<%= JSON.stringify(name) %>, v, '>=', <%= schema.maximum %>); - }<% -} -if ('multipleOf' in schema) { %> - if (v % <%= schema.multipleOf %> != 0) { - throw new exceptions.InvalidRangeException(<%= JSON.stringify(name) %>, v, 'multiple of', <%= schema.maximum %>); - }<% -} %> - this.value = v; - }, - isDefined() { return this.value !== undefined; }, - remove() { this.set(undefined); }, - schema() { return <%= JSON.stringify(schema) %>; }, -} diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-object.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-object.ejs deleted file mode 100644 index eb2412e3cb..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-object.ejs +++ /dev/null @@ -1,153 +0,0 @@ -(function() { -<% - const required = (schema.required || []); - const extras = { - exceptions: exceptions, - options: options, - path: path, - strings: strings, - symbols: symbols, - templates: templates, - }; -%> - -const additionalProperties = {}; -const additionalPropertyHandler = <% -if (!('additionalProperties' in schema)) { %>null<% } else { %> function() { return (<%= - templates.subschema(Object.assign({ - name: '???', - required: false, - schema: schema.additionalProperties, - }, extras)) %>); }<% -} -%>; - -const handlers = Object.create(null); -<% - for (const propName of Object.keys(schema.properties)) { - const _key = JSON.stringify(propName); - const _name = propName.match(/^[_a-zA-Z][_a-zA-Z0-9]*$/) ? propName : `[${_key}]`; -%>handlers[<%= JSON.stringify(_name) %>] = <%= - templates.subschema(Object.assign({ - name: _name, - required: required.indexOf(propName) != -1, - schema: schema.properties[propName], - }, extras)) -%><% -} -%> - -const objectFunctions = { - hasOwnProperty(name) { return objectProxyHandler.has(null, name); }, -}; - - -let defined = false; -const objectProxyHandler = { - isExtensible() { return false; }, - has(target, prop) { - return (prop in handlers && handlers[prop].isDefined()) - || (additionalPropertyHandler - ? (prop in additionalProperties && additionalProperties[prop].isDefined()) - : false); - }, - get(target, prop) { - if (prop === symbols.Schema) { - return objectHandler.schema; - } - if (prop in handlers) { - return handlers[prop].get(); - } - if (prop in objectFunctions) { - return objectFunctions[prop]; - } - return undefined; - }, - set(target, prop, v) { - defined = true; - if (prop in handlers) { - handlers[prop].set(v); - return true; - } else if (additionalPropertyHandler) { - if (!(prop in additionalProperties)) { - additionalProperties[prop] = additionalPropertyHandler(prop); - } - additionalProperties[prop].set(v); - return true; - } else { - <% if (options.ignoreExtraProperties !== true) { - %>throw new exceptions.InvalidPropertyNameException(<%= JSON.stringify(path) %> + '/' + prop);<% - } else { - // Just ignore the property. - %>return true;<% - } %> - } - }, - deleteProperty(target, prop) { - if (prop in handlers) { - handlers[prop].remove(); - return true; - } else if (additionalPropertyHandler && prop in additionalProperties) { - delete additionalProperties[prop]; - } - }, - defineProperty(target, prop, descriptor) { - return false; - }, - getOwnPropertyDescriptor(target, prop) { - if (prop in handlers) { - return { configurable: true, enumerable: true }; - } else if (additionalPropertyHandler && prop in additionalPropertyHandler) { - return { configurable: true, enumerable: true }; - } - }, - ownKeys(target) { - return [].concat( - Object.keys(handlers), - additionalPropertyHandler ? Object.keys(additionalProperties) : [] - ); - }, -}; - - -const proxy = new Proxy({}, objectProxyHandler); - -const objectHandler = { - set(v) { - if (v === undefined) { - defined = false; - return; - } - - defined = true; - for (const key of Object.keys(v)) { - proxy[key] = v[key]; - } - - // Validate required fields. - <% for (const key of required) { %> - if (!(<%= JSON.stringify(key) %> in v)) { - throw new exceptions.RequiredValueMissingException(<%= JSON.stringify(path) %> + '/' + <%= JSON.stringify(key) %>); - }<% } %> - }, - get() { - if (<%= options.allowAccessUndefinedObjects === true %> || this.isDefined()) { - return proxy; - } else { - return <%= 'default' in schema ? JSON.stringify(schema.default) : 'undefined' %>; - } - }, - isDefined() { - return defined - && (Object.keys(handlers).some(function(x) { return handlers[x].isDefined(); }) - || Object.keys(additionalProperties).some(function(x) { - return additionalProperties[x].isDefined(); - })); - }, - remove() { this.set(undefined); }, - schema: <%= JSON.stringify(schema) %>, -}; - -return objectHandler; - -})() diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-string.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-string.ejs deleted file mode 100644 index 20b84a86bf..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/prop-string.ejs +++ /dev/null @@ -1,39 +0,0 @@ -{ -<% -if ('default' in schema && typeof schema.default != 'string' - || 'minLength' in schema && (typeof schema.minLength != 'number' || schema.minLength < 0) - || 'maxLength' in schema && (typeof schema.maxLength != 'number' || schema.maxLength < 0) - || 'pattern' in schema && typeof schema.pattern != 'string' - || 'format' in schema && typeof schema.format != 'string') { - throw new exceptions.InvalidSchemaException(schema); -} - -const pattern = ('pattern' in schema) ? new RegExp(schema.pattern) : null; -%> - value: undefined, - get() { return this.value === undefined ? <%= JSON.stringify(schema.default) || 'undefined' %> : this.value; }, - set(v) { - if (v === undefined && <%= !required %>) { - this.value = undefined; - return; - } - if (typeof v != 'string') { - throw new exceptions.InvalidValueException(<%= JSON.stringify(name) %>, typeof v, 'string'); - }<% -if ('minLength' in schema) { %> - if (v.length <= <%= schema.minLength %>) { - throw new exceptions.InvalidRangeException(<%= JSON.stringify(name) %>, v, 'longer', <%= schema.minLength %>); - }<% -} -if ('maxLength' in schema) { %> - if (v.length >= <%= schema.maxLength %>) { - throw new exceptions.InvalidRangeException(<%= JSON.stringify(name) %>, v, 'smaller', <%= schema.maxLength %>); - }<% -} -%> - this.value = v; - }, - isDefined() { return this.value !== undefined; }, - remove() { this.set(undefined); }, - schema() { return <%= JSON.stringify(schema) %>; }, -} diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/root.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/root.ejs deleted file mode 100644 index 2e3f4f230d..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/root.ejs +++ /dev/null @@ -1,20 +0,0 @@ -<% -const extras = { - exceptions, - options, - strings, - symbols, - templates, -}; -%> - -const holder = <%= templates.subschema(Object.assign({ - name: name, - path: '', - required: false, - schema: schema, -}, extras)) -%>; - -holder.set(value); -return holder.get(); diff --git a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/subschema.ejs b/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/subschema.ejs deleted file mode 100644 index d1b1d2878d..0000000000 --- a/packages/angular_devkit/core/src/json/schema/serializers/templates/javascript/subschema.ejs +++ /dev/null @@ -1,38 +0,0 @@ -<% -const extras = { - exceptions, - options, - path: (path ? path + '/' : '') + name, - strings, - symbols, - templates, -}; - -if (!schema) { - %>null<% -} else if (schema === true) { -%><%= - templates.prop_any(Object.assign({ - name, - required, - schema: {}, - }, extras)) -%><% -} else if (!('type' in schema)) { -%><%= - templates.prop_any(Object.assign({ - name, - required, - schema: {}, - }, extras)) -%><% -} else { -%><%= - templates['prop_' + schema.type](Object.assign({ - name: name, - required, - schema: schema, - }, extras)) -%><% -} -%> diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 542eb45824..a2ffb6ee96 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,8 +17,7 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "@ngtools/json-schema": "^1.1.0", - "ajv": "~5.5.1" + "@ngtools/json-schema": "^1.1.0" }, "peerDependencies": { "rxjs": "^5.5.2" diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index c8a059b7f8..163e6edadd 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { logging } from '@angular-devkit/core'; +import { logging, schema } from '@angular-devkit/core'; import { Collection, DelegateTree, @@ -17,7 +17,6 @@ import { VirtualTree, } from '@angular-devkit/schematics'; import { - AjvSchemaRegistry, NodeModulesTestEngineHost, validateOptionsWithSchema, } from '@angular-devkit/schematics/tools'; @@ -44,7 +43,8 @@ export class SchematicTestRunner { this._engineHost.registerCollection(_collectionName, collectionPath); this._logger = new logging.Logger('test'); - this._engineHost.registerOptionsTransform(validateOptionsWithSchema(new AjvSchemaRegistry())); + this._engineHost.registerOptionsTransform( + validateOptionsWithSchema(new schema.CoreSchemaRegistry())); this._collection = this._engine.createCollection(this._collectionName); } diff --git a/packages/angular_devkit/schematics/tools/ajv-option-transform.ts b/packages/angular_devkit/schematics/tools/ajv-option-transform.ts deleted file mode 100644 index 398fdc741b..0000000000 --- a/packages/angular_devkit/schematics/tools/ajv-option-transform.ts +++ /dev/null @@ -1,278 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { JsonArray, JsonObject } from '@angular-devkit/core'; -import * as ajv from 'ajv'; -import * as http from 'http'; -import { Observable } from 'rxjs/Observable'; -import { fromPromise } from 'rxjs/observable/fromPromise'; -import { map } from 'rxjs/operators/map'; -import { - OptionsSchemaRegistry, - OptionsSchemaValidator, - OptionsSchemaValidatorResult, -} from './schema-option-transform'; - - -function _parseJsonPointer(pointer: string): string[] { - if (pointer === '') { return []; } - if (pointer.charAt(0) !== '/') { throw new Error('Invalid JSON pointer: ' + pointer); } - - return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); -} - - -interface JsonVisitor { - ( - current: JsonObject | JsonArray, - pointer: string, - parentSchema?: JsonObject | JsonArray, - index?: string, - ): void; -} - - -function _visitJsonSchema(schema: JsonObject, visitor: JsonVisitor) { - const keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - }; - - const propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true, - }; - - function _traverse( - schema: JsonObject | JsonArray, - jsonPtr: string, - rootSchema: JsonObject, - parentSchema?: JsonObject | JsonArray, - keyIndex?: string, - ) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - visitor(schema, jsonPtr, parentSchema, keyIndex); - - for (const key of Object.keys(schema)) { - const sch = schema[key]; - if (Array.isArray(sch)) { - if (key == 'items') { - for (let i = 0; i < sch.length; i++) { - _traverse( - sch[i] as JsonArray, - jsonPtr + '/' + key + '/' + i, - rootSchema, - schema, - '' + i, - ); - } - } - } else if (key in propsKeywords) { - if (sch && typeof sch == 'object') { - for (const prop of Object.keys(sch)) { - _traverse( - sch[prop] as JsonObject, - jsonPtr + '/' + key + '/' + prop.replace(/~/g, '~0').replace(/\//g, '~1'), - rootSchema, - schema, - prop, - ); - } - } - } else if (key in keywords) { - _traverse(sch as JsonObject, jsonPtr + '/' + key, rootSchema, schema, key); - } - } - } - } - - _traverse(schema, '', schema); -} - - -export class AjvSchemaRegistry implements OptionsSchemaRegistry { - private _ajv: ajv.Ajv; - private _uriCache = new Map(); - - constructor() { - /** - * Build an AJV instance that will be used to validate schemas. - */ - this._ajv = ajv({ - removeAdditional: 'all', - useDefaults: true, - loadSchema: (uri: string) => this._fetch(uri) as ajv.Thenable, - }); - - this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - } - - private _clean( - data: any, // tslint:disable-line:no-any - schema: JsonObject, - validate: ajv.ValidateFunction, - parentDataCache: WeakMap, // tslint:disable-line:no-any - ) { - _visitJsonSchema( - schema, - (currentSchema: object, pointer: string, parentSchema?: object, index?: string) => { - // If we're at the root, skip. - if (parentSchema === undefined || index === undefined) { - return; - } - - const parsedPointer = _parseJsonPointer(pointer); - // Every other path fragment is either 'properties', 'items', 'allOf', ... - const nonPropertyParsedPP = parsedPointer.filter((_, i) => !(i % 2)); - // Skip if it's part of a definitions or too complex for us to analyze. - if (nonPropertyParsedPP.some(f => f == 'definitions' || f == 'allOf' || f == 'anyOf')) { - return; - } - - let maybeParentData = parentDataCache.get(parentSchema); - if (!maybeParentData) { - // Every other path fragment is either 'properties' or 'items' in this model. - const parentDataPointer = parsedPointer.filter((_, i) => i % 2); - - // Find the parentData from the list. - maybeParentData = data; - for (const index of parentDataPointer.slice(0, -1)) { - if (maybeParentData[index] === undefined) { - // tslint:disable-next-line:no-any - if (parentSchema.hasOwnProperty('items') || (parentSchema as any)['type'] == 'array') { - maybeParentData[index] = []; - } else { - maybeParentData[index] = {}; - } - } - maybeParentData = maybeParentData[index]; - } - parentDataCache.set(parentSchema, maybeParentData); - } - - if (currentSchema.hasOwnProperty('$ref')) { - const $ref = (currentSchema as { $ref: string })['$ref']; - const refHash = $ref.split('#', 2)[1]; - const refUrl = $ref.startsWith('#') ? $ref : $ref.split('#', 1); - - let refVal = validate; - if (!$ref.startsWith('#')) { - // tslint:disable-next-line:no-any - refVal = (validate.refVal as any)[(validate.refs as any)[refUrl[0]]]; - } - if (refHash) { - // tslint:disable-next-line:no-any - refVal = (refVal.refVal as any)[(refVal.refs as any)['#' + refHash]]; - } - - maybeParentData[index] = {}; - this._clean(maybeParentData[index], refVal.schema as JsonObject, refVal, parentDataCache); - - return; - } else if (!maybeParentData.hasOwnProperty(index)) { - maybeParentData[index] = undefined; - } - }); - } - - private _fetch(uri: string): Promise { - const maybeSchema = this._uriCache.get(uri); - - if (maybeSchema) { - return Promise.resolve(maybeSchema); - } - - return new Promise((resolve, reject) => { - http.get(uri, res => { - if (!res.statusCode || res.statusCode >= 300) { - // Consume the rest of the data to free memory. - res.resume(); - reject(`Request failed. Status Code: ${res.statusCode}`); - } else { - res.setEncoding('utf8'); - let data = ''; - res.on('data', chunk => { - data += chunk; - }); - res.on('end', () => { - try { - const json = JSON.parse(data); - this._uriCache.set(uri, json); - resolve(json); - } catch (err) { - reject(err); - } - }); - } - }); - }); - } - - compile(schema: Object): Observable { - // Supports both synchronous and asynchronous compilation, by trying the synchronous - // version first, then if refs are missing this will fails. - // We also add any refs from external fetched schemas so that those will also be used - // in synchronous (if available). - let validator: Observable; - try { - const maybeFnValidate = this._ajv.compile(schema); - validator = Observable.of(maybeFnValidate); - } catch (e) { - // Propagate the error. - if (!(e instanceof (ajv.MissingRefError as {} as Function))) { - throw e; - } - - validator = new Observable(obs => { - this._ajv.compileAsync(schema) - .then(validate => { - obs.next(validate); - obs.complete(); - }, err => { - obs.error(err); - }); - }); - } - - return validator - .pipe( - // tslint:disable-next-line:no-any - map(validate => (data: any): Observable => { - const result = validate(data); - const resultObs = typeof result == 'boolean' - ? Observable.of(result) - : fromPromise(result as PromiseLike); - - return resultObs - .pipe( - map(result => { - if (result) { - // tslint:disable-next-line:no-any - const schemaDataMap = new WeakMap(); - schemaDataMap.set(schema, data); - - this._clean(data, schema as JsonObject, validate, schemaDataMap); - - return { success: true } as OptionsSchemaValidatorResult; - } - - return { - success: false, - errors: (validate.errors || []).map((err: ajv.ErrorObject) => err.message), - } as OptionsSchemaValidatorResult; - }), - ); - }), - ); - } -} diff --git a/packages/angular_devkit/schematics/tools/index.ts b/packages/angular_devkit/schematics/tools/index.ts index d2fac31bff..4ce36d5ec2 100644 --- a/packages/angular_devkit/schematics/tools/index.ts +++ b/packages/angular_devkit/schematics/tools/index.ts @@ -14,5 +14,4 @@ export { FileSystemEngineHost } from './file-system-engine-host'; export { NodeModulesEngineHost } from './node-module-engine-host'; export { NodeModulesTestEngineHost } from './node-modules-test-engine-host'; -export { AjvSchemaRegistry } from './ajv-option-transform'; export { validateOptionsWithSchema } from './schema-option-transform'; diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index d3136c484a..b142ae208d 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -5,7 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '@angular-devkit/core'; +import { + BaseException, + schema, +} from '@angular-devkit/core'; import { SchematicDescription } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; import { first } from 'rxjs/operators/first'; @@ -26,20 +29,6 @@ export class InvalidInputOptions extends BaseException { } -export interface OptionsSchemaValidatorResult { - success: boolean; - errors?: string[]; -} - -export interface OptionsSchemaValidator { - // tslint:disable-next-line:no-any - (data: any): Observable; -} - -export interface OptionsSchemaRegistry { - compile(schema: Object): Observable; -} - // tslint:disable-next-line:no-any function _deepCopy(object: T): T { const copy = {} as T; @@ -57,7 +46,7 @@ function _deepCopy(object: T): T { // This can only be used in NodeJS. -export function validateOptionsWithSchema(registry: OptionsSchemaRegistry) { +export function validateOptionsWithSchema(registry: schema.SchemaRegistry) { return (schematic: SchematicDesc, options: T): Observable => { // Prevent a schematic from changing the options object by making a copy of it. options = _deepCopy(options); diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index b1f5b632fe..9a6d4273ac 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -6,7 +6,11 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { schema, tags, terminal } from '@angular-devkit/core'; +import { + schema, + tags, + terminal, +} from '@angular-devkit/core'; import { createConsoleLogger } from '@angular-devkit/core/node'; import { DryRunEvent, @@ -17,7 +21,6 @@ import { Tree, } from '@angular-devkit/schematics'; import { - AjvSchemaRegistry, FileSystemHost, NodeModulesEngineHost, validateOptionsWithSchema, @@ -125,7 +128,7 @@ const engine = new SchematicEngine(engineHost); // Add support for schemaJson. -engineHost.registerOptionsTransform(validateOptionsWithSchema(new AjvSchemaRegistry())); +engineHost.registerOptionsTransform(validateOptionsWithSchema(new schema.CoreSchemaRegistry())); /** @@ -260,17 +263,10 @@ schematic.call(args, host, { debug, logger: logger.asApi() }) }) .subscribe({ error(err: Error) { - // Add extra processing to output better error messages. - if (err instanceof schema.javascript.RequiredValueMissingException) { - logger.fatal('Missing argument on the command line: ' + err.path.split('/').pop()); - } else if (err instanceof schema.javascript.InvalidPropertyNameException) { - logger.fatal('A non-supported argument was passed: ' + err.path.split('/').pop()); + if (debug) { + logger.fatal('An error occured:\n' + err.stack); } else { - if (debug) { - logger.fatal('An error occured:\n' + err.stack); - } else { - logger.fatal(err.message); - } + logger.fatal(err.message); } process.exit(1); }, From 1ac7edea8e3b56995f89a8b056c59e4a567d84bb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 19 Dec 2017 14:20:29 +0000 Subject: [PATCH 004/724] docs(@angular-devkit/core): add JSON schema headers --- .monorepo.json | 6 ++++ README.md | 2 +- packages/angular_devkit/core/README.md | 42 ++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 packages/angular_devkit/core/README.md diff --git a/.monorepo.json b/.monorepo.json index 2df50a1c95..ea559dee2c 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -58,6 +58,12 @@ }, "@angular-devkit/core": { "name": "Core", + "links": [ + { + "label": "README", + "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" + } + ], "version": "0.0.23", "hash": "45c3c8b7d60b038bbedd3000ebca1b88" }, diff --git a/README.md b/README.md index 27c429464f..8fa9b28628 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ This is a monorepo which contains many packages: | Project | Package | Version | Links | |---|---|---|---| **Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) -**Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | +**Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) **Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) **Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | diff --git a/packages/angular_devkit/core/README.md b/packages/angular_devkit/core/README.md new file mode 100644 index 0000000000..fe8ca4c306 --- /dev/null +++ b/packages/angular_devkit/core/README.md @@ -0,0 +1,42 @@ +# Core +> Shared utilities for Angular DevKit. + +# Exception + +# Json + +## Schema + +### SchemaValidatorResult +``` +export interface SchemaValidatorResult { + success: boolean; + errors?: string[]; +} +``` + +### SchemaValidator + +``` +export interface SchemaValidator { + (data: any): Observable; +} +``` + +### SchemaRegistry + +``` +export interface SchemaRegistry { + compile(schema: Object): Observable; +} +``` + +### CoreSchemaRegistry + +`SchemaRegistry` implementation using https://github.com/epoberezkin/ajv. + +# Logger + +# Utils + +# Virtual FS \ No newline at end of file From eb87ca47922ece927602d2f5f66fe324189dfa48 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 20 Dec 2017 14:46:48 +0000 Subject: [PATCH 005/724] feat(@angular-devkit/core): support schema custom formats --- packages/angular_devkit/core/README.md | 17 ++++ .../core/src/json/schema/interface.ts | 12 ++- .../core/src/json/schema/registry.ts | 37 +++++++- .../core/src/json/schema/registry_spec.ts | 93 +++++++++++++++++-- 4 files changed, 149 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/core/README.md b/packages/angular_devkit/core/README.md index fe8ca4c306..9657238b8c 100644 --- a/packages/angular_devkit/core/README.md +++ b/packages/angular_devkit/core/README.md @@ -23,17 +23,34 @@ export interface SchemaValidator { } ``` +### SchemaFormatter + +``` +export interface SchemaFormatter { + readonly async: boolean; + validate(data: any): boolean | Observable; +} +``` + ### SchemaRegistry ``` export interface SchemaRegistry { compile(schema: Object): Observable; + addFormat(name: string, formatter: SchemaFormatter): void; } ``` ### CoreSchemaRegistry `SchemaRegistry` implementation using https://github.com/epoberezkin/ajv. +Constructor accepts object containing `SchemaFormatter` that will be added automatically. + +``` +export class CoreSchemaRegistry implements SchemaRegistry { + constructor(formats: { [name: string]: SchemaFormatter} = {}) {} +} +``` # Logger diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index a634354046..71322f7136 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -13,13 +13,23 @@ export interface SchemaValidatorResult { errors?: string[]; } - export interface SchemaValidator { // tslint:disable-next-line:no-any (data: any): Observable; } +export interface SchemaFormatter { + readonly async: boolean; + // tslint:disable-next-line:no-any + validate(data: any): boolean | Observable; +} + +export interface SchemaFormat { + name: string; + formatter: SchemaFormatter; +} export interface SchemaRegistry { compile(schema: Object): Observable; + addFormat(format: SchemaFormat): void; } diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 4caeeda6bc..142c9f9285 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -12,7 +12,13 @@ import 'rxjs/add/observable/of'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { map } from 'rxjs/operators/map'; import { JsonArray, JsonObject } from '../interface'; -import { SchemaRegistry, SchemaValidator, SchemaValidatorResult } from './interface'; +import { + SchemaFormat, + SchemaFormatter, + SchemaRegistry, + SchemaValidator, + SchemaValidatorResult, +} from './interface'; function _parseJsonPointer(pointer: string): string[] { @@ -101,13 +107,21 @@ export class CoreSchemaRegistry implements SchemaRegistry { private _ajv: ajv.Ajv; private _uriCache = new Map(); - constructor() { + constructor(formats: SchemaFormat[] = []) { /** * Build an AJV instance that will be used to validate schemas. */ + + const formatsObj: { [name: string]: SchemaFormatter } = {}; + + for (const format of formats) { + formatsObj[format.name] = format.formatter; + } + this._ajv = ajv({ removeAdditional: 'all', useDefaults: true, + formats: formatsObj, loadSchema: (uri: string) => this._fetch(uri) as ajv.Thenable, }); @@ -265,11 +279,28 @@ export class CoreSchemaRegistry implements SchemaRegistry { return { success: false, - errors: (validate.errors || []).map((err: ajv.ErrorObject) => err.message), + errors: (validate.errors || []) + .map((err: ajv.ErrorObject) => `${err.dataPath} ${err.message}`), } as SchemaValidatorResult; }), ); }), ); } + + addFormat(format: SchemaFormat): void { + // tslint:disable-next-line:no-any + const validate = (data: any) => { + const result = format.formatter.validate(data); + + return result instanceof Observable ? result.toPromise() : result; + }; + + this._ajv.addFormat(format.name, { + async: format.formatter.async, + validate, + // AJV typings list `compare` as required, but it is optional. + // tslint:disable-next-line:no-any + } as any); + } } diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index 917cf6bde8..ece9121815 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -5,15 +5,15 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -// tslint:disable:no-any +import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/mergeMap'; import { CoreSchemaRegistry } from './registry'; describe('CoreSchemaRegistry', () => { it('works asynchronously', done => { - const registry = new CoreSchemaRegistry(); - const data: any = {}; // tslint:disable:no-any + const registry = new CoreSchemaRegistry(); + const data: any = {}; // tslint:disable-line:no-any registry .compile({ @@ -38,14 +38,14 @@ describe('CoreSchemaRegistry', () => { expect(data.tslint).not.toBeUndefined(); }) .subscribe(done, done.fail); - }); + }); // Synchronous failure is only used internally. // If it's meant to be used externally then this test should change to truly be synchronous // (i.e. not relyign on the observable). it('works synchronously', done => { - const registry = new CoreSchemaRegistry(); - const data: any = {}; // tslint:disable:no-any + const registry = new CoreSchemaRegistry(); + const data: any = {}; // tslint:disable-line:no-any let isDone = false; registry @@ -73,4 +73,85 @@ describe('CoreSchemaRegistry', () => { expect(isDone).toBe(true); done(); }); + + it('supports sync format', done => { + const registry = new CoreSchemaRegistry(); + const data = { str: 'hotdog' }; + const format = { + name: 'is-hotdog', + formatter: { + async: false, + validate: (str: string) => str === 'hotdog', + }, + }; + + registry.addFormat(format); + + registry + .compile({ + properties: { + str: { type: 'string', format: 'is-hotdog' }, + }, + }) + .mergeMap(validator => validator(data)) + .map(result => { + expect(result.success).toBe(true); + }) + .subscribe(done, done.fail); + }); + + it('supports async format', done => { + const registry = new CoreSchemaRegistry(); + const data = { str: 'hotdog' }; + const format = { + name: 'is-hotdog', + formatter: { + async: true, + validate: (str: string) => Observable.of(str === 'hotdog'), + }, + }; + + registry.addFormat(format); + + registry + .compile({ + $async: true, + properties: { + str: { type: 'string', format: 'is-hotdog' }, + }, + }) + .mergeMap(validator => validator(data)) + .map(result => { + expect(result.success).toBe(true); + }) + .subscribe(done, done.fail); + }); + + it('shows dataPath and message on error', done => { + const registry = new CoreSchemaRegistry(); + const data = { hotdot: 'hotdog', banana: 'banana' }; + const format = { + name: 'is-hotdog', + formatter: { + async: false, + validate: (str: string) => str === 'hotdog', + }, + }; + + registry.addFormat(format); + + registry + .compile({ + properties: { + hotdot: { type: 'string', format: 'is-hotdog' }, + banana: { type: 'string', format: 'is-hotdog' }, + }, + }) + .mergeMap(validator => validator(data)) + .map(result => { + expect(result.success).toBe(false); + expect(result.errors && result.errors[0]).toBe('.banana should match format "is-hotdog"'); + }) + .subscribe(done, done.fail); + }); }); From e7f36636cecf21ae483af21136287a23f6cc00ff Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 22 Dec 2017 13:34:37 +0000 Subject: [PATCH 006/724] feat(@angular-devkit/schematics): add custom schema formats --- .../schematics/src/formats/app-name.ts | 22 ++++++ .../schematics/src/formats/app-name_spec.ts | 69 +++++++++++++++++++ .../src/formats/format-validator.ts | 28 ++++++++ .../schematics/src/formats/html-selector.ts | 22 ++++++ .../src/formats/html-selector_spec.ts | 57 +++++++++++++++ .../schematics/src/formats/index.ts | 11 +++ .../schematics/src/formats/path.ts | 24 +++++++ .../schematics/src/formats/path_spec.ts | 35 ++++++++++ .../angular_devkit/schematics/src/index.ts | 2 + .../testing/schematic-test-runner.ts | 11 ++- .../schematics_cli/bin/schematics.ts | 9 ++- 11 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 packages/angular_devkit/schematics/src/formats/app-name.ts create mode 100644 packages/angular_devkit/schematics/src/formats/app-name_spec.ts create mode 100644 packages/angular_devkit/schematics/src/formats/format-validator.ts create mode 100644 packages/angular_devkit/schematics/src/formats/html-selector.ts create mode 100644 packages/angular_devkit/schematics/src/formats/html-selector_spec.ts create mode 100644 packages/angular_devkit/schematics/src/formats/index.ts create mode 100644 packages/angular_devkit/schematics/src/formats/path.ts create mode 100644 packages/angular_devkit/schematics/src/formats/path_spec.ts diff --git a/packages/angular_devkit/schematics/src/formats/app-name.ts b/packages/angular_devkit/schematics/src/formats/app-name.ts new file mode 100644 index 0000000000..1d1761858d --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/app-name.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { schema } from '@angular-devkit/core'; +import { htmlSelectorRe } from './html-selector'; + + +const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; + +export const appNameFormat: schema.SchemaFormat = { + name: 'app-name', + formatter: { + async: false, + validate: (appName: string) => htmlSelectorRe.test(appName) + && unsupportedProjectNames.indexOf(appName) === -1, + }, +}; diff --git a/packages/angular_devkit/schematics/src/formats/app-name_spec.ts b/packages/angular_devkit/schematics/src/formats/app-name_spec.ts new file mode 100644 index 0000000000..6098f92c7e --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/app-name_spec.ts @@ -0,0 +1,69 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { appNameFormat } from './app-name'; +import { formatValidator } from './format-validator'; + + +describe('Schematics app name format', () => { + it('accepts correct app name', done => { + const data = { appName: 'my-app' }; + const dataSchema = { + properties: { appName: { type: 'string', format: 'app-name' } }, + }; + + formatValidator(data, dataSchema, [appNameFormat]) + .map(result => expect(result.success).toBe(true)) + .subscribe(done, done.fail); + }); + + it('rejects app name starting with invalid characters', done => { + const data = { appName: 'my-app$' }; + const dataSchema = { + properties: { appName: { type: 'string', format: 'app-name' } }, + }; + + formatValidator(data, dataSchema, [appNameFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); + + it('rejects app name starting with number', done => { + const data = { appName: '1app' }; + const dataSchema = { + properties: { appName: { type: 'string', format: 'app-name' } }, + }; + + formatValidator(data, dataSchema, [appNameFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); + + it('rejects unsupported app names', done => { + const data = { + appName1: 'test', + appName2: 'ember', + appName3: 'ember-cli', + appName4: 'vendor', + appName5: 'app', + }; + const dataSchema = { + properties: { + appName1: { type: 'string', format: 'app-name' }, + appName2: { type: 'string', format: 'app-name' }, + appName3: { type: 'string', format: 'app-name' }, + appName4: { type: 'string', format: 'app-name' }, + appName5: { type: 'string', format: 'app-name' }, + }, + }; + + formatValidator(data, dataSchema, [appNameFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); +}); diff --git a/packages/angular_devkit/schematics/src/formats/format-validator.ts b/packages/angular_devkit/schematics/src/formats/format-validator.ts new file mode 100644 index 0000000000..8acfc7c871 --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/format-validator.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { schema } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/operator/mergeMap'; + + +export function formatValidator( + data: Object, + dataSchema: Object, + formats: schema.SchemaFormat[], +): Observable { + const registry = new schema.CoreSchemaRegistry(); + + for (const format of formats) { + registry.addFormat(format); + } + + return registry + .compile(dataSchema) + .mergeMap(validator => validator(data)); +} diff --git a/packages/angular_devkit/schematics/src/formats/html-selector.ts b/packages/angular_devkit/schematics/src/formats/html-selector.ts new file mode 100644 index 0000000000..6d7d9ada9b --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/html-selector.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { schema } from '@angular-devkit/core'; + + +// Must start with a letter, and must contain only alphanumeric characters or dashes. +// When adding a dash the segment after the dash must also start with a letter. +export const htmlSelectorRe = /^[a-zA-Z][.0-9a-zA-Z]*(:?-[a-zA-Z][.0-9a-zA-Z]*)*$/; + +export const htmlSelectorFormat: schema.SchemaFormat = { + name: 'html-selector', + formatter: { + async: false, + validate: (selector: string) => htmlSelectorRe.test(selector), + }, +}; diff --git a/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts b/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts new file mode 100644 index 0000000000..c2b264de4c --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts @@ -0,0 +1,57 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { formatValidator } from './format-validator'; +import { htmlSelectorFormat } from './html-selector'; + + +describe('Schematics HTML selector format', () => { + it('accepts correct selectors', done => { + const data = { selector: 'my-selector' }; + const dataSchema = { + properties: { selector: { type: 'string', format: 'html-selector' } }, + }; + + formatValidator(data, dataSchema, [htmlSelectorFormat]) + .map(result => expect(result.success).toBe(true)) + .subscribe(done, done.fail); + }); + + it('rejects selectors starting with invalid characters', done => { + const data = { selector: 'my-selector$' }; + const dataSchema = { + properties: { selector: { type: 'string', format: 'html-selector' } }, + }; + + formatValidator(data, dataSchema, [htmlSelectorFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); + + it('rejects selectors starting with number', done => { + const data = { selector: '1selector' }; + const dataSchema = { + properties: { selector: { type: 'string', format: 'html-selector' } }, + }; + + formatValidator(data, dataSchema, [htmlSelectorFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); + + it('rejects selectors with non-letter after dash', done => { + const data = { selector: 'my-1selector' }; + const dataSchema = { + properties: { selector: { type: 'string', format: 'html-selector' } }, + }; + + formatValidator(data, dataSchema, [htmlSelectorFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); +}); diff --git a/packages/angular_devkit/schematics/src/formats/index.ts b/packages/angular_devkit/schematics/src/formats/index.ts new file mode 100644 index 0000000000..aa8033eefb --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/index.ts @@ -0,0 +1,11 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './app-name'; +export * from './html-selector'; +export * from './path'; diff --git a/packages/angular_devkit/schematics/src/formats/path.ts b/packages/angular_devkit/schematics/src/formats/path.ts new file mode 100644 index 0000000000..0c854957f1 --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/path.ts @@ -0,0 +1,24 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { normalize, schema } from '@angular-devkit/core'; + + +export const pathFormat: schema.SchemaFormat = { + name: 'path', + formatter: { + async: false, + validate: (path: string) => { + // Check path is normalized already. + return path === normalize(path); + // TODO: check if path is valid (is that just checking if it's normalized?) + // TODO: check path is from root of schematics even if passed absolute + // TODO: error out if path is outside of host + }, + }, +}; diff --git a/packages/angular_devkit/schematics/src/formats/path_spec.ts b/packages/angular_devkit/schematics/src/formats/path_spec.ts new file mode 100644 index 0000000000..64b7ab8330 --- /dev/null +++ b/packages/angular_devkit/schematics/src/formats/path_spec.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { formatValidator } from './format-validator'; +import { pathFormat } from './path'; + + +describe('Schematics Path format', () => { + it('accepts correct Paths', done => { + const data = { path: 'a/b/c' }; + const dataSchema = { + properties: { path: { type: 'string', format: 'path' } }, + }; + + formatValidator(data, dataSchema, [pathFormat]) + .map(result => expect(result.success).toBe(true)) + .subscribe(done, done.fail); + }); + + it('rejects Paths that are not normalized', done => { + const data = { path: 'a/b/c/../' }; + const dataSchema = { + properties: { path: { type: 'string', format: 'path' } }, + }; + + formatValidator(data, dataSchema, [pathFormat]) + .map(result => expect(result.success).toBe(false)) + .subscribe(done, done.fail); + }); +}); diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index 60c9cc706f..5a711ad20b 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -33,6 +33,8 @@ export {UpdateRecorder} from './tree/interface'; export * from './engine/schematic'; export * from './sink/dryrun'; export {FileSystemSink} from './sink/filesystem'; +import * as formats from './formats'; +export { formats }; export interface TreeConstructor { diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 163e6edadd..b09b603513 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -15,6 +15,7 @@ import { SchematicEngine, Tree, VirtualTree, + formats, } from '@angular-devkit/schematics'; import { NodeModulesTestEngineHost, @@ -43,8 +44,14 @@ export class SchematicTestRunner { this._engineHost.registerCollection(_collectionName, collectionPath); this._logger = new logging.Logger('test'); - this._engineHost.registerOptionsTransform( - validateOptionsWithSchema(new schema.CoreSchemaRegistry())); + const schemaFormats = [ + formats.appNameFormat, + formats.htmlSelectorFormat, + formats.pathFormat, + ]; + const registry = new schema.CoreSchemaRegistry(schemaFormats); + + this._engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); this._collection = this._engine.createCollection(this._collectionName); } diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 9a6d4273ac..bd18e14581 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -19,6 +19,7 @@ import { FileSystemTree, SchematicEngine, Tree, + formats, } from '@angular-devkit/schematics'; import { FileSystemHost, @@ -128,7 +129,13 @@ const engine = new SchematicEngine(engineHost); // Add support for schemaJson. -engineHost.registerOptionsTransform(validateOptionsWithSchema(new schema.CoreSchemaRegistry())); +const schemaFormats = [ + formats.appNameFormat, + formats.htmlSelectorFormat, + formats.pathFormat, +]; +const registry = new schema.CoreSchemaRegistry(schemaFormats); +engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); /** From 4fa0167315448ac3226daad20bc7119079269d9f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 29 Dec 2017 15:06:53 +0000 Subject: [PATCH 007/724] refactor(@schematics/angular): use schema format --- .../schematics/angular/app-shell/index_spec.ts | 3 +-- .../schematics/angular/app-shell/schema.json | 15 ++++++++++++++- .../schematics/angular/application/index_spec.ts | 1 - .../schematics/angular/application/schema.json | 7 ++++++- packages/schematics/angular/class/schema.json | 3 +++ .../schematics/angular/component/index_spec.ts | 16 ++-------------- .../schematics/angular/component/schema.json | 6 +++++- .../schematics/angular/directive/schema.json | 5 +++++ packages/schematics/angular/enum/schema.json | 3 +++ packages/schematics/angular/guard/schema.json | 6 ++++-- .../schematics/angular/interface/schema.json | 3 +++ packages/schematics/angular/module/schema.json | 3 +++ packages/schematics/angular/pipe/schema.json | 6 ++++-- packages/schematics/angular/service/schema.json | 6 ++++-- .../schematics/angular/universal/index_spec.ts | 7 +++---- .../schematics/angular/universal/schema.json | 12 +++++++++++- 16 files changed, 71 insertions(+), 31 deletions(-) diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index 800787a563..fa69b5d55c 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -25,8 +25,7 @@ describe('App Shell Schematic', () => { let appTree: Tree; const appOptions: ApplicationOptions = { directory: '', - name: 'app', - prefix: '', + name: 'appshell-app', sourceDir: 'src', inlineStyle: false, inlineTemplate: false, diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index d066efdc10..e4b2a8cbf6 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -22,64 +22,77 @@ "name": { "type": "string", + "format": "app-name", "description": "Name of the universal app" }, "appId": { "type": "string", + "format": "app-name", "description": "The appId to use withServerTransition.", "default": "serverApp" }, "outDir": { "type": "string", + "format": "path", "description": "The output directory for build results.", - "default": "dist-server/" + "default": "dist-server" }, "root": { "type": "string", + "format": "path", "description": "The root directory of the app.", "default": "src" }, "index": { "type": "string", + "format": "path", "description": "Name of the index file", "default": "index.html" }, "main": { "type": "string", + "format": "path", "description": "The name of the main entry-point file.", "default": "main.server.ts" }, "test": { "type": "string", + "format": "path", "description": "The name of the test entry-point file." }, "tsconfigFileName": { "type": "string", + "format": "path", "default": "tsconfig.server", "description": "The name of the TypeScript configuration file." }, "testTsconfigFileName": { "type": "string", + "format": "path", "description": "The name of the TypeScript configuration file for tests.", "default": "tsconfig.spec" }, "appDir": { "type": "string", + "format": "path", "description": "The name of the application directory.", "default": "app" }, "rootModuleFileName": { "type": "string", + "format": "path", "description": "The name of the root module file", "default": "app.server.module.ts" }, "rootModuleClassName": { "type": "string", + "format": "app-name", "description": "The name of the root module class.", "default": "AppServerModule" }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "alias": "sd" diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index af02ff53a4..f57ce5668d 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -19,7 +19,6 @@ describe('Application Schematic', () => { const defaultOptions: ApplicationOptions = { directory: 'foo', name: 'foo', - prefix: '', sourceDir: 'src', inlineStyle: false, inlineTemplate: false, diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 4e6e6c890c..f288630af7 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -6,17 +6,20 @@ "properties": { "directory": { "type": "string", + "format": "path", "description": "The directory name to create the app in.", "alias": "dir" }, "path": { "type": "string", + "format": "path", "description": "The path of the application.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "alias": "sd", @@ -24,7 +27,8 @@ }, "name": { "description": "The name of the application.", - "type": "string" + "type": "string", + "format": "app-name" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", @@ -55,6 +59,7 @@ }, "prefix": { "type": "string", + "format": "html-selector", "description": "The prefix to apply to generated selectors.", "default": "app", "alias": "p" diff --git a/packages/schematics/angular/class/schema.json b/packages/schematics/angular/class/schema.json index a746f7569a..1cc74bf93c 100644 --- a/packages/schematics/angular/class/schema.json +++ b/packages/schematics/angular/class/schema.json @@ -10,18 +10,21 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the class.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 6badbcbbbb..8e0b65d7bb 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -28,7 +28,7 @@ describe('Component Schematic', () => { spec: true, module: undefined, export: false, - prefix: undefined, + prefix: 'app', }; let appTree: Tree; @@ -175,18 +175,6 @@ describe('Component Schematic', () => { expect(files.indexOf(`${root}.ts`)).toBeGreaterThanOrEqual(0); }); - it('should handle ".." in a path', () => { - const options = { ...defaultOptions, path: 'app/a/../c' }; - - const tree = schematicRunner.runSchematic('component', options, appTree); - const files = tree.files; - const root = `/src/app/c/foo/foo.component`; - expect(files.indexOf(`${root}.css`)).toBeGreaterThanOrEqual(0); - expect(files.indexOf(`${root}.html`)).toBeGreaterThanOrEqual(0); - expect(files.indexOf(`${root}.spec.ts`)).toBeGreaterThanOrEqual(0); - expect(files.indexOf(`${root}.ts`)).toBeGreaterThanOrEqual(0); - }); - it('should use the prefix', () => { const options = { ...defaultOptions, prefix: 'pre' }; @@ -196,7 +184,7 @@ describe('Component Schematic', () => { }); it('should not use a prefix if none is passed', () => { - const options = { ...defaultOptions, prefix: '' }; + const options = { ...defaultOptions, prefix: undefined }; const tree = schematicRunner.runSchematic('component', options, appTree); const content = getFileContent(tree, '/src/app/foo/foo.component.ts'); diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 990a30665a..7479112b38 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -6,12 +6,14 @@ "properties": { "path": { "type": "string", + "format": "path", "description": "The path to create the component.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "alias": "sd", @@ -19,6 +21,7 @@ }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, @@ -53,8 +56,8 @@ }, "prefix": { "type": "string", + "format": "html-selector", "description": "The prefix to apply to generated selectors.", - "default": "app", "alias": "p" }, "styleext": { @@ -79,6 +82,7 @@ }, "selector": { "type": "string", + "format": "html-selector", "description": "The selector to use for the component." }, "module": { diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index eb4e3e4c5d..ce8de2a228 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -10,23 +10,27 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the directive.", "default": "app", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, "prefix": { "type": "string", + "format": "html-selector", "description": "The prefix to apply to generated selectors.", "default": "app", "alias": "p" }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false @@ -43,6 +47,7 @@ }, "selector": { "type": "string", + "format": "html-selector", "description": "The selector to use for the directive." }, "flat": { diff --git a/packages/schematics/angular/enum/schema.json b/packages/schematics/angular/enum/schema.json index dc5dc5ccf3..c30c95ee5d 100644 --- a/packages/schematics/angular/enum/schema.json +++ b/packages/schematics/angular/enum/schema.json @@ -10,18 +10,21 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the enum.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false } diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index 614e286da3..14b3a441fc 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -21,23 +21,25 @@ "module": { "type": "string", "description": "Allows specification of the declaring module.", - "alias": "m", - "subtype": "filepath" + "alias": "m" }, "path": { "type": "string", + "format": "path", "description": "The path to create the guard.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false } diff --git a/packages/schematics/angular/interface/schema.json b/packages/schematics/angular/interface/schema.json index 62765b2820..3403e12d23 100644 --- a/packages/schematics/angular/interface/schema.json +++ b/packages/schematics/angular/interface/schema.json @@ -10,18 +10,21 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the interface.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index 5dc35b6224..c124c2184f 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -10,18 +10,21 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the module.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, diff --git a/packages/schematics/angular/pipe/schema.json b/packages/schematics/angular/pipe/schema.json index 505eef4a25..009fe827cf 100644 --- a/packages/schematics/angular/pipe/schema.json +++ b/packages/schematics/angular/pipe/schema.json @@ -10,18 +10,21 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the pipe.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, @@ -44,8 +47,7 @@ "type": "string", "default": "", "description": "Allows specification of the declaring module.", - "alias": "m", - "subtype": "filepath" + "alias": "m" }, "export": { "type": "boolean", diff --git a/packages/schematics/angular/service/schema.json b/packages/schematics/angular/service/schema.json index 082ef3c672..400f3939d8 100644 --- a/packages/schematics/angular/service/schema.json +++ b/packages/schematics/angular/service/schema.json @@ -10,18 +10,21 @@ }, "path": { "type": "string", + "format": "path", "description": "The path to create the service.", "default": "app", "visible": false }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "visible": false }, "appRoot": { "type": "string", + "format": "path", "description": "The root of the application.", "visible": false }, @@ -39,8 +42,7 @@ "type": "string", "default": "", "description": "Allows specification of the providing module.", - "alias": "m", - "subtype": "filepath" + "alias": "m" } }, "required": [ diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 07b7a705d4..d591e53cb1 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -26,8 +26,7 @@ describe('Universal Schematic', () => { beforeEach(() => { const appOptions: ApplicationOptions = { directory: '', - name: 'app', - prefix: '', + name: 'universal-app', sourceDir: 'src', inlineStyle: false, inlineTemplate: false, @@ -63,7 +62,7 @@ describe('Universal Schematic', () => { const file = tree.files.filter(f => f === filePath)[0]; expect(file).toBeDefined(); const contents = tree.read(filePath); - expect(contents).toMatch(/\"outDir\": \"\.\.\/dist-server\/\"/); + expect(contents).toMatch(/\"outDir\": \"\.\.\/dist-server\"/); }); it('should add dependency: @angular/platform-server', () => { @@ -83,7 +82,7 @@ describe('Universal Schematic', () => { const app = config.apps[1]; expect(app.platform).toEqual('server'); expect(app.root).toEqual('src'); - expect(app.outDir).toEqual('dist-server/'); + expect(app.outDir).toEqual('dist-server'); expect(app.index).toEqual('index.html'); expect(app.main).toEqual('main.server.ts'); expect(app.test).toEqual('test.ts'); diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index d6ce90f041..ad8d3cd4c5 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -15,31 +15,37 @@ }, "appId": { "type": "string", + "format": "app-name", "description": "The appId to use withServerTransition.", "default": "serverApp" }, "outDir": { "type": "string", + "format": "path", "description": "The output directory for build results.", - "default": "dist-server/" + "default": "dist-server" }, "root": { "type": "string", + "format": "path", "description": "The root directory of the app.", "default": "src" }, "index": { "type": "string", + "format": "path", "description": "Name of the index file", "default": "index.html" }, "main": { "type": "string", + "format": "path", "description": "The name of the main entry-point file.", "default": "main.server.ts" }, "test": { "type": "string", + "format": "path", "description": "The name of the test entry-point file." }, "tsconfigFileName": { @@ -49,16 +55,19 @@ }, "testTsconfigFileName": { "type": "string", + "format": "path", "description": "The name of the TypeScript configuration file for tests.", "default": "tsconfig.spec" }, "appDir": { "type": "string", + "format": "path", "description": "The name of the application directory.", "default": "app" }, "rootModuleFileName": { "type": "string", + "format": "path", "description": "The name of the root module file", "default": "app.server.module.ts" }, @@ -69,6 +78,7 @@ }, "sourceDir": { "type": "string", + "format": "path", "description": "The path of the source directory.", "default": "src", "alias": "sd" From fd7afdecd970a672a10b6cbd2898f697a748ed04 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 2 Jan 2018 10:41:01 +0000 Subject: [PATCH 008/724] refactor(@angular-devkit/schematics): add standardFormats array --- .../schematics/src/formats/index.ts | 16 +++++++++++++--- .../schematics_cli/bin/schematics.ts | 7 +------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/schematics/src/formats/index.ts b/packages/angular_devkit/schematics/src/formats/index.ts index aa8033eefb..fdd30b789e 100644 --- a/packages/angular_devkit/schematics/src/formats/index.ts +++ b/packages/angular_devkit/schematics/src/formats/index.ts @@ -6,6 +6,16 @@ * found in the LICENSE file at https://angular.io/license */ -export * from './app-name'; -export * from './html-selector'; -export * from './path'; +import { schema } from '@angular-devkit/core'; +import { appNameFormat } from './app-name'; +export { appNameFormat } from './app-name'; +import { htmlSelectorFormat } from './html-selector'; +export { htmlSelectorFormat } from './html-selector'; +import { pathFormat } from './path'; +export { pathFormat } from './path'; + +export const standardFormats: schema.SchemaFormat[] = [ + appNameFormat, + htmlSelectorFormat, + pathFormat, +]; diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index bd18e14581..e251a43eb1 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -129,12 +129,7 @@ const engine = new SchematicEngine(engineHost); // Add support for schemaJson. -const schemaFormats = [ - formats.appNameFormat, - formats.htmlSelectorFormat, - formats.pathFormat, -]; -const registry = new schema.CoreSchemaRegistry(schemaFormats); +const registry = new schema.CoreSchemaRegistry(formats.standardFormats); engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); From 783b60e6de7f986b52098e0bfc359559a4a66276 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 2 Jan 2018 10:45:56 +0000 Subject: [PATCH 009/724] docs(@angular-devkit/schematics): document formats --- packages/angular_devkit/schematics/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/schematics/README.md b/packages/angular_devkit/schematics/README.md index 91a5282009..c634d3f191 100644 --- a/packages/angular_devkit/schematics/README.md +++ b/packages/angular_devkit/schematics/README.md @@ -27,6 +27,7 @@ The tooling is responsible for the following tasks: 1. Create the Schematic Engine, and pass in a Collection and Schematic loader. 1. Understand and respect the Schematics metadata and dependencies between collections. Schematics can refer to dependencies, and it's the responsibility of the tool to honor those dependencies. The reference CLI uses NPM packages for its collections. 1. Create the Options object. Options can be anything, but the schematics can specify a JSON Schema that should be respected. The reference CLI, for example, parse the arguments as a JSON object and validate it with the Schema specified by the collection. + 1. Schematics provides some JSON Schema formats for validation that tooling should add. These validate paths, html selectors and app names. Please check the reference CLI for how these can be added. 1. Call the schematics with the original Tree. The tree should represent the initial state of the filesystem. The reference CLI uses the current directory for this. 1. Create a Sink and commit the result of the schematics to the Sink. Many sinks are provided by the library; FileSystemSink and DryRunSink are examples. 1. Output any logs propagated by the library, including debugging information. From e9fa11344df233c1824026d7ee621cb367a2e6c4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 10 Jan 2018 20:40:24 +0000 Subject: [PATCH 010/724] feat(@angular-devkit/schematics): allow any project name --- .../schematics/src/formats/app-name.ts | 22 ------ .../schematics/src/formats/app-name_spec.ts | 69 ------------------- .../schematics/src/formats/index.ts | 3 - .../testing/schematic-test-runner.ts | 7 +- .../schematics/angular/app-shell/schema.json | 6 +- .../angular/application/schema.json | 2 +- .../schematics/angular/universal/schema.json | 2 +- 7 files changed, 6 insertions(+), 105 deletions(-) delete mode 100644 packages/angular_devkit/schematics/src/formats/app-name.ts delete mode 100644 packages/angular_devkit/schematics/src/formats/app-name_spec.ts diff --git a/packages/angular_devkit/schematics/src/formats/app-name.ts b/packages/angular_devkit/schematics/src/formats/app-name.ts deleted file mode 100644 index 1d1761858d..0000000000 --- a/packages/angular_devkit/schematics/src/formats/app-name.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { schema } from '@angular-devkit/core'; -import { htmlSelectorRe } from './html-selector'; - - -const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; - -export const appNameFormat: schema.SchemaFormat = { - name: 'app-name', - formatter: { - async: false, - validate: (appName: string) => htmlSelectorRe.test(appName) - && unsupportedProjectNames.indexOf(appName) === -1, - }, -}; diff --git a/packages/angular_devkit/schematics/src/formats/app-name_spec.ts b/packages/angular_devkit/schematics/src/formats/app-name_spec.ts deleted file mode 100644 index 6098f92c7e..0000000000 --- a/packages/angular_devkit/schematics/src/formats/app-name_spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { appNameFormat } from './app-name'; -import { formatValidator } from './format-validator'; - - -describe('Schematics app name format', () => { - it('accepts correct app name', done => { - const data = { appName: 'my-app' }; - const dataSchema = { - properties: { appName: { type: 'string', format: 'app-name' } }, - }; - - formatValidator(data, dataSchema, [appNameFormat]) - .map(result => expect(result.success).toBe(true)) - .subscribe(done, done.fail); - }); - - it('rejects app name starting with invalid characters', done => { - const data = { appName: 'my-app$' }; - const dataSchema = { - properties: { appName: { type: 'string', format: 'app-name' } }, - }; - - formatValidator(data, dataSchema, [appNameFormat]) - .map(result => expect(result.success).toBe(false)) - .subscribe(done, done.fail); - }); - - it('rejects app name starting with number', done => { - const data = { appName: '1app' }; - const dataSchema = { - properties: { appName: { type: 'string', format: 'app-name' } }, - }; - - formatValidator(data, dataSchema, [appNameFormat]) - .map(result => expect(result.success).toBe(false)) - .subscribe(done, done.fail); - }); - - it('rejects unsupported app names', done => { - const data = { - appName1: 'test', - appName2: 'ember', - appName3: 'ember-cli', - appName4: 'vendor', - appName5: 'app', - }; - const dataSchema = { - properties: { - appName1: { type: 'string', format: 'app-name' }, - appName2: { type: 'string', format: 'app-name' }, - appName3: { type: 'string', format: 'app-name' }, - appName4: { type: 'string', format: 'app-name' }, - appName5: { type: 'string', format: 'app-name' }, - }, - }; - - formatValidator(data, dataSchema, [appNameFormat]) - .map(result => expect(result.success).toBe(false)) - .subscribe(done, done.fail); - }); -}); diff --git a/packages/angular_devkit/schematics/src/formats/index.ts b/packages/angular_devkit/schematics/src/formats/index.ts index fdd30b789e..2cfab19db6 100644 --- a/packages/angular_devkit/schematics/src/formats/index.ts +++ b/packages/angular_devkit/schematics/src/formats/index.ts @@ -7,15 +7,12 @@ */ import { schema } from '@angular-devkit/core'; -import { appNameFormat } from './app-name'; -export { appNameFormat } from './app-name'; import { htmlSelectorFormat } from './html-selector'; export { htmlSelectorFormat } from './html-selector'; import { pathFormat } from './path'; export { pathFormat } from './path'; export const standardFormats: schema.SchemaFormat[] = [ - appNameFormat, htmlSelectorFormat, pathFormat, ]; diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index b09b603513..6a5354bf8d 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -44,12 +44,7 @@ export class SchematicTestRunner { this._engineHost.registerCollection(_collectionName, collectionPath); this._logger = new logging.Logger('test'); - const schemaFormats = [ - formats.appNameFormat, - formats.htmlSelectorFormat, - formats.pathFormat, - ]; - const registry = new schema.CoreSchemaRegistry(schemaFormats); + const registry = new schema.CoreSchemaRegistry(formats.standardFormats); this._engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); this._collection = this._engine.createCollection(this._collectionName); diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index e4b2a8cbf6..cfb3c8d37b 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -22,12 +22,12 @@ "name": { "type": "string", - "format": "app-name", + "format": "html-selector", "description": "Name of the universal app" }, "appId": { "type": "string", - "format": "app-name", + "format": "html-selector", "description": "The appId to use withServerTransition.", "default": "serverApp" }, @@ -86,7 +86,7 @@ }, "rootModuleClassName": { "type": "string", - "format": "app-name", + "format": "html-selector", "description": "The name of the root module class.", "default": "AppServerModule" }, diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index f288630af7..b2239a5e78 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -28,7 +28,7 @@ "name": { "description": "The name of the application.", "type": "string", - "format": "app-name" + "format": "html-selector" }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index ad8d3cd4c5..fa8f3528a8 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -15,7 +15,7 @@ }, "appId": { "type": "string", - "format": "app-name", + "format": "html-selector", "description": "The appId to use withServerTransition.", "default": "serverApp" }, From 20695264b683405403aaa9102653dfc4e4fadd0b Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 10 Jan 2018 20:05:06 -0500 Subject: [PATCH 011/724] build: update source-map dependency. --- package-lock.json | 917 +++++++++++------- package.json | 2 +- .../tools/file-system-engine-host-base.ts | 7 +- 3 files changed, 563 insertions(+), 363 deletions(-) diff --git a/package-lock.json b/package-lock.json index abebd35541..f61079c9cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,19 @@ "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, + "@types/events": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", + "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==" + }, "@types/glob": { - "version": "5.0.33", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.33.tgz", - "integrity": "sha512-BcD4yyWz+qmCggaYMSFF0Xn7GkO6tgwm3Fh9Gxk/kQmEU3Z7flQTnVlMyKBUNvXXNTCCyjqK4XT4/2hLd1gQ2A==", + "version": "5.0.34", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", + "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", "requires": { - "@types/minimatch": "3.0.1", - "@types/node": "6.0.90" + "@types/events": "1.1.0", + "@types/minimatch": "3.0.3", + "@types/node": "6.0.96" } }, "@types/istanbul": { @@ -24,14 +30,14 @@ "integrity": "sha1-KcjLt0esVygJZVRdxYUUug27ma8=" }, "@types/jasmine": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.6.2.tgz", - "integrity": "sha512-MycZLb931+dfAUzz27JeIOrvKjqyWUk27PhJzYWpIJ9nEyPi2bb1AOc/X9bvmvYnekpNrGNqYXwvoXMmpaeoCw==" + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.3.tgz", + "integrity": "sha512-BN0ho2/U55Td9k8RT2KqonDNmWZHTl1crIk8GIh+xNeCw8A60GMCIKN5a6u/Voz3pF3zzl3Ui+ldGrGxCSsYQw==" }, "@types/minimatch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.1.tgz", - "integrity": "sha512-rUO/jz10KRSyA9SHoCWQ8WX9BICyj5jZYu1/ucKEJKb4KzLZCKMURdYbadP157Q6Zl1x0vHsrU+Z/O0XlhYQDw==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/minimist": { "version": "1.2.0", @@ -39,9 +45,9 @@ "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" }, "@types/node": { - "version": "6.0.90", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.90.tgz", - "integrity": "sha512-tXoGRVdi7wZX7P1VWoV9Wfk0uYDOAHdEYXAttuWgSrN76Q32wQlSrMX0Rgyv3RTEaQY2ZLQrzYHVM2e8rfo8sA==" + "version": "6.0.96", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.96.tgz", + "integrity": "sha512-fsOOY6tMQ3jCB2wD51XFDmmpgm4wVKkJECdcVRqapbJEa7awJDcr+SaH8toz+4r4KW8YQ3M7ybXMoSDo1QGewA==" }, "@types/semver": { "version": "5.4.0", @@ -64,37 +70,51 @@ "integrity": "sha512-pclMAvhPnXJcJu1ZZ8bQthuUcdDWzDuxDdbSf6l1U6s4fP6EBiZpPsOZYqFOrbqDV97sXGFSsb6AUpiLfv4xIA==" }, "@types/uglify-js": { - "version": "2.6.29", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-2.6.29.tgz", - "integrity": "sha512-BdFLCZW0GTl31AbqXSak8ss/MqEZ3DN2MH9rkAyGoTuzK7ifGUlX+u0nfbWeTsa7IPcZhtn8BlpYBXSV+vqGhQ==", + "version": "2.6.30", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-2.6.30.tgz", + "integrity": "sha512-NjiBNGFl58vHJeijl63w1fWRIjLnrfOvimsXF5b3lTzEzkTV1BnVsbqQeLejg54upsHPWIF63aiub5TEwH619A==", "requires": { - "@types/source-map": "0.5.2" + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "@types/webpack": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-3.0.14.tgz", - "integrity": "sha512-HkN9be7+47PsMH+WjnhtoOpypaUgmpgggwL/P0r8fT7mzuw7c4cpho8eTsnrMz9Fdj35TBnqRcuxG/U7ZcDRJg==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-3.8.2.tgz", + "integrity": "sha512-q0MGM3Zfi63YQmj45j2pbfJ98GBbzVjMbJORe+O3T7X6aCyvJOd9e1fYsOPfwqpqD8Q/CfjyZOJmC/jE1WyYHg==", "requires": { - "@types/node": "6.0.90", + "@types/node": "6.0.96", "@types/tapable": "0.2.4", - "@types/uglify-js": "2.6.29" + "@types/uglify-js": "2.6.30" } }, "@types/webpack-sources": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.3.tgz", - "integrity": "sha512-yS052yVjjyIjwcUqIEe2+JxbWsw27OM8UFb1fLUGacGYtqMRwgAx2qk41VTE/nPMjw/xfD0JiHPD0Q99dlrInA==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.4.tgz", + "integrity": "sha512-IMdz6ipvym7Vag2a1pkfGqONZDE84+RRqeAZxGEFvBq2el82ymla4qvUVQt6+Kj+3OLRDeHnc2jCiSYAlPnHCw==", "requires": { - "@types/node": "6.0.90", + "@types/node": "6.0.96", "@types/source-list-map": "0.1.2", - "@types/source-map": "0.5.2" + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", "requires": { "jsonparse": "1.3.1", "through": "2.3.8" @@ -106,9 +126,9 @@ "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" }, "ajv": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz", - "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { "co": "4.6.0", "fast-deep-equal": "1.0.0", @@ -141,7 +161,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "requires": { - "color-convert": "1.9.0" + "color-convert": "1.9.1" } }, "anymatch": { @@ -461,9 +481,9 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "color-convert": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", - "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "requires": { "color-name": "1.1.3" } @@ -487,9 +507,9 @@ } }, "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, "compare-func": { "version": "1.3.2", @@ -511,59 +531,59 @@ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, "conventional-changelog": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.6.tgz", - "integrity": "sha512-AaQRALJYQVbfMs0UYJ3jf5yIAJwGnm/E7ETwzZMwF/3JDMyDaa4agLQomz94pcYiGH7zcrxFcwHApSODOYnunA==", - "requires": { - "conventional-changelog-angular": "1.5.1", - "conventional-changelog-atom": "0.1.1", - "conventional-changelog-codemirror": "0.2.0", - "conventional-changelog-core": "1.9.2", - "conventional-changelog-ember": "0.2.8", - "conventional-changelog-eslint": "0.2.0", - "conventional-changelog-express": "0.2.0", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.7.tgz", + "integrity": "sha1-kVGmKx2O2y2CcR2r9bfPcQQfgrE=", + "requires": { + "conventional-changelog-angular": "1.6.0", + "conventional-changelog-atom": "0.1.2", + "conventional-changelog-codemirror": "0.2.1", + "conventional-changelog-core": "1.9.5", + "conventional-changelog-ember": "0.2.10", + "conventional-changelog-eslint": "0.2.1", + "conventional-changelog-express": "0.2.1", "conventional-changelog-jquery": "0.1.0", "conventional-changelog-jscs": "0.1.0", - "conventional-changelog-jshint": "0.2.0" + "conventional-changelog-jshint": "0.2.1" } }, "conventional-changelog-angular": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.5.1.tgz", - "integrity": "sha512-AnjnPyqHp8yR2IOWsXYOCv6Ly0WC2rLRK04fgAS/5QoA3ovYLSoz9PKB5pcSG3M9lAf40IqZwU3R3G6Hy7XCSA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.0.tgz", + "integrity": "sha1-CiagcfLJ/PzyuGugz79uYwG3W/o=", "requires": { "compare-func": "1.3.2", "q": "1.5.1" } }, "conventional-changelog-atom": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz", - "integrity": "sha512-6Nlu/+MiD4gi7k3Z+N1vMJWpaPSdvFPWzPGnH4OXewHAxiAl0L/TT9CGgA01fosPxmYr4hMNtD7kyN0tkg8vIA==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.1.2.tgz", + "integrity": "sha1-Ella1SZ6aTfDTPkAKBscZRmKTGM=", "requires": { "q": "1.5.1" } }, "conventional-changelog-codemirror": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz", - "integrity": "sha512-jUbY98JoKdAOR5k3pOBiKZ+Iz9t2F84hL7x4WjSRW6x7FdeCEUOjyfml+YClE2h/h62Tf3mwur5jSO8upxxc1g==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.1.tgz", + "integrity": "sha1-KZpPcUe681DmyBWPxUlUopHFzAk=", "requires": { "q": "1.5.1" } }, "conventional-changelog-core": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-1.9.2.tgz", - "integrity": "sha512-L/boGKXaKWrlCU8bHa1QM36Pb/JopCPmekj5SFqqAuBfjya860xX2fAC5Ggelse++Bw39AZ2NrHwBnJrdwLlLw==", + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-1.9.5.tgz", + "integrity": "sha1-XbdWba18DLddr0f7spdve/mSjB0=", "requires": { - "conventional-changelog-writer": "2.0.1", - "conventional-commits-parser": "2.0.0", + "conventional-changelog-writer": "2.0.3", + "conventional-commits-parser": "2.1.0", "dateformat": "1.0.12", "get-pkg-repo": "1.4.0", - "git-raw-commits": "1.2.0", + "git-raw-commits": "1.3.0", "git-remote-origin-url": "2.0.0", - "git-semver-tags": "1.2.2", + "git-semver-tags": "1.2.3", "lodash": "4.17.4", "normalize-package-data": "2.4.0", "q": "1.5.1", @@ -573,25 +593,25 @@ } }, "conventional-changelog-ember": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.2.8.tgz", - "integrity": "sha512-smsh0o/S95n22lrQZrSHYjJrxIGoFl+OFHK+q2KGHA2zRFrW7QilYM7VUjgmB+emzwqFguPjrq+D2U8iPhMNJg==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.2.10.tgz", + "integrity": "sha512-LBBBZO6Q7ib4HhSdyCNVR25OtaXl710UJg1aSHCLmR8AjuXKs3BO8tnbY1MH+D1C+z5IFoEDkpjOddefNTyhCQ==", "requires": { "q": "1.5.1" } }, "conventional-changelog-eslint": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz", - "integrity": "sha512-WGKnC0bGPD6BHGiRBfYqNGfy6DZDn2jGs1yxPRT8I2796wYdGqsbDF4477o4fdsxUJvckoW2OFPqkmRMQaCHSA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.1.tgz", + "integrity": "sha1-LCoRvrIW+AZJunKDQYApO2h8BmI=", "requires": { "q": "1.5.1" } }, "conventional-changelog-express": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz", - "integrity": "sha512-ujSEmbWfozC1iIjH5Pl7AKtREowvAl10whs1q6c7nZLnoNZK5CmdB2PQ/V42O6rCgUzaLX+ACRW2+g0A/Htqvw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.2.1.tgz", + "integrity": "sha1-g42eHmyQmXA7FQucGaoteBdCvWw=", "requires": { "q": "1.5.1" } @@ -613,21 +633,21 @@ } }, "conventional-changelog-jshint": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz", - "integrity": "sha512-uUP4c0et6F2teapl+YY2JHFAHD401U5CkgI+P8PyU0y1zS8BdBy6EnhqgZEXhFOp9fPzUdic+Wv/9alOqw3agQ==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.1.tgz", + "integrity": "sha1-hhObs6yZiZ8rF36WF+CbN9mbzzo=", "requires": { "compare-func": "1.3.2", "q": "1.5.1" } }, "conventional-changelog-writer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz", - "integrity": "sha512-X4qC758celQOKw0iUPAsH5sJX6fH6N5dboFc3elXb1/SIKhsYMukhhaxWmxRdtVUSqGt9rZg8giwBQG5B2GeKg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-2.0.3.tgz", + "integrity": "sha512-2E1h7UXL0fhRO5h0CxDZ5EBc5sfBZEQePvuZ+gPvApiRrICUyNDy/NQIP+2TBd4wKZQf2Zm7TxbzXHG5HkPIbA==", "requires": { "compare-func": "1.3.2", - "conventional-commits-filter": "1.0.0", + "conventional-commits-filter": "1.1.1", "dateformat": "1.0.12", "handlebars": "4.0.11", "json-stringify-safe": "5.0.1", @@ -639,20 +659,20 @@ } }, "conventional-commits-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz", - "integrity": "sha1-b8KmWTcrw/IznPn//34bA0S5MDk=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.1.tgz", + "integrity": "sha512-bQyatySNKHhcaeKVr9vFxYWA1W1Tdz6ybVMYDmv4/FhOXY1+fchiW07TzRbIQZhVa4cvBwrEaEUQBbCncFSdJQ==", "requires": { "is-subset": "0.1.1", "modify-values": "1.0.0" } }, "conventional-commits-parser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz", - "integrity": "sha512-8od6g684Fhi5Vpp4ABRv/RBsW1AY6wSHbJHEK6FGTv+8jvAAnlABniZu/FVmX9TcirkHepaEsa1QGkRvbg0CKw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.0.tgz", + "integrity": "sha512-8MD05yN0Zb6aRsZnFX1ET+8rHWfWJk+my7ANCJZBU2mhz7TSB1fk2vZhkrwVy/PCllcTYAP/1T1NiWQ7Z01mKw==", "requires": { - "JSONStream": "1.3.1", + "JSONStream": "1.3.2", "is-text-path": "1.0.1", "lodash": "4.17.4", "meow": "3.7.0", @@ -766,6 +786,11 @@ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "diff": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", @@ -807,9 +832,9 @@ } }, "es-abstract": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.9.0.tgz", - "integrity": "sha512-kk3IJoKo7A3pWJc0OV8yZ/VEX2oSUytfekrJiqoxBlKJMFAJVJVpGdHClCCTdv+Fn2zHfpDHHIelMFhZVfef3Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", + "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", "requires": { "es-to-primitive": "1.1.1", "function-bind": "1.1.1", @@ -1024,7 +1049,7 @@ "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", "optional": true, "requires": { - "nan": "2.7.0", + "nan": "2.8.0", "node-pre-gyp": "0.6.39" }, "dependencies": { @@ -1881,9 +1906,9 @@ } }, "git-raw-commits": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.2.0.tgz", - "integrity": "sha1-DzqL/ZmuDy2LkiTViJKXXppS0Dw=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.0.tgz", + "integrity": "sha1-C8hZbpDV/+c29/VUa9LRL3OrqsY=", "requires": { "dargs": "4.1.0", "lodash.template": "4.4.0", @@ -1902,9 +1927,9 @@ } }, "git-semver-tags": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.2.tgz", - "integrity": "sha512-fhINopzKBQ8m6YlQt7gPf6T6hFnTF84O7U+8kYJmfjjKk7gbmKGj+BLcKNWi+japPbBwCeXXnfKwThpJpR9ZnQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.3.tgz", + "integrity": "sha1-GItFOIK/nXojr9Mbq6U32rc4jV0=", "requires": { "meow": "3.7.0", "semver": "5.4.1" @@ -1915,7 +1940,7 @@ "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", "requires": { - "ini": "1.3.4" + "ini": "1.3.5" } }, "glob": { @@ -1984,7 +2009,19 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "requires": { + "ajv": "4.11.8", "har-schema": "1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + } } }, "has": { @@ -2067,9 +2104,9 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "is-arrayish": { "version": "0.2.1", @@ -2326,6 +2363,11 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, + "json-parse-better-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", + "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==" + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -2336,6 +2378,14 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -2470,9 +2520,9 @@ } }, "make-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz", - "integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.2.tgz", + "integrity": "sha512-l9ra35l5VWLF24y75Tg8XgfGLX0ueRhph118WKM6H5denx4bB5QF59+4UAm9oJ2qsPQZas/CQUDdtDdfvYHBdQ==" }, "map-obj": { "version": "1.0.1", @@ -2484,36 +2534,10 @@ "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" }, - "memory-streams": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/memory-streams/-/memory-streams-0.1.2.tgz", - "integrity": "sha1-Jz/3d6tg/sWZsRY1UlUoLMosUMI=", - "requires": { - "readable-stream": "1.0.34" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" }, "meow": { "version": "3.7.0", @@ -2594,9 +2618,9 @@ } }, "minizlib": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.4.tgz", - "integrity": "sha512-sN4U9tIJtBRwKbwgFh9qJfrPIQ/GGTRr1MGqkgOeMTLy8/lM0FcWU//FqlnZ3Vb7gJ+Mxh3FOg1EklibdajbaQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "requires": { "minipass": "2.2.1" } @@ -2627,20 +2651,21 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" }, "node-pre-gyp": { - "version": "0.6.38", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.38.tgz", - "integrity": "sha1-6Sog+DQWQVu0CG9tH7eLPac9ET0=", + "version": "0.6.39", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", + "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", "requires": { + "detect-libc": "1.0.3", "hawk": "3.1.3", "mkdirp": "0.5.1", "nopt": "4.0.1", "npmlog": "4.1.2", - "rc": "1.2.2", + "rc": "1.2.3", "request": "2.81.0", "rimraf": "2.6.2", "semver": "5.4.1", @@ -2705,9 +2730,9 @@ } }, "npm": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/npm/-/npm-5.5.1.tgz", - "integrity": "sha512-M3aO8EjHebaCw6uur4C86SZqkypnoaEVo5R63FEEU0dw9wLxf/JlwWtJItShYVyQS2WDxG2It10GEe5GmVEM2Q==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz", + "integrity": "sha512-mt839mCsI5hzdBJLf1iRBwt610P35iUfvqLVuL7VFdanUwRBAmGtbsjdGIuzegplR95xx+fTHE0vBMuMJp1sLQ==", "requires": { "JSONStream": "1.3.1", "abbrev": "1.1.1", @@ -2716,8 +2741,9 @@ "ansistyles": "0.1.3", "aproba": "1.2.0", "archy": "1.0.0", - "bluebird": "3.5.0", - "cacache": "9.2.9", + "bin-links": "1.1.0", + "bluebird": "3.5.1", + "cacache": "10.0.1", "call-limit": "1.1.0", "chownr": "1.0.1", "cli-table2": "0.2.0", @@ -2728,8 +2754,10 @@ "detect-indent": "5.0.0", "dezalgo": "1.0.3", "editor": "1.0.0", + "find-npm-prefix": "1.0.1", "fs-vacuum": "1.2.10", "fs-write-stream-atomic": "1.0.10", + "gentle-fs": "2.0.1", "glob": "7.1.2", "graceful-fs": "4.1.11", "has-unicode": "2.0.1", @@ -2742,7 +2770,7 @@ "init-package-json": "1.10.1", "is-cidr": "1.0.0", "lazy-property": "1.0.0", - "libnpx": "9.6.0", + "libnpx": "9.7.1", "lockfile": "1.0.3", "lodash._baseindexof": "3.1.0", "lodash._baseuniq": "4.6.0", @@ -2760,26 +2788,25 @@ "mississippi": "1.3.0", "mkdirp": "0.5.1", "move-concurrently": "1.0.1", - "node-gyp": "3.6.2", "nopt": "4.0.1", "normalize-package-data": "2.4.0", "npm-cache-filename": "1.0.2", "npm-install-checks": "3.0.0", - "npm-lifecycle": "1.0.3", - "npm-package-arg": "5.1.2", - "npm-packlist": "1.1.9", - "npm-profile": "2.0.4", + "npm-lifecycle": "2.0.0", + "npm-package-arg": "6.0.0", + "npm-packlist": "1.1.10", + "npm-profile": "2.0.5", "npm-registry-client": "8.5.0", "npm-user-validate": "1.0.0", "npmlog": "4.1.2", "once": "1.4.0", "opener": "1.4.3", "osenv": "0.1.4", - "pacote": "6.0.2", + "pacote": "7.0.2", "path-is-inside": "1.0.2", "promise-inflight": "1.0.1", "qrcode-terminal": "0.11.0", - "query-string": "5.0.0", + "query-string": "5.0.1", "qw": "1.0.1", "read": "1.0.7", "read-cmd-shim": "1.0.1", @@ -2797,20 +2824,20 @@ "slide": "1.1.6", "sorted-object": "2.0.1", "sorted-union-stream": "2.1.3", - "ssri": "4.1.6", + "ssri": "5.0.0", "strip-ansi": "4.0.0", - "tar": "4.0.1", + "tar": "4.0.2", "text-table": "0.2.0", "uid-number": "0.0.6", "umask": "1.1.0", "unique-filename": "1.1.0", "unpipe": "1.0.0", - "update-notifier": "2.2.0", + "update-notifier": "2.3.0", "uuid": "3.1.0", "validate-npm-package-license": "3.0.1", "validate-npm-package-name": "3.0.0", "which": "1.3.0", - "worker-farm": "1.5.0", + "worker-farm": "1.5.1", "wrappy": "1.0.2", "write-file-atomic": "2.1.0" }, @@ -2857,15 +2884,27 @@ "version": "1.0.0", "bundled": true }, + "bin-links": { + "version": "1.1.0", + "bundled": true, + "requires": { + "bluebird": "3.5.1", + "cmd-shim": "2.0.2", + "fs-write-stream-atomic": "1.0.10", + "gentle-fs": "2.0.1", + "graceful-fs": "4.1.11", + "slide": "1.1.6" + } + }, "bluebird": { - "version": "3.5.0", + "version": "3.5.1", "bundled": true }, "cacache": { - "version": "9.2.9", + "version": "10.0.1", "bundled": true, "requires": { - "bluebird": "3.5.0", + "bluebird": "3.5.1", "chownr": "1.0.1", "glob": "7.1.2", "graceful-fs": "4.1.11", @@ -2875,27 +2914,16 @@ "move-concurrently": "1.0.1", "promise-inflight": "1.0.1", "rimraf": "2.6.2", - "ssri": "4.1.6", + "ssri": "5.0.0", "unique-filename": "1.1.0", "y18n": "3.2.1" }, "dependencies": { - "lru-cache": { - "version": "4.1.1", + "ssri": { + "version": "5.0.0", "bundled": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - }, - "dependencies": { - "pseudomap": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true - } + "safe-buffer": "5.1.1" } }, "y18n": { @@ -3066,6 +3094,10 @@ "version": "1.0.0", "bundled": true }, + "find-npm-prefix": { + "version": "1.0.1", + "bundled": true + }, "fs-vacuum": { "version": "1.2.10", "bundled": true, @@ -3085,6 +3117,20 @@ "readable-stream": "2.3.3" } }, + "gentle-fs": { + "version": "2.0.1", + "bundled": true, + "requires": { + "aproba": "1.2.0", + "fs-vacuum": "1.2.10", + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "path-is-inside": "1.0.2", + "read-cmd-shim": "1.0.1", + "slide": "1.1.6" + } + }, "glob": { "version": "7.1.2", "bundled": true, @@ -3184,6 +3230,16 @@ "validate-npm-package-name": "3.0.0" }, "dependencies": { + "npm-package-arg": { + "version": "5.1.2", + "bundled": true, + "requires": { + "hosted-git-info": "2.5.0", + "osenv": "0.1.4", + "semver": "5.4.1", + "validate-npm-package-name": "3.0.0" + } + }, "promzard": { "version": "0.3.0", "bundled": true, @@ -3211,14 +3267,14 @@ "bundled": true }, "libnpx": { - "version": "9.6.0", + "version": "9.7.1", "bundled": true, "requires": { "dotenv": "4.0.0", "npm-package-arg": "5.1.2", "rimraf": "2.6.2", "safe-buffer": "5.1.1", - "update-notifier": "2.2.0", + "update-notifier": "2.3.0", "which": "1.3.0", "y18n": "3.2.1", "yargs": "8.0.2" @@ -3228,6 +3284,16 @@ "version": "4.0.0", "bundled": true }, + "npm-package-arg": { + "version": "5.1.2", + "bundled": true, + "requires": { + "hosted-git-info": "2.5.0", + "osenv": "0.1.4", + "semver": "5.4.1", + "validate-npm-package-name": "3.0.0" + } + }, "y18n": { "version": "3.2.1", "bundled": true @@ -3838,7 +3904,7 @@ "bundled": true, "requires": { "aproba": "1.2.0", - "copy-concurrently": "1.0.3", + "copy-concurrently": "1.0.5", "fs-write-stream-atomic": "1.0.10", "mkdirp": "0.5.1", "rimraf": "2.6.2", @@ -3846,7 +3912,7 @@ }, "dependencies": { "copy-concurrently": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "requires": { "aproba": "1.2.0", @@ -3998,18 +4064,31 @@ } }, "npm-lifecycle": { - "version": "1.0.3", + "version": "2.0.0", "bundled": true, "requires": { + "byline": "5.0.0", "graceful-fs": "4.1.11", + "node-gyp": "3.6.2", + "resolve-from": "4.0.0", "slide": "1.1.6", "uid-number": "0.0.6", "umask": "1.1.0", "which": "1.3.0" + }, + "dependencies": { + "byline": { + "version": "5.0.0", + "bundled": true + }, + "resolve-from": { + "version": "4.0.0", + "bundled": true + } } }, "npm-package-arg": { - "version": "5.1.2", + "version": "6.0.0", "bundled": true, "requires": { "hosted-git-info": "2.5.0", @@ -4019,15 +4098,15 @@ } }, "npm-packlist": { - "version": "1.1.9", + "version": "1.1.10", "bundled": true, "requires": { - "ignore-walk": "3.0.0", + "ignore-walk": "3.0.1", "npm-bundled": "1.0.3" }, "dependencies": { "ignore-walk": { - "version": "3.0.0", + "version": "3.0.1", "bundled": true, "requires": { "minimatch": "3.0.4" @@ -4069,7 +4148,7 @@ } }, "npm-profile": { - "version": "2.0.4", + "version": "2.0.5", "bundled": true, "requires": { "aproba": "1.2.0", @@ -4081,8 +4160,8 @@ "bundled": true, "requires": { "agentkeepalive": "3.3.0", - "cacache": "9.2.9", - "http-cache-semantics": "3.7.3", + "cacache": "9.3.0", + "http-cache-semantics": "3.8.0", "http-proxy-agent": "2.0.0", "https-proxy-agent": "2.1.0", "lru-cache": "4.1.1", @@ -4115,8 +4194,33 @@ } } }, + "cacache": { + "version": "9.3.0", + "bundled": true, + "requires": { + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.1", + "mississippi": "1.3.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "4.1.6", + "unique-filename": "1.1.0", + "y18n": "3.2.1" + }, + "dependencies": { + "y18n": { + "version": "3.2.1", + "bundled": true + } + } + }, "http-cache-semantics": { - "version": "3.7.3", + "version": "3.8.0", "bundled": true }, "http-proxy-agent": { @@ -4300,6 +4404,13 @@ } } } + }, + "ssri": { + "version": "4.1.6", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } } } } @@ -4336,6 +4447,23 @@ "bundled": true } } + }, + "npm-package-arg": { + "version": "5.1.2", + "bundled": true, + "requires": { + "hosted-git-info": "2.5.0", + "osenv": "0.1.4", + "semver": "5.4.1", + "validate-npm-package-name": "3.0.0" + } + }, + "ssri": { + "version": "4.1.6", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } } } }, @@ -4479,47 +4607,52 @@ } }, "pacote": { - "version": "6.0.2", + "version": "7.0.2", "bundled": true, "requires": { - "bluebird": "3.5.0", - "cacache": "9.2.9", + "bluebird": "3.5.1", + "cacache": "10.0.1", + "get-stream": "3.0.0", "glob": "7.1.2", "lru-cache": "4.1.1", - "make-fetch-happen": "2.5.0", + "make-fetch-happen": "2.6.0", "minimatch": "3.0.4", "mississippi": "1.3.0", "normalize-package-data": "2.4.0", - "npm-package-arg": "5.1.2", - "npm-packlist": "1.1.9", - "npm-pick-manifest": "1.0.4", + "npm-package-arg": "6.0.0", + "npm-packlist": "1.1.10", + "npm-pick-manifest": "2.1.0", "osenv": "0.1.4", "promise-inflight": "1.0.1", "promise-retry": "1.1.1", "protoduck": "4.0.0", "safe-buffer": "5.1.1", "semver": "5.4.1", - "ssri": "4.1.6", - "tar": "4.0.1", + "ssri": "5.0.0", + "tar": "4.0.2", "unique-filename": "1.1.0", "which": "1.3.0" }, "dependencies": { + "get-stream": { + "version": "3.0.0", + "bundled": true + }, "make-fetch-happen": { - "version": "2.5.0", + "version": "2.6.0", "bundled": true, "requires": { "agentkeepalive": "3.3.0", - "cacache": "9.2.9", - "http-cache-semantics": "3.7.3", + "cacache": "10.0.1", + "http-cache-semantics": "3.8.0", "http-proxy-agent": "2.0.0", "https-proxy-agent": "2.1.0", "lru-cache": "4.1.1", "mississippi": "1.3.0", "node-fetch-npm": "2.0.2", "promise-retry": "1.1.1", - "socks-proxy-agent": "3.0.0", - "ssri": "4.1.6" + "socks-proxy-agent": "3.0.1", + "ssri": "5.0.0" }, "dependencies": { "agentkeepalive": { @@ -4545,19 +4678,19 @@ } }, "http-cache-semantics": { - "version": "3.7.3", + "version": "3.8.0", "bundled": true }, "http-proxy-agent": { "version": "2.0.0", "bundled": true, "requires": { - "agent-base": "4.1.1", - "debug": "2.6.8" + "agent-base": "4.1.2", + "debug": "2.6.9" }, "dependencies": { "agent-base": { - "version": "4.1.1", + "version": "4.1.2", "bundled": true, "requires": { "es6-promisify": "5.0.0" @@ -4579,7 +4712,7 @@ } }, "debug": { - "version": "2.6.8", + "version": "2.6.9", "bundled": true, "requires": { "ms": "2.0.0" @@ -4597,12 +4730,12 @@ "version": "2.1.0", "bundled": true, "requires": { - "agent-base": "4.1.1", - "debug": "2.6.8" + "agent-base": "4.1.2", + "debug": "2.6.9" }, "dependencies": { "agent-base": { - "version": "4.1.1", + "version": "4.1.2", "bundled": true, "requires": { "es6-promisify": "5.0.0" @@ -4624,7 +4757,7 @@ } }, "debug": { - "version": "2.6.8", + "version": "2.6.9", "bundled": true, "requires": { "ms": "2.0.0" @@ -4651,11 +4784,11 @@ "version": "0.1.12", "bundled": true, "requires": { - "iconv-lite": "0.4.18" + "iconv-lite": "0.4.19" }, "dependencies": { "iconv-lite": { - "version": "0.4.18", + "version": "0.4.19", "bundled": true } } @@ -4667,15 +4800,15 @@ } }, "socks-proxy-agent": { - "version": "3.0.0", + "version": "3.0.1", "bundled": true, "requires": { - "agent-base": "4.1.1", + "agent-base": "4.1.2", "socks": "1.1.10" }, "dependencies": { "agent-base": { - "version": "4.1.1", + "version": "4.1.2", "bundled": true, "requires": { "es6-promisify": "5.0.0" @@ -4746,10 +4879,10 @@ } }, "npm-pick-manifest": { - "version": "1.0.4", + "version": "2.1.0", "bundled": true, "requires": { - "npm-package-arg": "5.1.2", + "npm-package-arg": "6.0.0", "semver": "5.4.1" } }, @@ -4795,7 +4928,7 @@ "bundled": true }, "query-string": { - "version": "5.0.0", + "version": "5.0.1", "bundled": true, "requires": { "decode-uri-component": "0.2.0", @@ -5380,7 +5513,7 @@ } }, "ssri": { - "version": "4.1.6", + "version": "5.0.0", "bundled": true, "requires": { "safe-buffer": "5.1.1" @@ -5400,12 +5533,12 @@ } }, "tar": { - "version": "4.0.1", + "version": "4.0.2", "bundled": true, "requires": { "chownr": "1.0.1", "minipass": "2.2.1", - "minizlib": "1.0.3", + "minizlib": "1.0.4", "mkdirp": "0.5.1", "yallist": "3.0.2" }, @@ -5418,7 +5551,7 @@ } }, "minizlib": { - "version": "1.0.3", + "version": "1.0.4", "bundled": true, "requires": { "minipass": "2.2.1" @@ -5463,13 +5596,14 @@ "bundled": true }, "update-notifier": { - "version": "2.2.0", + "version": "2.3.0", "bundled": true, "requires": { - "boxen": "1.1.0", - "chalk": "1.1.3", - "configstore": "3.1.0", + "boxen": "1.2.1", + "chalk": "2.1.0", + "configstore": "3.1.1", "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", "is-npm": "1.0.0", "latest-version": "3.1.0", "semver-diff": "2.1.0", @@ -5477,15 +5611,15 @@ }, "dependencies": { "boxen": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "requires": { "ansi-align": "2.0.0", "camelcase": "4.1.0", - "chalk": "1.1.3", + "chalk": "2.1.0", "cli-boxes": "1.0.0", - "string-width": "2.1.0", - "term-size": "0.1.1", + "string-width": "2.1.1", + "term-size": "1.2.0", "widest-line": "1.0.0" }, "dependencies": { @@ -5493,7 +5627,7 @@ "version": "2.0.0", "bundled": true, "requires": { - "string-width": "2.1.0" + "string-width": "2.1.1" } }, "camelcase": { @@ -5505,7 +5639,7 @@ "bundled": true }, "string-width": { - "version": "2.1.0", + "version": "2.1.1", "bundled": true, "requires": { "is-fullwidth-code-point": "2.0.0", @@ -5515,60 +5649,80 @@ "is-fullwidth-code-point": { "version": "2.0.0", "bundled": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "requires": { - "ansi-regex": "3.0.0" - } } } }, "term-size": { - "version": "0.1.1", + "version": "1.2.0", "bundled": true, "requires": { - "execa": "0.4.0" + "execa": "0.7.0" }, "dependencies": { "execa": { - "version": "0.4.0", + "version": "0.7.0", "bundled": true, "requires": { - "cross-spawn-async": "2.2.5", + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", "is-stream": "1.1.0", - "npm-run-path": "1.0.0", - "object-assign": "4.1.1", - "path-key": "1.0.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", "strip-eof": "1.0.0" }, "dependencies": { - "cross-spawn-async": { - "version": "2.2.5", + "cross-spawn": { + "version": "5.1.0", "bundled": true, "requires": { "lru-cache": "4.1.1", + "shebang-command": "1.2.0", "which": "1.3.0" + }, + "dependencies": { + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "requires": { + "shebang-regex": "1.0.0" + }, + "dependencies": { + "shebang-regex": { + "version": "1.0.0", + "bundled": true + } + } + } } }, + "get-stream": { + "version": "3.0.0", + "bundled": true + }, "is-stream": { "version": "1.1.0", "bundled": true }, "npm-run-path": { - "version": "1.0.0", + "version": "2.0.2", "bundled": true, "requires": { - "path-key": "1.0.0" + "path-key": "2.0.1" + }, + "dependencies": { + "path-key": { + "version": "2.0.1", + "bundled": true + } } }, - "object-assign": { - "version": "4.1.1", + "p-finally": { + "version": "1.0.0", "bundled": true }, - "path-key": { - "version": "1.0.0", + "signal-exit": { + "version": "3.0.2", "bundled": true }, "strip-eof": { @@ -5632,61 +5786,60 @@ } }, "chalk": { - "version": "1.1.3", + "version": "2.1.0", "bundled": true, "requires": { - "ansi-styles": "2.2.1", + "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "supports-color": "4.4.0" }, "dependencies": { "ansi-styles": { - "version": "2.2.1", - "bundled": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true - }, - "has-ansi": { - "version": "2.0.0", + "version": "3.2.0", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "color-convert": "1.9.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true + "color-convert": { + "version": "1.9.0", + "bundled": true, + "requires": { + "color-name": "1.1.3" + }, + "dependencies": { + "color-name": { + "version": "1.1.3", + "bundled": true + } + } } } }, - "strip-ansi": { - "version": "3.0.1", + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true + }, + "supports-color": { + "version": "4.4.0", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "has-flag": "2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", + "has-flag": { + "version": "2.0.0", "bundled": true } } - }, - "supports-color": { - "version": "2.0.0", - "bundled": true } } }, "configstore": { - "version": "3.1.0", + "version": "3.1.1", "bundled": true, "requires": { - "dot-prop": "4.1.1", + "dot-prop": "4.2.0", "graceful-fs": "4.1.11", "make-dir": "1.0.0", "unique-string": "1.0.0", @@ -5695,7 +5848,7 @@ }, "dependencies": { "dot-prop": { - "version": "4.1.1", + "version": "4.2.0", "bundled": true, "requires": { "is-obj": "1.0.1" @@ -5739,6 +5892,30 @@ "version": "2.1.0", "bundled": true }, + "is-installed-globally": { + "version": "0.1.0", + "bundled": true, + "requires": { + "global-dirs": "0.1.0", + "is-path-inside": "1.0.0" + }, + "dependencies": { + "global-dirs": { + "version": "0.1.0", + "bundled": true, + "requires": { + "ini": "1.3.4" + } + }, + "is-path-inside": { + "version": "1.0.0", + "bundled": true, + "requires": { + "path-is-inside": "1.0.2" + } + } + } + }, "is-npm": { "version": "1.0.0", "bundled": true @@ -5979,7 +6156,7 @@ } }, "worker-farm": { - "version": "1.5.0", + "version": "1.5.1", "bundled": true, "requires": { "errno": "0.1.4", @@ -6021,9 +6198,9 @@ } }, "npm-path": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.3.tgz", - "integrity": "sha1-Fc/04ciaONp39W9gVbJPl137K74=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", + "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", "requires": { "which": "1.3.0" } @@ -6035,55 +6212,69 @@ "requires": { "cross-spawn": "5.1.0", "minimist": "1.2.0", - "npm-path": "2.0.3", + "npm-path": "2.0.4", "npm-which": "3.0.1", "serializerr": "1.0.3", "sync-exec": "0.6.2" } }, "npm-run-all": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.1.tgz", - "integrity": "sha512-qrmqqaJa+REbzUTIL/mHfTdgwz+gL1xUezY/ueyLa7GISZ4T3h0CH8D2r6AaZdCYN2unu7PzspP0ofpXla1ftg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.2.tgz", + "integrity": "sha512-Z2aRlajMK4SQ8u19ZA75NZZu7wupfCNQWdYosIi8S6FgBdGf/8Y6Hgyjdc8zU2cYmIRVCx1nM80tJPkdEd+UYg==", "requires": { "ansi-styles": "3.2.0", "chalk": "2.3.0", "cross-spawn": "5.1.0", - "memory-streams": "0.1.2", + "memorystream": "0.3.1", "minimatch": "3.0.4", "ps-tree": "1.1.0", - "read-pkg": "2.0.0", + "read-pkg": "3.0.0", "shell-quote": "1.6.1", "string.prototype.padend": "3.0.0" }, "dependencies": { "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", + "parse-json": "4.0.0", + "pify": "3.0.0", "strip-bom": "3.0.0" } }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "requires": { + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.1" + } + }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "2.3.0" + "pify": "3.0.0" } }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "load-json-file": "2.0.0", + "load-json-file": "4.0.0", "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "path-type": "3.0.0" } }, "strip-bom": { @@ -6098,8 +6289,8 @@ "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", "requires": { - "commander": "2.11.0", - "npm-path": "2.0.3", + "commander": "2.12.2", + "npm-path": "2.0.4", "which": "1.3.0" } }, @@ -6375,12 +6566,12 @@ } }, "rc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", - "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.3.tgz", + "integrity": "sha1-UVdakA+N1oOBxxC0cSwhVMPiA1s=", "requires": { "deep-extend": "0.4.2", - "ini": "1.3.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" } @@ -6518,11 +6709,11 @@ "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" }, "rxjs": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.2.tgz", - "integrity": "sha512-oRYoIKWBU3Ic37fLA5VJu31VqQO4bWubRntcHSJ+cwaDQBwdnZ9x4zmhJfm/nFQ2E82/I4loSioHnACamrKGgA==", + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", + "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", "requires": { - "symbol-observable": "1.0.4" + "symbol-observable": "1.0.1" } }, "safe-buffer": { @@ -6536,9 +6727,9 @@ "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" }, "semver-intersect": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.1.2.tgz", - "integrity": "sha1-sLKLV1Ggf/3QAuXsYGyS1XbMtWE=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.2.0.tgz", + "integrity": "sha512-XwQtuo56XVJd4JDV90L9RWjBluxWcnKDlQivIlF+Jvdhqgvk7KAroAqs8aJ/hjQW0wNPSSWDxhJLzYX+dwb13A==", "requires": { "semver": "5.4.1" } @@ -6701,7 +6892,7 @@ "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", "requires": { "define-properties": "1.1.2", - "es-abstract": "1.9.0", + "es-abstract": "1.10.0", "function-bind": "1.1.1" } }, @@ -6756,9 +6947,9 @@ } }, "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, "sync-exec": { "version": "0.6.2", @@ -6772,7 +6963,7 @@ "requires": { "chownr": "1.0.1", "minipass": "2.2.1", - "minizlib": "1.0.4", + "minizlib": "1.1.0", "mkdirp": "0.5.1", "yallist": "3.0.2" }, @@ -6873,7 +7064,7 @@ "arrify": "1.0.1", "chalk": "1.1.3", "diff": "3.4.0", - "make-error": "1.3.0", + "make-error": "1.3.2", "minimist": "1.2.0", "mkdirp": "0.5.1", "pinkie": "2.0.4", @@ -6925,26 +7116,27 @@ } }, "tslib": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz", - "integrity": "sha512-ymKWWZJST0/CkgduC2qkzjMOWr4bouhuURNXCn/inEX0L57BnRG6FhX76o7FOnsjHazCjfU2LKeSrlS2sIKQJg==" + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", + "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" }, "tslint": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", - "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", "requires": { "babel-code-frame": "6.26.0", "builtin-modules": "1.1.1", "chalk": "2.3.0", - "commander": "2.11.0", + "commander": "2.12.2", "diff": "3.4.0", "glob": "7.1.2", + "js-yaml": "3.10.0", "minimatch": "3.0.4", "resolve": "1.5.0", "semver": "5.4.1", - "tslib": "1.8.0", - "tsutils": "2.12.1" + "tslib": "1.8.1", + "tsutils": "2.16.0" }, "dependencies": { "resolve": { @@ -6958,11 +7150,11 @@ } }, "tsutils": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.12.1.tgz", - "integrity": "sha1-9Nlc4zkciXHkblTEzw7bCiHdWyQ=", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", + "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", "requires": { - "tslib": "1.8.0" + "tslib": "1.8.1" } }, "tunnel-agent": { @@ -6988,9 +7180,9 @@ } }, "typescript": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", - "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=" }, "uglify-js": { "version": "2.8.29", @@ -7034,8 +7226,8 @@ "resolved": "https://registry.npmjs.org/v8-profiler/-/v8-profiler-5.7.0.tgz", "integrity": "sha1-6DgcvrtbX9DKjSsJ9qAYGhWNs00=", "requires": { - "nan": "2.7.0", - "node-pre-gyp": "0.6.38" + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" } }, "v8flags": { @@ -7073,12 +7265,19 @@ } }, "webpack-sources": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz", - "integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "requires": { "source-list-map": "2.0.0", - "source-map": "0.5.7" + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "which": { diff --git a/package.json b/package.json index cd8b3c1cac..22fc9c8ede 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@types/minimist": "^1.2.0", "@types/node": "^6.0.36", "@types/semver": "^5.3.30", - "@types/source-map": "^0.5.0", + "@types/source-map": "0.5.2", "@types/webpack": "^3.0.2", "@types/webpack-sources": "^0.1.3", "ajv": "^5.5.1", diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 89605833de..2ccfd59e07 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -222,7 +222,7 @@ export abstract class FileSystemEngineHostBase implements return (context: FileSystemSchematicContext) => { // Resolve all file:///a/b/c/d from the schematic's own path, and not the current // path. - const root = resolve(dirname(context.schematic.description.path), url.path); + const root = resolve(dirname(context.schematic.description.path), url.path || ''); return new FileSystemCreateTree(new FileSystemHost(root)); }; @@ -236,8 +236,9 @@ export abstract class FileSystemEngineHostBase implements options: OptionT, ): Observable { return (Observable.of(options) - .pipe(...this._transforms.map(tFn => mergeMap(opt => tFn(schematic, opt)))) - ) as {} as Observable; + .pipe( + ...this._transforms.map(tFn => mergeMap(opt => tFn(schematic, opt))), + )) as {} as Observable; } getSchematicRuleFactory( From 9a9ac060f3a66e804be789fb103ff906970ddeda Mon Sep 17 00:00:00 2001 From: Yaroslav Admin Date: Thu, 11 Jan 2018 01:38:26 +0100 Subject: [PATCH 012/724] refactor(@schematics/angular): remove obsolete logic for Karma start delay --- .../angular/application/files/__sourcedir__/test.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/schematics/angular/application/files/__sourcedir__/test.ts b/packages/schematics/angular/application/files/__sourcedir__/test.ts index cc21992c0c..16317897b1 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/test.ts +++ b/packages/schematics/angular/application/files/__sourcedir__/test.ts @@ -7,13 +7,8 @@ import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. -declare const __karma__: any; declare const require: any; -// Prevent Karma from running prematurely. -__karma__.loaded = function () {}; - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, @@ -23,5 +18,3 @@ getTestBed().initTestEnvironment( const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. context.keys().map(context); -// Finally, start Karma to run the tests. -__karma__.start(); From 560a549698c51df3f48d83dc6f81c1d11df5bd77 Mon Sep 17 00:00:00 2001 From: Karthik K Date: Thu, 11 Jan 2018 14:38:25 +0530 Subject: [PATCH 013/724] feat(@schematics/angular): update jasmine to 2.8.x --- .../schematics/angular/application/files/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index 3da1e9419c..dbee184c90 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -30,14 +30,14 @@ "@angular/cli": "<%= version %>", "@angular/compiler-cli": "^5.1.0", "@angular/language-service": "^5.1.0",<% if (!minimal) { %> - "@types/jasmine": "~2.5.53", + "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", - "jasmine-core": "~2.6.2", - "jasmine-spec-reporter": "~4.1.0", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", "karma": "~1.7.0", - "karma-chrome-launcher": "~2.1.1", + "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", From bff651c04c8d5d490f6cd2d48f47665c6ca48b56 Mon Sep 17 00:00:00 2001 From: Karthik K Date: Thu, 11 Jan 2018 14:48:14 +0530 Subject: [PATCH 014/724] feat(@schematics/angular): update karma to 2.0.0 --- packages/schematics/angular/application/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index dbee184c90..0b0bd83414 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -36,7 +36,7 @@ "codelyzer": "^4.0.1", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~1.7.0", + "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", From c0d8f2cf10ae4c4a83e0abe52a41a855aa30aaf0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 11 Jan 2018 11:25:39 +0000 Subject: [PATCH 015/724] fix(@angular-devkit/schematics): use correct additionalProperties schema property --- .../schematics/collection-schema.json | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/packages/angular_devkit/schematics/collection-schema.json b/packages/angular_devkit/schematics/collection-schema.json index ba6e948f4d..f6a8b18aeb 100644 --- a/packages/angular_devkit/schematics/collection-schema.json +++ b/packages/angular_devkit/schematics/collection-schema.json @@ -7,32 +7,30 @@ "schematics": { "type": "object", "description": "A map of schematic names to schematic details", - "properties": { - "additionalProperty": { - "type": "object", - "properties": { - "factory": { - "type": "string", - "description": "A folder or file path to the schematic factory" - }, - "description": { - "type": "string", - "description": "A description for the schematic" - }, - "extends": { - "type": "string", - "description": "An schematic override. It can be a local schematic or from another collection (in the format 'collection:schematic')" - }, - "schema": { - "type": "string", - "description": "Location of the schema.json file of the schematic" - } + "additionalProperties": { + "type": "object", + "properties": { + "factory": { + "type": "string", + "description": "A folder or file path to the schematic factory" }, - "required": [ - "factory", - "description" - ] - } + "description": { + "type": "string", + "description": "A description for the schematic" + }, + "extends": { + "type": "string", + "description": "An schematic override. It can be a local schematic or from another collection (in the format 'collection:schematic')" + }, + "schema": { + "type": "string", + "description": "Location of the schema.json file of the schematic" + } + }, + "required": [ + "factory", + "description" + ] } }, "version": { From 9deb7b89de464fd6b2bd81b4dd01b27e9885c7d9 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 4 Jan 2018 15:20:52 -0500 Subject: [PATCH 016/724] fix(@schematics/angular): Use correct TS position functions. Fixes angular/angular-cli#8520 --- packages/schematics/angular/utility/ast-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/utility/ast-utils.ts b/packages/schematics/angular/utility/ast-utils.ts index 2f34665f5c..aa95071612 100644 --- a/packages/schematics/angular/utility/ast-utils.ts +++ b/packages/schematics/angular/utility/ast-utils.ts @@ -89,7 +89,7 @@ export function findNode(node: ts.Node, kind: ts.SyntaxKind, text: string): ts.N * @return function to sort nodes in increasing order of position in sourceFile */ function nodesByPosition(first: ts.Node, second: ts.Node): number { - return first.pos - second.pos; + return first.getStart() - second.getStart(); } @@ -121,7 +121,7 @@ export function insertAfterLastOccurrence(nodes: ts.Node[], if (!lastItem && fallbackPos == undefined) { throw new Error(`tried to insert ${toInsert} as first occurence with no fallback position`); } - const lastItemPosition: number = lastItem ? lastItem.end : fallbackPos; + const lastItemPosition: number = lastItem ? lastItem.getEnd() : fallbackPos; return new InsertChange(file, lastItemPosition, toInsert); } From 49223a5010995c50fd9a412cf6982bf9e6012c33 Mon Sep 17 00:00:00 2001 From: Karthik K Date: Thu, 11 Jan 2018 14:29:15 +0530 Subject: [PATCH 017/724] feat(@schematics/angular): update tslint to 5.9.1 --- packages/schematics/angular/application/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index 0b0bd83414..b2ca197168 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -44,7 +44,7 @@ "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~3.2.0", - "tslint": "~5.8.0",<% } %> + "tslint": "~5.9.1",<% } %> "typescript": "~2.5.3" } } From 840281b689b0262d8e86b4e9a725fe1d81a2a64d Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 3 Jan 2018 16:49:22 -0500 Subject: [PATCH 018/724] fix(@schematics/angular): Add universal outDir to gitignore. Fixes #323 --- packages/schematics/angular/universal/index.ts | 17 +++++++++++++++++ .../schematics/angular/universal/index_spec.ts | 10 ++++++++++ 2 files changed, 27 insertions(+) diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 12fb034654..3b2c8761d5 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -161,6 +161,22 @@ function addDependencies(): Rule { }; } +function updateGitignore(options: UniversalOptions): Rule { + return (host: Tree) => { + const ignorePath = normalize('/.gitignore'); + const buffer = host.read(ignorePath); + if (buffer === null) { + // Assumption is made that there is no git repository. + return host; + } else { + const content = buffer.toString(); + host.overwrite(ignorePath, `${content}\n${options.outDir}`); + } + + return host; + }; +} + export default function (options: UniversalOptions): Rule { return (host: Tree, context: SchematicContext) => { const templateSource = apply(url('./files'), [ @@ -177,6 +193,7 @@ export default function (options: UniversalOptions): Rule { updateConfigFile(options), wrapBootstrapCall(options), addServerTransition(options), + updateGitignore(options), ])(host, context); }; } diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index d591e53cb1..407f823d88 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -104,4 +104,14 @@ describe('Universal Schematic', () => { const contents = tree.read(filePath); expect(contents).toMatch(/document.addEventListener\('DOMContentLoaded', \(\) => {/); }); + + it('should update .gitignore with the server outDir', () => { + const outDir = 'my-out-dir'; + const options = {...defaultOptions, outDir: outDir}; + const tree = schematicRunner.runSchematic('universal', options, appTree); + const filePath = '/.gitignore'; + const contents = tree.read(filePath) || new Buffer(''); + + expect(contents).toMatch(outDir); + }); }); From d03e19a65631ad26acca9935dc29b3fea8346925 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 3 Jan 2018 14:33:11 -0500 Subject: [PATCH 019/724] fix(@schematics/angular): Clear polyfills for universal apps. Fixes #324 --- packages/schematics/angular/universal/index.ts | 1 + packages/schematics/angular/universal/index_spec.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 3b2c8761d5..5c68b282a9 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -51,6 +51,7 @@ function updateConfigFile(options: UniversalOptions): Rule { test: options.test, tsconfig: tsCfg, testTsconfig: testTsCfg, + polyfills: undefined, }; if (options.name) { serverApp.name = options.name; diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 407f823d88..a93481a5ac 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -89,6 +89,7 @@ describe('Universal Schematic', () => { expect(app.tsconfig).toEqual('tsconfig.server.json'); expect(app.testTsconfig).toEqual('tsconfig.spec.json'); expect(app.environmentSource).toEqual('environments/environment.ts'); + expect(app.polyfills).not.toBeDefined(); }); it('should add a server transition to BrowerModule import', () => { From 8360b0ec47560bc9af49917cc67cb8a3287ec0a5 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 11 Jan 2018 14:11:23 -0800 Subject: [PATCH 020/724] release: patch --- .monorepo.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index ea559dee2c..1c89e087a3 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.36", - "hash": "718b816298c9ab7b7b12bd4c2f56423b" + "version": "0.0.37", + "hash": "d1eb36849df450c49b53987ed4635040" }, "@angular-devkit/core": { "name": "Core", @@ -64,8 +64,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.23", - "hash": "45c3c8b7d60b038bbedd3000ebca1b88" + "version": "0.0.24", + "hash": "64d0a02a2e02e518b20ebecdd49e633b" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -75,31 +75,31 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.42", - "hash": "33e9d31bdce777d0010265fcf99b8469" + "version": "0.0.43", + "hash": "667cc7ee32ff992537560ea9beed15f2" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.0", - "hash": "" + "version": "0.0.1", + "hash": "efaf2bbc19b91c48cdab5f897c11699e" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.11", - "hash": "94b15bcd6aafddd2cfa32c10bf1d46ab" + "version": "0.1.12", + "hash": "783fe48838794f2e8a4ef60a34dc7c4d" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.11", + "version": "0.0.12", "section": "Schematics", - "hash": "e5e524d6f6c523d4aed505bd7e6344cf" + "hash": "67a71a68bde3c29171f10fdad718ecc9" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.1", + "version": "0.0.2", "section": "Schematics", - "hash": "" + "hash": "6ba69d0f7fe59dd32c57f243dbb4b131" } } } From 51c1da3217fe1a32a16e7eeba9a2e83b7eea92a1 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 11 Jan 2018 14:38:45 -0800 Subject: [PATCH 021/724] fix(@angular-devkit/schematics): add a backward compatible function listSchematics was removed and shouldnt have been. Oops. --- .../schematics/src/engine/interface.ts | 4 ++++ .../schematics/tools/fallback-engine-host.ts | 13 ++++++++++++- .../tools/file-system-engine-host-base.ts | 7 +++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 3b340f75b8..c5d05eca9b 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -39,6 +39,10 @@ export type SchematicDescription { createCollectionDescription(name: string): CollectionDescription; + /** + * @deprecated Use `listSchematicNames`. + */ + listSchematics(collection: Collection): string[]; listSchematicNames(collection: CollectionDescription): string[]; createSchematicDescription( diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index ffd7704eeb..9df069aa56 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -6,11 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ import { + Collection, CollectionDescription, EngineHost, RuleFactory, SchematicDescription, - Source, TypedSchematicContext, + Source, + TypedSchematicContext, UnknownCollectionException, } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; @@ -90,6 +92,15 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { ) as {} as Observable; } + /** + * @deprecated Use `listSchematicNames`. + */ + listSchematics( + collection: Collection, + ): string[] { + return this.listSchematicNames(collection.description); + } + listSchematicNames(collection: CollectionDescription): string[] { const allNames = new Set(); this._hosts.forEach(host => { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 2ccfd59e07..718a4c0a8c 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -18,6 +18,7 @@ import { Observable } from 'rxjs/Observable'; import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; import { + FileSystemCollection, FileSystemCollectionDesc, FileSystemCollectionDescription, FileSystemSchematicContext, @@ -90,6 +91,12 @@ export abstract class FileSystemEngineHostBase implements private _transforms: OptionTransform[] = []; + /** + * @deprecated Use `listSchematicNames`. + */ + listSchematics(collection: FileSystemCollection): string[] { + return this.listSchematicNames(collection.description); + } listSchematicNames(collection: FileSystemCollectionDescription) { const schematics: string[] = []; for (const key of Object.keys(collection.schematics)) { From 6ac841ae62f5c9e5cd0e66ff65905456ec398ac6 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 11 Jan 2018 14:46:07 -0800 Subject: [PATCH 022/724] release: patch --- .monorepo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 1c89e087a3..dd746034ff 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -75,13 +75,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.43", - "hash": "667cc7ee32ff992537560ea9beed15f2" + "version": "0.0.44", + "hash": "42d1fca645a63b33a2310c2642f1bbe8" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.1", - "hash": "efaf2bbc19b91c48cdab5f897c11699e" + "version": "0.0.2", + "hash": "691a0d3a61d2f3b6b2766d1989650887" }, "@schematics/angular": { "name": "Angular Schematics", From 6c68c468a3bfe3826bd939294ffcb64bd092b9ad Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 11 Jan 2018 15:40:51 -0800 Subject: [PATCH 023/724] fix(@angular-devkit/schematics): add backward-compatibility to transformOptions Before it was supposed to return the options directly, now allows for returning observable. --- .../tools/file-system-engine-host-base.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 718a4c0a8c..802c4bb40c 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -29,6 +29,11 @@ import { FileSystemHost } from './file-system-host'; import { readJsonFile } from './file-system-utility'; +declare const Symbol: Symbol & { + readonly observable: symbol; +}; + + export declare type OptionTransform = (schematic: FileSystemSchematicDescription, options: T) => Observable; @@ -89,7 +94,7 @@ export abstract class FileSystemEngineHostBase implements collection: FileSystemCollectionDesc, desc: Partial): FileSystemSchematicDesc; - private _transforms: OptionTransform[] = []; + private _transforms: OptionTransform<{}, {}>[] = []; /** * @deprecated Use `listSchematicNames`. @@ -244,7 +249,14 @@ export abstract class FileSystemEngineHostBase implements ): Observable { return (Observable.of(options) .pipe( - ...this._transforms.map(tFn => mergeMap(opt => tFn(schematic, opt))), + ...this._transforms.map(tFn => mergeMap(opt => { + const newOptions = tFn(schematic, opt); + if (Symbol.observable in newOptions) { + return newOptions; + } else { + return Observable.of(newOptions); + } + })), )) as {} as Observable; } From f720fb0e416003dfed1db84879a7a9d08bc311fc Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 11 Jan 2018 15:47:59 -0800 Subject: [PATCH 024/724] release: patch --- .monorepo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index dd746034ff..87be3f43b5 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -75,13 +75,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.44", - "hash": "42d1fca645a63b33a2310c2642f1bbe8" + "version": "0.0.45", + "hash": "7c0e2822256d6bb74f0780f1794449b6" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.2", - "hash": "691a0d3a61d2f3b6b2766d1989650887" + "version": "0.0.3", + "hash": "4e7014ce3dbde3c854f6fda5753e85c3" }, "@schematics/angular": { "name": "Angular Schematics", From e99d11f9cd23bd2b359859b61603243eebdc7415 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 12 Jan 2018 12:22:40 -0500 Subject: [PATCH 025/724] fix(@angular-devkit/build-optimizer): limit ignore test to safe transformers --- .../build_optimizer/src/build-optimizer/build-optimizer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts index 20d9ab0f76..a7f50280d6 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts @@ -112,9 +112,10 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr } // tests are not needed for fast path + // usage will be expanded once transformers are verified safe const ignoreTest = !options.emitSourceMap && !typeCheck; - if (ignoreTest || testPrefixClasses(content)) { + if (testPrefixClasses(content)) { getTransforms.unshift(getPrefixClassesTransformer); } @@ -122,7 +123,7 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr getTransforms.unshift(getImportTslibTransformer); } - if (ignoreTest || testWrapEnums(content)) { + if (testWrapEnums(content)) { getTransforms.unshift(getWrapEnumsTransformer); } From e1f435606ffcf29b3311ab7204ef3eb84d661be2 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 22 Dec 2017 10:17:39 -0500 Subject: [PATCH 026/724] refactor: Update rxjs operators to be lettable --- bin/devkit-admin | 6 +- package-lock.json | 9 ++- package.json | 2 +- .../angular_devkit/core/node/cli-logger.ts | 4 +- packages/angular_devkit/core/node/host.ts | 27 +++---- .../core/src/json/schema/registry.ts | 6 +- .../core/src/json/schema/registry_spec.ts | 64 ++++++++++------- .../angular_devkit/core/src/logger/indent.ts | 18 ++--- .../core/src/logger/indent_spec.ts | 4 +- .../core/src/logger/logger_spec.ts | 12 ++-- .../core/src/logger/null-logger.ts | 5 +- .../core/src/logger/null-logger_spec.ts | 7 +- .../core/src/logger/transform-logger_spec.ts | 12 ++-- .../core/src/virtual-fs/host/memory.ts | 19 ++--- .../angular_devkit/schematics/package.json | 8 +-- .../schematics/src/engine/schematic.ts | 5 +- .../schematics/src/engine/schematic_spec.ts | 12 ++-- .../src/formats/format-validator.ts | 4 +- .../src/formats/html-selector_spec.ts | 9 +-- .../schematics/src/formats/path_spec.ts | 5 +- .../schematics/src/rules/base.ts | 27 ++++--- .../schematics/src/rules/base_spec.ts | 17 +++-- .../schematics/src/rules/call.ts | 51 +++++++------ .../schematics/src/rules/call_spec.ts | 21 +++--- .../schematics/src/rules/move_spec.ts | 7 +- .../schematics/src/rules/schematic.ts | 6 +- .../schematics/src/sink/dryrun.ts | 4 +- .../schematics/src/sink/dryrun_spec.ts | 9 +-- .../schematics/src/sink/sink.ts | 71 ++++++++++--------- .../schematics/src/sink/virtual-filesystem.ts | 46 ++++++------ .../testing/schematic-test-runner.ts | 10 +-- .../schematics/tools/fallback-engine-host.ts | 3 +- .../tools/file-system-engine-host-base.ts | 3 +- .../tools/schema-option-transform.ts | 3 +- .../schematics_cli/bin/schematics.ts | 51 +++++++------ .../schematics/angular/app-shell/index.ts | 1 - .../angular/application/files/package.json | 2 +- .../schematics/angular/component/index.ts | 1 - .../schematics/angular/directive/index.ts | 1 - packages/schematics/angular/guard/index.ts | 1 - packages/schematics/angular/pipe/index.ts | 1 - packages/schematics/angular/service/index.ts | 1 - .../schematics/angular/universal/index.ts | 1 - .../schematics/package-update/package.json | 2 +- .../schematics/package-update/utility/npm.ts | 17 +++-- packages/schematics/schematics/package.json | 2 +- 46 files changed, 304 insertions(+), 293 deletions(-) diff --git a/bin/devkit-admin b/bin/devkit-admin index 8cadae582b..5a2f0460cb 100755 --- a/bin/devkit-admin +++ b/bin/devkit-admin @@ -34,10 +34,10 @@ process.chdir(path.join(__dirname, '..')); let logger = null; try { logger = new (require('@angular-devkit/core').logging.IndentLogger)('root'); - require('rxjs/add/operator/filter'); + const filter = require('rxjs/operators').filter; logger - .filter(entry => (entry.level !== 'debug' || args.verbose)) + .pipe(filter(entry => (entry.level !== 'debug' || args.verbose))) .subscribe(entry => { let color = gray; let output = process.stdout; @@ -52,7 +52,7 @@ try { }); logger - .filter(entry => entry.level === 'fatal') + .pipe(filter(entry => entry.level === 'fatal')) .subscribe(() => { process.stderr.write('A fatal error happened. See details above.\n'); process.exit(100); diff --git a/package-lock.json b/package-lock.json index f61079c9cc..a53d40166a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,9 +60,12 @@ "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==" }, "@types/source-map": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", - "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LrnsgZIfJaysFkv9rRJp4/uAyqw87oVed3s1hhF83nwbo9c7MG9g5DqR0seHP+lkX4ldmMrVolPjQSe2ZfD0yA==", + "requires": { + "source-map": "0.5.7" + } }, "@types/tapable": { "version": "0.2.4", diff --git a/package.json b/package.json index 22fc9c8ede..5a9164afc8 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "npm": "^5.2.0", "npm-run": "^4.1.2", "npm-run-all": "^4.0.0", - "rxjs": "^5.5.2", + "rxjs": "^5.5.6", "semver": "^5.3.0", "semver-intersect": "^1.1.2", "source-map": "^0.5.6", diff --git a/packages/angular_devkit/core/node/cli-logger.ts b/packages/angular_devkit/core/node/cli-logger.ts index 1d8ef77a1f..d10382ea70 100644 --- a/packages/angular_devkit/core/node/cli-logger.ts +++ b/packages/angular_devkit/core/node/cli-logger.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { logging, terminal } from '@angular-devkit/core'; -import 'rxjs/add/operator/filter'; +import { filter } from 'rxjs/operators'; /** @@ -16,7 +16,7 @@ export function createConsoleLogger(verbose = false): logging.Logger { const logger = new logging.IndentLogger('cling'); logger - .filter(entry => (entry.level != 'debug' || verbose)) + .pipe(filter(entry => (entry.level != 'debug' || verbose))) .subscribe(entry => { let color: (s: string) => string = x => terminal.dim(terminal.white(x)); let output = process.stdout; diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 01cb0b168f..5a323c4949 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -18,8 +18,9 @@ import { } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; -import { ArrayObservable } from 'rxjs/observable/ArrayObservable'; -import { FromObservable } from 'rxjs/observable/FromObservable'; +import { empty } from 'rxjs/observable/empty'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { of as observableOf } from 'rxjs/observable/of'; import { concat } from 'rxjs/operators/concat'; import { concatMap } from 'rxjs/operators/concatMap'; import { ignoreElements } from 'rxjs/operators/ignoreElements'; @@ -131,11 +132,11 @@ export class NodeJsAsyncHost implements virtualFs.Host { }; _recurseList(path); - return FromObservable.create(allFiles) + return observableFrom(allFiles) .pipe( mergeMap(p => _callFs(fs.unlink, this._getSystemPath(p))), ignoreElements(), - concat(FromObservable.create(allDirs).pipe( + concat(observableFrom(allDirs).pipe( concatMap(p => _callFs(fs.rmdir, this._getSystemPath(p))), )), map(() => {}), @@ -251,13 +252,13 @@ export class NodeJsSyncHost implements virtualFs.Host { _createDir(dirname(path)); fs.writeFileSync(this._getSystemPath(path), new Uint8Array(content)); - return Observable.empty(); + return empty(); } read(path: Path): Observable { const buffer = fs.readFileSync(this._getSystemPath(path)); - return ArrayObservable.of(new Uint8Array(buffer).buffer as virtualFs.FileBuffer); + return observableOf(new Uint8Array(buffer).buffer as virtualFs.FileBuffer); } delete(path: Path): Observable { @@ -271,37 +272,37 @@ export class NodeJsSyncHost implements virtualFs.Host { fs.unlinkSync(this._getSystemPath(path)); } - return Observable.empty(); + return empty(); } rename(from: Path, to: Path): Observable { fs.renameSync(this._getSystemPath(from), this._getSystemPath(to)); - return Observable.empty(); + return empty(); } list(path: Path): Observable { - return ArrayObservable.of(fs.readdirSync(this._getSystemPath(path))).pipe( + return observableOf(fs.readdirSync(this._getSystemPath(path))).pipe( map(names => names.map(name => fragment(name))), ); } exists(path: Path): Observable { - return ArrayObservable.of(fs.existsSync(this._getSystemPath(path))); + return observableOf(fs.existsSync(this._getSystemPath(path))); } isDirectory(path: Path): Observable { // tslint:disable-next-line:non-null-operator - return this.stats(path) !.map(stat => stat.isDirectory()); + return this.stats(path) !.pipe(map(stat => stat.isDirectory())); } isFile(path: Path): Observable { // tslint:disable-next-line:non-null-operator - return this.stats(path) !.map(stat => stat.isFile()); + return this.stats(path) !.pipe(map(stat => stat.isFile())); } // Some hosts may not support stats. stats(path: Path): Observable> | null { - return ArrayObservable.of(fs.statSync(this._getSystemPath(path))); + return observableOf(fs.statSync(this._getSystemPath(path))); } // Some hosts may not support watching. diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 142c9f9285..732765df0d 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -8,8 +8,8 @@ import * as ajv from 'ajv'; import * as http from 'http'; import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/of'; import { fromPromise } from 'rxjs/observable/fromPromise'; +import { of as observableOf } from 'rxjs/observable/of'; import { map } from 'rxjs/operators/map'; import { JsonArray, JsonObject } from '../interface'; import { @@ -237,7 +237,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { let validator: Observable; try { const maybeFnValidate = this._ajv.compile(schema); - validator = Observable.of(maybeFnValidate); + validator = observableOf(maybeFnValidate); } catch (e) { // Propagate the error. if (!(e instanceof (ajv.MissingRefError as {} as Function))) { @@ -261,7 +261,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { map(validate => (data: any): Observable => { const result = validate(data); const resultObs = typeof result == 'boolean' - ? Observable.of(result) + ? observableOf(result) : fromPromise(result as PromiseLike); return resultObs diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index ece9121815..dd76cae266 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -5,8 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/mergeMap'; +import { of as observableOf } from 'rxjs/observable/of'; +import { map, mergeMap } from 'rxjs/operators'; import { CoreSchemaRegistry } from './registry'; @@ -31,12 +31,14 @@ describe('CoreSchemaRegistry', () => { }, }, }) - .mergeMap(validator => validator(data)) - .map(result => { - expect(result.success).toBe(true); - expect(data.obj.num).toBeUndefined(); - expect(data.tslint).not.toBeUndefined(); - }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(true); + expect(data.obj.num).toBeUndefined(); + expect(data.tslint).not.toBeUndefined(); + }), + ) .subscribe(done, done.fail); }); @@ -61,11 +63,13 @@ describe('CoreSchemaRegistry', () => { }, }, }) - .mergeMap(validator => validator(data)) - .map(result => { - expect(result.success).toBe(true); - expect(data.obj.num).toBeUndefined(); - }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(true); + expect(data.obj.num).toBeUndefined(); + }), + ) .subscribe(() => { isDone = true; }, done.fail); @@ -93,10 +97,12 @@ describe('CoreSchemaRegistry', () => { str: { type: 'string', format: 'is-hotdog' }, }, }) - .mergeMap(validator => validator(data)) - .map(result => { - expect(result.success).toBe(true); - }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(true); + }), + ) .subscribe(done, done.fail); }); @@ -107,7 +113,7 @@ describe('CoreSchemaRegistry', () => { name: 'is-hotdog', formatter: { async: true, - validate: (str: string) => Observable.of(str === 'hotdog'), + validate: (str: string) => observableOf(str === 'hotdog'), }, }; @@ -120,10 +126,12 @@ describe('CoreSchemaRegistry', () => { str: { type: 'string', format: 'is-hotdog' }, }, }) - .mergeMap(validator => validator(data)) - .map(result => { - expect(result.success).toBe(true); - }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(true); + }), + ) .subscribe(done, done.fail); }); @@ -147,11 +155,13 @@ describe('CoreSchemaRegistry', () => { banana: { type: 'string', format: 'is-hotdog' }, }, }) - .mergeMap(validator => validator(data)) - .map(result => { - expect(result.success).toBe(false); - expect(result.errors && result.errors[0]).toBe('.banana should match format "is-hotdog"'); - }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(false); + expect(result.errors && result.errors[0]).toBe('.banana should match format "is-hotdog"'); + }), + ) .subscribe(done, done.fail); }); }); diff --git a/packages/angular_devkit/core/src/logger/indent.ts b/packages/angular_devkit/core/src/logger/indent.ts index 19ceb815eb..e6fe06b686 100644 --- a/packages/angular_devkit/core/src/logger/indent.ts +++ b/packages/angular_devkit/core/src/logger/indent.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import 'rxjs/add/operator/map'; +import { map } from 'rxjs/operators'; import { Logger } from './logger'; @@ -24,21 +24,21 @@ export class IndentLogger extends Logger { super(name, parent); indentationMap[indentation] = indentationMap[indentation] || ['']; - const map = indentationMap[indentation]; + const indentMap = indentationMap[indentation]; - this._observable = this._observable.map(entry => { + this._observable = this._observable.pipe(map(entry => { const l = entry.path.length; - if (l >= map.length) { - let current = map[map.length - 1]; - while (l >= map.length) { + if (l >= indentMap.length) { + let current = indentMap[indentMap.length - 1]; + while (l >= indentMap.length) { current += indentation; - map.push(current); + indentMap.push(current); } } - entry.message = map[l] + entry.message.split(/\n/).join('\n' + map[l]); + entry.message = indentMap[l] + entry.message.split(/\n/).join('\n' + indentMap[l]); return entry; - }); + })); } } diff --git a/packages/angular_devkit/core/src/logger/indent_spec.ts b/packages/angular_devkit/core/src/logger/indent_spec.ts index 4328ba4f4c..a35ed3307a 100644 --- a/packages/angular_devkit/core/src/logger/indent_spec.ts +++ b/packages/angular_devkit/core/src/logger/indent_spec.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:no-any +import { toArray } from 'rxjs/operators'; import { IndentLogger } from './indent'; import { LogEntry, Logger } from './logger'; @@ -13,8 +14,7 @@ import { LogEntry, Logger } from './logger'; describe('IndentSpec', () => { it('works', (done: DoneFn) => { const logger = new IndentLogger('test'); - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: LogEntry[]) => { expect(observed).toEqual([ diff --git a/packages/angular_devkit/core/src/logger/logger_spec.ts b/packages/angular_devkit/core/src/logger/logger_spec.ts index 2bb404d32d..50439ca9a4 100644 --- a/packages/angular_devkit/core/src/logger/logger_spec.ts +++ b/packages/angular_devkit/core/src/logger/logger_spec.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:no-any -import 'rxjs/add/operator/toArray'; -import 'rxjs/add/operator/toPromise'; +import { toArray } from 'rxjs/operators'; import { JsonValue } from '../json/interface'; import { Logger } from './logger'; @@ -15,8 +14,7 @@ import { Logger } from './logger'; describe('Logger', () => { it('works', (done: DoneFn) => { const logger = new Logger('test'); - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: JsonValue[]) => { expect(observed).toEqual([ @@ -34,8 +32,7 @@ describe('Logger', () => { it('works with children', (done: DoneFn) => { const logger = new Logger('test'); let hasCompleted = false; - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: JsonValue[]) => { expect(observed).toEqual([ @@ -57,8 +54,7 @@ describe('Logger', () => { const logger = new Logger('test'); logger.debug('woah'); - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: JsonValue[]) => { expect(observed).toEqual([ diff --git a/packages/angular_devkit/core/src/logger/null-logger.ts b/packages/angular_devkit/core/src/logger/null-logger.ts index 233b1d827e..8136303019 100644 --- a/packages/angular_devkit/core/src/logger/null-logger.ts +++ b/packages/angular_devkit/core/src/logger/null-logger.ts @@ -5,15 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/empty'; +import { empty } from 'rxjs/observable/empty'; import { Logger, LoggerApi } from './logger'; export class NullLogger extends Logger { constructor(parent: Logger | null = null) { super('', parent); - this._observable = Observable.empty(); + this._observable = empty(); } asApi(): LoggerApi { diff --git a/packages/angular_devkit/core/src/logger/null-logger_spec.ts b/packages/angular_devkit/core/src/logger/null-logger_spec.ts index 749826995b..52f1936e48 100644 --- a/packages/angular_devkit/core/src/logger/null-logger_spec.ts +++ b/packages/angular_devkit/core/src/logger/null-logger_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { toArray } from 'rxjs/operators'; import { LogEntry, Logger } from './logger'; import { NullLogger } from './null-logger'; @@ -12,8 +13,7 @@ import { NullLogger } from './null-logger'; describe('NullLogger', () => { it('works', (done: DoneFn) => { const logger = new NullLogger(); - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: LogEntry[]) => { expect(observed).toEqual([]); @@ -27,8 +27,7 @@ describe('NullLogger', () => { it('nullifies children', (done: DoneFn) => { const logger = new Logger('test'); - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: LogEntry[]) => { expect(observed).toEqual([]); diff --git a/packages/angular_devkit/core/src/logger/transform-logger_spec.ts b/packages/angular_devkit/core/src/logger/transform-logger_spec.ts index b45411a87f..d99e2f8726 100644 --- a/packages/angular_devkit/core/src/logger/transform-logger_spec.ts +++ b/packages/angular_devkit/core/src/logger/transform-logger_spec.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:no-any -import 'rxjs/add/operator/filter'; -import 'rxjs/add/operator/map'; +import { filter, map, toArray } from 'rxjs/operators'; import { LogEntry } from './logger'; import { TransformLogger } from './transform-logger'; @@ -15,12 +14,11 @@ import { TransformLogger } from './transform-logger'; describe('TransformLogger', () => { it('works', (done: DoneFn) => { const logger = new TransformLogger('test', stream => { - return stream - .filter(entry => entry.message != 'hello') - .map(entry => (entry.message += '1', entry)); + return stream.pipe( + filter(entry => entry.message != 'hello'), + map(entry => (entry.message += '1', entry))); }); - logger - .toArray() + logger.pipe(toArray()) .toPromise() .then((observed: LogEntry[]) => { expect(observed).toEqual([ diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index 9cf502a883..b98c900265 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -7,7 +7,8 @@ */ import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; -import { ArrayObservable } from 'rxjs/observable/ArrayObservable'; +import { empty } from 'rxjs/observable/empty'; +import { of as observableOf } from 'rxjs/observable/of'; import { _throw } from 'rxjs/observable/throw'; import { FileAlreadyExistException, @@ -106,7 +107,7 @@ export class SimpleMemoryHost implements Host<{}> { this._cache.set(path, content); this._updateWatchers(path, existed ? HostWatchEventType.Changed : HostWatchEventType.Created); - return Observable.empty(); + return empty(); } read(path: Path): Observable { if (this._isDir(path)) { @@ -116,7 +117,7 @@ export class SimpleMemoryHost implements Host<{}> { if (!maybeBuffer) { return _throw(new FileDoesNotExistException(path)); } else { - return ArrayObservable.of(maybeBuffer); + return observableOf(maybeBuffer); } } delete(path: Path): Observable { @@ -131,7 +132,7 @@ export class SimpleMemoryHost implements Host<{}> { } this._updateWatchers(path, HostWatchEventType.Deleted); - return Observable.empty(); + return empty(); } rename(from: Path, to: Path): Observable { if (!this._cache.has(from)) { @@ -158,7 +159,7 @@ export class SimpleMemoryHost implements Host<{}> { this._updateWatchers(from, HostWatchEventType.Renamed); - return Observable.empty(); + return empty(); } list(path: Path): Observable { @@ -173,17 +174,17 @@ export class SimpleMemoryHost implements Host<{}> { } } - return ArrayObservable.of([...result]); + return observableOf([...result]); } exists(path: Path): Observable { - return ArrayObservable.of(this._cache.has(path) || this._isDir(path)); + return observableOf(this._cache.has(path) || this._isDir(path)); } isDirectory(path: Path): Observable { - return ArrayObservable.of(this._isDir(path)); + return observableOf(this._isDir(path)); } isFile(path: Path): Observable { - return ArrayObservable.of(this._cache.has(path)); + return observableOf(this._cache.has(path)); } stats(_path: Path): Observable> | null { diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index a2ffb6ee96..5cea537fee 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,9 +17,9 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "@ngtools/json-schema": "^1.1.0" - }, - "peerDependencies": { - "rxjs": "^5.5.2" + "@ngtools/json-schema": "^1.1.0", + "@schematics/schematics": "0.0.0", + "minimist": "^1.2.0", + "rxjs": "^5.5.6" } } diff --git a/packages/angular_devkit/schematics/src/engine/schematic.ts b/packages/angular_devkit/schematics/src/engine/schematic.ts index 5f1d8d4465..ed385cbeea 100644 --- a/packages/angular_devkit/schematics/src/engine/schematic.ts +++ b/packages/angular_devkit/schematics/src/engine/schematic.ts @@ -7,8 +7,7 @@ */ import { BaseException } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/of'; -import 'rxjs/add/operator/concatMap'; +import { of as observableOf } from 'rxjs/observable/of'; import { concatMap } from 'rxjs/operators/concatMap'; import { first } from 'rxjs/operators/first'; import { map } from 'rxjs/operators/map'; @@ -60,7 +59,7 @@ export class SchematicImpl [tree, o]), )), concatMap(([tree, transformedOptions]: [Tree, OptionT]) => { - return callRule(this._factory(transformedOptions), Observable.of(tree), context); + return callRule(this._factory(transformedOptions), observableOf(tree), context); }), ); } diff --git a/packages/angular_devkit/schematics/src/engine/schematic_spec.ts b/packages/angular_devkit/schematics/src/engine/schematic_spec.ts index 85798203ea..5f4c2a341f 100644 --- a/packages/angular_devkit/schematics/src/engine/schematic_spec.ts +++ b/packages/angular_devkit/schematics/src/engine/schematic_spec.ts @@ -7,9 +7,7 @@ */ // tslint:disable:non-null-operator import { logging } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/toArray'; -import 'rxjs/add/operator/toPromise'; +import { of as observableOf } from 'rxjs/observable/of'; import { MergeStrategy, Tree } from '../tree/interface'; import { branch, empty } from '../tree/static'; import { CollectionDescription, Engine, Rule, Schematic, SchematicDescription } from './interface'; @@ -33,7 +31,7 @@ const context = { }; const engine: Engine = { createContext: (schematic: Schematic<{}, {}>) => ({ engine, schematic, ...context }), - transformOptions: (_: {}, options: {}) => Observable.of(options), + transformOptions: (_: {}, options: {}) => observableOf(options), defaultMergeStrategy: MergeStrategy.Default, } as {} as Engine; const collection = { @@ -67,7 +65,7 @@ describe('Schematic', () => { }; const schematic = new SchematicImpl(desc, desc.factory, null !, engine); - schematic.call({}, Observable.of(empty())) + schematic.call({}, observableOf(empty())) .toPromise() .then(x => { expect(files(inner !)).toEqual([]); @@ -86,13 +84,13 @@ describe('Schematic', () => { factory: () => (fem: Tree) => { inner = fem; - return Observable.of(empty()); + return observableOf(empty()); }, }; const schematic = new SchematicImpl(desc, desc.factory, null !, engine); - schematic.call({}, Observable.of(empty())) + schematic.call({}, observableOf(empty())) .toPromise() .then(x => { expect(files(inner !)).toEqual([]); diff --git a/packages/angular_devkit/schematics/src/formats/format-validator.ts b/packages/angular_devkit/schematics/src/formats/format-validator.ts index 8acfc7c871..fec55c31e8 100644 --- a/packages/angular_devkit/schematics/src/formats/format-validator.ts +++ b/packages/angular_devkit/schematics/src/formats/format-validator.ts @@ -8,7 +8,7 @@ import { schema } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/mergeMap'; +import { mergeMap } from 'rxjs/operators'; export function formatValidator( @@ -24,5 +24,5 @@ export function formatValidator( return registry .compile(dataSchema) - .mergeMap(validator => validator(data)); + .pipe(mergeMap(validator => validator(data))); } diff --git a/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts b/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts index c2b264de4c..e287cd85cd 100644 --- a/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts +++ b/packages/angular_devkit/schematics/src/formats/html-selector_spec.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import { map } from 'rxjs/operators'; import { formatValidator } from './format-validator'; import { htmlSelectorFormat } from './html-selector'; @@ -18,7 +19,7 @@ describe('Schematics HTML selector format', () => { }; formatValidator(data, dataSchema, [htmlSelectorFormat]) - .map(result => expect(result.success).toBe(true)) + .pipe(map(result => expect(result.success).toBe(true))) .subscribe(done, done.fail); }); @@ -29,7 +30,7 @@ describe('Schematics HTML selector format', () => { }; formatValidator(data, dataSchema, [htmlSelectorFormat]) - .map(result => expect(result.success).toBe(false)) + .pipe(map(result => expect(result.success).toBe(false))) .subscribe(done, done.fail); }); @@ -40,7 +41,7 @@ describe('Schematics HTML selector format', () => { }; formatValidator(data, dataSchema, [htmlSelectorFormat]) - .map(result => expect(result.success).toBe(false)) + .pipe(map(result => expect(result.success).toBe(false))) .subscribe(done, done.fail); }); @@ -51,7 +52,7 @@ describe('Schematics HTML selector format', () => { }; formatValidator(data, dataSchema, [htmlSelectorFormat]) - .map(result => expect(result.success).toBe(false)) + .pipe(map(result => expect(result.success).toBe(false))) .subscribe(done, done.fail); }); }); diff --git a/packages/angular_devkit/schematics/src/formats/path_spec.ts b/packages/angular_devkit/schematics/src/formats/path_spec.ts index 64b7ab8330..83718278a8 100644 --- a/packages/angular_devkit/schematics/src/formats/path_spec.ts +++ b/packages/angular_devkit/schematics/src/formats/path_spec.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import { map } from 'rxjs/operators'; import { formatValidator } from './format-validator'; import { pathFormat } from './path'; @@ -18,7 +19,7 @@ describe('Schematics Path format', () => { }; formatValidator(data, dataSchema, [pathFormat]) - .map(result => expect(result.success).toBe(true)) + .pipe(map(result => expect(result.success).toBe(true))) .subscribe(done, done.fail); }); @@ -29,7 +30,7 @@ describe('Schematics Path format', () => { }; formatValidator(data, dataSchema, [pathFormat]) - .map(result => expect(result.success).toBe(false)) + .pipe(map(result => expect(result.success).toBe(false))) .subscribe(done, done.fail); }); }); diff --git a/packages/angular_devkit/schematics/src/rules/base.ts b/packages/angular_devkit/schematics/src/rules/base.ts index b4dee20290..9598251ca5 100644 --- a/packages/angular_devkit/schematics/src/rules/base.ts +++ b/packages/angular_devkit/schematics/src/rules/base.ts @@ -6,9 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/of'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/mergeMap'; +import { of as observableOf } from 'rxjs/observable/of'; +import { concatMap, map } from 'rxjs/operators'; import { FileOperator, Rule, SchematicContext, Source } from '../engine/interface'; import { FilteredTree } from '../tree/filtered'; import { FileEntry, FilePredicate, MergeStrategy, Tree } from '../tree/interface'; @@ -45,7 +44,7 @@ export function chain(rules: Rule[]): Rule { return (tree: Tree, context: SchematicContext) => { return rules.reduce((acc: Observable, curr: Rule) => { return callRule(curr, acc, context); - }, Observable.of(tree)); + }, observableOf(tree)); }; } @@ -67,7 +66,7 @@ export function mergeWith(source: Source, strategy: MergeStrategy = MergeStrateg return (tree: Tree, context: SchematicContext) => { const result = callSource(source, context); - return result.map(other => VirtualTree.merge(tree, other, strategy || context.strategy)); + return result.pipe(map(other => VirtualTree.merge(tree, other, strategy || context.strategy))); }; } @@ -91,8 +90,8 @@ export function branchAndMerge(rule: Rule, strategy = MergeStrategy.Default): Ru return (tree: Tree, context: SchematicContext) => { const branchedTree = branch(tree); - return callRule(rule, Observable.of(branchedTree), context) - .map(t => staticMerge(tree, t, strategy)); + return callRule(rule, observableOf(branchedTree), context) + .pipe(map(t => staticMerge(tree, t, strategy))); }; } @@ -118,15 +117,15 @@ export function partitionApplyMerge( if (!ruleNo) { // Shortcut. - return callRule(ruleYes, Observable.of(staticPartition(tree, predicate)[0]), context) - .map(yesTree => staticMerge(yesTree, no, context.strategy)); + return callRule(ruleYes, observableOf(staticPartition(tree, predicate)[0]), context) + .pipe(map(yesTree => staticMerge(yesTree, no, context.strategy))); } - return callRule(ruleYes, Observable.of(yes), context) - .concatMap(yesTree => { - return callRule(ruleNo, Observable.of(no), context) - .map(noTree => staticMerge(yesTree, noTree, context.strategy)); - }); + return callRule(ruleYes, observableOf(yes), context) + .pipe(concatMap(yesTree => { + return callRule(ruleNo, observableOf(no), context) + .pipe(map(noTree => staticMerge(yesTree, noTree, context.strategy))); + })); }; } diff --git a/packages/angular_devkit/schematics/src/rules/base_spec.ts b/packages/angular_devkit/schematics/src/rules/base_spec.ts index 4477726912..983743fc90 100644 --- a/packages/angular_devkit/schematics/src/rules/base_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/base_spec.ts @@ -13,8 +13,7 @@ import { MergeStrategy, partitionApplyMerge, } from '@angular-devkit/schematics'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/toPromise'; +import { of as observableOf } from 'rxjs/observable/of'; import { Rule, SchematicContext, Source } from '../engine/interface'; import { Tree } from '../tree/interface'; import { empty } from '../tree/static'; @@ -42,7 +41,7 @@ describe('chain', () => { const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, tree2); const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3); - callRule(chain([ rule0, rule1, rule2 ]), Observable.of(tree0), context) + callRule(chain([ rule0, rule1, rule2 ]), observableOf(tree0), context) .toPromise() .then(result => { expect(result).not.toBe(tree0); @@ -62,11 +61,11 @@ describe('chain', () => { const tree2 = empty(); const tree3 = empty(); - const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, Observable.of(tree1)); - const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, Observable.of(tree2)); + const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, observableOf(tree1)); + const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, observableOf(tree2)); const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3); - callRule(chain([ rule0, rule1, rule2 ]), Observable.of(tree0), context) + callRule(chain([ rule0, rule1, rule2 ]), observableOf(tree0), context) .toPromise() .then(result => { expect(result).not.toBe(tree0); @@ -116,8 +115,8 @@ describe('apply', () => { const tree3 = empty(); const source: Source = () => (sourceCalled = true, tree0); - const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, Observable.of(tree1)); - const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, Observable.of(tree2)); + const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, observableOf(tree1)); + const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, observableOf(tree2)); const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3); callSource(apply(source, [ rule0, rule1, rule2 ]), context) @@ -155,7 +154,7 @@ describe('partitionApplyMerge', () => { return empty(); }; - callRule(partitionApplyMerge(predicate, ruleYes, ruleNo), Observable.of(tree), context) + callRule(partitionApplyMerge(predicate, ruleYes, ruleNo), observableOf(tree), context) .toPromise() .then(result => { expect(result.exists('/test1')).toBe(false); diff --git a/packages/angular_devkit/schematics/src/rules/call.ts b/packages/angular_devkit/schematics/src/rules/call.ts index a0d703d0d7..d155c34edc 100644 --- a/packages/angular_devkit/schematics/src/rules/call.ts +++ b/packages/angular_devkit/schematics/src/rules/call.ts @@ -7,6 +7,7 @@ */ import { BaseException } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; import { _throw } from 'rxjs/observable/throw'; import { last } from 'rxjs/operators/last'; import { mergeMap } from 'rxjs/operators/mergeMap'; @@ -64,7 +65,7 @@ export function callSource(source: Source, context: SchematicContext): Observabl if (result === undefined) { return _throw(new InvalidSourceResultException(result)); } else if (TreeSymbol in result) { - return Observable.of(result as Tree); + return observableOf(result as Tree); } else if (Symbol.observable in result) { // Only return the last Tree, and make sure it's a Tree. return (result as Observable).pipe( @@ -84,31 +85,29 @@ export function callSource(source: Source, context: SchematicContext): Observabl export function callRule(rule: Rule, input: Observable, context: SchematicContext): Observable { - return input.pipe( - mergeMap(inputTree => { - const result = rule(inputTree, context) as object; + return input.pipe(mergeMap(inputTree => { + const result = rule(inputTree, context) as object; - if (result === undefined) { - return Observable.of(inputTree); - } else if (TreeSymbol in result) { - return Observable.of(result as Tree); - } else if (Symbol.observable in result) { - const obs = result as Observable; + if (result === undefined) { + return observableOf(inputTree); + } else if (TreeSymbol in result) { + return observableOf(result as Tree); + } else if (Symbol.observable in result) { + const obs = result as Observable; - // Only return the last Tree, and make sure it's a Tree. - return obs.pipe( - last(), - tap(inner => { - if (!(TreeSymbol in inner)) { - throw new InvalidRuleResultException(inner); - } - }), - ); - } else if (result === undefined) { - return Observable.of(inputTree); - } else { - return _throw(new InvalidRuleResultException(result)); - } - }), - ); + // Only return the last Tree, and make sure it's a Tree. + return obs.pipe( + last(), + tap(inner => { + if (!(TreeSymbol in inner)) { + throw new InvalidRuleResultException(inner); + } + }), + ); + } else if (result === undefined) { + return observableOf(inputTree); + } else { + return _throw(new InvalidRuleResultException(result)); + } + })); } diff --git a/packages/angular_devkit/schematics/src/rules/call_spec.ts b/packages/angular_devkit/schematics/src/rules/call_spec.ts index 08bb492afc..04b7b0af7c 100644 --- a/packages/angular_devkit/schematics/src/rules/call_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/call_spec.ts @@ -8,8 +8,7 @@ // tslint:disable:non-null-operator // tslint:disable:no-any import { MergeStrategy } from '@angular-devkit/schematics'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/toPromise'; +import { of as observableOf } from 'rxjs/observable/of'; import { Rule, SchematicContext, Source } from '../engine/interface'; import { Tree } from '../tree/interface'; import { empty } from '../tree/static'; @@ -52,7 +51,7 @@ describe('callSource', () => { }); it('errors if Observable of invalid source object', done => { - const source0: Source = () => Observable.of({} as Tree); + const source0: Source = () => observableOf({} as Tree); callSource(source0, context) .toPromise() @@ -76,7 +75,7 @@ describe('callSource', () => { it('works with an Observable', done => { const tree0 = empty(); - const source0: Source = () => Observable.of(tree0); + const source0: Source = () => observableOf(tree0); callSource(source0, context) .toPromise() @@ -89,7 +88,7 @@ describe('callSource', () => { describe('callRule', () => { it('errors if invalid source object', done => { - const tree0 = Observable.of(empty()); + const tree0 = observableOf(empty()); const rule0: Rule = () => ({} as Tree); callRule(rule0, tree0, context) @@ -101,8 +100,8 @@ describe('callRule', () => { }); it('errors if Observable of invalid source object', done => { - const tree0 = Observable.of(empty()); - const rule0: Rule = () => Observable.of({} as Tree); + const tree0 = observableOf(empty()); + const rule0: Rule = () => observableOf({} as Tree); callRule(rule0, tree0, context) .toPromise() @@ -116,7 +115,7 @@ describe('callRule', () => { const tree0 = empty(); const rule0: Rule = () => undefined; - callRule(rule0, Observable.of(tree0), context) + callRule(rule0, observableOf(tree0), context) .toPromise() .then(tree => { expect(tree).toBe(tree0); @@ -128,7 +127,7 @@ describe('callRule', () => { const tree0 = empty(); const rule0: Rule = () => tree0; - callRule(rule0, Observable.of(tree0), context) + callRule(rule0, observableOf(tree0), context) .toPromise() .then(tree => { expect(tree).toBe(tree0); @@ -138,9 +137,9 @@ describe('callRule', () => { it('works with an Observable', done => { const tree0 = empty(); - const rule0: Rule = () => Observable.of(tree0); + const rule0: Rule = () => observableOf(tree0); - callRule(rule0, Observable.of(tree0), context) + callRule(rule0, observableOf(tree0), context) .toPromise() .then(tree => { expect(tree).toBe(tree0); diff --git a/packages/angular_devkit/schematics/src/rules/move_spec.ts b/packages/angular_devkit/schematics/src/rules/move_spec.ts index 523213b1e1..e54d7d448a 100644 --- a/packages/angular_devkit/schematics/src/rules/move_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/move_spec.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:non-null-operator -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/toPromise'; +import { of as observableOf } from 'rxjs/observable/of'; import { SchematicContext } from '../engine/interface'; import { VirtualTree } from '../tree/virtual'; import { callRule } from './call'; @@ -24,7 +23,7 @@ describe('move', () => { tree.create('a/b/file2', 'hello world'); tree.create('a/c/file3', 'hello world'); - callRule(move('sub'), Observable.of(tree), context) + callRule(move('sub'), observableOf(tree), context) .toPromise() .then(result => { expect(result.exists('sub/a/b/file1')).toBe(true); @@ -40,7 +39,7 @@ describe('move', () => { tree.create('a/b/file2', 'hello world'); tree.create('a/c/file3', 'hello world'); - callRule(move('a/b', 'sub'), Observable.of(tree), context) + callRule(move('a/b', 'sub'), observableOf(tree), context) .toPromise() .then(result => { expect(result.exists('sub/file1')).toBe(true); diff --git a/packages/angular_devkit/schematics/src/rules/schematic.ts b/packages/angular_devkit/schematics/src/rules/schematic.ts index 3e76bbec26..c9f1d57c5e 100644 --- a/packages/angular_devkit/schematics/src/rules/schematic.ts +++ b/packages/angular_devkit/schematics/src/rules/schematic.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; import { Rule, SchematicContext } from '../engine/interface'; import { Tree } from '../tree/interface'; import { branch } from '../tree/static'; @@ -25,7 +25,7 @@ export function externalSchematic(collectionName: string const collection = context.engine.createCollection(collectionName); const schematic = collection.createSchematic(schematicName); - return schematic.call(options, Observable.of(branch(input)), context); + return schematic.call(options, observableOf(branch(input)), context); }; } @@ -41,6 +41,6 @@ export function schematic(schematicName: string, options const collection = context.schematic.collection; const schematic = collection.createSchematic(schematicName); - return schematic.call(options, Observable.of(branch(input)), context); + return schematic.call(options, observableOf(branch(input)), context); }; } diff --git a/packages/angular_devkit/schematics/src/sink/dryrun.ts b/packages/angular_devkit/schematics/src/sink/dryrun.ts index b29c4dae6b..7e781a12b6 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun.ts @@ -7,7 +7,7 @@ */ import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; -import 'rxjs/add/observable/empty'; +import { empty } from 'rxjs/observable/empty'; import { FileSystemSink } from './filesystem'; @@ -110,6 +110,6 @@ export class DryRunSink extends FileSystemSink { this._subject.complete(); - return Observable.empty(); + return empty(); } } diff --git a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts index 4d73df3a19..86a57d5556 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts @@ -8,8 +8,7 @@ import { normalize } from '@angular-devkit/core'; import * as fs from 'fs'; import * as path from 'path'; -import 'rxjs/add/operator/toArray'; -import 'rxjs/add/operator/toPromise'; +import { toArray } from 'rxjs/operators'; import { FileSystemCreateTree, FileSystemTree } from '../tree/filesystem'; import { InMemoryFileSystemTreeHost } from '../tree/memory-host'; import { optimize } from '../tree/static'; @@ -45,8 +44,7 @@ describe('DryRunSink', () => { expect(tree.files).toEqual(files.map(normalize)); const sink = new DryRunSink(outputRoot); - sink.reporter - .toArray() + sink.reporter.pipe(toArray()) .toPromise() .then(infos => { expect(infos.length).toBe(4); @@ -75,8 +73,7 @@ describe('DryRunSink', () => { // Need to create this file on the filesystem, otherwise the commit phase will fail. fs.writeFileSync(path.join(outputRoot, 'hello'), ''); const sink = new DryRunSink(outputRoot); - sink.reporter - .toArray() + sink.reporter.pipe(toArray()) .toPromise() .then(infos => { expect(infos.length).toBe(2); diff --git a/packages/angular_devkit/schematics/src/sink/sink.ts b/packages/angular_devkit/schematics/src/sink/sink.ts index af44221676..beb4bf1412 100644 --- a/packages/angular_devkit/schematics/src/sink/sink.ts +++ b/packages/angular_devkit/schematics/src/sink/sink.ts @@ -6,14 +6,17 @@ * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/defer'; -import 'rxjs/add/observable/from'; -import 'rxjs/add/operator/concat'; -import 'rxjs/add/operator/concatMap'; -import 'rxjs/add/operator/ignoreElements'; -import 'rxjs/add/operator/last'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/mergeMap'; +import { defer as deferObservable } from 'rxjs/observable/defer'; +import { empty } from 'rxjs/observable/empty'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { of as observableOf } from 'rxjs/observable/of'; +import { + concat, + concatMap, + ignoreElements, + map, + mergeMap, +} from 'rxjs/operators'; import { FileAlreadyExistException, FileDoesNotExistException } from '../exception/exception'; import { Action, @@ -66,21 +69,21 @@ export abstract class SimpleSinkBase implements Sink { protected _validateOverwriteAction(action: OverwriteFileAction): Observable { return this._validateFileExists(action.path) - .map(b => { if (!b) { this._fileDoesNotExistException(action.path); } }); + .pipe(map(b => { if (!b) { this._fileDoesNotExistException(action.path); } })); } protected _validateCreateAction(action: CreateFileAction): Observable { return this._validateFileExists(action.path) - .map(b => { if (b) { this._fileAlreadyExistException(action.path); } }); + .pipe(map(b => { if (b) { this._fileAlreadyExistException(action.path); } })); } protected _validateRenameAction(action: RenameFileAction): Observable { - return this._validateFileExists(action.path) - .map(b => { if (!b) { this._fileDoesNotExistException(action.path); } }) - .mergeMap(() => this._validateFileExists(action.to)) - .map(b => { if (b) { this._fileAlreadyExistException(action.to); } }); + return this._validateFileExists(action.path).pipe( + map(b => { if (!b) { this._fileDoesNotExistException(action.path); } }), + mergeMap(() => this._validateFileExists(action.to)), + map(b => { if (b) { this._fileAlreadyExistException(action.to); } })); } protected _validateDeleteAction(action: DeleteFileAction): Observable { return this._validateFileExists(action.path) - .map(b => { if (!b) { this._fileDoesNotExistException(action.path); } }); + .pipe(map(b => { if (!b) { this._fileDoesNotExistException(action.path); } })); } validateSingleAction(action: Action): Observable { @@ -94,11 +97,11 @@ export abstract class SimpleSinkBase implements Sink { } commitSingleAction(action: Action): Observable { - return Observable.empty() - .concat(new Observable(observer => { + return empty().pipe( + concat(new Observable(observer => { return this.validateSingleAction(action).subscribe(observer); - })) - .concat(new Observable(observer => { + })), + concat(new Observable(observer => { let committed = null; switch (action.kind) { case 'o': committed = this._overwriteFile(action.path, action.content); break; @@ -112,29 +115,31 @@ export abstract class SimpleSinkBase implements Sink { } else { observer.complete(); } - })); + }))); } commit(tree: Tree): Observable { - const actions = Observable.from(tree.actions); + const actions = observableFrom(tree.actions); - return (this.preCommit() || Observable.empty()) - .concat(Observable.defer(() => actions)) - .concatMap((action: Action) => { + return (this.preCommit() || empty()).pipe( + concat(deferObservable(() => actions)), + concatMap((action: Action) => { const maybeAction = this.preCommitAction(action); if (!maybeAction) { - return Observable.of(action); + return observableOf(action); } else if (isAction(maybeAction)) { - return Observable.of(maybeAction); + return observableOf(maybeAction); } else { return maybeAction; } - }) - .concatMap((action: Action) => { - return this.commitSingleAction(action).ignoreElements().concat([action]); - }) - .concatMap((action: Action) => this.postCommitAction(action) || Observable.empty()) - .concat(Observable.defer(() => this._done())) - .concat(Observable.defer(() => this.postCommit() || Observable.empty())); + }), + concatMap((action: Action) => { + return this.commitSingleAction(action).pipe( + ignoreElements(), + concat([action])); + }), + concatMap((action: Action) => this.postCommitAction(action) || empty()), + concat(deferObservable(() => this._done())), + concat(deferObservable(() => this.postCommit() || empty()))); } } diff --git a/packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts b/packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts index a2ba8e2fff..542bc77c16 100644 --- a/packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts +++ b/packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts @@ -6,13 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/concat'; -import 'rxjs/add/observable/empty'; -import 'rxjs/add/observable/merge'; -import 'rxjs/add/observable/of'; -import 'rxjs/add/operator/do'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/reduce'; +import { concat as concatObservables } from 'rxjs/observable/concat'; +import { empty } from 'rxjs/observable/empty'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { of as observableOf } from 'rxjs/observable/of'; +import { concatMap, reduce } from 'rxjs/operators'; import { CreateFileAction } from '../tree/action'; import { UpdateBuffer } from '../utility/update-buffer'; import { SimpleSinkBase } from './sink'; @@ -35,14 +33,14 @@ export abstract class VirtualFileSystemSink extends SimpleSinkBase { constructor(protected _host: VirtualFileSystemSinkHost, protected _force = false) { super(); } protected _validateCreateAction(action: CreateFileAction): Observable { - return this._force ? Observable.empty() : super._validateCreateAction(action); + return this._force ? empty() : super._validateCreateAction(action); } protected _validateFileExists(p: string): Observable { if (this._filesToCreate.has(p) || this._filesToUpdate.has(p)) { - return Observable.of(true); + return observableOf(true); } else if (this._filesToDelete.has(p)) { - return Observable.of(false); + return observableOf(false); } else { return this._host.exists(p); } @@ -51,17 +49,17 @@ export abstract class VirtualFileSystemSink extends SimpleSinkBase { protected _overwriteFile(path: string, content: Buffer): Observable { this._filesToUpdate.set(path, new UpdateBuffer(content)); - return Observable.empty(); + return empty(); } protected _createFile(path: string, content: Buffer): Observable { this._filesToCreate.set(path, new UpdateBuffer(content)); - return Observable.empty(); + return empty(); } protected _renameFile(from: string, to: string): Observable { this._filesToRename.add([from, to]); - return Observable.empty(); + return empty(); } protected _deleteFile(path: string): Observable { if (this._filesToCreate.has(path)) { @@ -71,20 +69,20 @@ export abstract class VirtualFileSystemSink extends SimpleSinkBase { this._filesToDelete.add(path); } - return Observable.empty(); + return empty(); } _done() { // Really commit everything to the actual filesystem. - return Observable.concat( - Observable.from([...this._filesToDelete.values()]) - .concatMap(path => this._host.delete(path)), - Observable.from([...this._filesToCreate.entries()]) - .concatMap(([path, buffer]) => this._host.write(path, buffer.generate())), - Observable.from([...this._filesToRename.entries()]) - .concatMap(([_, [path, to]]) => this._host.rename(path, to)), - Observable.from([...this._filesToUpdate.entries()]) - .concatMap(([path, buffer]) => this._host.write(path, buffer.generate())), - ).reduce(() => {}); + return concatObservables( + observableFrom([...this._filesToDelete.values()]).pipe( + concatMap(path => this._host.delete(path))), + observableFrom([...this._filesToCreate.entries()]).pipe( + concatMap(([path, buffer]) => this._host.write(path, buffer.generate()))), + observableFrom([...this._filesToRename.entries()]).pipe( + concatMap(([_, [path, to]]) => this._host.rename(path, to))), + observableFrom([...this._filesToUpdate.entries()]).pipe( + concatMap(([path, buffer]) => this._host.write(path, buffer.generate()))), + ).pipe(reduce(() => {})); } } diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 6a5354bf8d..79d2e40b26 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -22,6 +22,8 @@ import { validateOptionsWithSchema, } from '@angular-devkit/schematics/tools'; import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; +import { map } from 'rxjs/operators'; import { callRule } from '../src/rules/call'; @@ -58,10 +60,10 @@ export class SchematicTestRunner { tree?: Tree, ): Observable { const schematic = this._collection.createSchematic(schematicName); - const host = Observable.of(tree || new VirtualTree); + const host = observableOf(tree || new VirtualTree); return schematic.call(opts || {}, host, { logger: this._logger }) - .map(tree => new UnitTestTree(tree)); + .pipe(map(tree => new UnitTestTree(tree))); } runSchematic( @@ -72,7 +74,7 @@ export class SchematicTestRunner { const schematic = this._collection.createSchematic(schematicName); let result: UnitTestTree | null = null; - const host = Observable.of(tree || new VirtualTree); + const host = observableOf(tree || new VirtualTree); schematic.call(opts || {}, host, { logger: this._logger }) .subscribe(t => result = new UnitTestTree(t)); @@ -87,6 +89,6 @@ export class SchematicTestRunner { callRule(rule: Rule, tree: Tree, parentContext?: Partial): Observable { const context = this._engine.createContext({} as Schematic<{}, {}>, parentContext); - return callRule(rule, Observable.of(tree), context); + return callRule(rule, observableOf(tree), context); } } diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index 9df069aa56..dae6337101 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -16,6 +16,7 @@ import { UnknownCollectionException, } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; @@ -87,7 +88,7 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { schematic: SchematicDescription, options: OptionT, ): Observable { - return (Observable.of(options) + return (observableOf(options) .pipe(...this._hosts.map(host => mergeMap(opt => host.transformOptions(schematic, opt)))) ) as {} as Observable; } diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 802c4bb40c..b6989d8580 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -15,6 +15,7 @@ import { } from '@angular-devkit/schematics'; import { dirname, isAbsolute, join, resolve } from 'path'; import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; import { @@ -247,7 +248,7 @@ export abstract class FileSystemEngineHostBase implements schematic: FileSystemSchematicDesc, options: OptionT, ): Observable { - return (Observable.of(options) + return (observableOf(options) .pipe( ...this._transforms.map(tFn => mergeMap(opt => { const newOptions = tFn(schematic, opt); diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index b142ae208d..5b4a8e18ba 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -11,6 +11,7 @@ import { } from '@angular-devkit/core'; import { SchematicDescription } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; import { first } from 'rxjs/operators/first'; import { map } from 'rxjs/operators/map'; import { mergeMap } from 'rxjs/operators/mergeMap'; @@ -68,6 +69,6 @@ export function validateOptionsWithSchema(registry: schema.SchemaRegistry) { ); } - return Observable.of(options); + return observableOf(options); }; } diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index e251a43eb1..5e3a64dd97 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -27,9 +27,13 @@ import { validateOptionsWithSchema, } from '@angular-devkit/schematics/tools'; import * as minimist from 'minimist'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/ignoreElements'; - +import { of as observableOf } from 'rxjs/observable/of'; +import { + concat, + concatMap, + ignoreElements, + map, +} from 'rxjs/operators'; /** * Show usage of the CLI tool, and exit the process. @@ -162,7 +166,7 @@ const dryRun: boolean = argv['dry-run'] === null ? debug : argv['dry-run']; const force = argv['force']; /** This host is the original Tree created from the current directory. */ -const host = Observable.of(new FileSystemTree(new FileSystemHost(process.cwd()))); +const host = observableOf(new FileSystemTree(new FileSystemHost(process.cwd()))); // We need two sinks if we want to output what will happen, and actually do the work. // Note that fsSink is technically not used if `--dry-run` is passed, but creating the Sink @@ -243,26 +247,31 @@ delete args._; * (if --dry-run was not passed or an error was detected by dryRun). */ schematic.call(args, host, { debug, logger: logger.asApi() }) - .map((tree: Tree) => Tree.optimize(tree)) - .concatMap((tree: Tree) => { - return dryRunSink.commit(tree).ignoreElements().concat(Observable.of(tree)); - }) - .concatMap((tree: Tree) => { - if (!error) { - // Output the logging queue. - loggingQueue.forEach(log => logger.info(log)); - } + .pipe( + map((tree: Tree) => Tree.optimize(tree)), + concatMap((tree: Tree) => { + return dryRunSink.commit(tree).pipe( + ignoreElements(), + concat(observableOf(tree))); + }), + concatMap((tree: Tree) => { + if (!error) { + // Output the logging queue. + loggingQueue.forEach(log => logger.info(log)); + } - if (nothingDone) { - logger.info('Nothing to be done.'); - } + if (nothingDone) { + logger.info('Nothing to be done.'); + } - if (dryRun || error) { - return Observable.of(tree); - } + if (dryRun || error) { + return observableOf(tree); + } - return fsSink.commit(tree).ignoreElements().concat(Observable.of(tree)); - }) + return fsSink.commit(tree).pipe( + ignoreElements(), + concat(observableOf(tree))); + })) .subscribe({ error(err: Error) { if (debug) { diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 6a629639e1..11e61605e0 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -14,7 +14,6 @@ import { chain, schematic, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import { addImportToModule, diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index b2ca197168..69fc91d0b7 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -23,7 +23,7 @@ "@angular/router": "^5.1.0",<% if (serviceWorker) { %> "@angular/service-worker": "^5.1.0",<% } %> "core-js": "^2.4.1", - "rxjs": "^5.5.2", + "rxjs": "^5.5.6", "zone.js": "^0.8.19" }, "devDependencies": { diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 02e1bf7c86..cb5404b51e 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -21,7 +21,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import * as stringUtils from '../strings'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 8ade528a88..0c4ccbf084 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -21,7 +21,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import * as stringUtils from '../strings'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index a1c76119ab..61dcfc75c4 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -21,7 +21,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import * as stringUtils from '../strings'; import { addProviderToModule } from '../utility/ast-utils'; diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index 3b442f2534..5ef23428ce 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -21,7 +21,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import * as stringUtils from '../strings'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index cc98ea0409..17de19ac30 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -21,7 +21,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import * as stringUtils from '../strings'; import { addProviderToModule } from '../utility/ast-utils'; diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 5c68b282a9..dc90ee0b77 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -17,7 +17,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import 'rxjs/add/operator/merge'; import * as ts from 'typescript'; import * as stringUtils from '../strings'; import { findNode, getDecoratorMetadata } from '../utility/ast-utils'; diff --git a/packages/schematics/package-update/package.json b/packages/schematics/package-update/package.json index 0b0f911ef1..120e9bc726 100644 --- a/packages/schematics/package-update/package.json +++ b/packages/schematics/package-update/package.json @@ -15,7 +15,7 @@ "peerDependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", - "rxjs": "^5.5.2", + "rxjs": "^5.5.6", "semver": "^5.3.0", "semver-intersect": "^1.1.2" } diff --git a/packages/schematics/package-update/utility/npm.ts b/packages/schematics/package-update/utility/npm.ts index 95f3bc7c5c..eaa55ae683 100644 --- a/packages/schematics/package-update/utility/npm.ts +++ b/packages/schematics/package-update/utility/npm.ts @@ -16,6 +16,9 @@ import { import * as http from 'http'; import { Observable } from 'rxjs/Observable'; import { ReplaySubject } from 'rxjs/ReplaySubject'; +import { empty } from 'rxjs/observable/empty'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { of as observableOf } from 'rxjs/observable/of'; import { concat, ignoreElements, map, mergeMap } from 'rxjs/operators'; import * as semver from 'semver'; @@ -122,27 +125,27 @@ function _getRecursiveVersions( logger: logging.LoggerApi, loose: boolean, ): Observable { - return Observable.from(kPackageJsonDependencyFields).pipe( + return observableFrom(kPackageJsonDependencyFields).pipe( mergeMap(field => { const deps = packageJson[field] as JsonObject; if (deps) { - return Observable.from( + return observableFrom( Object.keys(deps) .map(depName => depName in deps ? [depName, deps[depName]] : null) .filter(x => !!x), ); } else { - return Observable.empty(); + return empty(); } }), mergeMap(([depName, depVersion]: [string, string]) => { if (!packages[depName] || packages[depName] === depVersion) { - return Observable.empty(); + return empty(); } if (allVersions[depName] && semver.intersects(allVersions[depName], depVersion)) { allVersions[depName] = semverIntersect.intersect(allVersions[depName], depVersion); - return Observable.empty(); + return empty(); } return _getNpmPackageJson(depName, logger).pipe( @@ -154,7 +157,7 @@ function _getRecursiveVersions( const npmPackageVersions = Object.keys(npmPackageJson['versions'] as JsonObject); const match = semver.maxSatisfying(npmPackageVersions, updateVersion); if (!match) { - return Observable.empty(); + return empty(); } if (semver.lt( semverIntersect.parseRange(updateVersion).version, @@ -234,7 +237,7 @@ export function updatePackageJson( return _getRecursiveVersions(packageJson, packages, allVersions, context.logger, loose).pipe( ignoreElements(), - concat(Observable.of(tree)), + concat(observableOf(tree)), map(_ => tree), // Just to get the TypeScript typesystem fixed. ); }, diff --git a/packages/schematics/schematics/package.json b/packages/schematics/schematics/package.json index f94a729df2..477f27fc58 100644 --- a/packages/schematics/schematics/package.json +++ b/packages/schematics/schematics/package.json @@ -15,6 +15,6 @@ "peerDependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", - "rxjs": "^5.5.2" + "rxjs": "^5.5.6" } } From 4790a5a7112adfc7756654a689571e557ece4cbc Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 12 Jan 2018 15:44:58 -0500 Subject: [PATCH 027/724] refactor: Correct additional lettable operator --- .../schematics/tools/file-system-engine-host-base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index b6989d8580..d80b91553c 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -255,7 +255,7 @@ export abstract class FileSystemEngineHostBase implements if (Symbol.observable in newOptions) { return newOptions; } else { - return Observable.of(newOptions); + return observableOf(newOptions); } })), )) as {} as Observable; From 5b699f7dc10b00f09b7eb423666618143934ab44 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 12 Jan 2018 19:08:31 -0500 Subject: [PATCH 028/724] fix(@angular-devkit/schematics): support existing CLI versions --- packages/angular_devkit/schematics/src/sink/filesystem.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/schematics/src/sink/filesystem.ts b/packages/angular_devkit/schematics/src/sink/filesystem.ts index dbf0669681..efabcd9c63 100644 --- a/packages/angular_devkit/schematics/src/sink/filesystem.ts +++ b/packages/angular_devkit/schematics/src/sink/filesystem.ts @@ -8,6 +8,7 @@ import * as fs from 'fs'; import { dirname, join } from 'path'; import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/operator/concat'; // provides support for CLI < 1.6.5/1.7.0-beta.1 import { VirtualFileSystemSink, VirtualFileSystemSinkHost } from './virtual-filesystem'; From c88d991344a910903c2178b537a919c9da2de03f Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 12 Jan 2018 16:33:35 -0800 Subject: [PATCH 029/724] build: Release artifacts --- .monorepo.json | 32 +- package-lock.json | 799 +--------------------------------------------- 2 files changed, 19 insertions(+), 812 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 87be3f43b5..8f90fef059 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.0.18", - "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" + "version": "0.0.19", + "hash": "9ccd85dc54ab247d40693a944048dd11" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.37", - "hash": "d1eb36849df450c49b53987ed4635040" + "version": "0.0.38", + "hash": "c761ff4c56bb246d2de7e3d0e61b129f" }, "@angular-devkit/core": { "name": "Core", @@ -64,8 +64,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.24", - "hash": "64d0a02a2e02e518b20ebecdd49e633b" + "version": "0.0.25", + "hash": "6ee145e7539d671c8f80244d5f6f5834" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -75,31 +75,31 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.45", - "hash": "7c0e2822256d6bb74f0780f1794449b6" + "version": "0.0.46", + "hash": "27f39a8765d2365bff42726fda817625" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.3", - "hash": "4e7014ce3dbde3c854f6fda5753e85c3" + "version": "0.0.4", + "hash": "16cbb52254288d58fc8535722bf939a3" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.12", - "hash": "783fe48838794f2e8a4ef60a34dc7c4d" + "version": "0.1.13", + "hash": "b76cc4a5d165349e0b10b6ed49d64603" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.12", + "version": "0.0.13", "section": "Schematics", - "hash": "67a71a68bde3c29171f10fdad718ecc9" + "hash": "9f113ad0f15ab50c25fc96c3c0f36fb1" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.2", + "version": "0.0.3", "section": "Schematics", - "hash": "6ba69d0f7fe59dd32c57f243dbb4b131" + "hash": "49aa6e68b802f7e5f1b6da3ef5e34337" } } } diff --git a/package-lock.json b/package-lock.json index a53d40166a..3362505ab6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,12 +60,9 @@ "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==" }, "@types/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LrnsgZIfJaysFkv9rRJp4/uAyqw87oVed3s1hhF83nwbo9c7MG9g5DqR0seHP+lkX4ldmMrVolPjQSe2ZfD0yA==", - "requires": { - "source-map": "0.5.7" - } + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", + "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==" }, "@types/tapable": { "version": "0.2.4", @@ -440,7 +437,6 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -1046,795 +1042,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "optional": true, - "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "optional": true, - "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - } - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", From 77eb8ad00815e1861b176c1de69888900fe0d769 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 12 Jan 2018 16:52:55 -0800 Subject: [PATCH 030/724] release: artifacts --- .monorepo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 8f90fef059..ebaea86ca3 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -75,13 +75,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.46", - "hash": "27f39a8765d2365bff42726fda817625" + "version": "0.0.48", + "hash": "6eb5fd28153bf934ae2ff56117ef1cd2" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.4", - "hash": "16cbb52254288d58fc8535722bf939a3" + "version": "0.0.5", + "hash": "f2f4f4539198a7731efd37c13e5581b7" }, "@schematics/angular": { "name": "Angular Schematics", From 727e179052c264dd60357dba26e1bf362b5a76a6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 16 Jan 2018 14:13:03 -0500 Subject: [PATCH 031/724] build: cleanup package dependencies --- packages/angular_devkit/build_optimizer/package.json | 2 +- packages/angular_devkit/core/package.json | 3 ++- packages/angular_devkit/schematics/package.json | 6 +++--- packages/angular_devkit/schematics_cli/package.json | 2 +- packages/schematics/angular/package.json | 3 ++- packages/schematics/package-update/package.json | 10 ++++++---- packages/schematics/schematics/package.json | 3 +-- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/package.json b/packages/angular_devkit/build_optimizer/package.json index a986fb2541..31ec0f8f63 100644 --- a/packages/angular_devkit/build_optimizer/package.json +++ b/packages/angular_devkit/build_optimizer/package.json @@ -14,7 +14,7 @@ "dependencies": { "loader-utils": "^1.1.0", "source-map": "^0.5.6", - "typescript": "~2.6.1", + "typescript": "~2.6.2", "webpack-sources": "^1.0.1" } } diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index fb7a470a19..25407cd3f9 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -13,6 +13,7 @@ "dependencies": { "ajv": "~5.5.1", "chokidar": "^1.7.0", - "source-map": "^0.5.6" + "source-map": "^0.5.6", + "rxjs": "^5.5.6" } } diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 5cea537fee..041a541fd2 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -16,10 +16,10 @@ "schematics" ], "dependencies": { - "@angular-devkit/core": "0.0.0", "@ngtools/json-schema": "^1.1.0", - "@schematics/schematics": "0.0.0", - "minimist": "^1.2.0", "rxjs": "^5.5.6" + }, + "peerDependencies": { + "@angular-devkit/core": "0.0.0" } } diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index d72c676c77..4ce732692b 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -21,6 +21,6 @@ "@angular-devkit/schematics": "0.0.0", "@schematics/schematics": "0.0.0", "minimist": "^1.2.0", - "rxjs": "^5.5.2" + "rxjs": "^5.5.6" } } diff --git a/packages/schematics/angular/package.json b/packages/schematics/angular/package.json index f6fda11298..9cf10dc6fd 100644 --- a/packages/schematics/angular/package.json +++ b/packages/schematics/angular/package.json @@ -12,9 +12,10 @@ }, "schematics": "./collection.json", "dependencies": { - "@angular-devkit/core": "0.0.0" + "typescript": "~2.6.2" }, "peerDependencies": { + "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0" } } diff --git a/packages/schematics/package-update/package.json b/packages/schematics/package-update/package.json index 120e9bc726..171028bb95 100644 --- a/packages/schematics/package-update/package.json +++ b/packages/schematics/package-update/package.json @@ -12,11 +12,13 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "schematics": "./collection.json", + "dependencies": { + "semver": "^5.3.0", + "semver-intersect": "^1.1.2", + "rxjs": "^5.5.6" + }, "peerDependencies": { "@angular-devkit/core": "0.0.0", - "@angular-devkit/schematics": "0.0.0", - "rxjs": "^5.5.6", - "semver": "^5.3.0", - "semver-intersect": "^1.1.2" + "@angular-devkit/schematics": "0.0.0" } } diff --git a/packages/schematics/schematics/package.json b/packages/schematics/schematics/package.json index 477f27fc58..7be96e5c32 100644 --- a/packages/schematics/schematics/package.json +++ b/packages/schematics/schematics/package.json @@ -14,7 +14,6 @@ "schematics": "./collection.json", "peerDependencies": { "@angular-devkit/core": "0.0.0", - "@angular-devkit/schematics": "0.0.0", - "rxjs": "^5.5.6" + "@angular-devkit/schematics": "0.0.0" } } From 2499ae659b0cfcd5a5e8b40bb7b1ab273c471952 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 16 Jan 2018 14:24:47 -0500 Subject: [PATCH 032/724] fix(@angular-devkit/schematics-cli): cleanup schematics split --- bin/schematics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/schematics b/bin/schematics index 7308c2c1e5..748599df46 100755 --- a/bin/schematics +++ b/bin/schematics @@ -11,4 +11,4 @@ require('../lib/bootstrap-local'); const packages = require('../lib/packages').packages; -require(packages['@angular-devkit/schematics'].bin['schematics']); +require(packages['@angular-devkit/schematics-cli'].bin['schematics']); From ebb74694752ff89f6eeedb5d245b9408f498e565 Mon Sep 17 00:00:00 2001 From: Sibiraj Date: Fri, 12 Jan 2018 11:35:47 +0530 Subject: [PATCH 033/724] refactor: remove deprecated typeof-compare --- packages/schematics/angular/application/files/tslint.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/application/files/tslint.json b/packages/schematics/angular/application/files/tslint.json index 2fa7b03a40..f28caa94d6 100644 --- a/packages/schematics/angular/application/files/tslint.json +++ b/packages/schematics/angular/application/files/tslint.json @@ -107,7 +107,6 @@ "variable-declaration": "nospace" } ], - "typeof-compare": true, "unified-signatures": true, "variable-name": false, "whitespace": [ From fd481505f3c4d691304c633a940f0b562f03ae87 Mon Sep 17 00:00:00 2001 From: Carlos Edinson Roso Espinosa Date: Sat, 13 Jan 2018 23:07:11 -0500 Subject: [PATCH 034/724] docs: add schematics-cli package to supported commit scopes --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4008bb6cb8..0cc4327a61 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -197,6 +197,7 @@ The following is the list of supported scopes: * **@angular-devkit/core** * **@angular-devkit/build-optimizer** * **@angular-devkit/schematics** +* **@angular-devkit/schematics-cli** * **@schematics/angular** * **@schematics/schematics** From ebbbd418fb455d5a8b60943ce95f6d8f2cee6c46 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 14 Dec 2017 16:36:11 +0000 Subject: [PATCH 035/724] fix(@schematics/angular): don't overwrite target for specs There's no need to. --- .../angular/application/files/__sourcedir__/tsconfig.spec.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json b/packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json index 97ebdc48c2..1df99a878c 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json +++ b/packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json @@ -4,7 +4,6 @@ "outDir": "<%= sourcedir.split('/').map(x => '..').join('/') %>/out-tsc/spec", "baseUrl": "./", "module": "commonjs", - "target": "es5", "types": [ "jasmine", "node" From 0f52facf0ab08859b00c030f040bdb77222d9da3 Mon Sep 17 00:00:00 2001 From: Karthik K Date: Tue, 16 Jan 2018 13:33:22 +0530 Subject: [PATCH 036/724] feat(@schematics/angular): upgrade to ng 5.2.0 and typescript 2.6.x --- .../angular/application/files/package.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index 69fc91d0b7..f53bf5a4c4 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -12,24 +12,24 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.1.0", - "@angular/common": "^5.1.0", - "@angular/compiler": "^5.1.0", - "@angular/core": "^5.1.0", - "@angular/forms": "^5.1.0", - "@angular/http": "^5.1.0", - "@angular/platform-browser": "^5.1.0", - "@angular/platform-browser-dynamic": "^5.1.0", - "@angular/router": "^5.1.0",<% if (serviceWorker) { %> - "@angular/service-worker": "^5.1.0",<% } %> + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0",<% if (serviceWorker) { %> + "@angular/service-worker": "^5.2.0",<% } %> "core-js": "^2.4.1", "rxjs": "^5.5.6", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "<%= version %>", - "@angular/compiler-cli": "^5.1.0", - "@angular/language-service": "^5.1.0",<% if (!minimal) { %> + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0",<% if (!minimal) { %> "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", @@ -45,6 +45,6 @@ "protractor": "~5.1.2", "ts-node": "~3.2.0", "tslint": "~5.9.1",<% } %> - "typescript": "~2.5.3" + "typescript": "~2.6.2" } } From d5159101515f56c501226ef91e160e058b599390 Mon Sep 17 00:00:00 2001 From: Karthik K Date: Tue, 16 Jan 2018 13:36:02 +0530 Subject: [PATCH 037/724] feat(@schematics/angular): upgrade ts-node to 4.1.0 --- packages/schematics/angular/application/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index f53bf5a4c4..1ef9d55992 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -43,7 +43,7 @@ "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", - "ts-node": "~3.2.0", + "ts-node": "~4.1.0", "tslint": "~5.9.1",<% } %> "typescript": "~2.6.2" } From 653bb81eb60a3c013750e01f416a4e78182fde5f Mon Sep 17 00:00:00 2001 From: Karthik K Date: Thu, 18 Jan 2018 23:04:03 +0530 Subject: [PATCH 038/724] revert: revert back to ts 2.5.3 because of angular/angular#21591 --- packages/schematics/angular/application/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index 1ef9d55992..acf30ee48b 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -45,6 +45,6 @@ "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1",<% } %> - "typescript": "~2.6.2" + "typescript": "~2.5.3" } } From 7f1ab5879c95029c673ea0378472c42703b45d01 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 18 Jan 2018 11:56:56 -0800 Subject: [PATCH 039/724] release: patch --- .monorepo.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index ebaea86ca3..d819037908 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.0.19", - "hash": "9ccd85dc54ab247d40693a944048dd11" + "version": "0.0.20", + "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.38", - "hash": "c761ff4c56bb246d2de7e3d0e61b129f" + "version": "0.0.39", + "hash": "d33ea15e49b95f0d2b38bba7991e94d0" }, "@angular-devkit/core": { "name": "Core", @@ -64,8 +64,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.25", - "hash": "6ee145e7539d671c8f80244d5f6f5834" + "version": "0.0.26", + "hash": "42ee618f548ef57ed2a606db12dcf719" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -75,31 +75,31 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.48", - "hash": "6eb5fd28153bf934ae2ff56117ef1cd2" + "version": "0.0.49", + "hash": "03d9a2f80bc8d590b6e1113b84f183e9" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.5", - "hash": "f2f4f4539198a7731efd37c13e5581b7" + "version": "0.0.6", + "hash": "51b96b1f651fddcc1b44a95005dceb29" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.13", - "hash": "b76cc4a5d165349e0b10b6ed49d64603" + "version": "0.1.14", + "hash": "c7f5c3e3724df9cf9f51947fdd9f8a77" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.13", + "version": "0.0.14", "section": "Schematics", - "hash": "9f113ad0f15ab50c25fc96c3c0f36fb1" + "hash": "0737267c88f3ed4ff28843f85d113144" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.3", + "version": "0.0.4", "section": "Schematics", - "hash": "49aa6e68b802f7e5f1b6da3ef5e34337" + "hash": "142ca446a6c3c9b321ef2ba78538dc37" } } } From 763bb51bcf549c738a4749508cea8596f3c54fd1 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 18 Jan 2018 13:29:32 -0800 Subject: [PATCH 040/724] release: emergency rollback --- .monorepo.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index d819037908..0673e92ae7 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.39", - "hash": "d33ea15e49b95f0d2b38bba7991e94d0" + "version": "0.0.40", + "hash": "a2183a9dfc0de865c5a1007c784b7dfb" }, "@angular-devkit/core": { "name": "Core", @@ -64,8 +64,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.26", - "hash": "42ee618f548ef57ed2a606db12dcf719" + "version": "0.0.27", + "hash": "6a320fc28a581075d57120a83f4e3d78" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -75,31 +75,31 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.49", - "hash": "03d9a2f80bc8d590b6e1113b84f183e9" + "version": "0.0.50", + "hash": "dc7d8a328d5cb0fc09951359b54f09ed" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.6", - "hash": "51b96b1f651fddcc1b44a95005dceb29" + "version": "0.0.7", + "hash": "7a904658491c5e11ddb18a6c68766004" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.14", - "hash": "c7f5c3e3724df9cf9f51947fdd9f8a77" + "version": "0.1.15", + "hash": "371d7c4336abb5c548f38f21df397fe0" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.14", + "version": "0.0.15", "section": "Schematics", - "hash": "0737267c88f3ed4ff28843f85d113144" + "hash": "d53bdc7553eaecf7fb271d5b6d439248" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.4", + "version": "0.0.5", "section": "Schematics", - "hash": "142ca446a6c3c9b321ef2ba78538dc37" + "hash": "68d109e710cdb5620e097287055c2b2b" } } } From eda2eb30ccd648b07a3e69a4d293e803ca55c44d Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 18 Jan 2018 15:43:19 -0800 Subject: [PATCH 041/724] release: patch --- .monorepo.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 0673e92ae7..b657c46d0a 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.40", - "hash": "a2183a9dfc0de865c5a1007c784b7dfb" + "version": "0.0.41", + "hash": "d33ea15e49b95f0d2b38bba7991e94d0" }, "@angular-devkit/core": { "name": "Core", @@ -64,8 +64,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.27", - "hash": "6a320fc28a581075d57120a83f4e3d78" + "version": "0.0.28", + "hash": "42ee618f548ef57ed2a606db12dcf719" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -75,31 +75,31 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.50", - "hash": "dc7d8a328d5cb0fc09951359b54f09ed" + "version": "0.0.51", + "hash": "03d9a2f80bc8d590b6e1113b84f183e9" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.7", - "hash": "7a904658491c5e11ddb18a6c68766004" + "version": "0.0.8", + "hash": "51b96b1f651fddcc1b44a95005dceb29" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.15", - "hash": "371d7c4336abb5c548f38f21df397fe0" + "version": "0.1.16", + "hash": "c7f5c3e3724df9cf9f51947fdd9f8a77" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.15", + "version": "0.0.16", "section": "Schematics", - "hash": "d53bdc7553eaecf7fb271d5b6d439248" + "hash": "0737267c88f3ed4ff28843f85d113144" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.5", + "version": "0.0.6", "section": "Schematics", - "hash": "68d109e710cdb5620e097287055c2b2b" + "hash": "142ca446a6c3c9b321ef2ba78538dc37" } } } From 2f60cf7161a0ec96a6a4457c7625261f6c401874 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 21 Dec 2017 21:56:22 -0500 Subject: [PATCH 042/724] feat(@angular-devkit/core): add basic priority queue --- .../angular_devkit/core/src/utils/index.ts | 1 + .../core/src/utils/priority-queue.ts | 52 +++++++++++++++++++ .../core/src/utils/priority-queue_spec.ts | 20 +++++++ 3 files changed, 73 insertions(+) create mode 100644 packages/angular_devkit/core/src/utils/priority-queue.ts create mode 100644 packages/angular_devkit/core/src/utils/priority-queue_spec.ts diff --git a/packages/angular_devkit/core/src/utils/index.ts b/packages/angular_devkit/core/src/utils/index.ts index 511ae85bcc..807fa3adc6 100644 --- a/packages/angular_devkit/core/src/utils/index.ts +++ b/packages/angular_devkit/core/src/utils/index.ts @@ -9,5 +9,6 @@ import * as tags from './literals'; export * from './object'; export * from './strings'; export * from './template'; +export * from './priority-queue'; export { tags }; diff --git a/packages/angular_devkit/core/src/utils/priority-queue.ts b/packages/angular_devkit/core/src/utils/priority-queue.ts new file mode 100644 index 0000000000..9d5008487d --- /dev/null +++ b/packages/angular_devkit/core/src/utils/priority-queue.ts @@ -0,0 +1,52 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +/** Naive priority queue; not intended for large datasets */ +export class PriorityQueue { + private _items = new Array(); + + constructor(private _comparator: (x: T, y: T) => number) {} + + clear() { + this._items = new Array(); + } + + push(item: T) { + const index = this._items.findIndex(existing => this._comparator(item, existing) <= 0); + + if (index === -1) { + this._items.push(item); + } else { + this._items.splice(index, 0, item); + } + } + + pop(): T | undefined { + if (this._items.length === 0) { + return undefined; + } + + return this._items.splice(0, 1)[0]; + } + + peek(): T | undefined { + if (this._items.length === 0) { + return undefined; + } + + return this._items[0]; + } + + get size(): number { + return this._items.length; + } + + toArray(): Array { + return this._items.slice(); + } +} diff --git a/packages/angular_devkit/core/src/utils/priority-queue_spec.ts b/packages/angular_devkit/core/src/utils/priority-queue_spec.ts new file mode 100644 index 0000000000..ef850273de --- /dev/null +++ b/packages/angular_devkit/core/src/utils/priority-queue_spec.ts @@ -0,0 +1,20 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { PriorityQueue } from './priority-queue'; + + +describe('PriorityQueue', () => { + it('adds an item', () => { + const queue = new PriorityQueue((x, y) => x - y); + + queue.push(99); + + expect(queue.size).toBe(1); + expect(queue.peek()).toBe(99); + }); +}); From 9af9399a1b4974468818461a036fcef9270f454e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 9 Jan 2018 21:48:10 -0500 Subject: [PATCH 043/724] feat(@angular-devkit/schematics): add task scheduling infrastructure --- packages/angular_devkit/schematics/BUILD | 17 +++ .../schematics/src/engine/engine.ts | 74 ++++++++++++- .../schematics/src/engine/interface.ts | 5 + .../schematics/src/engine/task.ts | 103 ++++++++++++++++++ .../angular_devkit/schematics/src/index.ts | 7 ++ .../schematics/tools/fallback-engine-host.ts | 24 ++++ .../tools/file-system-engine-host-base.ts | 22 ++++ .../schematics_cli/bin/schematics.ts | 3 +- tsconfig.json | 1 + 9 files changed, 253 insertions(+), 3 deletions(-) create mode 100644 packages/angular_devkit/schematics/src/engine/task.ts diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index ac0a91a511..79e4e896ef 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -21,6 +21,23 @@ ts_library( module_root = "src" ) +ts_library( + name = "tasks", + srcs = glob( + include = ["tasks/**/*.ts"], + exclude = ["tasks/**/*_spec.ts", "tasks/**/*_benchmark.ts"], + ), + deps = [ + ":schematics", + "//packages/angular_devkit/core", + "//packages/angular_devkit/core:node", + # @deps: rxjs + ], + tsconfig = "//:tsconfig.json", + module_name = "@angular-devkit/schematics/tasks", + module_root = "tasks" +) + ts_library( name = "tools", srcs = glob( diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index 12f8e1d7a6..fb1356ef41 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -6,8 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException, logging } from '@angular-devkit/core'; -import { CollectionDescription, TypedSchematicContext } from '@angular-devkit/schematics'; +import { + CollectionDescription, + SchematicDescription, + TypedSchematicContext, + } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { concatMap } from 'rxjs/operators'; import { Url } from 'url'; import { MergeStrategy } from '../tree/interface'; import { NullTree } from '../tree/null'; @@ -21,6 +27,12 @@ import { Source, } from './interface'; import { SchematicImpl } from './schematic'; +import { + TaskConfigurationGenerator, + TaskExecutor, + TaskId, + TaskScheduler, +} from './task'; export class UnknownUrlSourceProtocol extends BaseException { @@ -40,6 +52,12 @@ export class SchematicEngineConflictingException extends BaseException { constructor() { super(`A schematic was called from a different engine as its parent.`); } } +export class UnregisteredTaskException extends BaseException { + constructor(name: string, schematic?: SchematicDescription<{}, {}>) { + const addendum = schematic ? ` in schematic "${schematic.name}"` : ''; + super(`Unregistered task "${name}"${addendum}.`); + } +} export class SchematicEngine implements Engine { @@ -47,6 +65,7 @@ export class SchematicEngine>(); private _schematicCache = new Map>>(); + private _taskSchedulers = new Array(); constructor(private _host: EngineHost) { } @@ -80,7 +99,7 @@ export class SchematicEngine( + task: TaskConfigurationGenerator, + dependencies?: Array, + ): TaskId { + const config = task.toConfiguration(); + + if (!host.hasTaskExecutor(config.name)) { + throw new UnregisteredTaskException(config.name, schematic.description); + } + + config.dependencies = config.dependencies || []; + if (dependencies) { + config.dependencies.unshift(...dependencies); + } + + return taskScheduler.schedule(config); + } + + return context; } createSchematic( @@ -143,4 +187,30 @@ export class SchematicEngine { + const executors = new Map(); + + const taskObservable = observableFrom(this._taskSchedulers) + .pipe( + concatMap(scheduler => scheduler.finalize()), + concatMap(task => { + const { name, options } = task.configuration; + + const executor = executors.get(name); + if (executor) { + return executor(options, task.context); + } + + return this._host.createTaskExecutor(name) + .pipe(concatMap(executor => { + executors.set(name, executor); + + return executor(options, task.context); + })); + }), + ); + + return taskObservable; + } } diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index c5d05eca9b..5350833e51 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -9,6 +9,7 @@ import { logging } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { Url } from 'url'; import { FileEntry, MergeStrategy, Tree } from '../tree/interface'; +import { TaskConfigurationGenerator, TaskExecutor, TaskId } from './task'; /** @@ -60,6 +61,8 @@ export interface EngineHost, options: OptionT, ): Observable; + createTaskExecutor(name: string): Observable; + hasTaskExecutor(name: string): boolean; readonly defaultMergeStrategy?: MergeStrategy; } @@ -93,6 +96,7 @@ export interface Engine, options: OptionT, ): Observable; + executePostTasks(): Observable; readonly defaultMergeStrategy: MergeStrategy; } @@ -137,6 +141,7 @@ export interface TypedSchematicContext; readonly strategy: MergeStrategy; + addTask(task: TaskConfigurationGenerator, dependencies?: Array): TaskId; } diff --git a/packages/angular_devkit/schematics/src/engine/task.ts b/packages/angular_devkit/schematics/src/engine/task.ts new file mode 100644 index 0000000000..12943bb3fe --- /dev/null +++ b/packages/angular_devkit/schematics/src/engine/task.ts @@ -0,0 +1,103 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { PriorityQueue } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; +import { SchematicContext } from './interface'; + + +export interface TaskConfiguration { + name: string; + dependencies?: Array; + options?: T; +} + +export interface TaskConfigurationGenerator { + toConfiguration(): TaskConfiguration; +} + +export type TaskExecutor + = (options: T | undefined, context: SchematicContext) => Promise | Observable; + +export interface TaskExecutorFactory { + readonly name: string; + create(options?: T): Promise | Observable; +} + +export interface TaskId { + readonly id: number; +} + +export interface TaskInfo { + readonly id: number; + readonly priority: number; + readonly configuration: TaskConfiguration; + readonly context: SchematicContext; +} + +export class TaskScheduler { + private _queue = new PriorityQueue((x, y) => x.priority - y.priority); + private _taskIds = new Map(); + private static _taskIdCounter = 1; + + constructor(private _context: SchematicContext) {} + + private _calculatePriority(dependencies: Set): number { + if (dependencies.size === 0) { + return 0; + } + + const prio = [...dependencies].reduce((prio, task) => prio + task.priority, 1); + + return prio; + } + + private _mapDependencies(dependencies?: Array): Set { + if (!dependencies) { + return new Set(); + } + + const tasks = dependencies.map(dep => { + const task = this._taskIds.get(dep); + if (!task) { + throw new Error('Unknown task dependency'); + } + + return task; + }); + + return new Set(tasks); + } + + schedule(taskConfiguration: TaskConfiguration): TaskId { + const dependencies = this._mapDependencies(taskConfiguration.dependencies); + const priority = this._calculatePriority(dependencies); + + const task = { + id: TaskScheduler._taskIdCounter++, + priority, + configuration: taskConfiguration, + context: this._context, + }; + + this._queue.push(task); + + const id = { id: task.id }; + this._taskIds.set(id, task); + + return id; + } + + finalize(): ReadonlyArray { + const tasks = this._queue.toArray(); + this._queue.clear(); + this._taskIds.clear(); + + return tasks; + } + +} diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index 5a711ad20b..261bb65a4e 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -16,6 +16,13 @@ export * from './tree/action'; export * from './engine/collection'; export * from './engine/engine'; export * from './engine/interface'; +export { + TaskConfiguration, + TaskConfigurationGenerator, + TaskExecutor, + TaskExecutorFactory, + TaskId, +} from './engine/task'; export * from './exception/exception'; export * from './tree/interface'; export * from './rules/base'; diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index dae6337101..005d03f98c 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -12,11 +12,14 @@ import { RuleFactory, SchematicDescription, Source, + TaskExecutor, TypedSchematicContext, UnknownCollectionException, + UnregisteredTaskException, } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; import { of as observableOf } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; @@ -112,4 +115,25 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { return [...allNames]; } + + createTaskExecutor(name: string): Observable { + for (const host of this._hosts) { + if (host.hasTaskExecutor(name)) { + return host.createTaskExecutor(name); + } + } + + return _throw(new UnregisteredTaskException(name)); + } + + hasTaskExecutor(name: string): boolean { + for (const host of this._hosts) { + if (host.hasTaskExecutor(name)) { + return true; + } + } + + return false; + } + } diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index d80b91553c..ea4e718a0d 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -11,11 +11,16 @@ import { FileSystemCreateTree, RuleFactory, Source, + TaskExecutor, + TaskExecutorFactory, UnknownSchematicException, + UnregisteredTaskException, } from '@angular-devkit/schematics'; import { dirname, isAbsolute, join, resolve } from 'path'; import { Observable } from 'rxjs/Observable'; +import { from as observableFrom } from 'rxjs/observable/from'; import { of as observableOf } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; import { mergeMap } from 'rxjs/operators/mergeMap'; import { Url } from 'url'; import { @@ -96,6 +101,7 @@ export abstract class FileSystemEngineHostBase implements desc: Partial): FileSystemSchematicDesc; private _transforms: OptionTransform<{}, {}>[] = []; + private _taskFactories = new Map Observable>(); /** * @deprecated Use `listSchematicNames`. @@ -267,4 +273,20 @@ export abstract class FileSystemEngineHostBase implements return schematic.factoryFn; } + registerTaskExecutor(factory: TaskExecutorFactory, options?: T): void { + this._taskFactories.set(factory.name, () => observableFrom(factory.create(options))); + } + + createTaskExecutor(name: string): Observable { + const factory = this._taskFactories.get(name); + if (factory) { + return factory(); + } + + return _throw(new UnregisteredTaskException(name)); + } + + hasTaskExecutor(name: string): boolean { + return this._taskFactories.has(name); + } } diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 5e3a64dd97..4bf3e723ce 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -271,7 +271,8 @@ schematic.call(args, host, { debug, logger: logger.asApi() }) return fsSink.commit(tree).pipe( ignoreElements(), concat(observableOf(tree))); - })) + }), + concatMap(() => engine.executePostTasks())) .subscribe({ error(err: Error) { if (debug) { diff --git a/tsconfig.json b/tsconfig.json index 1f366079f1..4ec2fae5f7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,6 +39,7 @@ "@angular-devkit/core": [ "./packages/angular_devkit/core/src/index" ], "@angular-devkit/core/node": [ "./packages/angular_devkit/core/node/index" ], "@angular-devkit/schematics": [ "./packages/angular_devkit/schematics/src/index" ], + "@angular-devkit/schematics/tasks": [ "./packages/angular_devkit/schematics/tasks/index" ], "@angular-devkit/schematics/tools": [ "./packages/angular_devkit/schematics/tools/index" ], "@angular-devkit/schematics/testing": [ "./packages/angular_devkit/schematics/testing/index" ], "@angular-devkit/build_optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ] From 92479bfb99d859900575784f5052f9ae4dc444dd Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 9 Jan 2018 21:48:38 -0500 Subject: [PATCH 044/724] feat(@angular-devkit/schematics): add npm install task --- .../angular_devkit/schematics/tasks/index.ts | 8 +++ .../schematics/tasks/node-package/executor.ts | 67 +++++++++++++++++++ .../tasks/node-package/install-task.ts | 26 +++++++ .../schematics/tasks/node-package/options.ts | 19 ++++++ .../schematics/tasks/node/index.ts | 16 +++++ tsconfig.json | 1 + 6 files changed, 137 insertions(+) create mode 100644 packages/angular_devkit/schematics/tasks/index.ts create mode 100644 packages/angular_devkit/schematics/tasks/node-package/executor.ts create mode 100644 packages/angular_devkit/schematics/tasks/node-package/install-task.ts create mode 100644 packages/angular_devkit/schematics/tasks/node-package/options.ts create mode 100644 packages/angular_devkit/schematics/tasks/node/index.ts diff --git a/packages/angular_devkit/schematics/tasks/index.ts b/packages/angular_devkit/schematics/tasks/index.ts new file mode 100644 index 0000000000..6c6b9c4eef --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/index.ts @@ -0,0 +1,8 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export { NodePackageInstallTask } from './node-package/install-task'; diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts new file mode 100644 index 0000000000..c9e53ff971 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -0,0 +1,67 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { TaskExecutor } from '@angular-devkit/schematics'; +import { SpawnOptions, spawn } from 'child_process'; +import * as path from 'path'; +import { Observable } from 'rxjs/Observable'; +import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options'; + +type PackageManagerProfile = { + quietArgument?: string; +}; + +const packageManagers: { [name: string]: PackageManagerProfile } = { + 'npm': { + quietArgument: '--quiet', + }, + 'cnpm': { }, + 'yarn': { + quietArgument: '--silent', + }, +}; + +export default function( + factoryOptions: NodePackageTaskFactoryOptions = {}, +): TaskExecutor { + const packageManagerName = factoryOptions.packageManager || 'npm'; + const packageManagerProfile = packageManagers[packageManagerName]; + if (!packageManagerProfile) { + throw new Error(`Invalid package manager '${packageManagerName}' requested.`); + } + + const rootDirectory = factoryOptions.rootDirectory || process.cwd(); + + return (options: NodePackageTaskOptions) => { + const outputStream = process.stdout; + const errorStream = process.stderr; + const spawnOptions: SpawnOptions = { + stdio: [ process.stdin, outputStream, errorStream ], + shell: true, + cwd: path.join(rootDirectory, options.workingDirectory || ''), + }; + const args = [ options.command ]; + + if (options.quiet && packageManagerProfile.quietArgument) { + args.push(packageManagerProfile.quietArgument); + } + + return new Observable(obs => { + spawn(packageManagerName, args, spawnOptions) + .on('close', (code: number) => { + if (code === 0) { + obs.next(); + obs.complete(); + } else { + const message = 'Package install failed, see above.'; + obs.error(new Error(message)); + } + }); + }); + + }; +} diff --git a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts new file mode 100644 index 0000000000..deaaeef4b6 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; +import { NodePackageName, NodePackageTaskOptions } from './options'; + +export class NodePackageInstallTask implements TaskConfigurationGenerator { + quiet = true; + + constructor(public workingDirectory?: string) {} + + toConfiguration(): TaskConfiguration { + return { + name: NodePackageName, + options: { + command: 'install', + quiet: this.quiet, + workingDirectory: this.workingDirectory, + }, + }; + } +} diff --git a/packages/angular_devkit/schematics/tasks/node-package/options.ts b/packages/angular_devkit/schematics/tasks/node-package/options.ts new file mode 100644 index 0000000000..cd32377dd6 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/node-package/options.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export const NodePackageName = 'node-package'; + +export interface NodePackageTaskFactoryOptions { + rootDirectory?: string; + packageManager?: string; +} + +export interface NodePackageTaskOptions { + command: string; + quiet?: boolean; + workingDirectory?: string; +} diff --git a/packages/angular_devkit/schematics/tasks/node/index.ts b/packages/angular_devkit/schematics/tasks/node/index.ts new file mode 100644 index 0000000000..6216c7cc21 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/node/index.ts @@ -0,0 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { TaskExecutorFactory } from '@angular-devkit/schematics'; +import { NodePackageName, NodePackageTaskFactoryOptions } from '../node-package/options'; + +export class BuiltinTaskExecutor { + static readonly NodePackage: TaskExecutorFactory = { + name: NodePackageName, + create: (options) => import('../node-package/executor').then(mod => mod.default(options)), + }; +} diff --git a/tsconfig.json b/tsconfig.json index 4ec2fae5f7..055c81bd67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,6 +40,7 @@ "@angular-devkit/core/node": [ "./packages/angular_devkit/core/node/index" ], "@angular-devkit/schematics": [ "./packages/angular_devkit/schematics/src/index" ], "@angular-devkit/schematics/tasks": [ "./packages/angular_devkit/schematics/tasks/index" ], + "@angular-devkit/schematics/tasks/node": [ "./packages/angular_devkit/schematics/tasks/node/index" ], "@angular-devkit/schematics/tools": [ "./packages/angular_devkit/schematics/tools/index" ], "@angular-devkit/schematics/testing": [ "./packages/angular_devkit/schematics/testing/index" ], "@angular-devkit/build_optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ] From 63466545584fa51059f15828cd00df12d13fc027 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 9 Jan 2018 22:10:42 -0500 Subject: [PATCH 045/724] feat(@angular-devkit/schematics): add npm link task --- .../angular_devkit/schematics/tasks/index.ts | 1 + .../schematics/tasks/node-package/executor.ts | 4 +++ .../tasks/node-package/link-task.ts | 27 +++++++++++++++++++ .../schematics/tasks/node-package/options.ts | 1 + 4 files changed, 33 insertions(+) create mode 100644 packages/angular_devkit/schematics/tasks/node-package/link-task.ts diff --git a/packages/angular_devkit/schematics/tasks/index.ts b/packages/angular_devkit/schematics/tasks/index.ts index 6c6b9c4eef..2d4336ea31 100644 --- a/packages/angular_devkit/schematics/tasks/index.ts +++ b/packages/angular_devkit/schematics/tasks/index.ts @@ -6,3 +6,4 @@ * found in the LICENSE file at https://angular.io/license */ export { NodePackageInstallTask } from './node-package/install-task'; +export { NodePackageLinkTask } from './node-package/link-task'; diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index c9e53ff971..918b4fdd66 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -46,6 +46,10 @@ export default function( }; const args = [ options.command ]; + if (options.packageName) { + args.push(options.packageName); + } + if (options.quiet && packageManagerProfile.quietArgument) { args.push(packageManagerProfile.quietArgument); } diff --git a/packages/angular_devkit/schematics/tasks/node-package/link-task.ts b/packages/angular_devkit/schematics/tasks/node-package/link-task.ts new file mode 100644 index 0000000000..b77130d557 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/node-package/link-task.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; +import { NodePackageName, NodePackageTaskOptions } from './options'; + +export class NodePackageLinkTask implements TaskConfigurationGenerator { + quiet = true; + + constructor(public packageName?: string, public workingDirectory?: string) {} + + toConfiguration(): TaskConfiguration { + return { + name: NodePackageName, + options: { + command: 'link', + quiet: this.quiet, + workingDirectory: this.workingDirectory, + packageName: this.packageName, + }, + }; + } +} diff --git a/packages/angular_devkit/schematics/tasks/node-package/options.ts b/packages/angular_devkit/schematics/tasks/node-package/options.ts index cd32377dd6..5b947aa619 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/options.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/options.ts @@ -16,4 +16,5 @@ export interface NodePackageTaskOptions { command: string; quiet?: boolean; workingDirectory?: string; + packageName?: string; } From 6a5051cb4ce6e5e541a6e6e07f010168db8f509b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 16 Jan 2018 12:53:18 -0500 Subject: [PATCH 046/724] feat(@angular-devkit/schematics): add repo init task --- .../angular_devkit/schematics/tasks/index.ts | 1 + .../schematics/tasks/node/index.ts | 9 ++ .../schematics/tasks/repo-init/executor.ts | 87 +++++++++++++++++++ .../schematics/tasks/repo-init/init-task.ts | 34 ++++++++ .../schematics/tasks/repo-init/options.ts | 20 +++++ 5 files changed, 151 insertions(+) create mode 100644 packages/angular_devkit/schematics/tasks/repo-init/executor.ts create mode 100644 packages/angular_devkit/schematics/tasks/repo-init/init-task.ts create mode 100644 packages/angular_devkit/schematics/tasks/repo-init/options.ts diff --git a/packages/angular_devkit/schematics/tasks/index.ts b/packages/angular_devkit/schematics/tasks/index.ts index 2d4336ea31..a4bf01809e 100644 --- a/packages/angular_devkit/schematics/tasks/index.ts +++ b/packages/angular_devkit/schematics/tasks/index.ts @@ -7,3 +7,4 @@ */ export { NodePackageInstallTask } from './node-package/install-task'; export { NodePackageLinkTask } from './node-package/link-task'; +export { RepositoryInitializerTask } from './repo-init/init-task'; diff --git a/packages/angular_devkit/schematics/tasks/node/index.ts b/packages/angular_devkit/schematics/tasks/node/index.ts index 6216c7cc21..5ba5ae5a99 100644 --- a/packages/angular_devkit/schematics/tasks/node/index.ts +++ b/packages/angular_devkit/schematics/tasks/node/index.ts @@ -7,10 +7,19 @@ */ import { TaskExecutorFactory } from '@angular-devkit/schematics'; import { NodePackageName, NodePackageTaskFactoryOptions } from '../node-package/options'; +import { + RepositoryInitializerName, + RepositoryInitializerTaskFactoryOptions, + } from '../repo-init/options'; export class BuiltinTaskExecutor { static readonly NodePackage: TaskExecutorFactory = { name: NodePackageName, create: (options) => import('../node-package/executor').then(mod => mod.default(options)), }; + static readonly RepositoryInitializer: + TaskExecutorFactory = { + name: RepositoryInitializerName, + create: (options) => import('../repo-init/executor').then(mod => mod.default(options)), + }; } diff --git a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts new file mode 100644 index 0000000000..7625e88019 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts @@ -0,0 +1,87 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; +import { SchematicContext, TaskExecutor } from '@angular-devkit/schematics'; +import { SpawnOptions, spawn } from 'child_process'; +import * as path from 'path'; +import { + RepositoryInitializerTaskFactoryOptions, + RepositoryInitializerTaskOptions, +} from './options'; + + +export default function( + factoryOptions: RepositoryInitializerTaskFactoryOptions = {}, +): TaskExecutor { + const rootDirectory = factoryOptions.rootDirectory || process.cwd(); + + return async (options: RepositoryInitializerTaskOptions, context: SchematicContext) => { + const authorName = options.authorName; + const authorEmail = options.authorEmail; + + const execute = (args: string[], ignoreErrorStream?: boolean) => { + const outputStream = 'ignore'; + const errorStream = ignoreErrorStream ? 'ignore' : process.stderr; + const spawnOptions: SpawnOptions = { + stdio: [ process.stdin, outputStream, errorStream ], + shell: true, + cwd: path.join(rootDirectory, options.workingDirectory || ''), + env: { + GIT_AUTHOR_NAME: authorName, + GIT_COMMITTER_NAME: authorName, + GIT_AUTHOR_EMAIL: authorEmail, + GIT_COMMITTER_EMAIL: authorEmail, + }, + }; + + return new Promise((resolve, reject) => { + spawn('git', args, spawnOptions) + .on('close', (code: number) => { + if (code === 0) { + resolve(); + } else { + reject(code); + } + }); + }); + }; + + const hasCommand = await execute(['--version']) + .then(() => true, () => false); + if (!hasCommand) { + return; + } + + const insideRepo = await execute(['rev-parse', '--is-inside-work-tree'], true) + .then(() => true, () => false); + if (insideRepo) { + context.logger.info(tags.oneLine` + Directory is already under version control. + Skipping initialization of git. + `); + + return; + } + + // if git is not found or an error was thrown during the `git` + // init process just swallow any errors here + // NOTE: This will be removed once task error handling is implemented + try { + await execute(['init']); + await execute(['add', '.']); + + if (options.commit) { + const message = options.message || 'initial commit'; + + await execute(['commit', `-m "${message}"`]); + } + + context.logger.info('Successfully initialized git.'); + } catch {} + }; +} diff --git a/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts b/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts new file mode 100644 index 0000000000..e81c2d2883 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts @@ -0,0 +1,34 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; +import { RepositoryInitializerName, RepositoryInitializerTaskOptions } from './options'; + +export interface CommitOptions { + message?: string; + name: string; + email: string; +} + +export class RepositoryInitializerTask + implements TaskConfigurationGenerator { + + constructor(public workingDirectory?: string, public commitOptions?: CommitOptions) {} + + toConfiguration(): TaskConfiguration { + return { + name: RepositoryInitializerName, + options: { + commit: !!this.commitOptions, + workingDirectory: this.workingDirectory, + authorName: this.commitOptions && this.commitOptions.name, + authorEmail: this.commitOptions && this.commitOptions.email, + message: this.commitOptions && this.commitOptions.message, + }, + }; + } +} diff --git a/packages/angular_devkit/schematics/tasks/repo-init/options.ts b/packages/angular_devkit/schematics/tasks/repo-init/options.ts new file mode 100644 index 0000000000..8153764058 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/repo-init/options.ts @@ -0,0 +1,20 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export const RepositoryInitializerName = 'repo-init'; + +export interface RepositoryInitializerTaskFactoryOptions { + rootDirectory?: string; +} + +export interface RepositoryInitializerTaskOptions { + workingDirectory?: string; + commit?: boolean; + message?: string; + authorName?: string; + authorEmail?: string; +} From 7ba15221efb86b0892d4912e87accb52318ab473 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 11 Jan 2018 13:42:17 -0500 Subject: [PATCH 047/724] feat(@angular-devkit/schematics-cli): register node package and repo init tasks --- packages/angular_devkit/schematics_cli/BUILD | 1 + packages/angular_devkit/schematics_cli/bin/schematics.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index 8d56a46055..bb2ff31c0a 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -17,6 +17,7 @@ ts_library( "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", "//packages/angular_devkit/schematics", + "//packages/angular_devkit/schematics:tasks", "//packages/angular_devkit/schematics:tools", # @deps: rxjs ], diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 4bf3e723ce..d78e3978d2 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -21,6 +21,7 @@ import { Tree, formats, } from '@angular-devkit/schematics'; +import { BuiltinTaskExecutor } from '@angular-devkit/schematics/tasks/node'; import { FileSystemHost, NodeModulesEngineHost, @@ -136,6 +137,8 @@ const engine = new SchematicEngine(engineHost); const registry = new schema.CoreSchemaRegistry(formats.standardFormats); engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); +engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); +engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); /** * The collection to be used. From 06778d12720d6f5c51f0c43ccc2c4fe7d58b85e3 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 11 Jan 2018 13:43:41 -0500 Subject: [PATCH 048/724] feat(@schematics/schematics): install packages in blank schematic --- packages/schematics/schematics/blank/factory.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/schematics/schematics/blank/factory.ts b/packages/schematics/schematics/blank/factory.ts index 3af4f64064..c745875b66 100644 --- a/packages/schematics/schematics/blank/factory.ts +++ b/packages/schematics/schematics/blank/factory.ts @@ -27,6 +27,7 @@ import { template, url, } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { Schema } from './schema'; @@ -134,6 +135,8 @@ export default function (options: Schema): Rule { mergeWith(source), move(options.name), ]); + + context.addTask(new NodePackageInstallTask(options.name)); } return chain([ From 5ee7cf612b3ec8697a27b3f13de1619bcc3e0a46 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 19 Jan 2018 16:58:06 -0500 Subject: [PATCH 049/724] refactor(@angular-devkit/schematics): use specialized exception classes --- packages/angular_devkit/schematics/src/engine/task.ts | 9 +++++++-- .../schematics/tasks/node-package/executor.ts | 9 ++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/schematics/src/engine/task.ts b/packages/angular_devkit/schematics/src/engine/task.ts index 12943bb3fe..51029bf6c2 100644 --- a/packages/angular_devkit/schematics/src/engine/task.ts +++ b/packages/angular_devkit/schematics/src/engine/task.ts @@ -5,10 +5,15 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { PriorityQueue } from '@angular-devkit/core'; +import { BaseException, PriorityQueue } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { SchematicContext } from './interface'; +export class UnknownTaskDependencyException extends BaseException { + constructor(id: TaskId) { + super(`Unknown task dependency [ID: ${id.id}].`); + } +} export interface TaskConfiguration { name: string; @@ -64,7 +69,7 @@ export class TaskScheduler { const tasks = dependencies.map(dep => { const task = this._taskIds.get(dep); if (!task) { - throw new Error('Unknown task dependency'); + throw new UnknownTaskDependencyException(dep); } return task; diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index 918b4fdd66..61d53be913 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { BaseException } from '@angular-devkit/core'; import { TaskExecutor } from '@angular-devkit/schematics'; import { SpawnOptions, spawn } from 'child_process'; import * as path from 'path'; @@ -25,13 +26,19 @@ const packageManagers: { [name: string]: PackageManagerProfile } = { }, }; +export class UnknownPackageManagerException extends BaseException { + constructor(name: string) { + super(`Unknown package manager "${name}".`); + } +} + export default function( factoryOptions: NodePackageTaskFactoryOptions = {}, ): TaskExecutor { const packageManagerName = factoryOptions.packageManager || 'npm'; const packageManagerProfile = packageManagers[packageManagerName]; if (!packageManagerProfile) { - throw new Error(`Invalid package manager '${packageManagerName}' requested.`); + throw new UnknownPackageManagerException(packageManagerName); } const rootDirectory = factoryOptions.rootDirectory || process.cwd(); From 733a3d3bbf4963552667c6c4472eed7c259ee2d8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 22 Jan 2018 10:28:08 -0500 Subject: [PATCH 050/724] fix(@angular-devkit/build-optimizer): limit actions on webpack bundles --- .../src/build-optimizer/build-optimizer.ts | 16 +++++++++++++++- .../src/transforms/import-tslib.ts | 11 ++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts index a7f50280d6..1a14e6bd5c 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts @@ -87,6 +87,16 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr content = readFileSync(inputFilePath as string, 'UTF-8'); } + if (!content) { + return { + content: null, + sourceMap: null, + emitSkipped: true, + }; + } + + const isWebpackBundle = content.indexOf('__webpack_require__') !== -1; + // Determine which transforms to apply. const getTransforms = []; @@ -119,7 +129,11 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr getTransforms.unshift(getPrefixClassesTransformer); } - if (ignoreTest || testImportTslib(content)) { + // This transform introduces import/require() calls, but this won't work properly on libraries + // built with Webpack. These libraries use __webpack_require__() calls instead, which will break + // with a new import that wasn't part of it's original module list. + // We ignore this transform for such libraries. + if (!isWebpackBundle && (ignoreTest || testImportTslib(content))) { getTransforms.unshift(getImportTslibTransformer); } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts index 4e5e2bf282..458c4a540f 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts @@ -11,13 +11,7 @@ import * as ts from 'typescript'; export function testImportTslib(content: string) { const regex = /var (__extends|__decorate|__metadata|__param) = \(.*\r?\n( .*\r?\n)*\};/; - // This transform introduces import/require() calls, but this won't work properly on libraries - // built with Webpack. These libraries use __webpack_require__() calls instead, which will break - // with a new import that wasn't part of it's original module list. - // We ignore this transform for such libraries. - const webpackRequireRegex = /__webpack_require__/; - - return regex.test(content) && !webpackRequireRegex.test(content); + return regex.test(content); } export function getImportTslibTransformer(): ts.TransformerFactory { @@ -35,8 +29,7 @@ export function getImportTslibTransformer(): ts.TransformerFactory Date: Tue, 23 Jan 2018 12:22:59 -0800 Subject: [PATCH 051/724] refactor: replace - with _ One is compatible with Google internals, the other is not. --- .../{package-update => package_update}/_angular-devkit/index.ts | 0 .../{package-update => package_update}/_angular/index.ts | 0 .../{package-update => package_update}/_angular_cli/index.ts | 0 .../schematics/{package-update => package_update}/all/index.ts | 0 .../schematics/{package-update => package_update}/collection.json | 0 .../schematics/{package-update => package_update}/package.json | 0 .../schematics/{package-update => package_update}/schema.d.ts | 0 .../schematics/{package-update => package_update}/schema.json | 0 .../schematics/{package-update => package_update}/utility/npm.ts | 0 .../{package-update => package_update}/utility/npm_spec.ts | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename packages/schematics/{package-update => package_update}/_angular-devkit/index.ts (100%) rename packages/schematics/{package-update => package_update}/_angular/index.ts (100%) rename packages/schematics/{package-update => package_update}/_angular_cli/index.ts (100%) rename packages/schematics/{package-update => package_update}/all/index.ts (100%) rename packages/schematics/{package-update => package_update}/collection.json (100%) rename packages/schematics/{package-update => package_update}/package.json (100%) rename packages/schematics/{package-update => package_update}/schema.d.ts (100%) rename packages/schematics/{package-update => package_update}/schema.json (100%) rename packages/schematics/{package-update => package_update}/utility/npm.ts (100%) rename packages/schematics/{package-update => package_update}/utility/npm_spec.ts (100%) diff --git a/packages/schematics/package-update/_angular-devkit/index.ts b/packages/schematics/package_update/_angular-devkit/index.ts similarity index 100% rename from packages/schematics/package-update/_angular-devkit/index.ts rename to packages/schematics/package_update/_angular-devkit/index.ts diff --git a/packages/schematics/package-update/_angular/index.ts b/packages/schematics/package_update/_angular/index.ts similarity index 100% rename from packages/schematics/package-update/_angular/index.ts rename to packages/schematics/package_update/_angular/index.ts diff --git a/packages/schematics/package-update/_angular_cli/index.ts b/packages/schematics/package_update/_angular_cli/index.ts similarity index 100% rename from packages/schematics/package-update/_angular_cli/index.ts rename to packages/schematics/package_update/_angular_cli/index.ts diff --git a/packages/schematics/package-update/all/index.ts b/packages/schematics/package_update/all/index.ts similarity index 100% rename from packages/schematics/package-update/all/index.ts rename to packages/schematics/package_update/all/index.ts diff --git a/packages/schematics/package-update/collection.json b/packages/schematics/package_update/collection.json similarity index 100% rename from packages/schematics/package-update/collection.json rename to packages/schematics/package_update/collection.json diff --git a/packages/schematics/package-update/package.json b/packages/schematics/package_update/package.json similarity index 100% rename from packages/schematics/package-update/package.json rename to packages/schematics/package_update/package.json diff --git a/packages/schematics/package-update/schema.d.ts b/packages/schematics/package_update/schema.d.ts similarity index 100% rename from packages/schematics/package-update/schema.d.ts rename to packages/schematics/package_update/schema.d.ts diff --git a/packages/schematics/package-update/schema.json b/packages/schematics/package_update/schema.json similarity index 100% rename from packages/schematics/package-update/schema.json rename to packages/schematics/package_update/schema.json diff --git a/packages/schematics/package-update/utility/npm.ts b/packages/schematics/package_update/utility/npm.ts similarity index 100% rename from packages/schematics/package-update/utility/npm.ts rename to packages/schematics/package_update/utility/npm.ts diff --git a/packages/schematics/package-update/utility/npm_spec.ts b/packages/schematics/package_update/utility/npm_spec.ts similarity index 100% rename from packages/schematics/package-update/utility/npm_spec.ts rename to packages/schematics/package_update/utility/npm_spec.ts From 2816c5bf42158aee878bf0e1cc5c55a956eb4bf4 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 24 Jan 2018 12:01:39 -0800 Subject: [PATCH 052/724] fix(@schematics/angular): remove karma-cli It is not needed. Only when ejecting which is covered by angular/angular-cli#9368 --- packages/schematics/angular/application/files/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index acf30ee48b..2a75cb40cc 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -38,7 +38,6 @@ "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", - "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", From 3ac0f06f6fb2844293ab68fe988fc309aeb88af7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 24 Jan 2018 16:59:06 -0800 Subject: [PATCH 053/724] release: patch --- .monorepo.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index b657c46d0a..851ec2d05d 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.41", - "hash": "d33ea15e49b95f0d2b38bba7991e94d0" + "version": "0.0.42", + "hash": "00462760d0add5ae790e49030c24fc9a" }, "@angular-devkit/core": { "name": "Core", @@ -64,8 +64,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.28", - "hash": "42ee618f548ef57ed2a606db12dcf719" + "version": "0.0.29", + "hash": "c5b7ac4219d4e5bd7beb2230043fb876" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -75,31 +75,31 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.51", - "hash": "03d9a2f80bc8d590b6e1113b84f183e9" + "version": "0.0.52", + "hash": "5da7eec7e29add6e2d9f6018df033025" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.8", - "hash": "51b96b1f651fddcc1b44a95005dceb29" + "version": "0.0.9", + "hash": "c02482a7ec2071567393709d79c25e8a" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.16", - "hash": "c7f5c3e3724df9cf9f51947fdd9f8a77" + "version": "0.1.17", + "hash": "4a270480c210fdb2b3fd373e6ba55b14" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.16", + "version": "0.0.17", "section": "Schematics", - "hash": "0737267c88f3ed4ff28843f85d113144" + "hash": "7c0def54978ad8e45bdf8da42b1ddf73" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.6", + "version": "0.0.7", "section": "Schematics", - "hash": "142ca446a6c3c9b321ef2ba78538dc37" + "hash": "fa063063c05223c7ebf82e999476d2ba" } } } From 79df5569f14dd5f7682d40520b4f9e6ea11fdee9 Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Sun, 21 Jan 2018 15:29:26 +0900 Subject: [PATCH 054/724] feat(@schematics/angular): add zone.js flags which can disable some patch --- .../angular/application/files/__sourcedir__/polyfills.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts b/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts index d68672ffe4..200cfd8014 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts +++ b/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts @@ -52,7 +52,14 @@ import 'core-js/es7/reflect'; **/ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + */ + // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames /*************************************************************************************************** * Zone JS is required by default for Angular itself. From 47ace595740ff7ec7d03b1695ad2d4c7d737e060 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 25 Jan 2018 11:18:38 -0500 Subject: [PATCH 055/724] feat(@schematics/angular): allow CLI patch release on new application --- packages/schematics/angular/application/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index 2a75cb40cc..f68379bebe 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -27,7 +27,7 @@ "zone.js": "^0.8.19" }, "devDependencies": { - "@angular/cli": "<%= version %>", + "@angular/cli": "~<%= version %>", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0",<% if (!minimal) { %> "@types/jasmine": "~2.8.3", From 0776a4eddf05cab79b6e118cef4758c1cf04f1ec Mon Sep 17 00:00:00 2001 From: Carlos Edinson Roso Espinosa Date: Sat, 13 Jan 2018 15:33:29 -0500 Subject: [PATCH 056/724] refactor(@angular-devkit/core): expose string utils as a scoped namespace --- .../angular_devkit/core/src/utils/index.ts | 5 +- .../schematics/angular/application/index.ts | 6 +- packages/schematics/angular/class/index.ts | 5 +- .../schematics/angular/component/index.ts | 15 +- .../schematics/angular/directive/index.ts | 15 +- packages/schematics/angular/enum/index.ts | 5 +- packages/schematics/angular/guard/index.ts | 11 +- .../schematics/angular/interface/index.ts | 5 +- packages/schematics/angular/module/index.ts | 11 +- packages/schematics/angular/pipe/index.ts | 13 +- packages/schematics/angular/service/index.ts | 11 +- packages/schematics/angular/strings.ts | 129 ------------------ .../schematics/angular/universal/index.ts | 5 +- .../schematics/angular/utility/find-module.ts | 5 +- .../schematics/schematics/blank/factory.ts | 16 +-- .../schematics/schematic/factory.ts | 4 +- scripts/serialize.ts | 4 +- 17 files changed, 63 insertions(+), 202 deletions(-) delete mode 100644 packages/schematics/angular/strings.ts diff --git a/packages/angular_devkit/core/src/utils/index.ts b/packages/angular_devkit/core/src/utils/index.ts index 807fa3adc6..4909fc7d13 100644 --- a/packages/angular_devkit/core/src/utils/index.ts +++ b/packages/angular_devkit/core/src/utils/index.ts @@ -6,9 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ import * as tags from './literals'; +import * as strings from './strings'; + export * from './object'; -export * from './strings'; export * from './template'; export * from './priority-queue'; -export { tags }; +export { tags, strings }; diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index d5108e49a1..8a0d2e36a2 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { strings } from '@angular-devkit/core'; import { MergeStrategy, Rule, @@ -22,7 +23,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addBootstrapToModule, addImportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { Schema as ApplicationOptions } from './schema'; @@ -97,7 +97,7 @@ export default function (options: ApplicationOptions): Rule { options.skipGit ? filter(path => !path.endsWith('/__dot__gitignore')) : noop(), options.serviceWorker ? noop() : filter(path => !path.endsWith('/ngsw-config.json')), template({ - utils: stringUtils, + utils: strings, ...options, 'dot': '.', sourcedir: sourceDir, @@ -128,7 +128,7 @@ export default function (options: ApplicationOptions): Rule { componentOptions.inlineTemplate ? filter(path => !path.endsWith('.html')) : noop(), !componentOptions.spec ? filter(path => !path.endsWith('.spec.ts')) : noop(), template({ - utils: stringUtils, + utils: strings, ...options as any, // tslint:disable-line:no-any selector: appRootSelector, ...componentOptions, diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index aa2c8296d0..484ed2bc8f 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicsException, @@ -19,7 +19,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import * as stringUtils from '../strings'; import { Schema as ClassOptions } from './schema'; @@ -34,7 +33,7 @@ export default function (options: ClassOptions): Rule { const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ - ...stringUtils, + ...strings, ...options, }), move(sourceDir), diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index cb5404b51e..f1648a60ea 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,7 +22,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; @@ -44,11 +43,11 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); const componentPath = `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : stringUtils.dasherize(options.name) + '/') - + stringUtils.dasherize(options.name) + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + '.component'; const relativePath = buildRelativePath(modulePath, componentPath); - const classifiedName = stringUtils.classify(`${options.name}Component`); + const classifiedName = strings.classify(`${options.name}Component`); const declarationChanges = addDeclarationToModule(source, modulePath, classifiedName, @@ -73,7 +72,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { const exportRecorder = host.beginUpdate(modulePath); const exportChanges = addExportToModule(source, modulePath, - stringUtils.classify(`${options.name}Component`), + strings.classify(`${options.name}Component`), relativePath); for (const change of exportChanges) { @@ -91,7 +90,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { function buildSelector(options: ComponentOptions) { - let selector = stringUtils.dasherize(options.name); + let selector = strings.dasherize(options.name); if (options.prefix) { selector = `${options.prefix}-${selector}`; } @@ -116,7 +115,7 @@ export default function(options: ComponentOptions): Rule { options.inlineStyle ? filter(path => !path.endsWith('.__styleext__')) : noop(), options.inlineTemplate ? filter(path => !path.endsWith('.html')) : noop(), template({ - ...stringUtils, + ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 0c4ccbf084..2cd937a04b 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,7 +22,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; @@ -44,11 +43,11 @@ function addDeclarationToNgModule(options: DirectiveOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); const directivePath = `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : stringUtils.dasherize(options.name) + '/') - + stringUtils.dasherize(options.name) + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + '.directive'; const relativePath = buildRelativePath(modulePath, directivePath); - const classifiedName = stringUtils.classify(`${options.name}Directive`); + const classifiedName = strings.classify(`${options.name}Directive`); const declarationChanges = addDeclarationToModule(source, modulePath, classifiedName, @@ -72,7 +71,7 @@ function addDeclarationToNgModule(options: DirectiveOptions): Rule { const exportRecorder = host.beginUpdate(modulePath); const exportChanges = addExportToModule(source, modulePath, - stringUtils.classify(`${options.name}Directive`), + strings.classify(`${options.name}Directive`), relativePath); for (const change of exportChanges) { @@ -94,7 +93,7 @@ function buildSelector(options: DirectiveOptions) { selector = `${options.prefix}-${selector}`; } - return stringUtils.camelize(selector); + return strings.camelize(selector); } export default function (options: DirectiveOptions): Rule { @@ -110,7 +109,7 @@ export default function (options: DirectiveOptions): Rule { const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ - ...stringUtils, + ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), diff --git a/packages/schematics/angular/enum/index.ts b/packages/schematics/angular/enum/index.ts index e5cfb2b87b..641205f185 100644 --- a/packages/schematics/angular/enum/index.ts +++ b/packages/schematics/angular/enum/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicsException, @@ -17,7 +17,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import * as stringUtils from '../strings'; import { Schema as EnumOptions } from './schema'; @@ -30,7 +29,7 @@ export default function (options: EnumOptions): Rule { const templateSource = apply(url('./files'), [ template({ - ...stringUtils, + ...strings, ...options, }), move(sourceDir), diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index 61dcfc75c4..e24fafea3e 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,7 +22,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addProviderToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; @@ -45,12 +44,12 @@ function addDeclarationToNgModule(options: GuardOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); const guardPath = `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : stringUtils.dasherize(options.name) + '/') - + stringUtils.dasherize(options.name) + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + '.guard'; const relativePath = buildRelativePath(modulePath, guardPath); const changes = addProviderToModule(source, modulePath, - stringUtils.classify(`${options.name}Guard`), + strings.classify(`${options.name}Guard`), relativePath); const recorder = host.beginUpdate(modulePath); for (const change of changes) { @@ -79,7 +78,7 @@ export default function (options: GuardOptions): Rule { const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ - ...stringUtils, + ...strings, ...options, }), move(sourceDir), diff --git a/packages/schematics/angular/interface/index.ts b/packages/schematics/angular/interface/index.ts index 100d281ff4..189cd913e5 100644 --- a/packages/schematics/angular/interface/index.ts +++ b/packages/schematics/angular/interface/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicsException, @@ -17,7 +17,6 @@ import { template, url, } from '@angular-devkit/schematics'; -import * as stringUtils from '../strings'; import { Schema as InterfaceOptions } from './schema'; @@ -32,7 +31,7 @@ export default function (options: InterfaceOptions): Rule { const templateSource = apply(url('./files'), [ template({ - ...stringUtils, + ...strings, ...options, }), move(sourceDir), diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index 2a2a956887..3c853146f7 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { basename, dirname, normalize, relative } from '@angular-devkit/core'; +import { basename, dirname, normalize, relative, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,7 +22,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addImportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { findModuleFromOptions } from '../utility/find-module'; @@ -46,15 +45,15 @@ function addDeclarationToNgModule(options: ModuleOptions): Rule { const importModulePath = normalize( `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : stringUtils.dasherize(options.name) + '/') - + stringUtils.dasherize(options.name) + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + '.module', ); const relativeDir = relative(dirname(modulePath), dirname(importModulePath)); const relativePath = (relativeDir.startsWith('.') ? relativeDir : './' + relativeDir) + '/' + basename(importModulePath); const changes = addImportToModule(source, modulePath, - stringUtils.classify(`${options.name}Module`), + strings.classify(`${options.name}Module`), relativePath); const recorder = host.beginUpdate(modulePath); @@ -85,7 +84,7 @@ export default function (options: ModuleOptions): Rule { options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), options.routing ? noop() : filter(path => !path.endsWith('-routing.module.ts')), template({ - ...stringUtils, + ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index 5ef23428ce..5887923330 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,7 +22,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; @@ -44,12 +43,12 @@ function addDeclarationToNgModule(options: PipeOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); const pipePath = `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : stringUtils.dasherize(options.name) + '/') - + stringUtils.dasherize(options.name) + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + '.pipe'; const relativePath = buildRelativePath(modulePath, pipePath); const changes = addDeclarationToModule(source, modulePath, - stringUtils.classify(`${options.name}Pipe`), + strings.classify(`${options.name}Pipe`), relativePath); const recorder = host.beginUpdate(modulePath); for (const change of changes) { @@ -69,7 +68,7 @@ function addDeclarationToNgModule(options: PipeOptions): Rule { const exportRecorder = host.beginUpdate(modulePath); const exportChanges = addExportToModule(source, modulePath, - stringUtils.classify(`${options.name}Pipe`), + strings.classify(`${options.name}Pipe`), relativePath); for (const change of exportChanges) { @@ -97,7 +96,7 @@ export default function (options: PipeOptions): Rule { const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ - ...stringUtils, + ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index 17de19ac30..7c6299a421 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,7 +22,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { addProviderToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; @@ -49,12 +48,12 @@ function addProviderToNgModule(options: ServiceOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); const servicePath = `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : stringUtils.dasherize(options.name) + '/') - + stringUtils.dasherize(options.name) + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + '.service'; const relativePath = buildRelativePath(modulePath, servicePath); const changes = addProviderToModule(source, modulePath, - stringUtils.classify(`${options.name}Service`), + strings.classify(`${options.name}Service`), relativePath); const recorder = host.beginUpdate(modulePath); for (const change of changes) { @@ -83,7 +82,7 @@ export default function (options: ServiceOptions): Rule { const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ - ...stringUtils, + ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), diff --git a/packages/schematics/angular/strings.ts b/packages/schematics/angular/strings.ts deleted file mode 100644 index 4743e9cb65..0000000000 --- a/packages/schematics/angular/strings.ts +++ /dev/null @@ -1,129 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const STRING_DASHERIZE_REGEXP = (/[ _]/g); -const STRING_DECAMELIZE_REGEXP = (/([a-z\d])([A-Z])/g); -const STRING_CAMELIZE_REGEXP = (/(-|_|\.|\s)+(.)?/g); -const STRING_UNDERSCORE_REGEXP_1 = (/([a-z\d])([A-Z]+)/g); -const STRING_UNDERSCORE_REGEXP_2 = (/-|\s+/g); - -/** - * Converts a camelized string into all lower case separated by underscores. - * - ```javascript - decamelize('innerHTML'); // 'inner_html' - decamelize('action_name'); // 'action_name' - decamelize('css-class-name'); // 'css-class-name' - decamelize('my favorite items'); // 'my favorite items' - ``` - - @method decamelize - @param {String} str The string to decamelize. - @return {String} the decamelized string. - */ -export function decamelize(str: string): string { - return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase(); -} - -/** - Replaces underscores, spaces, or camelCase with dashes. - - ```javascript - dasherize('innerHTML'); // 'inner-html' - dasherize('action_name'); // 'action-name' - dasherize('css-class-name'); // 'css-class-name' - dasherize('my favorite items'); // 'my-favorite-items' - ``` - - @method dasherize - @param {String} str The string to dasherize. - @return {String} the dasherized string. - */ -export function dasherize(str: string): string { - return decamelize(str).replace(STRING_DASHERIZE_REGEXP, '-'); -} - -/** - Returns the lowerCamelCase form of a string. - - ```javascript - camelize('innerHTML'); // 'innerHTML' - camelize('action_name'); // 'actionName' - camelize('css-class-name'); // 'cssClassName' - camelize('my favorite items'); // 'myFavoriteItems' - camelize('My Favorite Items'); // 'myFavoriteItems' - ``` - - @method camelize - @param {String} str The string to camelize. - @return {String} the camelized string. - */ -export function camelize(str: string): string { - return str - .replace(STRING_CAMELIZE_REGEXP, (_match: string, _separator: string, chr: string) => { - return chr ? chr.toUpperCase() : ''; - }) - .replace(/^([A-Z])/, (match: string) => match.toLowerCase()); -} - -/** - Returns the UpperCamelCase form of a string. - - ```javascript - 'innerHTML'.classify(); // 'InnerHTML' - 'action_name'.classify(); // 'ActionName' - 'css-class-name'.classify(); // 'CssClassName' - 'my favorite items'.classify(); // 'MyFavoriteItems' - ``` - - @method classify - @param {String} str the string to classify - @return {String} the classified string - */ -export function classify(str: string): string { - return str.split('.').map(part => capitalize(camelize(part))).join('.'); -} - -/** - More general than decamelize. Returns the lower\_case\_and\_underscored - form of a string. - - ```javascript - 'innerHTML'.underscore(); // 'inner_html' - 'action_name'.underscore(); // 'action_name' - 'css-class-name'.underscore(); // 'css_class_name' - 'my favorite items'.underscore(); // 'my_favorite_items' - ``` - - @method underscore - @param {String} str The string to underscore. - @return {String} the underscored string. - */ -export function underscore(str: string): string { - return str - .replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2') - .replace(STRING_UNDERSCORE_REGEXP_2, '_') - .toLowerCase(); -} - -/** - Returns the Capitalized form of a string - - ```javascript - 'innerHTML'.capitalize() // 'InnerHTML' - 'action_name'.capitalize() // 'Action_name' - 'css-class-name'.capitalize() // 'Css-class-name' - 'my favorite items'.capitalize() // 'My favorite items' - ``` - - @method capitalize - @param {String} str The string to capitalize. - @return {String} The capitalized string. - */ -export function capitalize(str: string): string { - return str.charAt(0).toUpperCase() + str.substr(1); -} diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index dc90ee0b77..17ee3094f1 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -18,7 +18,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import * as stringUtils from '../strings'; import { findNode, getDecoratorMetadata } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { AppConfig, getAppFromConfig, getConfig } from '../utility/config'; @@ -181,7 +180,7 @@ export default function (options: UniversalOptions): Rule { return (host: Tree, context: SchematicContext) => { const templateSource = apply(url('./files'), [ template({ - ...stringUtils, + ...strings, ...options as object, stripTsExtension: (s: string) => { return s.replace(/\.ts$/, ''); }, }), diff --git a/packages/schematics/angular/utility/find-module.ts b/packages/schematics/angular/utility/find-module.ts index 9fa7b13d86..c365515cde 100644 --- a/packages/schematics/angular/utility/find-module.ts +++ b/packages/schematics/angular/utility/find-module.ts @@ -5,9 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Path, join, normalize, relative } from '@angular-devkit/core'; +import { Path, join, normalize, relative, strings } from '@angular-devkit/core'; import { DirEntry, Tree } from '@angular-devkit/schematics'; -import { dasherize } from '../strings'; export interface ModuleOptions { @@ -31,7 +30,7 @@ export function findModuleFromOptions(host: Tree, options: ModuleOptions): Path if (!options.module) { const pathToCheck = (options.sourceDir || '') + '/' + (options.path || '') - + (options.flat ? '' : '/' + dasherize(options.name)); + + (options.flat ? '' : '/' + strings.dasherize(options.name)); return normalize(findModule(host, pathToCheck)); } else { diff --git a/packages/schematics/schematics/blank/factory.ts b/packages/schematics/schematics/blank/factory.ts index c745875b66..acbf7c5aeb 100644 --- a/packages/schematics/schematics/blank/factory.ts +++ b/packages/schematics/schematics/blank/factory.ts @@ -10,10 +10,9 @@ import { JsonObject, JsonValue, Path, - camelize, - dasherize, normalize, parseJsonAst, + strings, } from '@angular-devkit/core'; import { Rule, @@ -115,8 +114,8 @@ export default function (options: Schema): Rule { coreVersion, schematicsVersion, dot: '.', - camelize, - dasherize, + camelize: strings.camelize, + dasherize: strings.dasherize, }), ]); @@ -129,8 +128,8 @@ export default function (options: Schema): Rule { coreVersion, schematicsVersion, dot: '.', - camelize, - dasherize, + camelize: strings.camelize, + dasherize: strings.dasherize, }), mergeWith(source), move(options.name), @@ -141,9 +140,10 @@ export default function (options: Schema): Rule { return chain([ mergeWith(source), - addSchematicToCollectionJson(collectionPath, dasherize(options.name), { + addSchematicToCollectionJson(collectionPath, strings.dasherize(options.name), { description: 'A blank schematic.', - factory: './' + dasherize(options.name) + '/index#' + camelize(options.name), + factory: './' + strings.dasherize(options.name) + '/index#' + + strings.camelize(options.name), }), ])(tree, context); }; diff --git a/packages/schematics/schematics/schematic/factory.ts b/packages/schematics/schematics/schematic/factory.ts index 63ab249b2d..075bed0b08 100644 --- a/packages/schematics/schematics/schematic/factory.ts +++ b/packages/schematics/schematics/schematic/factory.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Path, dasherize } from '@angular-devkit/core'; +import { Path, strings } from '@angular-devkit/core'; import { Rule, apply, @@ -30,7 +30,7 @@ export default function (options: Schema): Rule { coreVersion, schematicsVersion, dot: '.', - dasherize, + dasherize: strings.dasherize, }), ), move(options.name), diff --git a/scripts/serialize.ts b/scripts/serialize.ts index ae95794bfb..ddbb3cb644 100644 --- a/scripts/serialize.ts +++ b/scripts/serialize.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { classify, logging } from '@angular-devkit/core'; +import { logging, strings } from '@angular-devkit/core'; import { SchemaClassFactory } from '@ngtools/json-schema'; import * as fs from 'fs'; @@ -17,7 +17,7 @@ export function buildSchema(inFile: string, mimetype: string): string { let name = inFile.split(/[\/\\]/g).pop(); if (name) { - name = classify(name.replace(/\.[^.]*$/, '')); + name = strings.classify(name.replace(/\.[^.]*$/, '')); } const license = `/** From 1f1c2750a81a9b1397327cc2a3c3cb91d18c340c Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Sun, 21 Jan 2018 14:47:12 +0900 Subject: [PATCH 057/724] feat(@schematics/angular): add a zone.js flag for IE/Edge to prevent error or performance impact --- .../angular/application/files/__sourcedir__/polyfills.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts b/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts index 200cfd8014..af84770782 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts +++ b/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts @@ -61,6 +61,12 @@ import 'core-js/es7/reflect'; // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + /* + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + */ +// (window as any).__Zone_enable_cross_context_check = true; + /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ From 20860cc49f8dbc6a01d5344a3de048434e3da2bc Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 25 Jan 2018 11:44:44 -0800 Subject: [PATCH 058/724] ci: ignore builtin modules Similar to https://github.com/angular/angular-cli/pull/9302 --- lib/bootstrap-local.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/bootstrap-local.js b/lib/bootstrap-local.js index fefb8cffc3..3d7b231339 100644 --- a/lib/bootstrap-local.js +++ b/lib/bootstrap-local.js @@ -97,7 +97,7 @@ require.extensions['.ejs'] = function (m, filename) { return m._compile(result.source.replace(/return/, 'module.exports.default = '), filename); }; - +const builtinModules = Object.keys(process.binding('natives')); const packages = require('./packages').packages; // If we're running locally, meaning npm linked. This is basically "developer mode". if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) { @@ -110,6 +110,9 @@ if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) { Module._resolveFilename = function (request, parent) { if (request in packages) { return packages[request].main; + } else if (builtinModules.includes(request)) { + // It's a native Node module. + return oldResolve.call(this, request, parent); } else { const match = Object.keys(packages).find(pkgName => request.startsWith(pkgName + '/')); if (match) { From a96ee5d51fd36d9dec44b4146aa9eb685afd809a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 25 Jan 2018 11:35:17 -0800 Subject: [PATCH 059/724] ci: validate licenses of dependencies Removed invalid licensed dependencies (npm and npm-run). This requires that we do not use npm-run anymore for running typescript so we use typescript API directly instead. --- package-lock.json | 5927 +++++++++------------------------- package.json | 6 +- scripts/build.ts | 10 +- scripts/publish.ts | 3 +- scripts/validate-licenses.ts | 119 + scripts/validate.ts | 6 + 6 files changed, 1716 insertions(+), 4355 deletions(-) create mode 100644 scripts/validate-licenses.ts diff --git a/package-lock.json b/package-lock.json index 3362505ab6..f0d4c2ded5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -208,11 +208,6 @@ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -223,16 +218,6 @@ "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=" }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=" - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" - }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", @@ -243,6 +228,12 @@ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", @@ -437,6 +428,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -685,16 +677,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", @@ -751,6 +733,12 @@ "ms": "2.0.0" } }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -766,15 +754,6 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -790,6 +769,16 @@ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "2.0.6", + "wrappy": "1.0.2" + } + }, "diff": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", @@ -803,11 +792,6 @@ "is-obj": "1.0.1" } }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" - }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", @@ -830,28 +814,6 @@ "is-arrayish": "0.2.1" } }, - "es-abstract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", - "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", - "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" - } - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -895,30 +857,6 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "requires": { - "duplexer": "0.1.1", - "from": "0.1.7", - "map-stream": "0.1.0", - "pause-stream": "0.0.11", - "split": "0.3.3", - "stream-combiner": "0.0.4", - "through": "2.3.8" - }, - "dependencies": { - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "requires": { - "through": "2.3.8" - } - } - } - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -1012,11 +950,6 @@ "for-in": "1.0.2" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1032,1313 +965,282 @@ "mime-types": "2.1.17" } }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.2.8" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "get-pkg-repo": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", - "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", - "requires": { - "hosted-git-info": "2.5.0", - "meow": "3.7.0", - "normalize-package-data": "2.4.0", - "parse-github-repo-url": "1.4.1", - "through2": "2.0.3" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "git-raw-commits": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.0.tgz", - "integrity": "sha1-C8hZbpDV/+c29/VUa9LRL3OrqsY=", - "requires": { - "dargs": "4.1.0", - "lodash.template": "4.4.0", - "meow": "3.7.0", - "split2": "2.2.0", - "through2": "2.0.3" - } - }, - "git-remote-origin-url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", - "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", - "requires": { - "gitconfiglocal": "1.0.0", - "pify": "2.3.0" - } - }, - "git-semver-tags": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.3.tgz", - "integrity": "sha1-GItFOIK/nXojr9Mbq6U32rc4jV0=", - "requires": { - "meow": "3.7.0", - "semver": "5.4.1" - } - }, - "gitconfiglocal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", - "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", - "requires": { - "ini": "1.3.5" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "2.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - } - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "optional": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" }, "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, "ajv": { "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "bundled": true, + "optional": true, "requires": { "co": "4.6.0", "json-stable-stringify": "1.0.1" } - } - } - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", - "requires": { - "function-bind": "1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "2.0.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "requires": { - "binary-extensions": "1.11.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "1.0.1" - } - }, - "is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, - "is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", - "requires": { - "text-extensions": "1.7.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "requires": { - "abbrev": "1.0.9", - "async": "1.5.2", - "escodegen": "1.8.1", - "esprima": "2.7.3", - "glob": "5.0.15", - "handlebars": "4.0.11", - "js-yaml": "3.10.0", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "once": "1.4.0", - "resolve": "1.1.7", - "supports-color": "3.2.3", - "which": "1.3.0", - "wordwrap": "1.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - } - } - }, - "jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", - "requires": { - "exit": "0.1.2", - "glob": "7.1.2", - "jasmine-core": "2.8.0" - } - }, - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=" - }, - "jasmine-spec-reporter": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-3.3.0.tgz", - "integrity": "sha1-xjw9Q7rP0W5tqGxG0mWVfgB18Uw=", - "requires": { - "colors": "1.1.2" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", - "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-parse-better-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "optional": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1" - } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "requires": { - "lodash._reinterpolate": "3.0.0" - } - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "make-error": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.2.tgz", - "integrity": "sha512-l9ra35l5VWLF24y75Tg8XgfGLX0ueRhph118WKM6H5denx4bB5QF59+4UAm9oJ2qsPQZas/CQUDdtDdfvYHBdQ==" - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "requires": { - "mime-db": "1.30.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "minipass": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz", - "integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==", - "requires": { - "yallist": "3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" - } - } - }, - "minizlib": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", - "requires": { - "minipass": "2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "modify-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz", - "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" - }, - "node-pre-gyp": { - "version": "0.6.39", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", - "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", - "requires": { - "detect-libc": "1.0.3", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.3", - "request": "2.81.0", - "rimraf": "2.6.2", - "semver": "5.4.1", - "tar": "2.2.1", - "tar-pack": "3.4.1" - }, - "dependencies": { - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "requires": { - "abbrev": "1.0.9", - "osenv": "0.1.4" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1.0.9" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "npm": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz", - "integrity": "sha512-mt839mCsI5hzdBJLf1iRBwt610P35iUfvqLVuL7VFdanUwRBAmGtbsjdGIuzegplR95xx+fTHE0vBMuMJp1sLQ==", - "requires": { - "JSONStream": "1.3.1", - "abbrev": "1.1.1", - "ansi-regex": "3.0.0", - "ansicolors": "0.3.2", - "ansistyles": "0.1.3", - "aproba": "1.2.0", - "archy": "1.0.0", - "bin-links": "1.1.0", - "bluebird": "3.5.1", - "cacache": "10.0.1", - "call-limit": "1.1.0", - "chownr": "1.0.1", - "cli-table2": "0.2.0", - "cmd-shim": "2.0.2", - "columnify": "1.5.4", - "config-chain": "1.1.11", - "debuglog": "1.0.1", - "detect-indent": "5.0.0", - "dezalgo": "1.0.3", - "editor": "1.0.0", - "find-npm-prefix": "1.0.1", - "fs-vacuum": "1.2.10", - "fs-write-stream-atomic": "1.0.10", - "gentle-fs": "2.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "has-unicode": "2.0.1", - "hosted-git-info": "2.5.0", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "inflight": "1.0.6", - "inherits": "2.0.3", - "ini": "1.3.4", - "init-package-json": "1.10.1", - "is-cidr": "1.0.0", - "lazy-property": "1.0.0", - "libnpx": "9.7.1", - "lockfile": "1.0.3", - "lodash._baseindexof": "3.1.0", - "lodash._baseuniq": "4.6.0", - "lodash._bindcallback": "3.0.1", - "lodash._cacheindexof": "3.0.2", - "lodash._createcache": "3.1.2", - "lodash._getnative": "3.9.1", - "lodash.clonedeep": "4.5.0", - "lodash.restparam": "3.6.1", - "lodash.union": "4.6.0", - "lodash.uniq": "4.5.0", - "lodash.without": "4.4.0", - "lru-cache": "4.1.1", - "meant": "1.0.1", - "mississippi": "1.3.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "nopt": "4.0.1", - "normalize-package-data": "2.4.0", - "npm-cache-filename": "1.0.2", - "npm-install-checks": "3.0.0", - "npm-lifecycle": "2.0.0", - "npm-package-arg": "6.0.0", - "npm-packlist": "1.1.10", - "npm-profile": "2.0.5", - "npm-registry-client": "8.5.0", - "npm-user-validate": "1.0.0", - "npmlog": "4.1.2", - "once": "1.4.0", - "opener": "1.4.3", - "osenv": "0.1.4", - "pacote": "7.0.2", - "path-is-inside": "1.0.2", - "promise-inflight": "1.0.1", - "qrcode-terminal": "0.11.0", - "query-string": "5.0.1", - "qw": "1.0.1", - "read": "1.0.7", - "read-cmd-shim": "1.0.1", - "read-installed": "4.0.3", - "read-package-json": "2.0.12", - "read-package-tree": "5.1.6", - "readable-stream": "2.3.3", - "readdir-scoped-modules": "1.0.2", - "request": "2.83.0", - "retry": "0.10.1", - "rimraf": "2.6.2", - "safe-buffer": "5.1.1", - "semver": "5.4.1", - "sha": "2.0.1", - "slide": "1.1.6", - "sorted-object": "2.0.1", - "sorted-union-stream": "2.1.3", - "ssri": "5.0.0", - "strip-ansi": "4.0.0", - "tar": "4.0.2", - "text-table": "0.2.0", - "uid-number": "0.0.6", - "umask": "1.1.0", - "unique-filename": "1.1.0", - "unpipe": "1.0.0", - "update-notifier": "2.3.0", - "uuid": "3.1.0", - "validate-npm-package-license": "3.0.1", - "validate-npm-package-name": "3.0.0", - "which": "1.3.0", - "worker-farm": "1.5.1", - "wrappy": "1.0.2", - "write-file-atomic": "2.1.0" - }, - "dependencies": { - "JSONStream": { - "version": "1.3.1", + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", "bundled": true, + "optional": true, "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - }, - "dependencies": { - "jsonparse": { - "version": "1.3.1", - "bundled": true - }, - "through": { - "version": "2.3.8", - "bundled": true - } + "delegates": "1.0.0", + "readable-stream": "2.2.9" } }, - "abbrev": { - "version": "1.1.1", - "bundled": true + "asn1": { + "version": "0.2.3", + "bundled": true, + "optional": true }, - "ansi-regex": { - "version": "3.0.0", - "bundled": true + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "optional": true }, - "ansicolors": { - "version": "0.3.2", - "bundled": true + "asynckit": { + "version": "0.4.0", + "bundled": true, + "optional": true }, - "ansistyles": { - "version": "0.1.3", - "bundled": true + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "optional": true }, - "aproba": { - "version": "1.2.0", - "bundled": true + "aws4": { + "version": "1.6.0", + "bundled": true, + "optional": true }, - "archy": { - "version": "1.0.0", + "balanced-match": { + "version": "0.4.2", "bundled": true }, - "bin-links": { - "version": "1.1.0", + "bcrypt-pbkdf": { + "version": "1.0.1", "bundled": true, + "optional": true, "requires": { - "bluebird": "3.5.1", - "cmd-shim": "2.0.2", - "fs-write-stream-atomic": "1.0.10", - "gentle-fs": "2.0.1", - "graceful-fs": "4.1.11", - "slide": "1.1.6" + "tweetnacl": "0.14.5" } }, - "bluebird": { - "version": "3.5.1", - "bundled": true + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } }, - "cacache": { - "version": "10.0.1", + "boom": { + "version": "2.10.1", "bundled": true, "requires": { - "bluebird": "3.5.1", - "chownr": "1.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "lru-cache": "4.1.1", - "mississippi": "1.3.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "promise-inflight": "1.0.1", - "rimraf": "2.6.2", - "ssri": "5.0.0", - "unique-filename": "1.1.0", - "y18n": "3.2.1" - }, - "dependencies": { - "ssri": { - "version": "5.0.0", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true - } + "hoek": "2.16.3" } }, - "call-limit": { - "version": "1.1.0", + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", "bundled": true }, - "chownr": { - "version": "1.0.1", + "caseless": { + "version": "0.12.0", + "bundled": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", "bundled": true }, - "cli-table2": { - "version": "0.2.0", + "combined-stream": { + "version": "1.0.5", "bundled": true, "requires": { - "colors": "1.1.2", - "lodash": "3.10.1", - "string-width": "1.0.2" - }, - "dependencies": { - "colors": { - "version": "1.1.2", - "bundled": true, - "optional": true - }, - "lodash": { - "version": "3.10.1", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true - } - } - } - } - } + "delayed-stream": "1.0.0" } }, - "cmd-shim": { - "version": "2.0.2", + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "2.0.5", "bundled": true, "requires": { - "graceful-fs": "4.1.11", - "mkdirp": "0.5.1" + "boom": "2.10.1" } }, - "columnify": { - "version": "1.5.4", + "dashdash": { + "version": "1.14.1", "bundled": true, + "optional": true, "requires": { - "strip-ansi": "3.0.1", - "wcwidth": "1.0.1" + "assert-plus": "1.0.0" }, "dependencies": { - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true - } - } - }, - "wcwidth": { - "version": "1.0.1", + "assert-plus": { + "version": "1.0.0", "bundled": true, - "requires": { - "defaults": "1.0.3" - }, - "dependencies": { - "defaults": { - "version": "1.0.3", - "bundled": true, - "requires": { - "clone": "1.0.2" - }, - "dependencies": { - "clone": { - "version": "1.0.2", - "bundled": true - } - } - } - } + "optional": true } } }, - "config-chain": { - "version": "1.1.11", + "debug": { + "version": "2.6.8", "bundled": true, + "optional": true, "requires": { - "ini": "1.3.4", - "proto-list": "1.2.4" - }, - "dependencies": { - "proto-list": { - "version": "1.2.4", - "bundled": true - } + "ms": "2.0.0" } }, - "debuglog": { - "version": "1.0.1", - "bundled": true + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "optional": true }, - "detect-indent": { - "version": "5.0.0", + "delayed-stream": { + "version": "1.0.0", "bundled": true }, - "dezalgo": { - "version": "1.0.3", + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", "bundled": true, + "optional": true, "requires": { - "asap": "2.0.5", - "wrappy": "1.0.2" - }, - "dependencies": { - "asap": { - "version": "2.0.5", - "bundled": true - } + "jsbn": "0.1.1" } }, - "editor": { - "version": "1.0.0", + "extend": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", "bundled": true }, - "find-npm-prefix": { - "version": "1.0.1", + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", "bundled": true }, - "fs-vacuum": { - "version": "1.2.10", + "fstream": { + "version": "1.0.11", "bundled": true, "requires": { "graceful-fs": "4.1.11", - "path-is-inside": "1.0.2", - "rimraf": "2.6.2" + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" } }, - "fs-write-stream-atomic": { - "version": "1.0.10", + "fstream-ignore": { + "version": "1.0.5", "bundled": true, + "optional": true, "requires": { - "graceful-fs": "4.1.11", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "readable-stream": "2.3.3" + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" } }, - "gentle-fs": { - "version": "2.0.1", + "gauge": { + "version": "2.7.4", "bundled": true, + "optional": true, "requires": { - "aproba": "1.2.0", - "fs-vacuum": "1.2.10", - "graceful-fs": "4.1.11", - "iferr": "0.1.5", - "mkdirp": "0.5.1", - "path-is-inside": "1.0.2", - "read-cmd-shim": "1.0.1", - "slide": "1.1.6" + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } } }, "glob": { @@ -2351,3157 +1253,1469 @@ "minimatch": "3.0.4", "once": "1.4.0", "path-is-absolute": "1.0.1" - }, - "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - } } }, "graceful-fs": { "version": "4.1.11", "bundled": true }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true - }, - "iferr": { - "version": "0.1.5", - "bundled": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true + "har-schema": { + "version": "1.0.5", + "bundled": true, + "optional": true }, - "inflight": { - "version": "1.0.6", + "har-validator": { + "version": "4.2.1", "bundled": true, + "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "ajv": "4.11.8", + "har-schema": "1.0.5" } }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true }, - "init-package-json": { - "version": "1.10.1", + "hawk": { + "version": "3.1.3", "bundled": true, "requires": { - "glob": "7.1.2", - "npm-package-arg": "5.1.2", - "promzard": "0.3.0", - "read": "1.0.7", - "read-package-json": "2.0.12", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1", - "validate-npm-package-name": "3.0.0" - }, - "dependencies": { - "npm-package-arg": { - "version": "5.1.2", - "bundled": true, - "requires": { - "hosted-git-info": "2.5.0", - "osenv": "0.1.4", - "semver": "5.4.1", - "validate-npm-package-name": "3.0.0" - } - }, - "promzard": { - "version": "0.3.0", - "bundled": true, - "requires": { - "read": "1.0.7" - } - } + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" } }, - "is-cidr": { - "version": "1.0.0", + "hoek": { + "version": "2.16.3", + "bundled": true + }, + "http-signature": { + "version": "1.1.1", "bundled": true, + "optional": true, "requires": { - "cidr-regex": "1.0.6" - }, - "dependencies": { - "cidr-regex": { - "version": "1.0.6", - "bundled": true - } + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" } }, - "lazy-property": { - "version": "1.0.0", - "bundled": true - }, - "libnpx": { - "version": "9.7.1", + "inflight": { + "version": "1.0.6", "bundled": true, "requires": { - "dotenv": "4.0.0", - "npm-package-arg": "5.1.2", - "rimraf": "2.6.2", - "safe-buffer": "5.1.1", - "update-notifier": "2.3.0", - "which": "1.3.0", - "y18n": "3.2.1", - "yargs": "8.0.2" - }, - "dependencies": { - "dotenv": { - "version": "4.0.0", - "bundled": true - }, - "npm-package-arg": { - "version": "5.1.2", - "bundled": true, - "requires": { - "hosted-git-info": "2.5.0", - "osenv": "0.1.4", - "semver": "5.4.1", - "validate-npm-package-name": "3.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true - }, - "yargs": { - "version": "8.0.2", - "bundled": true, - "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true - }, - "cliui": { - "version": "3.2.0", - "bundled": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true - } - } - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" - } - } - } - }, - "decamelize": { - "version": "1.2.0", - "bundled": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - }, - "dependencies": { - "execa": { - "version": "0.7.0", - "bundled": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - }, - "dependencies": { - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "requires": { - "shebang-regex": "1.0.0" - }, - "dependencies": { - "shebang-regex": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "get-stream": { - "version": "3.0.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "requires": { - "path-key": "2.0.1" - }, - "dependencies": { - "path-key": { - "version": "2.0.1", - "bundled": true - } - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true - } - } - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "requires": { - "invert-kv": "1.0.0" - }, - "dependencies": { - "invert-kv": { - "version": "1.0.0", - "bundled": true - } - } - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "requires": { - "mimic-fn": "1.1.0" - }, - "dependencies": { - "mimic-fn": { - "version": "1.1.0", - "bundled": true - } - } - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "bundled": true, - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "bundled": true, - "requires": { - "locate-path": "2.0.0" - }, - "dependencies": { - "locate-path": { - "version": "2.0.0", - "bundled": true, - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - }, - "dependencies": { - "p-locate": { - "version": "2.0.0", - "bundled": true, - "requires": { - "p-limit": "1.1.0" - }, - "dependencies": { - "p-limit": { - "version": "1.1.0", - "bundled": true - } - } - }, - "path-exists": { - "version": "3.0.0", - "bundled": true - } - } - } - } - }, - "read-pkg": { - "version": "2.0.0", - "bundled": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "2.0.0", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "bundled": true, - "requires": { - "error-ex": "1.3.1" - }, - "dependencies": { - "error-ex": { - "version": "1.3.1", - "bundled": true, - "requires": { - "is-arrayish": "0.2.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.2.1", - "bundled": true - } - } - } - } - }, - "pify": { - "version": "2.3.0", - "bundled": true - }, - "strip-bom": { - "version": "3.0.0", - "bundled": true - } - } - }, - "path-type": { - "version": "2.0.0", - "bundled": true, - "requires": { - "pify": "2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "bundled": true - } - } - } - } - } - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true - } - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true - }, - "yargs-parser": { - "version": "7.0.0", - "bundled": true, - "requires": { - "camelcase": "4.1.0" - } - } - } - } + "once": "1.4.0", + "wrappy": "1.0.2" } }, - "lockfile": { - "version": "1.0.3", + "inherits": { + "version": "2.0.3", "bundled": true }, - "lodash._baseindexof": { - "version": "3.1.0", - "bundled": true + "ini": { + "version": "1.3.4", + "bundled": true, + "optional": true }, - "lodash._baseuniq": { - "version": "4.6.0", + "is-fullwidth-code-point": { + "version": "1.0.0", "bundled": true, "requires": { - "lodash._createset": "4.0.3", - "lodash._root": "3.0.1" - }, - "dependencies": { - "lodash._createset": { - "version": "4.0.3", - "bundled": true - }, - "lodash._root": { - "version": "3.0.1", - "bundled": true - } + "number-is-nan": "1.0.1" } }, - "lodash._bindcallback": { - "version": "3.0.1", - "bundled": true + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "optional": true }, - "lodash._cacheindexof": { - "version": "3.0.2", + "isarray": { + "version": "1.0.0", "bundled": true }, - "lodash._createcache": { - "version": "3.1.2", + "isstream": { + "version": "0.1.2", + "bundled": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", "bundled": true, + "optional": true, "requires": { - "lodash._getnative": "3.9.1" + "jsbn": "0.1.1" } }, - "lodash._getnative": { - "version": "3.9.1", - "bundled": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "bundled": true + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true }, - "lodash.restparam": { - "version": "3.6.1", - "bundled": true + "json-schema": { + "version": "0.2.3", + "bundled": true, + "optional": true }, - "lodash.union": { - "version": "4.6.0", - "bundled": true + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } }, - "lodash.uniq": { - "version": "4.5.0", - "bundled": true + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "optional": true }, - "lodash.without": { - "version": "4.4.0", - "bundled": true + "jsonify": { + "version": "0.0.0", + "bundled": true, + "optional": true }, - "lru-cache": { - "version": "4.1.1", + "jsprim": { + "version": "1.4.0", "bundled": true, + "optional": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" }, "dependencies": { - "pseudomap": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true } } }, - "meant": { - "version": "1.0.1", + "mime-db": { + "version": "1.27.0", "bundled": true }, - "mississippi": { - "version": "1.3.0", + "mime-types": { + "version": "2.1.15", "bundled": true, "requires": { - "concat-stream": "1.6.0", - "duplexify": "3.5.0", - "end-of-stream": "1.4.0", - "flush-write-stream": "1.0.2", - "from2": "2.3.0", - "parallel-transform": "1.1.0", - "pump": "1.0.2", - "pumpify": "1.3.5", - "stream-each": "1.2.0", - "through2": "2.0.3" - }, - "dependencies": { - "concat-stream": { - "version": "1.6.0", - "bundled": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" - }, - "dependencies": { - "typedarray": { - "version": "0.0.6", - "bundled": true - } - } - }, - "duplexify": { - "version": "3.5.0", - "bundled": true, - "requires": { - "end-of-stream": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" - }, - "dependencies": { - "end-of-stream": { - "version": "1.0.0", - "bundled": true, - "requires": { - "once": "1.3.3" - }, - "dependencies": { - "once": { - "version": "1.3.3", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - } - } - }, - "stream-shift": { - "version": "1.0.0", - "bundled": true - } - } - }, - "end-of-stream": { - "version": "1.4.0", - "bundled": true, - "requires": { - "once": "1.4.0" - } - }, - "flush-write-stream": { - "version": "1.0.2", - "bundled": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "from2": { - "version": "2.3.0", - "bundled": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "parallel-transform": { - "version": "1.1.0", - "bundled": true, - "requires": { - "cyclist": "0.2.2", - "inherits": "2.0.3", - "readable-stream": "2.3.3" - }, - "dependencies": { - "cyclist": { - "version": "0.2.2", - "bundled": true - } - } - }, - "pump": { - "version": "1.0.2", - "bundled": true, - "requires": { - "end-of-stream": "1.4.0", - "once": "1.4.0" - } - }, - "pumpify": { - "version": "1.3.5", - "bundled": true, - "requires": { - "duplexify": "3.5.0", - "inherits": "2.0.3", - "pump": "1.0.2" - } - }, - "stream-each": { - "version": "1.2.0", - "bundled": true, - "requires": { - "end-of-stream": "1.4.0", - "stream-shift": "1.0.0" - }, - "dependencies": { - "stream-shift": { - "version": "1.0.0", - "bundled": true - } - } - }, - "through2": { - "version": "2.0.3", - "bundled": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - }, - "dependencies": { - "xtend": { - "version": "4.0.1", - "bundled": true - } - } - } + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.7" } }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, "mkdirp": { "version": "0.5.1", "bundled": true, "requires": { "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true - } } }, - "move-concurrently": { - "version": "1.0.1", + "ms": { + "version": "2.0.0", "bundled": true, - "requires": { - "aproba": "1.2.0", - "copy-concurrently": "1.0.5", - "fs-write-stream-atomic": "1.0.10", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" - }, - "dependencies": { - "copy-concurrently": { - "version": "1.0.5", - "bundled": true, - "requires": { - "aproba": "1.2.0", - "fs-write-stream-atomic": "1.0.10", - "iferr": "0.1.5", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" - } - }, - "run-queue": { - "version": "1.0.3", - "bundled": true, - "requires": { - "aproba": "1.2.0" - } - } - } + "optional": true }, - "node-gyp": { - "version": "3.6.2", + "node-pre-gyp": { + "version": "0.6.39", "bundled": true, + "optional": true, "requires": { - "fstream": "1.0.11", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", + "detect-libc": "1.0.2", + "hawk": "3.1.3", "mkdirp": "0.5.1", - "nopt": "3.0.6", - "npmlog": "4.1.2", - "osenv": "0.1.4", - "request": "2.83.0", - "rimraf": "2.6.2", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", "semver": "5.3.0", "tar": "2.2.1", - "which": "1.3.0" - }, - "dependencies": { - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - }, - "nopt": { - "version": "3.0.6", - "bundled": true, - "requires": { - "abbrev": "1.1.1" - } - }, - "semver": { - "version": "5.3.0", - "bundled": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - }, - "dependencies": { - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - } - } - } + "tar-pack": "3.4.0" } }, "nopt": { "version": "4.0.1", "bundled": true, + "optional": true, "requires": { - "abbrev": "1.1.1", + "abbrev": "1.1.0", "osenv": "0.1.4" } }, - "normalize-package-data": { - "version": "2.4.0", + "npmlog": { + "version": "4.1.0", "bundled": true, + "optional": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - }, - "dependencies": { - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "requires": { - "builtin-modules": "1.1.1" - }, - "dependencies": { - "builtin-modules": { - "version": "1.1.1", - "bundled": true - } - } - } + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, - "npm-cache-filename": { - "version": "1.0.2", + "number-is-nan": { + "version": "1.0.1", "bundled": true }, - "npm-install-checks": { - "version": "3.0.0", + "oauth-sign": { + "version": "0.8.2", "bundled": true, - "requires": { - "semver": "5.4.1" - } + "optional": true }, - "npm-lifecycle": { - "version": "2.0.0", + "object-assign": { + "version": "4.1.1", "bundled": true, - "requires": { - "byline": "5.0.0", - "graceful-fs": "4.1.11", - "node-gyp": "3.6.2", - "resolve-from": "4.0.0", - "slide": "1.1.6", - "uid-number": "0.0.6", - "umask": "1.1.0", - "which": "1.3.0" - }, - "dependencies": { - "byline": { - "version": "5.0.0", - "bundled": true - }, - "resolve-from": { - "version": "4.0.0", - "bundled": true - } - } + "optional": true }, - "npm-package-arg": { - "version": "6.0.0", + "once": { + "version": "1.4.0", "bundled": true, "requires": { - "hosted-git-info": "2.5.0", - "osenv": "0.1.4", - "semver": "5.4.1", - "validate-npm-package-name": "3.0.0" + "wrappy": "1.0.2" } }, - "npm-packlist": { - "version": "1.1.10", + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", "bundled": true, + "optional": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" - }, - "dependencies": { - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "requires": { - "minimatch": "3.0.4" - }, - "dependencies": { - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - } - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true - } + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, - "npm-profile": { - "version": "2.0.5", + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.1", "bundled": true, + "optional": true, "requires": { - "aproba": "1.2.0", - "make-fetch-happen": "2.5.0" + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { - "make-fetch-happen": { - "version": "2.5.0", + "minimist": { + "version": "1.2.0", "bundled": true, - "requires": { - "agentkeepalive": "3.3.0", - "cacache": "9.3.0", - "http-cache-semantics": "3.8.0", - "http-proxy-agent": "2.0.0", - "https-proxy-agent": "2.1.0", - "lru-cache": "4.1.1", - "mississippi": "1.3.0", - "node-fetch-npm": "2.0.2", - "promise-retry": "1.1.1", - "socks-proxy-agent": "3.0.1", - "ssri": "4.1.6" - }, - "dependencies": { - "agentkeepalive": { - "version": "3.3.0", - "bundled": true, - "requires": { - "humanize-ms": "1.2.1" - }, - "dependencies": { - "humanize-ms": { - "version": "1.2.1", - "bundled": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "cacache": { - "version": "9.3.0", - "bundled": true, - "requires": { - "bluebird": "3.5.1", - "chownr": "1.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "lru-cache": "4.1.1", - "mississippi": "1.3.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "promise-inflight": "1.0.1", - "rimraf": "2.6.2", - "ssri": "4.1.6", - "unique-filename": "1.1.0", - "y18n": "3.2.1" - }, - "dependencies": { - "y18n": { - "version": "3.2.1", - "bundled": true - } - } - }, - "http-cache-semantics": { - "version": "3.8.0", - "bundled": true - }, - "http-proxy-agent": { - "version": "2.0.0", - "bundled": true, - "requires": { - "agent-base": "4.1.1", - "debug": "2.6.9" - }, - "dependencies": { - "agent-base": { - "version": "4.1.1", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - }, - "dependencies": { - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "requires": { - "es6-promise": "4.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.1.1", - "bundled": true - } - } - } - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "https-proxy-agent": { - "version": "2.1.0", - "bundled": true, - "requires": { - "agent-base": "4.1.1", - "debug": "2.6.9" - }, - "dependencies": { - "agent-base": { - "version": "4.1.1", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - }, - "dependencies": { - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "requires": { - "es6-promise": "4.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.1.1", - "bundled": true - } - } - } - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "node-fetch-npm": { - "version": "2.0.2", - "bundled": true, - "requires": { - "encoding": "0.1.12", - "json-parse-better-errors": "1.0.1", - "safe-buffer": "5.1.1" - }, - "dependencies": { - "encoding": { - "version": "0.1.12", - "bundled": true, - "requires": { - "iconv-lite": "0.4.19" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.19", - "bundled": true - } - } - }, - "json-parse-better-errors": { - "version": "1.0.1", - "bundled": true - } - } - }, - "promise-retry": { - "version": "1.1.1", - "bundled": true, - "requires": { - "err-code": "1.1.2", - "retry": "0.10.1" - }, - "dependencies": { - "err-code": { - "version": "1.1.2", - "bundled": true - } - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "bundled": true, - "requires": { - "agent-base": "4.1.1", - "socks": "1.1.10" - }, - "dependencies": { - "agent-base": { - "version": "4.1.1", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - }, - "dependencies": { - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "requires": { - "es6-promise": "4.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.1.1", - "bundled": true - } - } - } - } - }, - "socks": { - "version": "1.1.10", - "bundled": true, - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - }, - "dependencies": { - "ip": { - "version": "1.1.5", - "bundled": true - }, - "smart-buffer": { - "version": "1.1.15", - "bundled": true - } - } - } - } - }, - "ssri": { - "version": "4.1.6", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - } - } + "optional": true } } }, - "npm-registry-client": { - "version": "8.5.0", + "readable-stream": { + "version": "2.2.9", "bundled": true, "requires": { - "concat-stream": "1.6.0", - "graceful-fs": "4.1.11", - "normalize-package-data": "2.4.0", - "npm-package-arg": "5.1.2", - "npmlog": "4.1.2", - "once": "1.4.0", - "request": "2.83.0", - "retry": "0.10.1", - "semver": "5.4.1", - "slide": "1.1.6", - "ssri": "4.1.6" - }, - "dependencies": { - "concat-stream": { - "version": "1.6.0", - "bundled": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" - }, - "dependencies": { - "typedarray": { - "version": "0.0.6", - "bundled": true - } - } - }, - "npm-package-arg": { - "version": "5.1.2", - "bundled": true, - "requires": { - "hosted-git-info": "2.5.0", - "osenv": "0.1.4", - "semver": "5.4.1", - "validate-npm-package-name": "3.0.0" - } - }, - "ssri": { - "version": "4.1.6", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - } + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" } }, - "npm-user-validate": { - "version": "1.0.0", - "bundled": true - }, - "npmlog": { - "version": "4.1.2", + "request": { + "version": "2.81.0", "bundled": true, + "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - }, - "dependencies": { - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" - }, - "dependencies": { - "delegates": { - "version": "1.0.0", - "bundled": true - } - } - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true - } - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "requires": { - "string-width": "1.0.2" - } - } - } - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - } + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" } }, - "once": { - "version": "1.4.0", + "rimraf": { + "version": "2.6.1", "bundled": true, "requires": { - "wrappy": "1.0.2" + "glob": "7.1.2" } }, - "opener": { - "version": "1.4.3", + "safe-buffer": { + "version": "5.0.1", "bundled": true }, - "osenv": { - "version": "0.1.4", + "semver": { + "version": "5.3.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", "bundled": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - }, - "dependencies": { - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - } + "hoek": "2.16.3" } }, - "pacote": { - "version": "7.0.2", + "sshpk": { + "version": "1.13.0", "bundled": true, + "optional": true, "requires": { - "bluebird": "3.5.1", - "cacache": "10.0.1", - "get-stream": "3.0.0", - "glob": "7.1.2", - "lru-cache": "4.1.1", - "make-fetch-happen": "2.6.0", - "minimatch": "3.0.4", - "mississippi": "1.3.0", - "normalize-package-data": "2.4.0", - "npm-package-arg": "6.0.0", - "npm-packlist": "1.1.10", - "npm-pick-manifest": "2.1.0", - "osenv": "0.1.4", - "promise-inflight": "1.0.1", - "promise-retry": "1.1.1", - "protoduck": "4.0.0", - "safe-buffer": "5.1.1", - "semver": "5.4.1", - "ssri": "5.0.0", - "tar": "4.0.2", - "unique-filename": "1.1.0", - "which": "1.3.0" + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" }, "dependencies": { - "get-stream": { - "version": "3.0.0", - "bundled": true - }, - "make-fetch-happen": { - "version": "2.6.0", - "bundled": true, - "requires": { - "agentkeepalive": "3.3.0", - "cacache": "10.0.1", - "http-cache-semantics": "3.8.0", - "http-proxy-agent": "2.0.0", - "https-proxy-agent": "2.1.0", - "lru-cache": "4.1.1", - "mississippi": "1.3.0", - "node-fetch-npm": "2.0.2", - "promise-retry": "1.1.1", - "socks-proxy-agent": "3.0.1", - "ssri": "5.0.0" - }, - "dependencies": { - "agentkeepalive": { - "version": "3.3.0", - "bundled": true, - "requires": { - "humanize-ms": "1.2.1" - }, - "dependencies": { - "humanize-ms": { - "version": "1.2.1", - "bundled": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "http-cache-semantics": { - "version": "3.8.0", - "bundled": true - }, - "http-proxy-agent": { - "version": "2.0.0", - "bundled": true, - "requires": { - "agent-base": "4.1.2", - "debug": "2.6.9" - }, - "dependencies": { - "agent-base": { - "version": "4.1.2", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - }, - "dependencies": { - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "requires": { - "es6-promise": "4.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.1.1", - "bundled": true - } - } - } - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "https-proxy-agent": { - "version": "2.1.0", - "bundled": true, - "requires": { - "agent-base": "4.1.2", - "debug": "2.6.9" - }, - "dependencies": { - "agent-base": { - "version": "4.1.2", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - }, - "dependencies": { - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "requires": { - "es6-promise": "4.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.1.1", - "bundled": true - } - } - } - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "node-fetch-npm": { - "version": "2.0.2", - "bundled": true, - "requires": { - "encoding": "0.1.12", - "json-parse-better-errors": "1.0.1", - "safe-buffer": "5.1.1" - }, - "dependencies": { - "encoding": { - "version": "0.1.12", - "bundled": true, - "requires": { - "iconv-lite": "0.4.19" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.19", - "bundled": true - } - } - }, - "json-parse-better-errors": { - "version": "1.0.1", - "bundled": true - } - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "bundled": true, - "requires": { - "agent-base": "4.1.2", - "socks": "1.1.10" - }, - "dependencies": { - "agent-base": { - "version": "4.1.2", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - }, - "dependencies": { - "es6-promisify": { - "version": "5.0.0", - "bundled": true, - "requires": { - "es6-promise": "4.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.1.1", - "bundled": true - } - } - } - } - }, - "socks": { - "version": "1.1.10", - "bundled": true, - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - }, - "dependencies": { - "ip": { - "version": "1.1.5", - "bundled": true - }, - "smart-buffer": { - "version": "1.1.15", - "bundled": true - } - } - } - } - } - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - }, - "npm-pick-manifest": { - "version": "2.1.0", - "bundled": true, - "requires": { - "npm-package-arg": "6.0.0", - "semver": "5.4.1" - } - }, - "promise-retry": { - "version": "1.1.1", - "bundled": true, - "requires": { - "err-code": "1.1.2", - "retry": "0.10.1" - }, - "dependencies": { - "err-code": { - "version": "1.1.2", - "bundled": true - } - } - }, - "protoduck": { - "version": "4.0.0", + "assert-plus": { + "version": "1.0.0", "bundled": true, - "requires": { - "genfun": "4.0.1" - }, - "dependencies": { - "genfun": { - "version": "4.0.1", - "bundled": true - } - } + "optional": true } } }, - "path-is-inside": { + "string-width": { "version": "1.0.2", - "bundled": true + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } }, - "promise-inflight": { + "string_decoder": { "version": "1.0.1", - "bundled": true + "bundled": true, + "requires": { + "safe-buffer": "5.0.1" + } }, - "qrcode-terminal": { - "version": "0.11.0", - "bundled": true + "stringstream": { + "version": "0.0.5", + "bundled": true, + "optional": true }, - "query-string": { - "version": "5.0.1", + "strip-ansi": { + "version": "3.0.1", "bundled": true, "requires": { - "decode-uri-component": "0.2.0", - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" - }, - "dependencies": { - "decode-uri-component": { - "version": "0.2.0", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "strict-uri-encode": { - "version": "1.1.0", - "bundled": true - } + "ansi-regex": "2.1.1" } }, - "qw": { - "version": "1.0.1", - "bundled": true + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true }, - "read": { - "version": "1.0.7", + "tar": { + "version": "2.2.1", "bundled": true, "requires": { - "mute-stream": "0.0.7" - }, - "dependencies": { - "mute-stream": { - "version": "0.0.7", - "bundled": true - } + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" } }, - "read-cmd-shim": { - "version": "1.0.1", + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", "bundled": true, + "optional": true, "requires": { - "graceful-fs": "4.1.11" + "punycode": "1.4.1" } }, - "read-installed": { - "version": "4.0.3", + "tunnel-agent": { + "version": "0.6.0", "bundled": true, + "optional": true, "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.12", - "readdir-scoped-modules": "1.0.2", - "semver": "5.4.1", - "slide": "1.1.6", - "util-extend": "1.0.3" - }, - "dependencies": { - "util-extend": { - "version": "1.0.3", - "bundled": true - } + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" } }, - "read-package-json": { - "version": "2.0.12", + "wide-align": { + "version": "1.1.2", "bundled": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + } + } + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.2.8" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "requires": { + "hosted-git-info": "2.5.0", + "meow": "3.7.0", + "normalize-package-data": "2.4.0", + "parse-github-repo-url": "1.4.1", + "through2": "2.0.3" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "git-raw-commits": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.0.tgz", + "integrity": "sha1-C8hZbpDV/+c29/VUa9LRL3OrqsY=", + "requires": { + "dargs": "4.1.0", + "lodash.template": "4.4.0", + "meow": "3.7.0", + "split2": "2.2.0", + "through2": "2.0.3" + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "requires": { + "gitconfiglocal": "1.0.0", + "pify": "2.3.0" + } + }, + "git-semver-tags": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.3.tgz", + "integrity": "sha1-GItFOIK/nXojr9Mbq6U32rc4jV0=", + "requires": { + "meow": "3.7.0", + "semver": "5.4.1" + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "requires": { + "ini": "1.3.5" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-better-errors": "1.0.1", - "normalize-package-data": "2.4.0", - "slash": "1.0.0" - }, - "dependencies": { - "json-parse-better-errors": { - "version": "1.0.1", - "bundled": true - }, - "slash": { - "version": "1.0.0", - "bundled": true - } + "amdefine": "1.0.1" } - }, - "read-package-tree": { - "version": "5.1.6", - "bundled": true, + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "once": "1.4.0", - "read-package-json": "2.0.12", - "readdir-scoped-modules": "1.0.2" + "co": "4.6.0", + "json-stable-stringify": "1.0.1" } - }, - "readable-stream": { - "version": "2.3.3", - "bundled": true, + } + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "2.0.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "requires": { + "text-extensions": "1.7.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "requires": { + "abbrev": "1.0.9", + "async": "1.5.2", + "escodegen": "1.8.1", + "esprima": "2.7.3", + "glob": "5.0.15", + "handlebars": "4.0.11", + "js-yaml": "3.10.0", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "once": "1.4.0", + "resolve": "1.1.7", + "supports-color": "3.2.3", + "which": "1.3.0", + "wordwrap": "1.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "core-util-is": "1.0.2", + "inflight": "1.0.6", "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "string_decoder": { - "version": "1.0.3", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - } - } - }, - "readdir-scoped-modules": { - "version": "1.0.2", - "bundled": true, - "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.4.0" - } - }, - "request": { - "version": "2.83.0", - "bundled": true, - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - }, - "dependencies": { - "aws-sign2": { - "version": "0.7.0", - "bundled": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - }, - "dependencies": { - "delayed-stream": { - "version": "1.0.0", - "bundled": true - } - } - }, - "extend": { - "version": "3.0.1", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true - }, - "form-data": { - "version": "2.3.1", - "bundled": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - }, - "dependencies": { - "asynckit": { - "version": "0.4.0", - "bundled": true - } - } - }, - "har-validator": { - "version": "5.0.3", - "bundled": true, - "requires": { - "ajv": "5.2.3", - "har-schema": "2.0.0" - }, - "dependencies": { - "ajv": { - "version": "5.2.3", - "bundled": true, - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "json-schema-traverse": "0.3.1", - "json-stable-stringify": "1.0.1" - }, - "dependencies": { - "co": { - "version": "4.6.0", - "bundled": true - }, - "fast-deep-equal": { - "version": "1.0.0", - "bundled": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "bundled": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "requires": { - "jsonify": "0.0.0" - }, - "dependencies": { - "jsonify": { - "version": "0.0.0", - "bundled": true - } - } - } - } - }, - "har-schema": { - "version": "2.0.0", - "bundled": true - } - } - }, - "hawk": { - "version": "6.0.2", - "bundled": true, - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.0.2" - }, - "dependencies": { - "boom": { - "version": "4.3.1", - "bundled": true, - "requires": { - "hoek": "4.2.0" - } - }, - "cryptiles": { - "version": "3.1.2", - "bundled": true, - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "bundled": true, - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "hoek": { - "version": "4.2.0", - "bundled": true - }, - "sntp": { - "version": "2.0.2", - "bundled": true, - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "http-signature": { - "version": "1.2.0", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - }, - "jsprim": { - "version": "1.4.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "extsprintf": { - "version": "1.3.0", - "bundled": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true - }, - "verror": { - "version": "1.10.0", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "bundled": true - } - } - } - } - }, - "sshpk": { - "version": "1.13.1", - "bundled": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - } - } - } - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true - }, - "mime-types": { - "version": "2.1.17", - "bundled": true, - "requires": { - "mime-db": "1.30.0" - }, - "dependencies": { - "mime-db": { - "version": "1.30.0", - "bundled": true - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, - "performance-now": { - "version": "2.1.0", - "bundled": true - }, - "qs": { - "version": "6.5.1", - "bundled": true - }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, - "tough-cookie": { - "version": "2.3.3", - "bundled": true, - "requires": { - "punycode": "1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "bundled": true - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - } - } - }, - "retry": { - "version": "0.10.1", - "bundled": true - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true - }, - "semver": { - "version": "5.4.1", - "bundled": true - }, - "sha": { - "version": "2.0.1", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "readable-stream": "2.3.3" - } - }, - "slide": { - "version": "1.1.6", - "bundled": true - }, - "sorted-object": { - "version": "2.0.1", - "bundled": true - }, - "sorted-union-stream": { - "version": "2.1.3", - "bundled": true, - "requires": { - "from2": "1.3.0", - "stream-iterate": "1.2.0" - }, - "dependencies": { - "from2": { - "version": "1.3.0", - "bundled": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "1.1.14" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "bundled": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "isarray": { - "version": "0.0.1", - "bundled": true - }, - "string_decoder": { - "version": "0.10.31", - "bundled": true - } - } - } - } - }, - "stream-iterate": { - "version": "1.2.0", - "bundled": true, - "requires": { - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" - }, - "dependencies": { - "stream-shift": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "ssri": { - "version": "5.0.0", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, - "strip-ansi": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + } + } + }, + "jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", + "requires": { + "exit": "0.1.2", + "glob": "7.1.2", + "jasmine-core": "2.8.0" + } + }, + "jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=" + }, + "jasmine-spec-reporter": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-3.3.0.tgz", + "integrity": "sha1-xjw9Q7rP0W5tqGxG0mWVfgB18Uw=", + "requires": { + "colors": "1.1.2" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + }, + "dependencies": { + "esprima": { "version": "4.0.0", - "bundled": true, - "requires": { - "ansi-regex": "3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true - } - } - }, - "tar": { - "version": "4.0.2", - "bundled": true, - "requires": { - "chownr": "1.0.1", - "minipass": "2.2.1", - "minizlib": "1.0.4", - "mkdirp": "0.5.1", - "yallist": "3.0.2" - }, - "dependencies": { - "minipass": { - "version": "2.2.1", - "bundled": true, - "requires": { - "yallist": "3.0.2" - } - }, - "minizlib": { - "version": "1.0.4", - "bundled": true, - "requires": { - "minipass": "2.2.1" - } - }, - "yallist": { - "version": "3.0.2", - "bundled": true - } - } - }, - "text-table": { - "version": "0.2.0", - "bundled": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + } + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-parse-better-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", + "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "license-checker": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-16.0.0.tgz", + "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", + "dev": true, + "requires": { + "chalk": "0.5.1", + "debug": "2.6.9", + "mkdirp": "0.3.5", + "nopt": "2.2.1", + "read-installed": "4.0.3", + "semver": "5.4.1", + "spdx": "0.5.1", + "spdx-correct": "2.0.4", + "spdx-satisfies": "0.1.3", + "treeify": "1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true }, - "umask": { + "ansi-styles": { "version": "1.1.0", - "bundled": true + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true }, - "unique-filename": { - "version": "1.1.0", - "bundled": true, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true, "requires": { - "unique-slug": "2.0.0" - }, - "dependencies": { - "unique-slug": { - "version": "2.0.0", - "bundled": true, - "requires": { - "imurmurhash": "0.1.4" - } - } + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" } }, - "unpipe": { - "version": "1.0.0", - "bundled": true - }, - "update-notifier": { - "version": "2.3.0", - "bundled": true, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "dev": true, "requires": { - "boxen": "1.2.1", - "chalk": "2.1.0", - "configstore": "3.1.1", - "import-lazy": "2.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" - }, - "dependencies": { - "boxen": { - "version": "1.2.1", - "bundled": true, - "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.1.0", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "1.0.0" - }, - "dependencies": { - "ansi-align": { - "version": "2.0.0", - "bundled": true, - "requires": { - "string-width": "2.1.1" - } - }, - "camelcase": { - "version": "4.1.0", - "bundled": true - }, - "cli-boxes": { - "version": "1.0.0", - "bundled": true - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true - } - } - }, - "term-size": { - "version": "1.2.0", - "bundled": true, - "requires": { - "execa": "0.7.0" - }, - "dependencies": { - "execa": { - "version": "0.7.0", - "bundled": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - }, - "dependencies": { - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "requires": { - "shebang-regex": "1.0.0" - }, - "dependencies": { - "shebang-regex": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "get-stream": { - "version": "3.0.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "requires": { - "path-key": "2.0.1" - }, - "dependencies": { - "path-key": { - "version": "2.0.1", - "bundled": true - } - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "widest-line": { - "version": "1.0.0", - "bundled": true, - "requires": { - "string-width": "1.0.2" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true - } - } - } - } - } - } - } - } - }, - "chalk": { - "version": "2.1.0", - "bundled": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.0", - "bundled": true, - "requires": { - "color-convert": "1.9.0" - }, - "dependencies": { - "color-convert": { - "version": "1.9.0", - "bundled": true, - "requires": { - "color-name": "1.1.3" - }, - "dependencies": { - "color-name": { - "version": "1.1.3", - "bundled": true - } - } - } - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true - }, - "supports-color": { - "version": "4.4.0", - "bundled": true, - "requires": { - "has-flag": "2.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "configstore": { - "version": "3.1.1", - "bundled": true, - "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.0.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.1.0", - "xdg-basedir": "3.0.0" - }, - "dependencies": { - "dot-prop": { - "version": "4.2.0", - "bundled": true, - "requires": { - "is-obj": "1.0.1" - }, - "dependencies": { - "is-obj": { - "version": "1.0.1", - "bundled": true - } - } - }, - "make-dir": { - "version": "1.0.0", - "bundled": true, - "requires": { - "pify": "2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "bundled": true - } - } - }, - "unique-string": { - "version": "1.0.0", - "bundled": true, - "requires": { - "crypto-random-string": "1.0.0" - }, - "dependencies": { - "crypto-random-string": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "import-lazy": { - "version": "2.1.0", - "bundled": true - }, - "is-installed-globally": { - "version": "0.1.0", - "bundled": true, - "requires": { - "global-dirs": "0.1.0", - "is-path-inside": "1.0.0" - }, - "dependencies": { - "global-dirs": { - "version": "0.1.0", - "bundled": true, - "requires": { - "ini": "1.3.4" - } - }, - "is-path-inside": { - "version": "1.0.0", - "bundled": true, - "requires": { - "path-is-inside": "1.0.2" - } - } - } - }, - "is-npm": { - "version": "1.0.0", - "bundled": true - }, - "latest-version": { - "version": "3.1.0", - "bundled": true, - "requires": { - "package-json": "4.0.1" - }, - "dependencies": { - "package-json": { - "version": "4.0.1", - "bundled": true, - "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.1", - "registry-url": "3.1.0", - "semver": "5.4.1" - }, - "dependencies": { - "got": { - "version": "6.7.1", - "bundled": true, - "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" - }, - "dependencies": { - "create-error-class": { - "version": "3.0.2", - "bundled": true, - "requires": { - "capture-stack-trace": "1.0.0" - }, - "dependencies": { - "capture-stack-trace": { - "version": "1.0.0", - "bundled": true - } - } - }, - "duplexer3": { - "version": "0.1.4", - "bundled": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true - }, - "is-redirect": { - "version": "1.0.0", - "bundled": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "lowercase-keys": { - "version": "1.0.0", - "bundled": true - }, - "timed-out": { - "version": "4.0.1", - "bundled": true - }, - "unzip-response": { - "version": "2.0.1", - "bundled": true - }, - "url-parse-lax": { - "version": "1.0.0", - "bundled": true, - "requires": { - "prepend-http": "1.0.4" - }, - "dependencies": { - "prepend-http": { - "version": "1.0.4", - "bundled": true - } - } - } - } - }, - "registry-auth-token": { - "version": "3.3.1", - "bundled": true, - "requires": { - "rc": "1.2.1", - "safe-buffer": "5.1.1" - }, - "dependencies": { - "rc": { - "version": "1.2.1", - "bundled": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - } - } - } - } - }, - "registry-url": { - "version": "3.1.0", - "bundled": true, - "requires": { - "rc": "1.2.1" - }, - "dependencies": { - "rc": { - "version": "1.2.1", - "bundled": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - } - } - } - } - } - } - } - } - }, - "semver-diff": { - "version": "2.1.0", - "bundled": true, - "requires": { - "semver": "5.4.1" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "bundled": true - } + "ansi-regex": "0.2.1" } }, - "uuid": { - "version": "3.1.0", - "bundled": true + "mkdirp": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", + "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=", + "dev": true }, - "validate-npm-package-license": { - "version": "3.0.1", - "bundled": true, + "nopt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.2.1.tgz", + "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", + "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - }, - "dependencies": { - "spdx-correct": { - "version": "1.0.2", - "bundled": true, - "requires": { - "spdx-license-ids": "1.2.2" - }, - "dependencies": { - "spdx-license-ids": { - "version": "1.2.2", - "bundled": true - } - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "bundled": true - } + "abbrev": "1.0.9" } }, - "validate-npm-package-name": { - "version": "3.0.0", - "bundled": true, + "spdx-correct": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-2.0.4.tgz", + "integrity": "sha512-c+4gPpt9YDhz7cHlz5UrsHzxxRi4ksclxnEEKsuGT9JdwSC+ZNmsGbYRzzgxyZaBYpcWnlu+4lPcdLKx4DOCmA==", + "dev": true, "requires": { - "builtins": "1.0.3" - }, - "dependencies": { - "builtins": { - "version": "1.0.3", - "bundled": true - } + "spdx-expression-parse": "2.0.2", + "spdx-license-ids": "2.0.1" } }, - "which": { - "version": "1.3.0", - "bundled": true, - "requires": { - "isexe": "2.0.0" - }, - "dependencies": { - "isexe": { - "version": "2.0.0", - "bundled": true - } - } + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true }, - "worker-farm": { - "version": "1.5.1", - "bundled": true, + "spdx-expression-parse": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-2.0.2.tgz", + "integrity": "sha512-oFxOkWCfFS0ltNp0H66gXlU4NF6bxg7RkoTYR0413t+yTY9zyj+AIWsjtN8dcVp6703ijDYBWBIARlJ7DkyP9Q==", + "dev": true, "requires": { - "errno": "0.1.4", - "xtend": "4.0.1" - }, - "dependencies": { - "errno": { - "version": "0.1.4", - "bundled": true, - "requires": { - "prr": "0.0.0" - }, - "dependencies": { - "prr": { - "version": "0.0.0", - "bundled": true - } - } - }, - "xtend": { - "version": "4.0.1", - "bundled": true - } + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "2.0.1" } }, - "wrappy": { - "version": "1.0.2", - "bundled": true + "spdx-license-ids": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-2.0.1.tgz", + "integrity": "sha1-AgF7zDU07k/+9tWNIOfT6aHDyOw=", + "dev": true }, - "write-file-atomic": { - "version": "2.1.0", - "bundled": true, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "ansi-regex": "0.2.1" } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true + } + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.templatesettings": "4.1.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "requires": { + "lodash._reinterpolate": "3.0.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "make-error": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.2.tgz", + "integrity": "sha512-l9ra35l5VWLF24y75Tg8XgfGLX0ueRhph118WKM6H5denx4bB5QF59+4UAm9oJ2qsPQZas/CQUDdtDdfvYHBdQ==" + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "minipass": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz", + "integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==", + "requires": { + "yallist": "3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, - "npm-path": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", - "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", + "minizlib": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "requires": { - "which": "1.3.0" + "minipass": "2.2.1" } }, - "npm-run": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npm-run/-/npm-run-4.1.2.tgz", - "integrity": "sha1-EDDh7FaQjIn8w/o2bQOiwrqY65k=", + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { - "cross-spawn": "5.1.0", - "minimist": "1.2.0", - "npm-path": "2.0.4", - "npm-which": "3.0.1", - "serializerr": "1.0.3", - "sync-exec": "0.6.2" + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } } }, - "npm-run-all": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.2.tgz", - "integrity": "sha512-Z2aRlajMK4SQ8u19ZA75NZZu7wupfCNQWdYosIi8S6FgBdGf/8Y6Hgyjdc8zU2cYmIRVCx1nM80tJPkdEd+UYg==", + "modify-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz", + "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" + }, + "node-pre-gyp": { + "version": "0.6.39", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", + "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", "requires": { - "ansi-styles": "3.2.0", - "chalk": "2.3.0", - "cross-spawn": "5.1.0", - "memorystream": "0.3.1", - "minimatch": "3.0.4", - "ps-tree": "1.1.0", - "read-pkg": "3.0.0", - "shell-quote": "1.6.1", - "string.prototype.padend": "3.0.0" + "detect-libc": "1.0.3", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.3", + "request": "2.81.0", + "rimraf": "2.6.2", + "semver": "5.4.1", + "tar": "2.2.1", + "tar-pack": "3.4.1" }, "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" + "abbrev": "1.0.9", + "osenv": "0.1.4" } }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "pify": "3.0.0" + "glob": "7.1.2" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { - "load-json-file": "4.0.0", - "normalize-package-data": "2.4.0", - "path-type": "3.0.0" + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" } } }, - "npm-which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", - "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "requires": { - "commander": "2.12.2", - "npm-path": "2.0.4", - "which": "1.3.0" + "abbrev": "1.0.9" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.1.0" } }, "npmlog": { @@ -5530,11 +2744,6 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" - }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -5659,14 +2868,6 @@ "pinkie-promise": "2.0.1" } }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "requires": { - "through": "2.3.8" - } - }, "performance-now": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", @@ -5705,24 +2906,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, - "protochain": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/protochain/-/protochain-1.0.5.tgz", - "integrity": "sha1-mRxAfpneJkqt+PgVBLXn+ve/omA=" - }, - "ps-tree": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", - "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", - "requires": { - "event-stream": "3.3.4" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -5786,6 +2969,34 @@ "strip-json-comments": "2.0.1" } }, + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, + "requires": { + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.12", + "readdir-scoped-modules": "1.0.2", + "semver": "5.4.1", + "slide": "1.1.6", + "util-extend": "1.0.3" + } + }, + "read-package-json": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", + "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", + "dev": true, + "requires": { + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "json-parse-better-errors": "1.0.1", + "normalize-package-data": "2.4.0", + "slash": "1.0.0" + } + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -5819,6 +3030,18 @@ "util-deprecate": "1.0.2" } }, + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "dev": true, + "requires": { + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" + } + }, "readdirp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", @@ -5944,14 +3167,6 @@ "semver": "5.4.1" } }, - "serializerr": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/serializerr/-/serializerr-1.0.3.tgz", - "integrity": "sha1-EtTFqhw/+49tHcXzlaqUVVacP5E=", - "requires": { - "protochain": "1.0.5" - } - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -5962,35 +3177,23 @@ "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" - } - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", @@ -6017,6 +3220,26 @@ "source-map": "0.5.7" } }, + "spdx": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", + "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", + "dev": true, + "requires": { + "spdx-exceptions": "1.0.5", + "spdx-license-ids": "1.2.2" + } + }, + "spdx-compare": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", + "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", + "dev": true, + "requires": { + "spdx-expression-parse": "1.0.4", + "spdx-ranges": "1.0.1" + } + }, "spdx-correct": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", @@ -6025,6 +3248,12 @@ "spdx-license-ids": "1.2.2" } }, + "spdx-exceptions": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", + "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", + "dev": true + }, "spdx-expression-parse": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", @@ -6035,6 +3264,22 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" }, + "spdx-ranges": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", + "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", + "dev": true + }, + "spdx-satisfies": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", + "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", + "dev": true, + "requires": { + "spdx-compare": "0.1.2", + "spdx-expression-parse": "1.0.4" + } + }, "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -6078,14 +3323,6 @@ } } }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "requires": { - "duplexer": "0.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -6096,16 +3333,6 @@ "strip-ansi": "3.0.1" } }, - "string.prototype.padend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", - "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", - "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.10.0", - "function-bind": "1.1.1" - } - }, "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", @@ -6161,11 +3388,6 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, - "sync-exec": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/sync-exec/-/sync-exec-0.6.2.tgz", - "integrity": "sha1-cX0izFPwzh3vVZQ2LzqJouu5EQU=" - }, "tar": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", @@ -6256,6 +3478,12 @@ "punycode": "1.4.1" } }, + "treeify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.0.1.tgz", + "integrity": "sha1-abPNAiAioWhCTnz6HO1EyTnT6y8=", + "dev": true + }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", @@ -6426,6 +3654,12 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", + "dev": true + }, "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", @@ -6527,11 +3761,6 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, "yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", diff --git a/package.json b/package.json index 5a9164afc8..897668bf64 100644 --- a/package.json +++ b/package.json @@ -64,9 +64,6 @@ "jasmine-spec-reporter": "^3.2.0", "loader-utils": "^1.1.0", "minimist": "^1.2.0", - "npm": "^5.2.0", - "npm-run": "^4.1.2", - "npm-run-all": "^4.0.0", "rxjs": "^5.5.6", "semver": "^5.3.0", "semver-intersect": "^1.1.2", @@ -78,5 +75,8 @@ "typescript": "~2.6.1", "v8-profiler": "^5.7.0", "webpack-sources": "^1.0.1" + }, + "devDependencies": { + "license-checker": "^16.0.0" } } diff --git a/scripts/build.ts b/scripts/build.ts index 96b91f248d..dcb2d5689f 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -9,10 +9,10 @@ import { JsonObject, logging } from '@angular-devkit/core'; import * as fs from 'fs'; import * as glob from 'glob'; import * as path from 'path'; +import * as ts from 'typescript'; import { packages } from '../lib/packages'; const minimatch = require('minimatch'); -const npmRun = require('npm-run'); const tar = require('tar'); const gitIgnore = fs.readFileSync(path.join(__dirname, '../.gitignore'), 'utf-8') @@ -132,7 +132,13 @@ function _build(logger: logging.Logger) { logger.info('Building...'); const tsConfigPath = path.relative(process.cwd(), path.join(__dirname, '../tsconfig.json')); try { - npmRun.execSync(`tsc -p "${tsConfigPath}"`); + // Load the Compiler Options. + const tsConfig = ts.readConfigFile(tsConfigPath, ts.sys.readFile); + const parsedTsConfig = ts.parseJsonConfigFileContent(tsConfig.config, ts.sys, '.'); + + // Create the program and emit. + const program = ts.createProgram(parsedTsConfig.fileNames, parsedTsConfig.options); + program.emit(); } catch (err) { const stdout = err.stdout.toString().split('\n').join('\n '); logger.error(`TypeScript compiler failed:\n\nSTDOUT:\n ${stdout}`); diff --git a/scripts/publish.ts b/scripts/publish.ts index 379d47d6b1..013245c400 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -6,10 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ import { logging } from '@angular-devkit/core'; +import { resolve } from '@angular-devkit/core/node'; import * as stream from 'stream'; import { packages } from '../lib/packages'; -const npm = require('npm'); +const npm = require(resolve('npm', { basedir: '/', checkGlobal: true })); class NullStream extends stream.Writable { _write() {} diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts new file mode 100644 index 0000000000..7d44481597 --- /dev/null +++ b/scripts/validate-licenses.ts @@ -0,0 +1,119 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject, logging } from '@angular-devkit/core'; + +require('../lib/bootstrap-local'); + +const path = require('path'); +const spdxSatisfies = require('spdx-satisfies'); + + +/** + * A general note on some black listed specific licenses: + * - CC0 + * This is not a valid license. It does not grant copyright of the code/asset, and does not + * resolve patents or other licensed work. The different claims also have no standing in court + * and do not provide protection to or from Google and/or third parties. + * We cannot use nor contribute to CC0 licenses. + * - Public Domain + * Same as CC0, it is not a valid license. + */ +const licensesWhitelist = [ + // Regular valid open source licenses supported by Google. + 'MIT', + 'ISC', + 'Apache-2.0', + + 'BSD-2-Clause', + 'BSD-3-Clause', + 'BSD-4-Clause', + + // All CC-BY licenses have a full copyright grant and attribution section. + 'CC-BY-3.0', + 'CC-BY-4.0', + + // Have a full copyright grant. Validated by opensource team. + 'Unlicense', + + // Combinations. + '(AFL-2.1 OR BSD-2-Clause)', + '(MIT OR CC-BY-3.0)', + '(MIT OR Apache-2.0)', +]; + +// Name variations of SPDX licenses that some packages have. +// Licenses not included in SPDX but accepted will be converted to MIT. +const licenseReplacements: { [key: string]: string } = { + // Just a longer string that our script catches. SPDX official name is the shorter one. + 'Apache License, Version 2.0': 'Apache-2.0', + 'Apache2': 'Apache-2.0', + 'AFLv2.1': 'AFL-2.1', + // BSD is BSD-2-clause by default. + 'BSD': 'BSD-2-Clause', +}; + +// Specific packages to ignore, add a reason in a comment. Format: package-name@version. +const ignoredPackages = [ + 'spdx-license-ids@2.0.1', // CC0 but it's content only (index.json, no code) and not distributed. + 'map-stream@0.1.0', // MIT, license but it's not listed in package.json. + 'xmldom@0.1.27', // LGPL,MIT but has a broken licenses array. + 'true-case-path@1.0.2', // Apache-2.0 but broken license in package.json + + 'jsonify@0.0.0', // TODO(hansl): fix this. this is not an acceptable license, but is 8 deps down + // so hard to manage. In talk with owner and users to switch over. +]; + +// Find all folders directly under a `node_modules` that have a package.json. +const checker = require('license-checker'); + + +export default function (_options: {}, logger: logging.Logger) { + checker.init({ start: path.join(__dirname, '..') }, (err: Error, json: JsonObject) => { + if (err) { + logger.fatal(`Something happened:\n${err.message}`); + } else { + logger.info(`Testing ${Object.keys(json).length} packages.\n`); + + // Packages with bad licenses are those that neither pass SPDX nor are ignored. + const badLicensePackages = Object.keys(json) + .map(key => ({ + id: key, + licenses: ([] as string[]) + // tslint:disable-next-line:non-null-operator + .concat((json[key] ! as JsonObject).licenses as string[]) + // `*` is used when the license is guessed. + .map(x => x.replace(/\*$/, '')) + .map(x => x in licenseReplacements ? licenseReplacements[x] : x), + })) + .filter(pkg => !passesSpdx(pkg.licenses, licensesWhitelist)) + .filter(pkg => !ignoredPackages.find(ignored => ignored === pkg.id)); + + // Report packages with bad licenses + if (badLicensePackages.length > 0) { + logger.error('Invalid package licences found:'); + badLicensePackages.forEach(pkg => { + logger.error(`${pkg.id}: ${JSON.stringify(pkg.licenses)}`); + }); + logger.fatal(`\n${badLicensePackages.length} total packages with invalid licenses.`); + } else { + logger.info('All package licenses are valid.'); + } + } + }); + +// Check if a license is accepted by an array of accepted licenses + function passesSpdx(licenses: string[], accepted: string[]) { + return accepted.some(l => { + try { + return spdxSatisfies(licenses.join(' AND '), l); + } catch (_) { + return false; + } + }); + } +} diff --git a/scripts/validate.ts b/scripts/validate.ts index f3e20eada8..40a719fe63 100644 --- a/scripts/validate.ts +++ b/scripts/validate.ts @@ -9,6 +9,7 @@ import { logging, tags } from '@angular-devkit/core'; import { execSync } from 'child_process'; import templates from './templates'; import validateCommits from './validate-commits'; +import validateLicenses from './validate-licenses'; export default function (options: { verbose: boolean }, logger: logging.Logger) { let error = false; @@ -38,6 +39,11 @@ export default function (options: { verbose: boolean }, logger: logging.Logger) logger.info('Running commit validation...'); validateCommits({}, logger.createChild('validate-commits')); + + logger.info(''); + logger.info('Running license validation...'); + validateLicenses({}, logger.createChild('validate-commits')); + if (error) { process.exit(101); } From c95e60f3f5cd73f702208790e593f7b9f2e1803c Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 26 Jan 2018 09:54:19 -0500 Subject: [PATCH 060/724] style: Add tslint rule to prevent using non-pipeable imports --- packages/angular_devkit/schematics/src/sink/filesystem.ts | 1 - tslint.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/src/sink/filesystem.ts b/packages/angular_devkit/schematics/src/sink/filesystem.ts index efabcd9c63..dbf0669681 100644 --- a/packages/angular_devkit/schematics/src/sink/filesystem.ts +++ b/packages/angular_devkit/schematics/src/sink/filesystem.ts @@ -8,7 +8,6 @@ import * as fs from 'fs'; import { dirname, join } from 'path'; import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/concat'; // provides support for CLI < 1.6.5/1.7.0-beta.1 import { VirtualFileSystemSink, VirtualFileSystemSinkHost } from './virtual-filesystem'; diff --git a/tslint.json b/tslint.json index 133e19eb2b..82ab7b19c1 100644 --- a/tslint.json +++ b/tslint.json @@ -14,6 +14,7 @@ true, "rxjs" ], + "no-import-side-effect": [true, {"ignore-module": "^(?!rxjs\/)"}], "align": [ true, "elements", From 0a1d678bbe3622baa2d77d42f963df564bd281aa Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 29 Jan 2018 12:56:59 -0800 Subject: [PATCH 061/724] build: when typescript fails, now show the diagnostics --- scripts/build.ts | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/scripts/build.ts b/scripts/build.ts index dcb2d5689f..b6fd7abc0d 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -131,17 +131,28 @@ function _sortPackages() { function _build(logger: logging.Logger) { logger.info('Building...'); const tsConfigPath = path.relative(process.cwd(), path.join(__dirname, '../tsconfig.json')); - try { - // Load the Compiler Options. - const tsConfig = ts.readConfigFile(tsConfigPath, ts.sys.readFile); - const parsedTsConfig = ts.parseJsonConfigFileContent(tsConfig.config, ts.sys, '.'); - - // Create the program and emit. - const program = ts.createProgram(parsedTsConfig.fileNames, parsedTsConfig.options); - program.emit(); - } catch (err) { - const stdout = err.stdout.toString().split('\n').join('\n '); - logger.error(`TypeScript compiler failed:\n\nSTDOUT:\n ${stdout}`); + // Load the Compiler Options. + const tsConfig = ts.readConfigFile(tsConfigPath, ts.sys.readFile); + const parsedTsConfig = ts.parseJsonConfigFileContent(tsConfig.config, ts.sys, '.'); + + // Create the program and emit. + const program = ts.createProgram(parsedTsConfig.fileNames, parsedTsConfig.options); + const result = program.emit(); + if (result.emitSkipped) { + logger.error(`TypeScript compiler failed:`); + const diagLogger = logger.createChild('diagnostics'); + result.diagnostics.forEach(diagnostic => { + const messageText = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + + if (diagnostic.file) { + const position = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start || 0); + const fileName = diagnostic.file.fileName; + const { line, character } = position; + diagLogger.error(`${fileName} (${line + 1},${character + 1}): ${messageText}`); + } else { + diagLogger.error(messageText); + } + }); process.exit(1); } } From 5973d74812aa80def79953eae2a0dbefb5c6a06d Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 25 Jan 2018 14:17:10 -0800 Subject: [PATCH 062/724] ci: add snapshots scripts --- .monorepo.json | 6 ++-- lib/packages.ts | 21 ++++++++++++ scripts/build.ts | 17 ++++++++-- scripts/publish.ts | 2 +- scripts/snapshots.ts | 81 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 scripts/snapshots.ts diff --git a/.monorepo.json b/.monorepo.json index 851ec2d05d..fe6a513e61 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -65,7 +65,8 @@ } ], "version": "0.0.29", - "hash": "c5b7ac4219d4e5bd7beb2230043fb876" + "hash": "c5b7ac4219d4e5bd7beb2230043fb876", + "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { "name": "Schematics", @@ -76,7 +77,8 @@ } ], "version": "0.0.52", - "hash": "5da7eec7e29add6e2d9f6018df033025" + "hash": "5da7eec7e29add6e2d9f6018df033025", + "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", diff --git a/lib/packages.ts b/lib/packages.ts index c4ac80fce6..9fda494fa2 100644 --- a/lib/packages.ts +++ b/lib/packages.ts @@ -8,6 +8,7 @@ 'use strict'; import { JsonObject } from '@angular-devkit/core'; +import { execSync } from 'child_process'; import * as crypto from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; @@ -31,6 +32,10 @@ export interface PackageInfo { packageJson: JsonObject; dependencies: string[]; + snapshot: boolean; + snapshotRepo: string; + snapshotHash: string; + dirty: boolean; hash: string; version: string; @@ -156,6 +161,16 @@ const packageJsonPaths = _findAllPackageJson(path.join(__dirname, '..'), exclude .filter(p => p != path.join(__dirname, '../package.json')); +let gitShaCache: string; +function _getSnapshotHash(_pkg: PackageInfo): string { + if (!gitShaCache) { + gitShaCache = execSync('git log --format=%h -n1').toString().trim(); + } + + return gitShaCache; +} + + // All the supported packages. Go through the packages directory and create a map of // name => PackageInfo. This map is partial as it lacks some information that requires the // map itself to finish building. @@ -191,6 +206,12 @@ export const packages: PackageMap = name, packageJson, + snapshot: !!monorepoPackages[name].snapshotRepo, + snapshotRepo: monorepoPackages[name].snapshotRepo, + get snapshotHash() { + return _getSnapshotHash(this); + }, + dependencies: [], hash: '', dirty: false, diff --git a/scripts/build.ts b/scripts/build.ts index b6fd7abc0d..871e23bf0f 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -158,7 +158,7 @@ function _build(logger: logging.Logger) { } -export default function(argv: { local?: boolean }, logger: logging.Logger) { +export default function(argv: { local?: boolean, snapshot?: boolean }, logger: logging.Logger) { _clean(logger); const sortedPackages = _sortPackages(); @@ -295,8 +295,19 @@ export default function(argv: { local?: boolean }, logger: logging.Logger) { if (obj && obj[depName]) { if (argv.local) { obj[depName] = packages[depName].tar; - } else if (obj[depName] == '0.0.0') { - obj[depName] = v; + } else if (argv.snapshot) { + const pkg = packages[depName]; + if (!pkg.snapshotRepo) { + versionLogger.error( + `Package ${JSON.stringify(depName)} is not published as a snapshot. ` + + `Fixing to current version ${v}.`, + ); + obj[depName] = v; + } else { + obj[depName] = `github:${pkg.snapshotRepo}#${pkg.snapshotHash}`; + } + } else if ((obj[depName] as string).match(/\b0\.0\.0\b/)) { + obj[depName] = (obj[depName] as string).replace(/\b0\.0\.0\b/, v); } } } diff --git a/scripts/publish.ts b/scripts/publish.ts index 013245c400..8e479b79ac 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -9,6 +9,7 @@ import { logging } from '@angular-devkit/core'; import { resolve } from '@angular-devkit/core/node'; import * as stream from 'stream'; import { packages } from '../lib/packages'; +import build from './build'; const npm = require(resolve('npm', { basedir: '/', checkGlobal: true })); @@ -19,7 +20,6 @@ class NullStream extends stream.Writable { export default function (_: {}, logger: logging.Logger) { logger.info('Building...'); - const build = require('./build').default; build({}, logger.createChild('build')); return new Promise((resolve, reject) => { diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts new file mode 100644 index 0000000000..2a44f4862c --- /dev/null +++ b/scripts/snapshots.ts @@ -0,0 +1,81 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { logging } from '@angular-devkit/core'; +import { execSync } from 'child_process'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { packages } from '../lib/packages'; +import build from './build'; + + +function _copy(from: string, to: string) { + fs.readdirSync(from) + .forEach(name => { + const fromPath = path.join(from, name); + const toPath = path.join(to, name); + if (fs.statSync(fromPath).isDirectory()) { + if (!fs.existsSync(toPath)) { + fs.mkdirSync(toPath); + } + _copy(fromPath, toPath); + } else { + fs.writeFileSync(toPath, fs.readFileSync(fromPath)); + } + }); +} + + +export default function(opts: { force?: boolean }, logger: logging.Logger) { + // Get the SHA. + if (execSync(`git status --porcelain`).toString() && !opts.force) { + logger.error('You cannot run snapshots with local changes.'); + process.exit(1); + } + + const root = fs.mkdtempSync(path.join(os.tmpdir(), 'angular-devkit-publish-')); + const message = execSync(`git log --format="%h %s" -n1`).toString().trim(); + + // Run build. + logger.info('Building...'); + build({ snapshot: true }, logger.createChild('build')); + + for (const packageName of Object.keys(packages)) { + const pkg = packages[packageName]; + + if (!pkg.snapshot) { + logger.warn(`Skipping ${pkg.name}.`); + continue; + } + + logger.info(`Publishing ${pkg.name} to repo ${JSON.stringify(pkg.snapshotRepo)}.`); + + const publishLogger = logger.createChild('publish'); + publishLogger.debug('Temporary directory: ' + root); + + const url = `https://github.com/${pkg.snapshotRepo}.git`; + execSync(`git clone ${JSON.stringify(url)}`, { cwd: root }); + + const destPath = path.join(root, path.basename(pkg.snapshotRepo)); + _copy(pkg.dist, destPath); + + execSync(`git config credential.helper "store --file=.git/credentials"`, { cwd: destPath }); + fs.writeFileSync(path.join(destPath, '.git/credentials'), + `https://${process.env['GITHUB_ACCESS_TOKEN']}@github.com`); + + // Make sure that every snapshots is unique. + fs.writeFileSync(path.join(destPath, 'uniqueId'), '' + new Date()); + + // Commit and push. + execSync(`git add -A`, { cwd: destPath }); + execSync(`git commit -am ${JSON.stringify(message)}`, { cwd: destPath }); + execSync(`git tag ${pkg.snapshotHash}`, { cwd: destPath }); + execSync(`git push origin`, { cwd: destPath }); + execSync(`git push --tags origin`, { cwd: destPath }); + } +} From 7e390c52d3843529a21f2c2c1b9929505590d7cf Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 29 Jan 2018 11:54:31 -0800 Subject: [PATCH 063/724] ci: add snapshots to CircleCI --- .circleci/config.yml | 23 +++++++++++++++++++++++ .circleci/github_token | 2 ++ scripts/snapshots.ts | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .circleci/github_token diff --git a/.circleci/config.yml b/.circleci/config.yml index 52a61c4400..5c0257f7d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,6 +81,22 @@ jobs: paths: - "node_modules" + snapshot_publish: + <<: *defaults + steps: + - checkout: + <<: *post_checkout + - restore_cache: + key: angular_devkit-{{ checksum "package-lock.json" }} + + - run: + name: Decrypt Credentials + command: | + openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/github_token + - run: + name: Deployment to Snapshot + command: | + npm run admin -- snapshots --verbose --githubToken="$(cat ~/github_token)" workflows: version: 2 @@ -91,3 +107,10 @@ workflows: - build - test - integration + - snapshot_publish: + requires: + - test + - integration + filters: + branches: + only: master diff --git a/.circleci/github_token b/.circleci/github_token new file mode 100644 index 0000000000..2eb5dcfbdb --- /dev/null +++ b/.circleci/github_token @@ -0,0 +1,2 @@ +Salted__3 ¼H å’ê-V@:}ø<Ë€yù ó +_Kîò Ï7KIKʹ,wˆ©Øñf£Ao*yífX“× \ No newline at end of file diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 2a44f4862c..f36264d034 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -31,7 +31,7 @@ function _copy(from: string, to: string) { } -export default function(opts: { force?: boolean }, logger: logging.Logger) { +export default function(opts: { force?: boolean, githubToken: string }, logger: logging.Logger) { // Get the SHA. if (execSync(`git status --porcelain`).toString() && !opts.force) { logger.error('You cannot run snapshots with local changes.'); @@ -66,7 +66,7 @@ export default function(opts: { force?: boolean }, logger: logging.Logger) { execSync(`git config credential.helper "store --file=.git/credentials"`, { cwd: destPath }); fs.writeFileSync(path.join(destPath, '.git/credentials'), - `https://${process.env['GITHUB_ACCESS_TOKEN']}@github.com`); + `https://${opts.githubToken}@github.com`); // Make sure that every snapshots is unique. fs.writeFileSync(path.join(destPath, 'uniqueId'), '' + new Date()); From 27574d3fbd5f04289aa5eb52e85733dd200fa212 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 29 Jan 2018 17:32:11 -0800 Subject: [PATCH 064/724] build: add Buildifier (BUILD file formatter) --- .circleci/config.yml | 4 ++++ WORKSPACE | 21 +++++++++++++++++++++ package.json | 2 ++ 3 files changed, 27 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c0257f7d7..d1c3ced46b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,10 @@ jobs: steps: - checkout: <<: *post_checkout + # Check BUILD.bazel formatting before we have a node_modules directory + # Then we don't need any exclude pattern to avoid checking those files + - run: 'buildifier -mode=check $(find . -type f \( -name BUILD.bazel -or -name BUILD \)) || + (echo "BUILD files not formatted. Please run ''npm run buildifier''" ; exit 1)' - restore_cache: key: angular_devkit-{{ checksum "package-lock.json" }} diff --git a/WORKSPACE b/WORKSPACE index 4cf1f4429a..8b910a3c2b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -20,3 +20,24 @@ git_repository( load("@build_bazel_rules_typescript//:setup.bzl", "ts_setup_workspace") ts_setup_workspace(default_tsconfig = "@angular_devkit//:tsconfig.json") + +# We get tools like Buildifier from here +git_repository( + name = "com_github_bazelbuild_buildtools", + remote = "https://github.com/bazelbuild/buildtools.git", + commit = "b3b620e8bcff18ed3378cd3f35ebeb7016d71f71", +) + +# The Go toolchain is used for Buildifier and some TypeScript tooling. +http_archive( + name = "io_bazel_rules_go", + url = "https://github.com/bazelbuild/rules_go/releases/download/0.7.1/rules_go-0.7.1.tar.gz", + sha256 = "341d5eacef704415386974bc82a1783a8b7ffbff2ab6ba02375e1ca20d9b031c", +) + +load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") + +go_rules_dependencies() + +go_register_toolchains() + diff --git a/package.json b/package.json index 897668bf64..d2cc9350f6 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "build-tsc": "tsc -p tsconfig.json", "fix": "npm run admin -- lint --fix", "lint": "npm run admin -- lint", + "prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier", + "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier", "templates": "node ./bin/devkit-admin templates", "test": "node ./bin/devkit-admin test", "test:watch": "nodemon --watch packages -e ts ./bin/devkit-admin test", From 9835571b7cd5a37db6c651a15771221b5e1ee46c Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 29 Jan 2018 17:33:03 -0800 Subject: [PATCH 065/724] style: Reformat BUILD files --- BUILD | 4 +-- packages/angular_devkit/core/BUILD | 19 +++++++---- packages/angular_devkit/schematics/BUILD | 36 +++++++++++++------- packages/angular_devkit/schematics_cli/BUILD | 22 +++++++----- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/BUILD b/BUILD index 4f999acd21..64f2b78d0e 100644 --- a/BUILD +++ b/BUILD @@ -8,13 +8,13 @@ licenses(["notice"]) # MIT License exports_files([ "LICENSE", - "tsconfig.json" # @external + "tsconfig.json", # @external ]) # NOTE: this will move to node_modules/BUILD in a later release # @external_begin filegroup( name = "node_modules", - srcs = glob(["node_modules/**/*"]) + srcs = glob(["node_modules/**/*"]), ) # @external_end diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index bdb6755ce6..2f7b016ad8 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -3,6 +3,7 @@ # Use of this source code is governed by an MIT-style license that can be # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) + load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") licenses(["notice"]) # MIT License @@ -11,27 +12,33 @@ ts_library( name = "core", srcs = glob( include = ["src/**/*.ts"], - exclude = ["src/**/*_spec.ts", "src/**/*_benchmark.ts"], + exclude = [ + "src/**/*_spec.ts", + "src/**/*_benchmark.ts", + ], ), + module_name = "@angular-devkit/core", + module_root = "src", deps = [ # @deps: rxjs ], - module_name = "@angular-devkit/core", - module_root = "src" ) ts_library( name = "node", srcs = glob( include = ["node/**/*.ts"], - exclude = ["node/**/*_spec.ts", "tools/**/*_benchmark.ts"], + exclude = [ + "node/**/*_spec.ts", + "tools/**/*_benchmark.ts", + ], ), + module_name = "@angular-devkit/core/node", + module_root = "node", deps = [ "//packages/angular_devkit/core", # @deps: rxjs ], - module_name = "@angular-devkit/core/node", - module_root = "node" ) ts_library( diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index 79e4e896ef..c9958ef63a 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -3,6 +3,7 @@ # Use of this source code is governed by an MIT-style license that can be # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) + load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") licenses(["notice"]) # MIT License @@ -11,47 +12,56 @@ ts_library( name = "schematics", srcs = glob( include = ["src/**/*.ts"], - exclude = ["src/**/*_spec.ts", "src/**/*_benchmark.ts"], + exclude = [ + "src/**/*_spec.ts", + "src/**/*_benchmark.ts", + ], ), + module_name = "@angular-devkit/schematics", + module_root = "src", deps = [ - "//packages/angular_devkit/core", + "//packages/angular_devkit/core", # @deps: rxjs ], - module_name = "@angular-devkit/schematics", - module_root = "src" ) ts_library( name = "tasks", srcs = glob( include = ["tasks/**/*.ts"], - exclude = ["tasks/**/*_spec.ts", "tasks/**/*_benchmark.ts"], + exclude = [ + "tasks/**/*_spec.ts", + "tasks/**/*_benchmark.ts", + ], ), + module_name = "@angular-devkit/schematics/tasks", + module_root = "tasks", + tsconfig = "//:tsconfig.json", deps = [ ":schematics", "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", # @deps: rxjs ], - tsconfig = "//:tsconfig.json", - module_name = "@angular-devkit/schematics/tasks", - module_root = "tasks" ) ts_library( name = "tools", srcs = glob( include = ["tools/**/*.ts"], - exclude = ["tools/**/*_spec.ts", "tools/**/*_benchmark.ts"], + exclude = [ + "tools/**/*_spec.ts", + "tools/**/*_benchmark.ts", + ], ), + module_name = "@angular-devkit/schematics/tools", + module_root = "tools", deps = [ ":schematics", "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", # @deps: rxjs ], - module_name = "@angular-devkit/schematics/tools", - module_root = "tools" ) ts_library( @@ -60,14 +70,14 @@ ts_library( include = ["testing/**/*.ts"], exclude = [], ), + module_name = "@angular-devkit/schematics/testing", + module_root = "testing", deps = [ ":schematics", ":tools", "//packages/angular_devkit/core", # @deps: rxjs ], - module_name = "@angular-devkit/schematics/testing", - module_root = "testing" ) ts_library( diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index bb2ff31c0a..7c8b2a9c3f 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -3,6 +3,7 @@ # Use of this source code is governed by an MIT-style license that can be # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) + load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") licenses(["notice"]) # MIT License @@ -11,17 +12,20 @@ ts_library( name = "schematics-cli", srcs = glob( include = ["bin/**/*.ts"], - exclude = ["bin/**/*_spec.ts", "bin/**/*_benchmark.ts"], + exclude = [ + "bin/**/*_spec.ts", + "bin/**/*_benchmark.ts", + ], ), + module_name = "@angular-devkit/schematics-cli", + module_root = "bin", + tsconfig = "//:tsconfig.json", deps = [ - "//packages/angular_devkit/core", - "//packages/angular_devkit/core:node", - "//packages/angular_devkit/schematics", - "//packages/angular_devkit/schematics:tasks", - "//packages/angular_devkit/schematics:tools", + "//packages/angular_devkit/core", + "//packages/angular_devkit/core:node", + "//packages/angular_devkit/schematics", + "//packages/angular_devkit/schematics:tasks", + "//packages/angular_devkit/schematics:tools", # @deps: rxjs ], - tsconfig = "//:tsconfig.json", - module_name = "@angular-devkit/schematics-cli", - module_root = "bin" ) From 0255f5d1b582be627f8d5862ea0d3fd19e80a477 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Tue, 30 Jan 2018 10:18:06 -0500 Subject: [PATCH 066/724] refactor: Add readContent method to UnitTestTree --- .../testing/schematic-test-runner.ts | 9 ++++ .../angular/app-shell/index_spec.ts | 44 +++++++++---------- .../angular/universal/index_spec.ts | 14 +++--- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 79d2e40b26..3f0f8bb5d2 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -34,6 +34,15 @@ export class UnitTestTree extends DelegateTree { return result; } + + readContent(path: string): string { + const buffer = this.read(path); + if (buffer === null) { + return ''; + } + + return buffer.toString(); + } } export class SchematicTestRunner { diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index fa69b5d55c..0cb4820b47 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -60,23 +60,23 @@ describe('App Shell Schematic', () => { name: defaultOptions.universalApp, }; - let tree: Tree = schematicRunner.runSchematic('universal', universalOptions, appTree); + let tree = schematicRunner.runSchematic('universal', universalOptions, appTree); const filePath = '/.angular-cli.json'; - let content = tree.read(filePath) || new Buffer(''); - let config = JSON.parse(content.toString()); + let content = tree.readContent(filePath); + let config = JSON.parse(content); const appCount = config.apps.length; tree = schematicRunner.runSchematic('appShell', defaultOptions, tree); - content = tree.read(filePath) || new Buffer(''); - config = JSON.parse(content.toString()); + content = tree.readContent(filePath); + config = JSON.parse(content); expect(config.apps.length).toBe(appCount); }); it('should add app shell configuration', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); const filePath = '/.angular-cli.json'; - const content = tree.read(filePath) || new Buffer(''); - const config = JSON.parse(content.toString()); + const content = tree.readContent(filePath); + const config = JSON.parse(content); const app = config.apps[0]; expect(app.appShell).toBeDefined(); expect(app.appShell.app).toEqual('universal'); @@ -86,8 +86,8 @@ describe('App Shell Schematic', () => { it('should add router module to client app module', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); const filePath = '/src/app/app.module.ts'; - const content = tree.read(filePath) || new Buffer(''); - expect(content.toString()).toMatch(/import { RouterModule } from \'@angular\/router\';/); + const content = tree.readContent(filePath); + expect(content).toMatch(/import { RouterModule } from \'@angular\/router\';/); }); describe('Add router-outlet', () => { @@ -125,8 +125,8 @@ describe('App Shell Schematic', () => { appTree.overwrite(htmlPath, ''); const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const content = tree.read(htmlPath) || new Buffer(''); - const matches = content.toString().match(/<\/router\-outlet>/g); + const content = tree.readContent(htmlPath); + const matches = content.match(/<\/router\-outlet>/g); const numMatches = matches ? matches.length : 0; expect(numMatches).toEqual(1); }); @@ -134,8 +134,8 @@ describe('App Shell Schematic', () => { it('should not re-add the router outlet (inline template)', () => { makeInlineTemplate(appTree, ''); const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const content = tree.read('/src/app/app.component.ts') || new Buffer(''); - const matches = content.toString().match(/<\/router\-outlet>/g); + const content = tree.readContent('/src/app/app.component.ts'); + const matches = content.match(/<\/router\-outlet>/g); const numMatches = matches ? matches.length : 0; expect(numMatches).toEqual(1); }); @@ -144,32 +144,32 @@ describe('App Shell Schematic', () => { it('should add router imports to server module', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); const filePath = '/src/app/app.server.module.ts'; - const content = tree.read(filePath) || new Buffer(''); + const content = tree.readContent(filePath); // tslint:disable-next-line:max-line-length - expect(content.toString()).toMatch(/import { Routes, RouterModule } from \'@angular\/router\';/); + expect(content).toMatch(/import { Routes, RouterModule } from \'@angular\/router\';/); }); it('should define a server route', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); const filePath = '/src/app/app.server.module.ts'; - const content = tree.read(filePath) || new Buffer(''); - expect(content.toString()).toMatch(/const routes: Routes = \[/); + const content = tree.readContent(filePath); + expect(content).toMatch(/const routes: Routes = \[/); }); it('should import RouterModule with forRoot', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); const filePath = '/src/app/app.server.module.ts'; - const content = tree.read(filePath) || new Buffer(''); - expect(content.toString()) + const content = tree.readContent(filePath); + expect(content) .toMatch(/const routes: Routes = \[ { path: 'shell', component: AppShellComponent }\];/); - expect(content.toString()) + expect(content) .toMatch(/ServerModule,\r?\n\s*RouterModule\.forRoot\(routes\),/); }); it('should create the shell component', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); expect(tree.exists('/src/app/app-shell/app-shell.component.ts')); - const content = tree.read('/src/app/app.server.module.ts') || new Buffer(''); - expect(content.toString()).toMatch(/app\-shell\.component/); + const content = tree.readContent('/src/app/app.server.module.ts'); + expect(content).toMatch(/app\-shell\.component/); }); }); diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index a93481a5ac..d82f9fc03a 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -52,7 +52,7 @@ describe('Universal Schematic', () => { const filePath = '/src/main.server.ts'; const file = tree.files.filter(f => f === filePath)[0]; expect(file).toBeDefined(); - const contents = tree.read(filePath); + const contents = tree.readContent(filePath); expect(contents).toMatch(/export { AppServerModule } from '\.\/app\/app\.server\.module'/); }); @@ -61,21 +61,21 @@ describe('Universal Schematic', () => { const filePath = '/src/tsconfig.server.json'; const file = tree.files.filter(f => f === filePath)[0]; expect(file).toBeDefined(); - const contents = tree.read(filePath); + const contents = tree.readContent(filePath); expect(contents).toMatch(/\"outDir\": \"\.\.\/dist-server\"/); }); it('should add dependency: @angular/platform-server', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); const filePath = '/package.json'; - const contents = tree.read(filePath); + const contents = tree.readContent(filePath); expect(contents).toMatch(/\"@angular\/platform-server\": \"/); }); it('should update .angular-cli.json with a server app', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); const filePath = '/.angular-cli.json'; - const contents = tree.read(filePath) || new Buffer(''); + const contents = tree.readContent(filePath); const config = JSON.parse(contents.toString()); expect(config.apps.length).toEqual(2); @@ -95,14 +95,14 @@ describe('Universal Schematic', () => { it('should add a server transition to BrowerModule import', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); const filePath = '/src/app/app.module.ts'; - const contents = tree.read(filePath); + const contents = tree.readContent(filePath); expect(contents).toMatch(/BrowserModule\.withServerTransition\({ appId: 'serverApp' }\)/); }); it('should wrap the bootstrap call in a DOMContentLoaded event handler', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); const filePath = '/src/main.ts'; - const contents = tree.read(filePath); + const contents = tree.readContent(filePath); expect(contents).toMatch(/document.addEventListener\('DOMContentLoaded', \(\) => {/); }); @@ -111,7 +111,7 @@ describe('Universal Schematic', () => { const options = {...defaultOptions, outDir: outDir}; const tree = schematicRunner.runSchematic('universal', options, appTree); const filePath = '/.gitignore'; - const contents = tree.read(filePath) || new Buffer(''); + const contents = tree.readContent(filePath); expect(contents).toMatch(outDir); }); From aa35ebefce3587760b52b4196079fa57ca11db3a Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Tue, 30 Jan 2018 09:48:06 -0500 Subject: [PATCH 067/724] fix(@schematics/angular): Remove unnecessary code. fixes angular/angular-cli#8989 --- .../schematics/angular/application/index.ts | 43 +------------------ .../angular/application/index_spec.ts | 14 ++++++ 2 files changed, 15 insertions(+), 42 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 8a0d2e36a2..8b29117c52 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -10,7 +10,6 @@ import { MergeStrategy, Rule, SchematicContext, - SchematicsException, Tree, apply, chain, @@ -22,49 +21,9 @@ import { template, url, } from '@angular-devkit/schematics'; -import * as ts from 'typescript'; -import { addBootstrapToModule, addImportToModule } from '../utility/ast-utils'; -import { InsertChange } from '../utility/change'; import { Schema as ApplicationOptions } from './schema'; -function addBootstrapToNgModule(directory: string, sourceDir: string): Rule { - return (host: Tree) => { - const modulePath = `${directory}/${sourceDir}/app/app.module.ts`; - const content = host.read(modulePath); - if (!content) { - throw new SchematicsException(`File ${modulePath} does not exist.`); - } - const sourceText = content.toString('utf-8'); - const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - - const componentModule = './app.component'; - - const importChanges = addImportToModule(source, - modulePath, - 'BrowserModule', - '@angular/platform-browser'); - const bootstrapChanges = addBootstrapToModule(source, - modulePath, - 'AppComponent', - componentModule); - const changes = [ - ...importChanges, - ...bootstrapChanges, - ]; - - const recorder = host.beginUpdate(modulePath); - for (const change of changes) { - if (change instanceof InsertChange) { - recorder.insertLeft(change.pos, change.toAdd); - } - } - host.commitUpdate(recorder); - - return host; - }; -} - function minimalPathFilter(path: string): boolean { const toRemoveList: RegExp[] = [/e2e\//, /editorconfig/, /README/, /karma.conf.js/, /protractor.conf.js/, /test.ts/, /tsconfig.spec.json/, @@ -120,9 +79,9 @@ export default function (options: ApplicationOptions): Rule { sourceDir: options.directory + '/' + sourceDir, flat: true, path: options.path, + skipImport: true, ...componentOptions, }), - addBootstrapToNgModule(options.directory, sourceDir), mergeWith( apply(url('./other-files'), [ componentOptions.inlineTemplate ? filter(path => !path.endsWith('.html')) : noop(), diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index f57ce5668d..723e8391f1 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -100,4 +100,18 @@ describe('Application Schematic', () => { const files = tree.files; expect(files.indexOf('/foo/.gitignore')).toEqual(-1); }); + + it('should import BrowserModule in the app module', () => { + const tree = schematicRunner.runSchematic('application', defaultOptions); + const path = '/foo/src/app/app.module.ts'; + const content = tree.readContent(path); + expect(content).toMatch(/import { BrowserModule } from \'@angular\/platform-browser\';/); + }); + + it('should declare app component in the app module', () => { + const tree = schematicRunner.runSchematic('application', defaultOptions); + const path = '/foo/src/app/app.module.ts'; + const content = tree.readContent(path); + expect(content).toMatch(/import { AppComponent } from \'\.\/app\.component\';/); + }); }); From 958b14fa09fa465d477f13620c38cfdf6d80a08d Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 09:05:54 -0800 Subject: [PATCH 068/724] ci: fix snapshots --- .circleci/config.yml | 7 ++----- .circleci/github_token | 5 +++-- scripts/snapshots.ts | 12 +++++++++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d1c3ced46b..5712a50618 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,10 +14,6 @@ jobs: steps: - checkout: <<: *post_checkout - # Check BUILD.bazel formatting before we have a node_modules directory - # Then we don't need any exclude pattern to avoid checking those files - - run: 'buildifier -mode=check $(find . -type f \( -name BUILD.bazel -or -name BUILD \)) || - (echo "BUILD files not formatted. Please run ''npm run buildifier''" ; exit 1)' - restore_cache: key: angular_devkit-{{ checksum "package-lock.json" }} @@ -93,6 +89,7 @@ jobs: - restore_cache: key: angular_devkit-{{ checksum "package-lock.json" }} + - run: npm install --no-save - run: name: Decrypt Credentials command: | @@ -100,7 +97,7 @@ jobs: - run: name: Deployment to Snapshot command: | - npm run admin -- snapshots --verbose --githubToken="$(cat ~/github_token)" + npm run admin -- snapshots --verbose --githubTokenFile=~/github_token workflows: version: 2 diff --git a/.circleci/github_token b/.circleci/github_token index 2eb5dcfbdb..65b2243fa5 100644 --- a/.circleci/github_token +++ b/.circleci/github_token @@ -1,2 +1,3 @@ -Salted__3 ¼H å’ê-V@:}ø<Ë€yù ó -_Kîò Ï7KIKʹ,wˆ©Øñf£Ao*yífX“× \ No newline at end of file +Salted__fE~W_»ZA Date: Tue, 30 Jan 2018 11:11:34 -0800 Subject: [PATCH 069/724] ci: fix home directory reference --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5712a50618..2ec624fbaa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,7 +97,7 @@ jobs: - run: name: Deployment to Snapshot command: | - npm run admin -- snapshots --verbose --githubTokenFile=~/github_token + npm run admin -- snapshots --verbose --githubTokenFile=${HOME}/github_token workflows: version: 2 From b986efe698cc1367ff6d7dd356c4bcefe94e2373 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 11:12:53 -0800 Subject: [PATCH 070/724] ci: remove integration as requirement for snapshot --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ec624fbaa..b7f1b406a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,6 +75,7 @@ jobs: - run: bazel run @nodejs//:npm install - run: bazel build //packages/... + - run: npm run admin -- build - save_cache: key: angular_devkit-{{ checksum "package-lock.json" }} @@ -111,7 +112,7 @@ workflows: - snapshot_publish: requires: - test - - integration + - build filters: branches: only: master From 9d88e5c75d4c66e74574453d62c81e68ba2e2021 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 11:30:14 -0800 Subject: [PATCH 071/724] ci: add git user and email, plus proper logger --- scripts/snapshots.ts | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index c47085fffb..7fb3ea4dae 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -10,6 +10,7 @@ import { execSync } from 'child_process'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; +import { Writable } from 'stream'; import { packages } from '../lib/packages'; import build from './build'; @@ -31,6 +32,28 @@ function _copy(from: string, to: string) { } +function _exec(command: string, opts: { cwd?: string }, logger: logging.Logger) { + const infoLoggerStream = new Writable({ + write(chunk, _encoding, callback) { + logger.info(chunk.toString()); + callback(); + }, + }); + const errorLoggerStream = new Writable({ + write(chunk, _encoding, callback) { + logger.error(chunk.toString()); + callback(); + }, + }); + + logger.debug(`Running command "${JSON.stringify(command)}"...`); + execSync(command, { + ...opts, + stdio: [0, infoLoggerStream, errorLoggerStream], + }); +} + + export interface SnapshotsOptions { force?: boolean; githubTokenFile: string; @@ -48,6 +71,11 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const githubToken = fs.readFileSync(opts.githubTokenFile, 'utf-8'); + logger.info('Setting up global git name.'); + _exec(`git config --global user.email "circleci@angular.io"`, {}, logger); + _exec(`git config --global user.name "Angular Builds"`, {}, logger); + + // Run build. logger.info('Building...'); build({ snapshot: true }, logger.createChild('build')); @@ -66,22 +94,23 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { publishLogger.debug('Temporary directory: ' + root); const url = `https://github.com/${pkg.snapshotRepo}.git`; - execSync(`git clone ${JSON.stringify(url)}`, { cwd: root }); + _exec(`git clone ${JSON.stringify(url)}`, { cwd: root }, publishLogger); const destPath = path.join(root, path.basename(pkg.snapshotRepo)); _copy(pkg.dist, destPath); - execSync(`git config credential.helper "store --file=.git/credentials"`, { cwd: destPath }); + _exec(`git config credential.helper "store --file=.git/credentials"`, { cwd: destPath }, + publishLogger); fs.writeFileSync(path.join(destPath, '.git/credentials'), `https://${githubToken}@github.com`); // Make sure that every snapshots is unique. fs.writeFileSync(path.join(destPath, 'uniqueId'), '' + new Date()); // Commit and push. - execSync(`git add -A`, { cwd: destPath }); - execSync(`git commit -am ${JSON.stringify(message)}`, { cwd: destPath }); - execSync(`git tag ${pkg.snapshotHash}`, { cwd: destPath }); - execSync(`git push origin`, { cwd: destPath }); - execSync(`git push --tags origin`, { cwd: destPath }); + _exec(`git add -A`, { cwd: destPath }, publishLogger); + _exec(`git commit -am ${JSON.stringify(message)}`, { cwd: destPath }, publishLogger); + _exec(`git tag ${pkg.snapshotHash}`, { cwd: destPath }, publishLogger); + _exec(`git push origin`, { cwd: destPath }, publishLogger); + _exec(`git push --tags origin`, { cwd: destPath }, publishLogger); } } From 959aa50e613dd58b5d5db3ed43ed3530ee1d1686 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 13:55:40 -0800 Subject: [PATCH 072/724] ci: properly log execution from subprocess --- scripts/snapshots.ts | 49 ++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 7fb3ea4dae..2014eb3f9c 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -6,11 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ import { logging } from '@angular-devkit/core'; -import { execSync } from 'child_process'; +import { execSync, spawnSync } from 'child_process'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import { Writable } from 'stream'; import { packages } from '../lib/packages'; import build from './build'; @@ -32,25 +31,18 @@ function _copy(from: string, to: string) { } -function _exec(command: string, opts: { cwd?: string }, logger: logging.Logger) { - const infoLoggerStream = new Writable({ - write(chunk, _encoding, callback) { - logger.info(chunk.toString()); - callback(); - }, - }); - const errorLoggerStream = new Writable({ - write(chunk, _encoding, callback) { - logger.error(chunk.toString()); - callback(); - }, - }); - +function _exec(command: string, args: string[], opts: { cwd?: string }, logger: logging.Logger) { logger.debug(`Running command "${JSON.stringify(command)}"...`); - execSync(command, { + const { stdout, stderr, status, error } = spawnSync(command, args, { ...opts, - stdio: [0, infoLoggerStream, errorLoggerStream], }); + + logger.error(stderr.toString()); + if (status != 0) { + logger.fatal(error.message); + throw error; + } + logger.info(stdout.toString()); } @@ -70,10 +62,9 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const message = execSync(`git log --format="%h %s" -n1`).toString().trim(); const githubToken = fs.readFileSync(opts.githubTokenFile, 'utf-8'); - logger.info('Setting up global git name.'); - _exec(`git config --global user.email "circleci@angular.io"`, {}, logger); - _exec(`git config --global user.name "Angular Builds"`, {}, logger); + _exec('git', ['config', '--global', 'user.email', 'circleci@angular.io'], {}, logger); + _exec('git', ['config', '--global', 'user.name', 'Angular Builds'], {}, logger); // Run build. @@ -94,23 +85,23 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { publishLogger.debug('Temporary directory: ' + root); const url = `https://github.com/${pkg.snapshotRepo}.git`; - _exec(`git clone ${JSON.stringify(url)}`, { cwd: root }, publishLogger); + _exec('git', ['clone', url], { cwd: root }, publishLogger); const destPath = path.join(root, path.basename(pkg.snapshotRepo)); _copy(pkg.dist, destPath); - _exec(`git config credential.helper "store --file=.git/credentials"`, { cwd: destPath }, - publishLogger); + _exec('git', ['config', 'credential.helper', 'store --file=.git/credentials'], + { cwd: root }, publishLogger); fs.writeFileSync(path.join(destPath, '.git/credentials'), `https://${githubToken}@github.com`); // Make sure that every snapshots is unique. fs.writeFileSync(path.join(destPath, 'uniqueId'), '' + new Date()); // Commit and push. - _exec(`git add -A`, { cwd: destPath }, publishLogger); - _exec(`git commit -am ${JSON.stringify(message)}`, { cwd: destPath }, publishLogger); - _exec(`git tag ${pkg.snapshotHash}`, { cwd: destPath }, publishLogger); - _exec(`git push origin`, { cwd: destPath }, publishLogger); - _exec(`git push --tags origin`, { cwd: destPath }, publishLogger); + _exec('git', ['add', '.'], { cwd: destPath }, publishLogger); + _exec('git', ['commit', '-am', message], { cwd: destPath }, publishLogger); + _exec('git', ['tag', pkg.snapshotHash], { cwd: destPath }, publishLogger); + _exec('git', ['push', 'origin'], { cwd: destPath }, publishLogger); + _exec('git', ['push', '--tags', 'origin'], { cwd: destPath }, publishLogger); } } From a684259b6f224994bacdda462672ccd6f4fb1004 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 14:09:29 -0800 Subject: [PATCH 073/724] ci: fix publishing script --- scripts/snapshots.ts | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 2014eb3f9c..dcbe6698a6 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -32,23 +32,26 @@ function _copy(from: string, to: string) { function _exec(command: string, args: string[], opts: { cwd?: string }, logger: logging.Logger) { - logger.debug(`Running command "${JSON.stringify(command)}"...`); - const { stdout, stderr, status, error } = spawnSync(command, args, { - ...opts, - }); + logger.debug(`Running command ${JSON.stringify(command)} ${ + args.map(x => JSON.stringify(x)).join(' ')}...`); + const { stdout, stderr, status, error } = spawnSync(command, args, { ...opts }); - logger.error(stderr.toString()); + if (stderr.length) { + logger.error(stderr.toString()); + } if (status != 0) { logger.fatal(error.message); throw error; } - logger.info(stdout.toString()); + if (stdout.length) { + logger.info(stdout.toString()); + } } export interface SnapshotsOptions { force?: boolean; - githubTokenFile: string; + githubTokenFile?: string; } export default function(opts: SnapshotsOptions, logger: logging.Logger) { @@ -61,11 +64,12 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const root = fs.mkdtempSync(path.join(os.tmpdir(), 'angular-devkit-publish-')); const message = execSync(`git log --format="%h %s" -n1`).toString().trim(); - const githubToken = fs.readFileSync(opts.githubTokenFile, 'utf-8'); + const githubToken = opts.githubTokenFile && fs.readFileSync(opts.githubTokenFile, 'utf-8'); logger.info('Setting up global git name.'); - _exec('git', ['config', '--global', 'user.email', 'circleci@angular.io'], {}, logger); - _exec('git', ['config', '--global', 'user.name', 'Angular Builds'], {}, logger); - + if (opts.githubTokenFile) { + _exec('git', ['config', '--global', 'user.email', 'circleci@angular.io'], {}, logger); + _exec('git', ['config', '--global', 'user.name', 'Angular Builds'], {}, logger); + } // Run build. logger.info('Building...'); @@ -90,16 +94,21 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const destPath = path.join(root, path.basename(pkg.snapshotRepo)); _copy(pkg.dist, destPath); - _exec('git', ['config', 'credential.helper', 'store --file=.git/credentials'], - { cwd: root }, publishLogger); - fs.writeFileSync(path.join(destPath, '.git/credentials'), `https://${githubToken}@github.com`); + if (githubToken) { + _exec('git', ['config', 'credential.helper', 'store --file=.git/credentials'], + { cwd: destPath }, publishLogger); + _exec('git', ['config', 'commit.gpgSign', 'false'], { cwd: destPath }, publishLogger); + + fs.writeFileSync(path.join(destPath, '.git/credentials'), + `https://${githubToken}@github.com`); + } // Make sure that every snapshots is unique. fs.writeFileSync(path.join(destPath, 'uniqueId'), '' + new Date()); // Commit and push. _exec('git', ['add', '.'], { cwd: destPath }, publishLogger); - _exec('git', ['commit', '-am', message], { cwd: destPath }, publishLogger); + _exec('git', ['commit', '-a', '-m', message], { cwd: destPath }, publishLogger); _exec('git', ['tag', pkg.snapshotHash], { cwd: destPath }, publishLogger); _exec('git', ['push', 'origin'], { cwd: destPath }, publishLogger); _exec('git', ['push', '--tags', 'origin'], { cwd: destPath }, publishLogger); From 7ad09becf8d95f903abbae65e743f00fdb177b54 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 14:20:42 -0800 Subject: [PATCH 074/724] ci: fix publishing script (2) --- scripts/snapshots.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index dcbe6698a6..1441ef012e 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -52,6 +52,7 @@ function _exec(command: string, args: string[], opts: { cwd?: string }, logger: export interface SnapshotsOptions { force?: boolean; githubTokenFile?: string; + githubToken?: string; } export default function(opts: SnapshotsOptions, logger: logging.Logger) { @@ -64,13 +65,18 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const root = fs.mkdtempSync(path.join(os.tmpdir(), 'angular-devkit-publish-')); const message = execSync(`git log --format="%h %s" -n1`).toString().trim(); - const githubToken = opts.githubTokenFile && fs.readFileSync(opts.githubTokenFile, 'utf-8'); + const githubToken = opts.githubToken || + (opts.githubTokenFile && fs.readFileSync(opts.githubTokenFile, 'utf-8')); logger.info('Setting up global git name.'); - if (opts.githubTokenFile) { + if (githubToken) { _exec('git', ['config', '--global', 'user.email', 'circleci@angular.io'], {}, logger); _exec('git', ['config', '--global', 'user.name', 'Angular Builds'], {}, logger); + _exec('git', ['config', '--global', 'push.default', 'simple'], {}, logger); } + const gitCredentials = path.join(process.env['HOME'], '.git-credentials'); + fs.writeFileSync(gitCredentials, `https://${githubToken}@github.com`); + // Run build. logger.info('Building...'); build({ snapshot: true }, logger.createChild('build')); @@ -95,12 +101,8 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { _copy(pkg.dist, destPath); if (githubToken) { - _exec('git', ['config', 'credential.helper', 'store --file=.git/credentials'], - { cwd: destPath }, publishLogger); _exec('git', ['config', 'commit.gpgSign', 'false'], { cwd: destPath }, publishLogger); - - fs.writeFileSync(path.join(destPath, '.git/credentials'), - `https://${githubToken}@github.com`); + _exec('git', ['config', 'credential.helper', 'store'], { cwd: destPath }, publishLogger); } // Make sure that every snapshots is unique. From 81f2e25054c05fc4b86ccffcb9666d448d4e2104 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 14:27:08 -0800 Subject: [PATCH 075/724] ci: trim the githubtoken --- scripts/snapshots.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 1441ef012e..50e50ab6cf 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -65,8 +65,12 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const root = fs.mkdtempSync(path.join(os.tmpdir(), 'angular-devkit-publish-')); const message = execSync(`git log --format="%h %s" -n1`).toString().trim(); - const githubToken = opts.githubToken || - (opts.githubTokenFile && fs.readFileSync(opts.githubTokenFile, 'utf-8')); + const githubToken = ( + opts.githubToken + || (opts.githubTokenFile && fs.readFileSync(opts.githubTokenFile, 'utf-8')) + || '' + ).trim(); + logger.info('Setting up global git name.'); if (githubToken) { _exec('git', ['config', '--global', 'user.email', 'circleci@angular.io'], {}, logger); From dfd7d245213d79e4fbea8a2431c44b3e2508b53c Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 14:33:20 -0800 Subject: [PATCH 076/724] ci: use a credential file --- scripts/snapshots.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 50e50ab6cf..19bd8bafb3 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -106,7 +106,8 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { if (githubToken) { _exec('git', ['config', 'commit.gpgSign', 'false'], { cwd: destPath }, publishLogger); - _exec('git', ['config', 'credential.helper', 'store'], { cwd: destPath }, publishLogger); + _exec('git', ['config', 'credential.helper', `store --file="${gitCredentials}"`], + { cwd: destPath }, publishLogger); } // Make sure that every snapshots is unique. From fae4b299e7f56650e202de6f71e4294a114202bd Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 14:54:39 -0800 Subject: [PATCH 077/724] ci: remove credentials (and log) --- scripts/snapshots.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 19bd8bafb3..243c6558e9 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -32,8 +32,6 @@ function _copy(from: string, to: string) { function _exec(command: string, args: string[], opts: { cwd?: string }, logger: logging.Logger) { - logger.debug(`Running command ${JSON.stringify(command)} ${ - args.map(x => JSON.stringify(x)).join(' ')}...`); const { stdout, stderr, status, error } = spawnSync(command, args, { ...opts }); if (stderr.length) { @@ -78,9 +76,6 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { _exec('git', ['config', '--global', 'push.default', 'simple'], {}, logger); } - const gitCredentials = path.join(process.env['HOME'], '.git-credentials'); - fs.writeFileSync(gitCredentials, `https://${githubToken}@github.com`); - // Run build. logger.info('Building...'); build({ snapshot: true }, logger.createChild('build')); @@ -98,7 +93,7 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const publishLogger = logger.createChild('publish'); publishLogger.debug('Temporary directory: ' + root); - const url = `https://github.com/${pkg.snapshotRepo}.git`; + const url = `https://${githubToken ? githubToken + '@' : ''}github.com/${pkg.snapshotRepo}.git`; _exec('git', ['clone', url], { cwd: root }, publishLogger); const destPath = path.join(root, path.basename(pkg.snapshotRepo)); @@ -106,8 +101,6 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { if (githubToken) { _exec('git', ['config', 'commit.gpgSign', 'false'], { cwd: destPath }, publishLogger); - _exec('git', ['config', 'credential.helper', `store --file="${gitCredentials}"`], - { cwd: destPath }, publishLogger); } // Make sure that every snapshots is unique. From 1f41b71f69257369b9e5a79ca7db1f869c9cc95f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 14:56:36 -0800 Subject: [PATCH 078/724] ci: update token --- .circleci/github_token | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/github_token b/.circleci/github_token index 65b2243fa5..5181e52395 100644 --- a/.circleci/github_token +++ b/.circleci/github_token @@ -1,3 +1 @@ -Salted__fE~W_»ZA Date: Tue, 30 Jan 2018 15:02:15 -0800 Subject: [PATCH 079/724] ci: remove excessive logging --- .circleci/github_token | 2 +- scripts/snapshots.ts | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.circleci/github_token b/.circleci/github_token index 5181e52395..450cb2c93f 100644 --- a/.circleci/github_token +++ b/.circleci/github_token @@ -1 +1 @@ -Salted__êIOŠc*c|ÄB+ ùÕ§–x³¢Ù„—Å@h©3“ŒÿZÙ¹Ä'­ÎOÄ=©ÔIŽTdÿÚKáÔ \ No newline at end of file +Salted__zÈùº¬ö"Bõ¾Y¾’|‚Û¢V”QÖ³UzWò±/G…îR ¡e}j‘% þÿ¦<%öáÉÿ–¼ \ No newline at end of file diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 243c6558e9..5014818c3d 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -32,18 +32,12 @@ function _copy(from: string, to: string) { function _exec(command: string, args: string[], opts: { cwd?: string }, logger: logging.Logger) { - const { stdout, stderr, status, error } = spawnSync(command, args, { ...opts }); + const { status, error } = spawnSync(command, args, { ...opts }); - if (stderr.length) { - logger.error(stderr.toString()); - } if (status != 0) { logger.fatal(error.message); throw error; } - if (stdout.length) { - logger.info(stdout.toString()); - } } From 52859dbde03b1dc3930ceb1fe82e0fcb0fe343c9 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 30 Jan 2018 15:10:55 -0800 Subject: [PATCH 080/724] ci: add snapshot repos for all packages --- .monorepo.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index fe6a513e61..5b2dfbc64d 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -54,7 +54,8 @@ } ], "version": "0.0.42", - "hash": "00462760d0add5ae790e49030c24fc9a" + "hash": "00462760d0add5ae790e49030c24fc9a", + "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/core": { "name": "Core", @@ -83,13 +84,15 @@ "@angular-devkit/schematics-cli": { "name": "Schematics CLI", "version": "0.0.9", - "hash": "c02482a7ec2071567393709d79c25e8a" + "hash": "c02482a7ec2071567393709d79c25e8a", + "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", "version": "0.1.17", - "hash": "4a270480c210fdb2b3fd373e6ba55b14" + "hash": "4a270480c210fdb2b3fd373e6ba55b14", + "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", @@ -101,7 +104,8 @@ "name": "Package JSON Update Schematics", "version": "0.0.7", "section": "Schematics", - "hash": "fa063063c05223c7ebf82e999476d2ba" + "hash": "fa063063c05223c7ebf82e999476d2ba", + "snapshotRepo": "angular/schematics-package-update-builds" } } } From e804ce65d82819ddf4dfd5ada5f63c6f8b7021d6 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 31 Jan 2018 12:14:07 -0800 Subject: [PATCH 081/724] release: 0.2.0 --- .monorepo.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 5b2dfbc64d..80c4a20870 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.0.20", - "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" + "version": "0.2.0", + "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -53,7 +53,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.0.42", + "version": "0.2.0", "hash": "00462760d0add5ae790e49030c24fc9a", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -65,8 +65,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.0.29", - "hash": "c5b7ac4219d4e5bd7beb2230043fb876", + "version": "0.2.0", + "hash": "7c8dffd46a51b48697690041ac1042e0", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -77,32 +77,32 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.0.52", - "hash": "5da7eec7e29add6e2d9f6018df033025", + "version": "0.2.0", + "hash": "cb0d10fec403c08f0a228fa83f12efbf", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.0.9", - "hash": "c02482a7ec2071567393709d79c25e8a", + "version": "0.2.0", + "hash": "c16524a2d75242300ce0dbd2fa1a0d00", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.1.17", - "hash": "4a270480c210fdb2b3fd373e6ba55b14", + "version": "0.2.0", + "hash": "b18aa59a8d5ce619522b48ab141e61d0", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.0.17", + "version": "0.2.0", "section": "Schematics", - "hash": "7c0def54978ad8e45bdf8da42b1ddf73" + "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.0.7", + "version": "0.2.0", "section": "Schematics", "hash": "fa063063c05223c7ebf82e999476d2ba", "snapshotRepo": "angular/schematics-package-update-builds" From 6cc697d163114f2ec1f082420b8d2579ec7fd4f6 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 31 Jan 2018 16:33:08 -0800 Subject: [PATCH 082/724] refactor: added a tslint rule to enforce package.json dependencies And added disable of the rule to spec and scripts files. --- lib/packages.ts | 3 +-- .../build-optimizer/build-optimizer_spec.ts | 1 + .../src/build-optimizer/webpack-loader.ts | 3 ++- .../build_optimizer/src/purify/purify_spec.ts | 1 + .../src/purify/webpack-plugin.ts | 1 + .../src/transforms/class-fold_spec.ts | 1 + .../src/transforms/import-tslib_spec.ts | 1 + .../src/transforms/prefix-classes_spec.ts | 1 + .../src/transforms/prefix-functions_spec.ts | 1 + .../src/transforms/scrub-file_spec.ts | 1 + .../src/transforms/wrap-enums_spec.ts | 1 + .../angular_devkit/core/node/cli-logger.ts | 2 +- packages/angular_devkit/core/node/host.ts | 22 +++++++++---------- .../angular_devkit/core/node/host_spec.ts | 1 + packages/angular_devkit/core/node/resolve.ts | 2 +- .../angular_devkit/core/node/resolve_spec.ts | 1 + .../core/src/json/parser_benchmark.ts | 1 + .../core/src/virtual-fs/host/memory_spec.ts | 1 + .../core/src/virtual-fs/path.ts | 2 +- .../core/src/virtual-fs/path_benchmark.ts | 1 + .../schematics/src/engine/engine.ts | 8 +++---- .../schematics/src/rules/base_spec.ts | 1 + .../schematics/src/rules/call_spec.ts | 1 + .../schematics/src/sink/dryrun_spec.ts | 1 + .../schematics/src/sink/filesystem_spec.ts | 1 + .../schematics/tasks/node-package/executor.ts | 2 +- .../tasks/node-package/install-task.ts | 2 +- .../tasks/node-package/link-task.ts | 2 +- .../schematics/tasks/node/index.ts | 2 +- .../schematics/tasks/repo-init/executor.ts | 2 +- .../schematics/tasks/repo-init/init-task.ts | 2 +- .../testing/schematic-test-runner.ts | 12 +++++----- .../schematics/tools/description.ts | 2 +- .../schematics/tools/fallback-engine-host.ts | 12 +++++----- .../tools/file-system-engine-host-base.ts | 16 +++++++------- .../tools/file-system-engine-host.ts | 8 +++---- .../tools/file-system-engine-host_spec.ts | 1 + .../schematics/tools/file-system-host.ts | 2 +- .../tools/node-module-engine-host.ts | 6 ++--- .../tools/node-modules-test-engine-host.ts | 2 +- .../tools/schema-option-transform.ts | 2 +- rules/noGlobalTslintDisableRule.ts | 4 ++++ scripts/benchmark.ts | 1 + scripts/build.ts | 1 + scripts/lint.ts | 1 + scripts/packages.ts | 1 + scripts/publish.ts | 1 + scripts/release.ts | 1 + scripts/serialize.ts | 1 + scripts/snapshots.ts | 1 + scripts/templates.ts | 1 + scripts/test.ts | 1 + scripts/validate-commits.ts | 1 + scripts/validate-licenses.ts | 1 + scripts/validate.ts | 1 + tslint.json | 1 + 56 files changed, 94 insertions(+), 59 deletions(-) diff --git a/lib/packages.ts b/lib/packages.ts index 9fda494fa2..11ade6c101 100644 --- a/lib/packages.ts +++ b/lib/packages.ts @@ -5,8 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -'use strict'; - +// tslint:disable-next-line:no-implicit-dependencies import { JsonObject } from '@angular-devkit/core'; import { execSync } from 'child_process'; import * as crypto from 'crypto'; diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts index 588f0c8b5d..4a54aa1120 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { RawSourceMap } from 'source-map'; import { buildOptimizer } from './build-optimizer'; diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts index caee6e46be..215e488de6 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts @@ -6,7 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map'; -import * as webpack from 'webpack'; +import * as webpack from 'webpack'; // tslint:disable-line:no-implicit-dependencies + const loaderUtils = require('loader-utils'); import { buildOptimizer } from './build-optimizer'; diff --git a/packages/angular_devkit/build_optimizer/src/purify/purify_spec.ts b/packages/angular_devkit/build_optimizer/src/purify/purify_spec.ts index c3157d4efb..bdc214139f 100644 --- a/packages/angular_devkit/build_optimizer/src/purify/purify_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/purify/purify_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { purify } from './purify'; diff --git a/packages/angular_devkit/build_optimizer/src/purify/webpack-plugin.ts b/packages/angular_devkit/build_optimizer/src/purify/webpack-plugin.ts index 3744951fc0..19383416bc 100644 --- a/packages/angular_devkit/build_optimizer/src/purify/webpack-plugin.ts +++ b/packages/angular_devkit/build_optimizer/src/purify/webpack-plugin.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import * as webpack from 'webpack'; import { ReplaceSource } from 'webpack-sources'; import { purifyReplacements } from './purify'; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/class-fold_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/class-fold_spec.ts index 8471e3630a..4af639ca0d 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/class-fold_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/class-fold_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; import { getFoldFileTransformer } from './class-fold'; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts index 205007c6cc..ca32b0b7f4 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; import { getImportTslibTransformer, testImportTslib } from './import-tslib'; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts index c0a3cae25c..a5766eb02b 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; import { getPrefixClassesTransformer, testPrefixClasses } from './prefix-classes'; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/prefix-functions_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/prefix-functions_spec.ts index e09d38f906..f0e73f96d7 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/prefix-functions_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/prefix-functions_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; import { getPrefixFunctionsTransformer } from './prefix-functions'; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts index d4d1295868..fec5b0af3f 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; import { getScrubFileTransformer, testScrubFile } from './scrub-file'; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index 34d8e4d5b2..899463c83f 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; import { getWrapEnumsTransformer, testWrapEnums } from './wrap-enums'; diff --git a/packages/angular_devkit/core/node/cli-logger.ts b/packages/angular_devkit/core/node/cli-logger.ts index d10382ea70..8459fd936f 100644 --- a/packages/angular_devkit/core/node/cli-logger.ts +++ b/packages/angular_devkit/core/node/cli-logger.ts @@ -5,8 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { logging, terminal } from '@angular-devkit/core'; import { filter } from 'rxjs/operators'; +import { logging, terminal } from '../src'; /** diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 5a323c4949..2a473dfe24 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -5,17 +5,6 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { - Path, - PathFragment, - asPosixPath, - asWindowsPath, - dirname, - fragment, - join, - normalize, - virtualFs, -} from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; import { empty } from 'rxjs/observable/empty'; @@ -28,6 +17,17 @@ import { map } from 'rxjs/operators/map'; import { mergeMap } from 'rxjs/operators/mergeMap'; import { publish } from 'rxjs/operators/publish'; import { refCount } from 'rxjs/operators/refCount'; +import { + Path, + PathFragment, + asPosixPath, + asWindowsPath, + dirname, + fragment, + join, + normalize, + virtualFs, +} from '../src'; interface ChokidarWatcher { diff --git a/packages/angular_devkit/core/node/host_spec.ts b/packages/angular_devkit/core/node/host_spec.ts index b2fc85443f..bb249cb4e2 100644 --- a/packages/angular_devkit/core/node/host_spec.ts +++ b/packages/angular_devkit/core/node/host_spec.ts @@ -7,6 +7,7 @@ */ // tslint:disable:no-any // tslint:disable:non-null-operator +// tslint:disable:no-implicit-dependencies import { normalize, virtualFs } from '@angular-devkit/core'; import { NodeJsAsyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; diff --git a/packages/angular_devkit/core/node/resolve.ts b/packages/angular_devkit/core/node/resolve.ts index 01688b139f..b497121bbd 100644 --- a/packages/angular_devkit/core/node/resolve.ts +++ b/packages/angular_devkit/core/node/resolve.ts @@ -5,9 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '@angular-devkit/core'; import * as fs from 'fs'; import * as path from 'path'; +import { BaseException } from '../src'; import { isFile } from './fs'; /** diff --git a/packages/angular_devkit/core/node/resolve_spec.ts b/packages/angular_devkit/core/node/resolve_spec.ts index b260aba377..9ecf1dec3b 100644 --- a/packages/angular_devkit/core/node/resolve_spec.ts +++ b/packages/angular_devkit/core/node/resolve_spec.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:no-any +// tslint:disable-next-line:no-implicit-dependencies import { resolve } from '@angular-devkit/core/node'; import * as path from 'path'; diff --git a/packages/angular_devkit/core/src/json/parser_benchmark.ts b/packages/angular_devkit/core/src/json/parser_benchmark.ts index de96970e6b..3c06ec3738 100644 --- a/packages/angular_devkit/core/src/json/parser_benchmark.ts +++ b/packages/angular_devkit/core/src/json/parser_benchmark.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { benchmark } from '@_/benchmark'; import { parseJson, parseJsonAst } from './parser'; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts index 566a231200..2ba0ae0d21 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies // tslint:disable:non-null-operator import { fragment, normalize } from '@angular-devkit/core'; import { stringToFileBuffer } from './buffer'; diff --git a/packages/angular_devkit/core/src/virtual-fs/path.ts b/packages/angular_devkit/core/src/virtual-fs/path.ts index 6efff030b1..e435758a72 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '@angular-devkit/core'; +import { BaseException } from '..'; export class InvalidPathException extends BaseException { diff --git a/packages/angular_devkit/core/src/virtual-fs/path_benchmark.ts b/packages/angular_devkit/core/src/virtual-fs/path_benchmark.ts index b2fbef6926..a2ab0824a1 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path_benchmark.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path_benchmark.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { benchmark } from '@_/benchmark'; import { join, normalize } from './path'; diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index fb1356ef41..ce735708f5 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -6,11 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException, logging } from '@angular-devkit/core'; -import { - CollectionDescription, - SchematicDescription, - TypedSchematicContext, - } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; import { from as observableFrom } from 'rxjs/observable/from'; import { concatMap } from 'rxjs/operators'; @@ -21,10 +16,13 @@ import { empty } from '../tree/static'; import { CollectionImpl } from './collection'; import { Collection, + CollectionDescription, Engine, EngineHost, Schematic, + SchematicDescription, Source, + TypedSchematicContext, } from './interface'; import { SchematicImpl } from './schematic'; import { diff --git a/packages/angular_devkit/schematics/src/rules/base_spec.ts b/packages/angular_devkit/schematics/src/rules/base_spec.ts index 983743fc90..ea85e5ccb3 100644 --- a/packages/angular_devkit/schematics/src/rules/base_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/base_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies // tslint:disable:non-null-operator import { Path } from '@angular-devkit/core'; import { diff --git a/packages/angular_devkit/schematics/src/rules/call_spec.ts b/packages/angular_devkit/schematics/src/rules/call_spec.ts index 04b7b0af7c..743a394608 100644 --- a/packages/angular_devkit/schematics/src/rules/call_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/call_spec.ts @@ -7,6 +7,7 @@ */ // tslint:disable:non-null-operator // tslint:disable:no-any +// tslint:disable:no-implicit-dependencies import { MergeStrategy } from '@angular-devkit/schematics'; import { of as observableOf } from 'rxjs/observable/of'; import { Rule, SchematicContext, Source } from '../engine/interface'; diff --git a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts index 86a57d5556..c4a2c502ce 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { normalize } from '@angular-devkit/core'; import * as fs from 'fs'; import * as path from 'path'; diff --git a/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts b/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts index 6701d25b5c..b4a69aa0b5 100644 --- a/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { normalize } from '@angular-devkit/core'; import { FileSystemTree, FileSystemTreeHost } from '@angular-devkit/schematics'; import * as fs from 'fs'; diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index 61d53be913..4f6af9f5fa 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException } from '@angular-devkit/core'; -import { TaskExecutor } from '@angular-devkit/schematics'; import { SpawnOptions, spawn } from 'child_process'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; +import { TaskExecutor } from '../../src'; import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options'; type PackageManagerProfile = { diff --git a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts index deaaeef4b6..60824eca87 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; +import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; import { NodePackageName, NodePackageTaskOptions } from './options'; export class NodePackageInstallTask implements TaskConfigurationGenerator { diff --git a/packages/angular_devkit/schematics/tasks/node-package/link-task.ts b/packages/angular_devkit/schematics/tasks/node-package/link-task.ts index b77130d557..900a47f9ff 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/link-task.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/link-task.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; +import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; import { NodePackageName, NodePackageTaskOptions } from './options'; export class NodePackageLinkTask implements TaskConfigurationGenerator { diff --git a/packages/angular_devkit/schematics/tasks/node/index.ts b/packages/angular_devkit/schematics/tasks/node/index.ts index 5ba5ae5a99..f0063d9fd3 100644 --- a/packages/angular_devkit/schematics/tasks/node/index.ts +++ b/packages/angular_devkit/schematics/tasks/node/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { TaskExecutorFactory } from '@angular-devkit/schematics'; +import { TaskExecutorFactory } from '../../src'; import { NodePackageName, NodePackageTaskFactoryOptions } from '../node-package/options'; import { RepositoryInitializerName, diff --git a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts index 7625e88019..697661fc48 100644 --- a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts +++ b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ import { tags } from '@angular-devkit/core'; -import { SchematicContext, TaskExecutor } from '@angular-devkit/schematics'; import { SpawnOptions, spawn } from 'child_process'; import * as path from 'path'; +import { SchematicContext, TaskExecutor } from '../../src'; import { RepositoryInitializerTaskFactoryOptions, RepositoryInitializerTaskOptions, diff --git a/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts b/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts index e81c2d2883..c24e58412e 100644 --- a/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts +++ b/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics'; +import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; import { RepositoryInitializerName, RepositoryInitializerTaskOptions } from './options'; export interface CommitOptions { diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 3f0f8bb5d2..b0909ef9be 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -6,6 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ import { logging, schema } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; +import { map } from 'rxjs/operators'; import { Collection, DelegateTree, @@ -16,15 +19,12 @@ import { Tree, VirtualTree, formats, -} from '@angular-devkit/schematics'; +} from '../src'; +import { callRule } from '../src/rules/call'; import { NodeModulesTestEngineHost, validateOptionsWithSchema, -} from '@angular-devkit/schematics/tools'; -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; -import { map } from 'rxjs/operators'; -import { callRule } from '../src/rules/call'; +} from '../tools'; export class UnitTestTree extends DelegateTree { diff --git a/packages/angular_devkit/schematics/tools/description.ts b/packages/angular_devkit/schematics/tools/description.ts index 0276e736b8..c35dae3530 100644 --- a/packages/angular_devkit/schematics/tools/description.ts +++ b/packages/angular_devkit/schematics/tools/description.ts @@ -12,7 +12,7 @@ import { RuleFactory, SchematicDescription, TypedSchematicContext, -} from '@angular-devkit/schematics'; +} from '../src'; export interface FileSystemCollectionDescription { diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index 005d03f98c..51870486b9 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -5,6 +5,11 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { Observable } from 'rxjs/Observable'; +import { of as observableOf } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; +import { mergeMap } from 'rxjs/operators/mergeMap'; +import { Url } from 'url'; import { Collection, CollectionDescription, @@ -16,12 +21,7 @@ import { TypedSchematicContext, UnknownCollectionException, UnregisteredTaskException, -} from '@angular-devkit/schematics'; -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; -import { mergeMap } from 'rxjs/operators/mergeMap'; -import { Url } from 'url'; +} from '../src'; export type FallbackCollectionDescription = { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index ea4e718a0d..a83722aeca 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -6,6 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException, JsonObject } from '@angular-devkit/core'; +import { dirname, isAbsolute, join, resolve } from 'path'; +import { Observable } from 'rxjs/Observable'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { of as observableOf } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; +import { mergeMap } from 'rxjs/operators/mergeMap'; +import { Url } from 'url'; import { EngineHost, FileSystemCreateTree, @@ -15,14 +22,7 @@ import { TaskExecutorFactory, UnknownSchematicException, UnregisteredTaskException, -} from '@angular-devkit/schematics'; -import { dirname, isAbsolute, join, resolve } from 'path'; -import { Observable } from 'rxjs/Observable'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; -import { mergeMap } from 'rxjs/operators/mergeMap'; -import { Url } from 'url'; +} from '../src'; import { FileSystemCollection, FileSystemCollectionDesc, diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host.ts index a20fcf26e0..e503a9952d 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host.ts @@ -5,14 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { RuleFactory } from '@angular-devkit/schematics'; +import { existsSync } from 'fs'; +import { join } from 'path'; +import { RuleFactory } from '../src'; import { CollectionCannotBeResolvedException, CollectionMissingSchematicsMapException, SchematicMissingFieldsException, -} from '@angular-devkit/schematics/tools'; -import { existsSync } from 'fs'; -import { join } from 'path'; +} from '../tools'; import { FileSystemCollectionDesc, FileSystemSchematicDesc } from './description'; import { ExportStringRef } from './export-ref'; import { FileSystemEngineHostBase } from './file-system-engine-host-base'; diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts index fe4fe18f5e..c02c004e50 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:no-any +// tslint:disable:no-implicit-dependencies import { SchematicEngine } from '@angular-devkit/schematics'; import { FileSystemEngineHost } from '@angular-devkit/schematics/tools'; import * as path from 'path'; diff --git a/packages/angular_devkit/schematics/tools/file-system-host.ts b/packages/angular_devkit/schematics/tools/file-system-host.ts index ad3317f7fd..e349a4a7ee 100644 --- a/packages/angular_devkit/schematics/tools/file-system-host.ts +++ b/packages/angular_devkit/schematics/tools/file-system-host.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ import { fs } from '@angular-devkit/core/node'; -import { FileSystemTreeHost } from '@angular-devkit/schematics'; import { existsSync, readFileSync, readdirSync } from 'fs'; import { join } from 'path'; +import { FileSystemTreeHost } from '../src'; export class FileSystemHost implements FileSystemTreeHost { constructor(private _root: string) {} diff --git a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts index 03c06399ef..bc7e52fbec 100644 --- a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts @@ -6,13 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ import * as core from '@angular-devkit/core/node'; -import { RuleFactory } from '@angular-devkit/schematics'; +import { dirname, join, resolve as resolvePath } from 'path'; +import { RuleFactory } from '../src'; import { CollectionCannotBeResolvedException, CollectionMissingSchematicsMapException, SchematicMissingFieldsException, -} from '@angular-devkit/schematics/tools'; -import { dirname, join, resolve as resolvePath } from 'path'; +} from '../tools'; import { FileSystemCollectionDesc, FileSystemSchematicDesc, diff --git a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts index 37f567467f..26c4506644 100644 --- a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { NodeModulesEngineHost } from '@angular-devkit/schematics/tools'; +import { NodeModulesEngineHost } from '../tools'; /** diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index 5b4a8e18ba..13a665bf48 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -9,12 +9,12 @@ import { BaseException, schema, } from '@angular-devkit/core'; -import { SchematicDescription } from '@angular-devkit/schematics'; import { Observable } from 'rxjs/Observable'; import { of as observableOf } from 'rxjs/observable/of'; import { first } from 'rxjs/operators/first'; import { map } from 'rxjs/operators/map'; import { mergeMap } from 'rxjs/operators/mergeMap'; +import { SchematicDescription } from '../src'; import { FileSystemCollectionDescription, FileSystemSchematicDescription } from './description'; export type SchematicDesc = diff --git a/rules/noGlobalTslintDisableRule.ts b/rules/noGlobalTslintDisableRule.ts index bd1b3aca30..1db5d0804b 100644 --- a/rules/noGlobalTslintDisableRule.ts +++ b/rules/noGlobalTslintDisableRule.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import * as path from 'path'; import * as Lint from 'tslint'; import * as ts from 'typescript'; @@ -50,6 +51,9 @@ class Walker extends Lint.RuleWalker { if (sourceFile.fileName.match(/_benchmark.ts$/)) { return; } + if (sourceFile.fileName.startsWith(path.join(process.cwd(), 'scripts'))) { + return; + } // Find all comment nodes. const ranges = this._findComments(sourceFile); diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts index 9bf91eb164..5a621d7d71 100644 --- a/scripts/benchmark.ts +++ b/scripts/benchmark.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { tags, terminal } from '@angular-devkit/core'; import * as glob from 'glob'; import 'jasmine'; diff --git a/scripts/build.ts b/scripts/build.ts index 871e23bf0f..fd9aa0694a 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { JsonObject, logging } from '@angular-devkit/core'; import * as fs from 'fs'; import * as glob from 'glob'; diff --git a/scripts/lint.ts b/scripts/lint.ts index a0fed2b2be..d213461005 100644 --- a/scripts/lint.ts +++ b/scripts/lint.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import { ParsedArgs } from 'minimist'; import * as path from 'path'; diff --git a/scripts/packages.ts b/scripts/packages.ts index cb681e56ee..7706d01394 100644 --- a/scripts/packages.ts +++ b/scripts/packages.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; diff --git a/scripts/publish.ts b/scripts/publish.ts index 8e479b79ac..51d46d54b0 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import { resolve } from '@angular-devkit/core/node'; import * as stream from 'stream'; diff --git a/scripts/release.ts b/scripts/release.ts index 48910217a9..2cf881ffa5 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import * as fs from 'fs'; import * as path from 'path'; diff --git a/scripts/serialize.ts b/scripts/serialize.ts index ddbb3cb644..f3d0b3a64b 100644 --- a/scripts/serialize.ts +++ b/scripts/serialize.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging, strings } from '@angular-devkit/core'; import { SchemaClassFactory } from '@ngtools/json-schema'; import * as fs from 'fs'; diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 5014818c3d..6cfbdb460e 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import { execSync, spawnSync } from 'child_process'; import * as fs from 'fs'; diff --git a/scripts/templates.ts b/scripts/templates.ts index 3fa6bf6741..f403d78ac2 100644 --- a/scripts/templates.ts +++ b/scripts/templates.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import * as fs from 'fs'; import * as path from 'path'; diff --git a/scripts/test.ts b/scripts/test.ts index cb14d2b54e..4a1ce971ac 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import * as glob from 'glob'; import * as Istanbul from 'istanbul'; diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index 0cb13f571f..fad5699fc6 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; import { execSync } from 'child_process'; import { packages } from '../lib/packages'; diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts index 7d44481597..6f1577fa67 100644 --- a/scripts/validate-licenses.ts +++ b/scripts/validate-licenses.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { JsonObject, logging } from '@angular-devkit/core'; require('../lib/bootstrap-local'); diff --git a/scripts/validate.ts b/scripts/validate.ts index 40a719fe63..879045f1e2 100644 --- a/scripts/validate.ts +++ b/scripts/validate.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-implicit-dependencies import { logging, tags } from '@angular-devkit/core'; import { execSync } from 'child_process'; import templates from './templates'; diff --git a/tslint.json b/tslint.json index 82ab7b19c1..f0f33ec1de 100644 --- a/tslint.json +++ b/tslint.json @@ -10,6 +10,7 @@ "single-eof-line": true, + "no-implicit-dependencies": true, "import-blacklist": [ true, "rxjs" From 3c26a73f56129f7b0362e72547a752f70c6d41f8 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 25 Oct 2017 10:11:18 +0100 Subject: [PATCH 083/724] ci: add code owners --- .github/CODEOWNERS | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..e4c28efb37 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,8 @@ +packages/_/* @hansl +packages/angular_devkit/build_optimizer/* @filipesilva +packages/angular_devkit/core/* @hansl +packages/angular_devkit/schematics/* @hansl +packages/schematics/angular/* @hansl @Brocco +packages/schematics/schematics/* @hansl +rules/* @hansl +scripts/* @hansl From 68daef39eb7d19d462937913c39fcdb0bf5ea230 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 18 Jan 2018 14:04:41 -0500 Subject: [PATCH 084/724] feat(@angular-devkit/schematics): support collection extension --- .../schematics/collection-schema.json | 16 ++ .../schematics/src/engine/collection.ts | 3 +- .../schematics/src/engine/engine.ts | 69 +++++++- .../schematics/src/engine/interface.ts | 4 +- .../schematics/tools/fallback-engine-host.ts | 5 +- .../tools/file-system-engine-host-base.ts | 12 +- .../tools/file-system-engine-host_spec.ts | 157 ++++++++++++++++++ .../extends-basic-string/collection.json | 10 ++ .../extends-basic/collection.json | 12 ++ .../extends-circular-deep/collection.json | 10 ++ .../extends-circular-middle/collection.json | 13 ++ .../extends-circular-multiple/collection.json | 13 ++ .../extends-circular/collection.json | 10 ++ .../extends-deep/collection.json | 5 + .../extends-multiple/collection.json | 8 + .../extends-replace/collection.json | 12 ++ 16 files changed, 343 insertions(+), 16 deletions(-) create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic-string/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-deep/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-middle/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-multiple/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-deep/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-multiple/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-replace/collection.json diff --git a/packages/angular_devkit/schematics/collection-schema.json b/packages/angular_devkit/schematics/collection-schema.json index f6a8b18aeb..ac9642962f 100644 --- a/packages/angular_devkit/schematics/collection-schema.json +++ b/packages/angular_devkit/schematics/collection-schema.json @@ -4,6 +4,22 @@ "title": "Collection Schema for validating a 'collection.json'.", "type": "object", "properties": { + "extends": { + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1 + } + ] + }, "schematics": { "type": "object", "description": "A map of schematic names to schematic details", diff --git a/packages/angular_devkit/schematics/src/engine/collection.ts b/packages/angular_devkit/schematics/src/engine/collection.ts index 362d78b492..f7d36f1113 100644 --- a/packages/angular_devkit/schematics/src/engine/collection.ts +++ b/packages/angular_devkit/schematics/src/engine/collection.ts @@ -12,7 +12,8 @@ import { Collection, CollectionDescription, Schematic } from './interface'; export class CollectionImpl implements Collection { constructor(private _description: CollectionDescription, - private _engine: SchematicEngine) { + private _engine: SchematicEngine, + public readonly baseDescriptions?: Array>) { } get description() { return this._description; } diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index ce735708f5..a877e2f9fb 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -40,6 +40,13 @@ export class UnknownUrlSourceProtocol extends BaseException { export class UnknownCollectionException extends BaseException { constructor(name: string) { super(`Unknown collection "${name}".`); } } + +export class CircularCollectionException extends BaseException { + constructor(name: string) { + super(`Circular collection reference "${name}".`); + } +} + export class UnknownSchematicException extends BaseException { constructor(name: string, collection: CollectionDescription<{}>) { super(`Schematic "${name}" not found in collection "${collection.name}".`); @@ -76,16 +83,38 @@ export class SchematicEngine(description, this, bases); + this._collectionCache.set(name, collection); + this._schematicCache.set(name, new Map()); + + return collection; + } + + private _createCollectionDescription( + name: string, + parentNames?: Set, + ): [CollectionDescription, Array>] { const description = this._host.createCollectionDescription(name); if (!description) { throw new UnknownCollectionException(name); } + if (parentNames && parentNames.has(description.name)) { + throw new CircularCollectionException(name); + } - collection = new CollectionImpl(description, this); - this._collectionCache.set(name, collection); - this._schematicCache.set(name, new Map()); + const bases = new Array>(); + if (description.extends) { + parentNames = (parentNames || new Set()).add(description.name); + for (const baseName of description.extends) { + const [base, baseBases] = this._createCollectionDescription(baseName, new Set(parentNames)); - return collection; + bases.unshift(base, ...baseBases); + } + } + + return [description, bases]; } createContext( @@ -148,12 +177,25 @@ export class SchematicEngine(description, factory, collection, this); schematicMap.set(name, schematic); @@ -161,8 +203,17 @@ export class SchematicEngine) { - return this._host.listSchematicNames(collection.description); + listSchematicNames(collection: Collection): string[] { + const names = this._host.listSchematicNames(collection.description); + + if (collection.baseDescriptions) { + for (const base of collection.baseDescriptions) { + names.push(...this._host.listSchematicNames(base)); + } + } + + // remove duplicates + return [...new Set(names)]; } transformOptions( diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 5350833e51..746eccd98d 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -19,6 +19,7 @@ import { TaskConfigurationGenerator, TaskExecutor, TaskId } from './task'; */ export type CollectionDescription = CollectionMetadataT & { readonly name: string; + readonly extends?: string[]; }; /** @@ -49,7 +50,7 @@ export interface EngineHost): - SchematicDescription; + SchematicDescription | null; getSchematicRuleFactory( schematic: SchematicDescription, collection: CollectionDescription): RuleFactory; @@ -108,6 +109,7 @@ export interface Engine { readonly description: CollectionDescription; + readonly baseDescriptions?: Array>; createSchematic(name: string): Schematic; listSchematicNames(): string[]; diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index 51870486b9..89f3dd891a 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -68,8 +68,11 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { createSchematicDescription( name: string, collection: CollectionDescription, - ): SchematicDescription { + ): SchematicDescription | null { const description = collection.host.createSchematicDescription(name, collection.description); + if (!description) { + return null; + } return { name, collection, description }; } diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index a83722aeca..6dfdda90fd 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -20,7 +20,6 @@ import { Source, TaskExecutor, TaskExecutorFactory, - UnknownSchematicException, UnregisteredTaskException, } from '../src'; import { @@ -142,6 +141,11 @@ export abstract class FileSystemEngineHostBase implements throw new InvalidCollectionJsonException(name, path); } + // normalize extends property to an array + if (typeof jsonValue['extends'] === 'string') { + jsonValue['extends'] = [jsonValue['extends']]; + } + const description = this._transformCollectionDescription(name, { ...jsonValue, path, @@ -169,7 +173,7 @@ export abstract class FileSystemEngineHostBase implements createSchematicDescription( name: string, collection: FileSystemCollectionDesc, - ): FileSystemSchematicDesc { + ): FileSystemSchematicDesc | null { // Resolve aliases first. for (const schematicName of Object.keys(collection.schematics)) { const schematicDescription = collection.schematics[schematicName]; @@ -180,13 +184,13 @@ export abstract class FileSystemEngineHostBase implements } if (!(name in collection.schematics)) { - throw new UnknownSchematicException(name, collection); + return null; } const collectionPath = dirname(collection.path); const partialDesc: Partial | null = collection.schematics[name]; if (!partialDesc) { - throw new UnknownSchematicException(name, collection); + return null; } if (partialDesc.extends) { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts index c02c004e50..33dd6877f1 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts @@ -39,6 +39,163 @@ describe('FileSystemEngineHost', () => { expect(schematic1.description.name).toBe('schematic1'); }); + it('lists schematics but not aliases', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const testCollection = engine.createCollection('aliases'); + const names = testCollection.listSchematicNames(); + + expect(names).not.toBeNull(); + expect(names[0]).toBe('schematic1'); + expect(names[1]).toBe('schematic2'); + }); + + it('extends a collection with string', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const testCollection = engine.createCollection('extends-basic-string'); + + expect(testCollection.baseDescriptions).not.toBeUndefined(); + expect(testCollection.baseDescriptions + && testCollection.baseDescriptions.length).toBe(1); + + const schematic1 = engine.createSchematic('schematic1', testCollection); + + expect(schematic1).not.toBeNull(); + expect(schematic1.description.name).toBe('schematic1'); + + const schematic2 = engine.createSchematic('schematic2', testCollection); + + expect(schematic2).not.toBeNull(); + expect(schematic2.description.name).toBe('schematic2'); + + const names = testCollection.listSchematicNames(); + + expect(names.length).toBe(2); + }); + + it('extends a collection with array', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const testCollection = engine.createCollection('extends-basic'); + + expect(testCollection.baseDescriptions).not.toBeUndefined(); + expect(testCollection.baseDescriptions + && testCollection.baseDescriptions.length).toBe(1); + + const schematic1 = engine.createSchematic('schematic1', testCollection); + + expect(schematic1).not.toBeNull(); + expect(schematic1.description.name).toBe('schematic1'); + + const schematic2 = engine.createSchematic('schematic2', testCollection); + + expect(schematic2).not.toBeNull(); + expect(schematic2.description.name).toBe('schematic2'); + + const names = testCollection.listSchematicNames(); + + expect(names.length).toBe(2); + }); + + it('extends a collection with full depth', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const testCollection = engine.createCollection('extends-deep'); + + expect(testCollection.baseDescriptions).not.toBeUndefined(); + expect(testCollection.baseDescriptions + && testCollection.baseDescriptions.length).toBe(2); + + const schematic1 = engine.createSchematic('schematic1', testCollection); + + expect(schematic1).not.toBeNull(); + expect(schematic1.description.name).toBe('schematic1'); + + const schematic2 = engine.createSchematic('schematic2', testCollection); + + expect(schematic2).not.toBeNull(); + expect(schematic2.description.name).toBe('schematic2'); + + const names = testCollection.listSchematicNames(); + + expect(names.length).toBe(2); + }); + + it('replaces base schematics when extending', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const testCollection = engine.createCollection('extends-replace'); + + expect(testCollection.baseDescriptions).not.toBeUndefined(); + expect(testCollection.baseDescriptions + && testCollection.baseDescriptions.length).toBe(1); + + const schematic1 = engine.createSchematic('schematic1', testCollection); + + expect(schematic1).not.toBeNull(); + expect(schematic1.description.name).toBe('schematic1'); + expect(schematic1.description.description).toBe('replaced'); + + const names = testCollection.listSchematicNames(); + + expect(names).not.toBeNull(); + expect(names.length).toBe(1); + }); + + it('extends multiple collections', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const testCollection = engine.createCollection('extends-multiple'); + + expect(testCollection.baseDescriptions).not.toBeUndefined(); + expect(testCollection.baseDescriptions + && testCollection.baseDescriptions.length).toBe(4); + + const schematic1 = engine.createSchematic('schematic1', testCollection); + + expect(schematic1).not.toBeNull(); + expect(schematic1.description.name).toBe('schematic1'); + expect(schematic1.description.description).toBe('replaced'); + + const schematic2 = engine.createSchematic('schematic2', testCollection); + + expect(schematic2).not.toBeNull(); + expect(schematic2.description.name).toBe('schematic2'); + + const names = testCollection.listSchematicNames(); + + expect(names).not.toBeNull(); + expect(names.length).toBe(2); + }); + + it('errors on simple circular collections', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + expect(() => engine.createCollection('extends-circular')).toThrow(); + }); + + it('errors on complex circular collections', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + expect(() => engine.createCollection('extends-circular-multiple')).toThrow(); + }); + + it('errors on deep circular collections', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + expect(() => engine.createCollection('extends-circular-deep')).toThrow(); + }); + it('errors on invalid aliases', () => { const engineHost = new FileSystemEngineHost(root); const engine = new SchematicEngine(engineHost); diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic-string/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic-string/collection.json new file mode 100644 index 0000000000..f21d316bf7 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic-string/collection.json @@ -0,0 +1,10 @@ +{ + "name": "extends-basic-string", + "extends": "works", + "schematics": { + "schematic2": { + "description": "2", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic/collection.json new file mode 100644 index 0000000000..e20abcc174 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-basic/collection.json @@ -0,0 +1,12 @@ +{ + "name": "extends-basic", + "extends": [ + "works" + ], + "schematics": { + "schematic2": { + "description": "2", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-deep/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-deep/collection.json new file mode 100644 index 0000000000..e717cc7fb2 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-deep/collection.json @@ -0,0 +1,10 @@ +{ + "name": "extends-circular-deep", + "extends": "extends-circular-multiple", + "schematics": { + "schematic2": { + "description": "2", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-middle/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-middle/collection.json new file mode 100644 index 0000000000..703a0514cc --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-middle/collection.json @@ -0,0 +1,13 @@ +{ + "name": "extends-circular-middle", + "extends": [ + "extends-multiple", + "extends-circular-multiple" + ], + "schematics": { + "schematic2": { + "description": "2", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-multiple/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-multiple/collection.json new file mode 100644 index 0000000000..2581e5d6b8 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular-multiple/collection.json @@ -0,0 +1,13 @@ +{ + "name": "extends-circular-multiple", + "extends": [ + "extends-multiple", + "extends-circular-middle" + ], + "schematics": { + "schematic2": { + "description": "2", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular/collection.json new file mode 100644 index 0000000000..c588bedf62 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-circular/collection.json @@ -0,0 +1,10 @@ +{ + "name": "extends-circular", + "extends": "extends-circular", + "schematics": { + "schematic2": { + "description": "2", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-deep/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-deep/collection.json new file mode 100644 index 0000000000..56decb72ab --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-deep/collection.json @@ -0,0 +1,5 @@ +{ + "name": "extends-deep", + "extends": "extends-basic", + "schematics": {} +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-multiple/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-multiple/collection.json new file mode 100644 index 0000000000..59c58c152d --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-multiple/collection.json @@ -0,0 +1,8 @@ +{ + "name": "extends-multiple", + "extends": [ + "extends-basic", + "extends-replace" + ], + "schematics": {} +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-replace/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-replace/collection.json new file mode 100644 index 0000000000..7fdce6f449 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extends-replace/collection.json @@ -0,0 +1,12 @@ +{ + "name": "extends-replace", + "extends": [ + "works" + ], + "schematics": { + "schematic1": { + "description": "replaced", + "factory": "../null-factory" + } + } +} From fcbe7f6ad5832dadd5dc68442111661451def354 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 17 Jan 2018 09:38:38 -0500 Subject: [PATCH 085/724] feat(@schematics/angular): use tasks to install/init applications --- packages/angular_devkit/schematics/BUILD | 1 + .../testing/schematic-test-runner.ts | 4 +++ .../schematics/angular/application/index.ts | 25 +++++++++++++ .../angular/application/schema.d.ts | 12 +++++++ .../angular/application/schema.json | 36 +++++++++++++++++++ 5 files changed, 78 insertions(+) diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index c9958ef63a..1a8229bb37 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -74,6 +74,7 @@ ts_library( module_root = "testing", deps = [ ":schematics", + ":tasks", ":tools", "//packages/angular_devkit/core", # @deps: rxjs diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index b0909ef9be..3c45024d29 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -21,6 +21,7 @@ import { formats, } from '../src'; import { callRule } from '../src/rules/call'; +import { BuiltinTaskExecutor } from '../tasks/node'; import { NodeModulesTestEngineHost, validateOptionsWithSchema, @@ -58,6 +59,9 @@ export class SchematicTestRunner { const registry = new schema.CoreSchemaRegistry(formats.standardFormats); this._engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); + this._collection = this._engine.createCollection(this._collectionName); } diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 8b29117c52..6e0db4e4a5 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -21,6 +21,11 @@ import { template, url, } from '@angular-devkit/schematics'; +import { + NodePackageInstallTask, + NodePackageLinkTask, + RepositoryInitializerTask, +} from '@angular-devkit/schematics/tasks'; import { Schema as ApplicationOptions } from './schema'; @@ -49,6 +54,26 @@ export default function (options: ApplicationOptions): Rule { }; const sourceDir = options.sourceDir || 'src'; + let packageTask; + if (!options.skipInstall) { + packageTask = context.addTask(new NodePackageInstallTask(options.directory)); + if (options.linkCli) { + packageTask = context.addTask( + new NodePackageLinkTask('@angular/cli', options.directory), + [packageTask], + ); + } + } + if (!options.skipGit) { + context.addTask( + new RepositoryInitializerTask( + options.directory, + options.commit, + ), + packageTask ? [packageTask] : [], + ); + } + return chain([ mergeWith( apply(url('./files'), [ diff --git a/packages/schematics/angular/application/schema.d.ts b/packages/schematics/angular/application/schema.d.ts index 273eb3db0e..091f548110 100644 --- a/packages/schematics/angular/application/schema.d.ts +++ b/packages/schematics/angular/application/schema.d.ts @@ -55,10 +55,22 @@ export interface Schema { * Skip creating spec files. */ skipTests?: boolean; + /** + * Skip installing dependency packages. + */ + skipInstall?: boolean; + /** + * Link CLI to global version (internal development only). + */ + linkCli?: boolean; /** * Skip initializing a git repository. */ skipGit?: boolean; + /** + * Initial repository commit information. + */ + commit?: { name: string, email: string, message?: string }; /** * Create a minimal app (no test structure, inline styles/templates). */ diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index b2239a5e78..689f21fa00 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -75,12 +75,48 @@ "default": false, "alias": "st" }, + "skipInstall": { + "description": "Skip installing dependency packages.", + "type": "boolean", + "default": false + }, + "linkCli": { + "description": "Link CLI to global version (internal development only).", + "type": "boolean", + "default": false + }, "skipGit": { "description": "Skip initializing a git repository.", "type": "boolean", "default": false, "alias": "sg" }, + "commit": { + "description": "Initial repository commit information.", + "default": null, + "oneOf": [ + { "type": "null" }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "message": { + "type": "string" + } + }, + "required": [ + "name", + "email" + ] + } + ] + }, "minimal": { "description": "Create a minimal app (no test structure, inline styles/templates).", "type": "boolean", From 69fcdee61c5ff3f08aa609dec69155dfd29c809a Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 29 Jan 2018 16:34:07 -0800 Subject: [PATCH 086/724] feat(@angular-devkit/build-optimizer): add rollup plugin Also add a bazel build file so angular/angular can have a source dependency on it. --- packages/angular_devkit/build_optimizer/BUILD | 32 ++++++++++++ .../src/build-optimizer/rollup-plugin.ts | 49 +++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 packages/angular_devkit/build_optimizer/BUILD create mode 100644 packages/angular_devkit/build_optimizer/src/build-optimizer/rollup-plugin.ts diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD new file mode 100644 index 0000000000..10ba16f91c --- /dev/null +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -0,0 +1,32 @@ +# Copyright Google Inc. All Rights Reserved. +# +# Use of this source code is governed by an MIT-style license that can be +# found in the LICENSE file at https://angular.io/license + +licenses(["notice"]) # MIT + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +package(default_visibility = ["//visibility:public"]) + +ts_library( + name = "lib", + srcs = glob( + ["**/*.ts"], + # Currently, this library is used only with the rollup plugin. + # To make it simpler for downstream repositories to compile this, we + # neither provide compile-time deps as an `npm_install` rule, nor do we + # expect the downstream repository to install @types/webpack[-*] + # So we exclude files that depend on webpack typings. + exclude = [ + "src/build-optimizer/webpack-loader.ts", + "src/purify/**", + "src/index.ts", + "**/*_spec.ts", + ], + ), + # Note, intentionally no node_modules attribute - so it will use the + # compile-time deps in the downstream repository's //:node_modules. + # This creates the assumption that every consumer does have that target. + tsconfig = "//:tsconfig.json", +) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/rollup-plugin.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/rollup-plugin.ts new file mode 100644 index 0000000000..de02a159f6 --- /dev/null +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/rollup-plugin.ts @@ -0,0 +1,49 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +/** + * @fileoverview This adapts the buildOptimizer to run over each file as it is + * processed by Rollup. We must do this since buildOptimizer expects to see the + * ESModules in the input sources, and therefore cannot run on the rollup output + */ + +import * as path from 'path'; +import { RawSourceMap } from 'source-map'; +import { buildOptimizer } from './build-optimizer'; + +const DEBUG = false; + +export interface Options { + sideEffectFreeModules?: string[]; +} + +export default function optimizer(options: Options) { + return { + name: 'build-optimizer', + transform: (content: string, id: string): {code: string, map: RawSourceMap}|null => { + const isSideEffectFree = options.sideEffectFreeModules && + options.sideEffectFreeModules.some(m => id.indexOf(m) >= 0); + const { content: code, sourceMap: map } = buildOptimizer({ + content, inputFilePath: id, emitSourceMap: true, isSideEffectFree, + }); + if (!code) { + if (DEBUG) { + console.error('no transforms produced by buildOptimizer for ' + + path.relative(process.cwd(), id)); + } + + return null; + } + if (!map) { + throw new Error('no sourcemap produced by buildOptimizer'); + } + + return { code, map }; + }, + }; +} From d4b9fedd974651e864badcaf96d167893aa37178 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 09:52:56 -0800 Subject: [PATCH 087/724] release: minor --- .monorepo.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 80c4a20870..a42e052b4b 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.2.0", - "hash": "37ed7e417435c92dbf301e7b26ea37ca" + "version": "0.3.0", + "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.2.0", - "hash": "00462760d0add5ae790e49030c24fc9a", + "version": "0.3.0", + "hash": "d9a0e76333fe09e6add43062ceb18ba1", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/core": { @@ -65,8 +65,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.2.0", - "hash": "7c8dffd46a51b48697690041ac1042e0", + "version": "0.3.0", + "hash": "9eb8cb93b8e333fc84152520c2d22506", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -77,32 +77,32 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.2.0", - "hash": "cb0d10fec403c08f0a228fa83f12efbf", + "version": "0.3.0", + "hash": "7178c07f17f16d776b1cfac93bdaf700", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.2.0", - "hash": "c16524a2d75242300ce0dbd2fa1a0d00", + "version": "0.3.0", + "hash": "3f25d29ae06c7301b1d8514099a5f7af", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.2.0", - "hash": "b18aa59a8d5ce619522b48ab141e61d0", + "version": "0.3.0", + "hash": "d4a129bf64884701bf8ba0aa8fbdf2d6", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.2.0", + "version": "0.3.0", "section": "Schematics", "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.2.0", + "version": "0.3.0", "section": "Schematics", "hash": "fa063063c05223c7ebf82e999476d2ba", "snapshotRepo": "angular/schematics-package-update-builds" From 8e848b989bc28f57b472f1c990a2f0d9403caf8d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 7 Feb 2018 13:54:57 -0500 Subject: [PATCH 088/724] fix(@schematics/angular): mark link-cli option as not visible --- packages/schematics/angular/application/schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 689f21fa00..2166263131 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -83,7 +83,8 @@ "linkCli": { "description": "Link CLI to global version (internal development only).", "type": "boolean", - "default": false + "default": false, + "visible": false }, "skipGit": { "description": "Skip initializing a git repository.", From 9de9c4cf5634a62c862f512f04e94b2cc0211eb7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 10:28:38 -0800 Subject: [PATCH 089/724] ci: add support for releasing from CI --- .circleci/config.yml | 42 +++++++++++++++++++++++++++++++++++++++--- .circleci/npm_token | 1 + 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .circleci/npm_token diff --git a/.circleci/config.yml b/.circleci/config.yml index b7f1b406a2..e2dc962485 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,15 +100,40 @@ jobs: command: | npm run admin -- snapshots --verbose --githubTokenFile=${HOME}/github_token + publish: + <<: *defaults + steps: + - checkout: + <<: *post_checkout + - restore_cache: + key: angular_devkit-{{ checksum "package-lock.json" }} + + - run: npm install --no-save + - run: + name: Decrypt Credentials + command: | + openssl aes-256-cbc -d -in .circleci/npm_token -k "${KEY}" -out ~/.npmrc + - run: + name: Deployment to NPM + command: | + npm run admin -- publish --verbose + workflows: version: 2 default_workflow: jobs: - lint - validate - - build - - test - - integration + - build: + requires: + - lint + - validate + - test: + requires: + - build + - integration: + requires: + - build - snapshot_publish: requires: - test @@ -116,3 +141,14 @@ workflows: filters: branches: only: master + - publish: + requires: + - test + - build + - integration + - snapshot_publish + filters: + tags: + only: /^v\d+/ + branches: + ignore: /.*/ diff --git a/.circleci/npm_token b/.circleci/npm_token new file mode 100644 index 0000000000..5a1bb63030 --- /dev/null +++ b/.circleci/npm_token @@ -0,0 +1 @@ +Salted__°/¥ÙL Ž¡”ö¦°Â;ª…(.|©í¡ –ÚCŒàÔ’“þÖ5`h¢8Ðài8JÁo*´?}çû£3§0f´!Ð'ÛB¸Ì œ"UÆŠ&K!¨%Áɵڤ \ No newline at end of file From 1039ab1f55b40a20a015df15320d863685123577 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 11:52:49 -0800 Subject: [PATCH 090/724] ci: add release type to validate-commits --- scripts/validate-commits.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index fad5699fc6..a69adc37ca 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -99,6 +99,17 @@ export default function (_: {}, logger: logging.Logger) { } break; + case 'release': + if (scope) { + _invalid(sha, message, 'should not have a scope'); + continue; + } + if (commits.length > 1) { + _invalid(sha, message, 'release should always be alone in a PR'); + continue; + } + break; + // Unknown types. default: _invalid(sha, message, 'has an unknown type'); From e2a9b033643e96b40c3e551557bc7b26c21c18c9 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 7 Feb 2018 14:39:11 -0500 Subject: [PATCH 091/724] release: patch --- .monorepo.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index a42e052b4b..aa21556ffd 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.3.0", - "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" + "version": "0.3.1", + "hash": "d99e730f5b1c9e8b585fb44ee61987c6" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.3.0", - "hash": "d9a0e76333fe09e6add43062ceb18ba1", + "version": "0.3.1", + "hash": "7b1a2ec24e8f7f829750a76da289224b", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/core": { @@ -65,8 +65,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.3.0", - "hash": "9eb8cb93b8e333fc84152520c2d22506", + "version": "0.3.1", + "hash": "0d9f5622254e182f82887ab964e71f23", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -77,34 +77,34 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.3.0", - "hash": "7178c07f17f16d776b1cfac93bdaf700", + "version": "0.3.1", + "hash": "d6db5094063c899602e29f1f819805d1", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.3.0", - "hash": "3f25d29ae06c7301b1d8514099a5f7af", + "version": "0.3.1", + "hash": "6910af904a9ed63d693c80ddac3ee2de", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.3.0", - "hash": "d4a129bf64884701bf8ba0aa8fbdf2d6", + "version": "0.3.1", + "hash": "9293a8548489c8bde3b70ce94439d220", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.3.0", + "version": "0.3.1", "section": "Schematics", - "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" + "hash": "d7ede81252da518fb704a02a69ae06a1" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.3.0", + "version": "0.3.1", "section": "Schematics", - "hash": "fa063063c05223c7ebf82e999476d2ba", + "hash": "9122b9f3dafd393f564d823a72ceffa8", "snapshotRepo": "angular/schematics-package-update-builds" } } From 9bebf947fb4f4a3ec5f0a2a689b31aa3cb434c96 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 15:50:13 -0800 Subject: [PATCH 092/724] ci: publish on master branch or version branch --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e2dc962485..cc6a614f26 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,4 +151,6 @@ workflows: tags: only: /^v\d+/ branches: - ignore: /.*/ + only: + - master + - /^\d+\.\d+\.x/ From 6d944f856432db99e7f6fb1dc6252131da184de1 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 6 Feb 2018 17:10:29 -0800 Subject: [PATCH 093/724] feat(@schematics/package-update): add the node package install task --- packages/schematics/package_update/utility/npm.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/schematics/package_update/utility/npm.ts b/packages/schematics/package_update/utility/npm.ts index eaa55ae683..57b7bb3c2a 100644 --- a/packages/schematics/package_update/utility/npm.ts +++ b/packages/schematics/package_update/utility/npm.ts @@ -13,6 +13,7 @@ import { Tree, chain, } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import * as http from 'http'; import { Observable } from 'rxjs/Observable'; import { ReplaySubject } from 'rxjs/ReplaySubject'; @@ -265,5 +266,8 @@ export function updatePackageJson( return tree; }, + (_tree: Tree, context: SchematicContext) => { + context.addTask(new NodePackageInstallTask()); + }, ]); } From 530a7c413a4162d4c2be3022d4e59db21cb5cfd7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 18:05:10 -0800 Subject: [PATCH 094/724] ci: publish on tags only --- .circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cc6a614f26..e2dc962485 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,6 +151,4 @@ workflows: tags: only: /^v\d+/ branches: - only: - - master - - /^\d+\.\d+\.x/ + ignore: /.*/ From 8384fa134e64f9f75b28666924b2f22042ed0c1f Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 13 Feb 2018 07:56:38 -0800 Subject: [PATCH 095/724] build: Update to latest bazel rules --- WORKSPACE | 18 ++++++++++-------- packages/angular_devkit/build_optimizer/BUILD | 2 +- packages/angular_devkit/core/BUILD | 2 +- packages/angular_devkit/schematics/BUILD | 2 +- packages/angular_devkit/schematics_cli/BUILD | 2 +- tools/BUILD | 1 + .bazelrc => tools/bazel.rc | 0 tools/defaults.bzl | 9 +++++++++ tsconfig.json | 3 +++ 9 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 tools/BUILD rename .bazelrc => tools/bazel.rc (100%) create mode 100644 tools/defaults.bzl diff --git a/WORKSPACE b/WORKSPACE index 8b910a3c2b..faaa5f6710 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,9 +1,10 @@ workspace(name = "angular_devkit") -git_repository( +http_archive( name = "build_bazel_rules_nodejs", - remote = "https://github.com/bazelbuild/rules_nodejs.git", - tag = "0.3.1", + url = "https://github.com/bazelbuild/rules_nodejs/archive/0.4.1.zip", + strip_prefix = "rules_nodejs-0.4.1", + sha256 = "e9bc013417272b17f302dc169ad597f05561bb277451f010043f4da493417607", ) load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") @@ -11,15 +12,16 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi check_bazel_version("0.9.0") node_repositories(package_json = ["//:package.json"]) -git_repository( +http_archive( name = "build_bazel_rules_typescript", - remote = "https://github.com/bazelbuild/rules_typescript.git", - tag = "0.7.1", + url = "https://github.com/bazelbuild/rules_typescript/archive/0.10.1.zip", + strip_prefix = "rules_typescript-0.10.1", + sha256 = "a2c81776a4a492ff9f878f9705639f5647bef345f7f3e1da09c9eeb8dec80485", ) -load("@build_bazel_rules_typescript//:setup.bzl", "ts_setup_workspace") +load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") -ts_setup_workspace(default_tsconfig = "@angular_devkit//:tsconfig.json") +ts_setup_workspace() # We get tools like Buildifier from here git_repository( diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD index 10ba16f91c..da70aee0de 100644 --- a/packages/angular_devkit/build_optimizer/BUILD +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -5,7 +5,7 @@ licenses(["notice"]) # MIT -load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") +load("//tools:defaults.bzl", "ts_library") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 2f7b016ad8..54118427a7 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") +load("//tools:defaults.bzl", "ts_library") licenses(["notice"]) # MIT License diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index 1a8229bb37..21f9bb687b 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") +load("//tools:defaults.bzl", "ts_library") licenses(["notice"]) # MIT License diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index 7c8b2a9c3f..16fa1280cf 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") +load("//tools:defaults.bzl", "ts_library") licenses(["notice"]) # MIT License diff --git a/tools/BUILD b/tools/BUILD new file mode 100644 index 0000000000..ee6d23bbcd --- /dev/null +++ b/tools/BUILD @@ -0,0 +1 @@ +# Marker file indicating this directory is a Bazel package diff --git a/.bazelrc b/tools/bazel.rc similarity index 100% rename from .bazelrc rename to tools/bazel.rc diff --git a/tools/defaults.bzl b/tools/defaults.bzl new file mode 100644 index 0000000000..ef30657b54 --- /dev/null +++ b/tools/defaults.bzl @@ -0,0 +1,9 @@ +"""Re-export of some bazel rules with repository-wide defaults.""" +load("@build_bazel_rules_typescript//:defs.bzl", _ts_library = "ts_library") + +DEFAULT_TSCONFIG = "//:tsconfig.json" + +def ts_library(tsconfig = None, **kwargs): + if not tsconfig: + tsconfig = DEFAULT_TSCONFIG + _ts_library(tsconfig = tsconfig, **kwargs) diff --git a/tsconfig.json b/tsconfig.json index 055c81bd67..eb0656dee3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,6 +46,9 @@ "@angular-devkit/build_optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ] } }, + "bazelOptions": { + "suppressTsconfigOverrideWarnings": true + }, "exclude": [ "bazel-*/**/*", "dist/**/*", From 8651a94380eccef0e77b509ee9d2fff4030fbfc2 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 12 Feb 2018 16:26:27 -0800 Subject: [PATCH 096/724] feat(@angular-devkit/schematics): use the Virtual FS Host in Schematics --- .editorconfig | 3 +- .../core/src/virtual-fs/host/index.ts | 4 + .../core/src/virtual-fs/host/memory.ts | 15 +- .../core/src/virtual-fs/host/memory_spec.ts | 2 + .../core/src/virtual-fs/host/sync.ts | 3 + .../core/src/virtual-fs/host/test.ts | 49 ++++++ .../core/src/virtual-fs/host/test_spec.ts | 28 ++++ packages/angular_devkit/schematics/BUILD | 1 + .../angular_devkit/schematics/src/index.ts | 4 +- .../schematics/src/rules/base_spec.ts | 5 +- .../schematics/src/sink/dryrun.ts | 25 ++- .../schematics/src/sink/dryrun_spec.ts | 28 ++-- .../schematics/src/sink/filesystem.ts | 104 ++---------- .../schematics/src/sink/filesystem_spec.ts | 152 ------------------ .../sink/{virtual-filesystem.ts => host.ts} | 39 +++-- .../schematics/src/sink/host_spec.ts | 114 +++++++++++++ .../schematics/src/tree/filesystem.ts | 69 ++++---- .../schematics/src/tree/filesystem_spec.ts | 5 +- .../schematics/src/tree/memory-host.ts | 54 ------- .../schematics/src/tree/node-host.ts | 32 ---- .../schematics/src/tree/virtual_spec.ts | 21 ++- .../schematics/tools/export-ref_spec.ts | 8 +- .../tools/file-system-engine-host-base.ts | 10 +- .../schematics/tools/file-system-host.ts | 30 +--- .../angular_devkit/schematics/tools/index.ts | 3 +- .../tools/node-modules-test-engine-host.ts | 2 +- .../schematics_cli/bin/schematics.ts | 16 +- .../package_update/utility/npm_spec.ts | 6 +- 28 files changed, 352 insertions(+), 480 deletions(-) create mode 100644 packages/angular_devkit/core/src/virtual-fs/host/test.ts create mode 100644 packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts delete mode 100644 packages/angular_devkit/schematics/src/sink/filesystem_spec.ts rename packages/angular_devkit/schematics/src/sink/{virtual-filesystem.ts => host.ts} (64%) create mode 100644 packages/angular_devkit/schematics/src/sink/host_spec.ts delete mode 100644 packages/angular_devkit/schematics/src/tree/memory-host.ts delete mode 100644 packages/angular_devkit/schematics/src/tree/node-host.ts diff --git a/.editorconfig b/.editorconfig index b53765a86c..36e19acf95 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,11 +2,12 @@ root = true -[*] +[*.ts] charset = utf-8 indent_style = space indent_size = 2 insert_final_newline = true +spaces_around_brackets = inside trim_trailing_whitespace = true [*.md] diff --git a/packages/angular_devkit/core/src/virtual-fs/host/index.ts b/packages/angular_devkit/core/src/virtual-fs/host/index.ts index 91a9aae22a..e959f3df56 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/index.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/index.ts @@ -11,3 +11,7 @@ export * from './interface'; export * from './memory'; export * from './scoped'; export * from './sync'; + +import * as test from './test'; + +export { test }; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index b98c900265..61e6a031c0 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -17,6 +17,7 @@ import { PathIsFileException, } from '../../exception/exception'; import { + NormalizedRoot, NormalizedSep, Path, PathFragment, @@ -168,9 +169,17 @@ export class SimpleMemoryHost implements Host<{}> { } const fragments = split(path); const result = new Set(); - for (const p of this._cache.keys()) { - if (p.startsWith(path + NormalizedSep)) { - result.add(split(p)[fragments.length]); + if (path !== NormalizedRoot) { + for (const p of this._cache.keys()) { + if (p.startsWith(path + NormalizedSep)) { + result.add(split(p)[fragments.length]); + } + } + } else { + for (const p of this._cache.keys()) { + if (p.startsWith(NormalizedSep)) { + result.add(split(p)[1]); + } } } diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts index 2ba0ae0d21..8721bbce49 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts @@ -91,6 +91,8 @@ describe('SimpleMemoryHost', () => { expect(host.list(normalize('/sub'))) .toEqual([fragment('file1'), fragment('file2'), fragment('sub1')]); + expect(host.list(normalize('/'))) + .toEqual([fragment('sub'), fragment('file4')]); }); it('supports isFile / isDirectory', () => { diff --git a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts index 03cb66e7a9..c5a126bf94 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts @@ -59,6 +59,9 @@ export class SyncDelegateHost { get capabilities(): HostCapabilities { return this._delegate.capabilities; } + get delegate() { + return this._delegate; + } write(path: Path, content: FileBuffer): void { return this._doSyncCall(this._delegate.write(path, content)); diff --git a/packages/angular_devkit/core/src/virtual-fs/host/test.ts b/packages/angular_devkit/core/src/virtual-fs/host/test.ts new file mode 100644 index 0000000000..e06a23ef69 --- /dev/null +++ b/packages/angular_devkit/core/src/virtual-fs/host/test.ts @@ -0,0 +1,49 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Path, join, normalize } from '..'; +import { stringToFileBuffer } from './buffer'; +import { SimpleMemoryHost } from './memory'; +import { SyncDelegateHost } from './sync'; + +export class TestHost extends SimpleMemoryHost { + protected _sync: SyncDelegateHost<{}>; + + constructor(map: { [path: string]: string } = {}) { + super(); + + for (const filePath of Object.getOwnPropertyNames(map)) { + this.write(normalize(filePath), stringToFileBuffer(map[filePath])); + } + debugger; + } + + get files(): Path[] { + const sync = this.sync; + function _visit(p: Path): Path[] { + return sync.list(p) + .map(fragment => join(p, fragment)) + .reduce((files, path) => { + if (sync.isDirectory(path)) { + return files.concat(_visit(path)); + } else { + return files.concat(path); + } + }, [] as Path[]); + } + + return _visit(normalize('/')); + } + + get sync() { + if (!this._sync) { + this._sync = new SyncDelegateHost<{}>(this); + } + + return this._sync; + } +} diff --git a/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts new file mode 100644 index 0000000000..f7c10305cc --- /dev/null +++ b/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +// tslint:disable:non-null-operator +import { TestHost } from './test'; + + +// Yes, we realize the irony of testing a test host. +describe('TestHost', () => { + + it('can list files', () => { + const files = { + '/x/y/z': '', + '/a': '', + '/h': '', + '/x/y/b': '', + }; + + const host = new TestHost(files); + expect(host.files.sort() as string[]).toEqual(Object.keys(files).sort()); + }); + +}); diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index 21f9bb687b..5f9afa2a02 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -21,6 +21,7 @@ ts_library( module_root = "src", deps = [ "//packages/angular_devkit/core", + "//packages/angular_devkit/core:node", # TODO: get rid of this for 6.0 # @deps: rxjs ], ) diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index 261bb65a4e..d639a3aaa0 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -34,12 +34,12 @@ export * from './rules/url'; export * from './tree/delegate'; export * from './tree/empty'; export * from './tree/filesystem'; -export * from './tree/memory-host'; export * from './tree/virtual'; export {UpdateRecorder} from './tree/interface'; export * from './engine/schematic'; export * from './sink/dryrun'; -export {FileSystemSink} from './sink/filesystem'; +export * from './sink/filesystem'; +export * from './sink/host'; import * as formats from './formats'; export { formats }; diff --git a/packages/angular_devkit/schematics/src/rules/base_spec.ts b/packages/angular_devkit/schematics/src/rules/base_spec.ts index ea85e5ccb3..8bf8d9becc 100644 --- a/packages/angular_devkit/schematics/src/rules/base_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/base_spec.ts @@ -7,10 +7,9 @@ */ // tslint:disable:no-implicit-dependencies // tslint:disable:non-null-operator -import { Path } from '@angular-devkit/core'; +import { Path, virtualFs } from '@angular-devkit/core'; import { FileSystemTree, - InMemoryFileSystemTreeHost, MergeStrategy, partitionApplyMerge, } from '@angular-devkit/schematics'; @@ -135,7 +134,7 @@ describe('apply', () => { describe('partitionApplyMerge', () => { it('works with simple rules', done => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/test1': '', '/test2': '', }); diff --git a/packages/angular_devkit/schematics/src/sink/dryrun.ts b/packages/angular_devkit/schematics/src/sink/dryrun.ts index 7e781a12b6..48511cd078 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun.ts @@ -5,10 +5,12 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { normalize, virtualFs } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; import { empty } from 'rxjs/observable/empty'; -import { FileSystemSink } from './filesystem'; +import { HostSink } from './host'; export interface DryRunErrorEvent { @@ -43,14 +45,31 @@ export type DryRunEvent = DryRunErrorEvent | DryRunRenameEvent; -export class DryRunSink extends FileSystemSink { +export class DryRunSink extends HostSink { protected _subject = new Subject(); protected _fileDoesNotExistExceptionSet = new Set(); protected _fileAlreadyExistExceptionSet = new Set(); readonly reporter: Observable = this._subject.asObservable(); - constructor(root = '', force = false) { super(root, force); } + /** + * @deprecated Use the virtualFs.Host constructor instead. + */ + constructor(dir: string, force?: boolean); + + /** + * @param {host} dir The host to use to output. This should be scoped. + * @param {boolean} force Whether to force overwriting files that already exist. + */ + constructor(host: virtualFs.Host, force?: boolean); + + constructor(host: virtualFs.Host | string, force = false) { + super(typeof host == 'string' + ? new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(host)) + : host, + force, + ); + } protected _fileAlreadyExistException(path: string): void { this._fileAlreadyExistExceptionSet.add(path); diff --git a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts index c4a2c502ce..129992c640 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts @@ -6,19 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:no-implicit-dependencies -import { normalize } from '@angular-devkit/core'; -import * as fs from 'fs'; -import * as path from 'path'; +import { normalize, virtualFs } from '@angular-devkit/core'; import { toArray } from 'rxjs/operators'; import { FileSystemCreateTree, FileSystemTree } from '../tree/filesystem'; -import { InMemoryFileSystemTreeHost } from '../tree/memory-host'; import { optimize } from '../tree/static'; import { DryRunSink } from './dryrun'; -const temp = require('temp'); - -const host = new InMemoryFileSystemTreeHost({ +const host = new virtualFs.test.TestHost({ '/hello': '', '/sub/file1': '', '/sub/directory/file2': '', @@ -26,12 +21,6 @@ const host = new InMemoryFileSystemTreeHost({ describe('DryRunSink', () => { - let outputRoot: string; - - beforeEach(() => { - outputRoot = temp.mkdirSync('schematics-spec-'); - }); - it('works when creating everything', done => { const tree = new FileSystemCreateTree(host); @@ -42,9 +31,9 @@ describe('DryRunSink', () => { tree.overwrite('/hello', 'world'); const files = ['/hello', '/sub/directory/file2', '/sub/file1', '/test']; - expect(tree.files).toEqual(files.map(normalize)); + expect(tree.files.sort()).toEqual(files.map(normalize)); - const sink = new DryRunSink(outputRoot); + const sink = new DryRunSink(new virtualFs.SimpleMemoryHost()); sink.reporter.pipe(toArray()) .toPromise() .then(infos => { @@ -69,15 +58,16 @@ describe('DryRunSink', () => { tree.overwrite('/hello', 'world'); const files = ['/hello', '/sub/directory/file2', '/sub/file1', '/test']; - expect(tree.files).toEqual(files.map(normalize)); + expect(tree.files.sort()).toEqual(files.map(normalize)); // Need to create this file on the filesystem, otherwise the commit phase will fail. - fs.writeFileSync(path.join(outputRoot, 'hello'), ''); - const sink = new DryRunSink(outputRoot); + const outputHost = new virtualFs.SimpleMemoryHost(); + outputHost.write(normalize('/hello'), virtualFs.stringToFileBuffer('')); + + const sink = new DryRunSink(outputHost); sink.reporter.pipe(toArray()) .toPromise() .then(infos => { - expect(infos.length).toBe(2); expect(infos.map(x => x.kind)).toEqual(['create', 'update']); }) .then(done, done.fail); diff --git a/packages/angular_devkit/schematics/src/sink/filesystem.ts b/packages/angular_devkit/schematics/src/sink/filesystem.ts index dbf0669681..16e1d0275f 100644 --- a/packages/angular_devkit/schematics/src/sink/filesystem.ts +++ b/packages/angular_devkit/schematics/src/sink/filesystem.ts @@ -5,101 +5,15 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import * as fs from 'fs'; -import { dirname, join } from 'path'; -import { Observable } from 'rxjs/Observable'; -import { VirtualFileSystemSink, VirtualFileSystemSinkHost } from './virtual-filesystem'; +import { normalize, virtualFs } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { HostSink } from './host'; - -export class FileSystemSinkHost implements VirtualFileSystemSinkHost { - constructor(protected _root: string) {} - - exists(path: string): Observable { - return new Observable(observer => { - fs.exists(join(this._root, path), exists => { - observer.next(exists); - observer.complete(); - }); - }); - } - - delete(path: string): Observable { - return new Observable(o => { - fs.unlink(join(this._root, path), (err) => { - if (err) { - o.error(err); - } else { - o.complete(); - } - }); - }); - } - - mkDir(path: string): void { - const paths = []; - for (; path != dirname(path); path = dirname(path)) { - if (fs.existsSync(path)) { - break; - } - paths.unshift(path); - } - paths.forEach(path => { - fs.mkdirSync(path); - }); - } - - write(path: string, content: Buffer): Observable { - path = join(this._root, path); - - return new Observable(o => { - this.mkDir(dirname(path)); - - fs.writeFile(path, content, (err) => { - if (err) { - o.error(err); - } else { - o.complete(); - } - }); - }); - } - - read(path: string): Observable { - path = join(this._root, path); - - return new Observable(o => { - fs.readFile(path, (err, data) => { - if (err) { - o.error(err); - } else { - o.next(data); - o.complete(); - } - }); - }); - } - - rename(from: string, to: string): Observable { - from = join(this._root, from); - to = join(this._root, to); - - return new Observable(o => { - this.mkDir(dirname(to)); - - fs.rename(from, to, err => { - if (err) { - o.error(err); - } else { - o.complete(); - } - }); - }); - } -} - - -export class FileSystemSink extends VirtualFileSystemSink { - constructor(protected _root: string, force?: boolean) { - super(new FileSystemSinkHost(_root), force); +/** + * @deprecated Use the new virtualFs.Host classes from @angular-devkit/core. + */ +export class FileSystemSink extends HostSink { + constructor(dir: string, force = false) { + super(new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(dir)), force); } } diff --git a/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts b/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts deleted file mode 100644 index b4a69aa0b5..0000000000 --- a/packages/angular_devkit/schematics/src/sink/filesystem_spec.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// tslint:disable:no-implicit-dependencies -import { normalize } from '@angular-devkit/core'; -import { FileSystemTree, FileSystemTreeHost } from '@angular-devkit/schematics'; -import * as fs from 'fs'; -import * as glob from 'glob'; -import * as path from 'path'; -import { join } from 'path'; -import { FileSystemCreateTree } from '../tree/filesystem'; -import { InMemoryFileSystemTreeHost } from '../tree/memory-host'; -import { optimize } from '../tree/static'; -import { FileSystemSink } from './filesystem'; - -const temp = require('temp'); - - -// Tools cannot be a dependency of schematics, so we just put the same interface here. -export class FileSystemHost implements FileSystemTreeHost { - constructor(private _root: string) {} - - listDirectory(path: string) { - return fs.readdirSync(join(this._root, path)); - } - isDirectory(path: string) { - return fs.statSync(join(this._root, path)).isDirectory(); - } - readFile(path: string) { - return fs.readFileSync(join(this._root, path)); - } - exists(path: string) { - return fs.existsSync(this.join(this._root, path)); - } - - join(path1: string, path2: string) { - return join(path1, path2); - } -} - - -describe('FileSystemSink', () => { - let outputRoot: string; - - beforeEach(() => { - outputRoot = temp.mkdirSync('schematics-spec-'); - }); - afterEach(() => { - // Delete the whole temporary directory. - function rmdir(systemPath: string) { - for (const name of fs.readdirSync(systemPath)) { - const systemName = path.join(systemPath, name); - if (fs.statSync(systemName).isDirectory()) { - rmdir(systemName); - fs.rmdirSync(systemName); - } else { - fs.unlinkSync(systemName); - } - } - } - - rmdir(outputRoot); - }); - - it('works', done => { - const host = new InMemoryFileSystemTreeHost({ - '/hello': 'world', - '/sub/directory/file2': '', - '/sub/file1': '', - }); - const tree = new FileSystemCreateTree(host); - - tree.create('/test', 'testing 1 2'); - const recorder = tree.beginUpdate('/test'); - recorder.insertLeft(8, 'testing '); - tree.commitUpdate(recorder); - - const files = ['/hello', '/sub/directory/file2', '/sub/file1', '/test']; - expect(tree.files).toEqual(files.map(normalize)); - - const sink = new FileSystemSink(outputRoot); - sink.commit(optimize(tree)) - .toPromise() - .then(() => { - const tmpFiles = glob.sync(join(outputRoot, '**/*'), { nodir: true }); - expect(tmpFiles.map(x => x.substr(outputRoot.length))).toEqual(files); - expect(fs.readFileSync(join(outputRoot, 'test'), 'utf-8')).toBe('testing testing 1 2'); - }) - .then(done, done.fail); - }); - - describe('complex tests', () => { - beforeEach(done => { - // Commit a version of the tree. - const host = new InMemoryFileSystemTreeHost({ - '/file0': '/file0', - '/sub/directory/file2': '/sub/directory/file2', - '/sub/file1': '/sub/file1', - }); - const tree = new FileSystemCreateTree(host); - - const sink = new FileSystemSink(outputRoot); - sink.commit(optimize(tree)) - .toPromise() - .then(done, done.fail); - }); - - it('can rename files', done => { - const tree = new FileSystemTree(new FileSystemHost(outputRoot)); - tree.rename('/file0', '/file1'); - - const sink = new FileSystemSink(outputRoot); - sink.commit(optimize(tree)) - .toPromise() - .then(() => { - expect(fs.existsSync(join(outputRoot, 'file0'))).toBe(false); - expect(fs.existsSync(join(outputRoot, 'file1'))).toBe(true); - }) - .then(done, done.fail); - }); - - - it('can rename nested files', done => { - const tree = new FileSystemTree(new FileSystemHost(outputRoot)); - tree.rename('/sub/directory/file2', '/another-directory/file2'); - - const sink = new FileSystemSink(outputRoot); - sink.commit(optimize(tree)) - .toPromise() - .then(() => { - expect(fs.existsSync(join(outputRoot, '/sub/directory/file2'))).toBe(false); - expect(fs.existsSync(join(outputRoot, '/another-directory/file2'))).toBe(true); - }) - .then(done, done.fail); - }); - - it('can delete and create the same file', done => { - const tree = new FileSystemTree(new FileSystemHost(outputRoot)); - tree.delete('/file0'); - tree.create('/file0', 'hello'); - - const sink = new FileSystemSink(outputRoot); - sink.commit(optimize(tree)) - .toPromise() - .then(done, done.fail); - }); - }); -}); diff --git a/packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts b/packages/angular_devkit/schematics/src/sink/host.ts similarity index 64% rename from packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts rename to packages/angular_devkit/schematics/src/sink/host.ts index 542bc77c16..4345194c1f 100644 --- a/packages/angular_devkit/schematics/src/sink/virtual-filesystem.ts +++ b/packages/angular_devkit/schematics/src/sink/host.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { Path, virtualFs } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { concat as concatObservables } from 'rxjs/observable/concat'; import { empty } from 'rxjs/observable/empty'; @@ -16,27 +17,19 @@ import { UpdateBuffer } from '../utility/update-buffer'; import { SimpleSinkBase } from './sink'; -export interface VirtualFileSystemSinkHost { - write(path: string, content: Buffer): Observable; - delete(path: string): Observable; - exists(path: string): Observable; - rename(path: string, to: string): Observable; -} - - -export abstract class VirtualFileSystemSink extends SimpleSinkBase { - protected _filesToDelete = new Set(); - protected _filesToRename = new Set<[string, string]>(); - protected _filesToCreate = new Map(); - protected _filesToUpdate = new Map(); +export class HostSink extends SimpleSinkBase { + protected _filesToDelete = new Set(); + protected _filesToRename = new Set<[Path, Path]>(); + protected _filesToCreate = new Map(); + protected _filesToUpdate = new Map(); - constructor(protected _host: VirtualFileSystemSinkHost, protected _force = false) { super(); } + constructor(protected _host: virtualFs.Host, protected _force = false) { super(); } protected _validateCreateAction(action: CreateFileAction): Observable { return this._force ? empty() : super._validateCreateAction(action); } - protected _validateFileExists(p: string): Observable { + protected _validateFileExists(p: Path): Observable { if (this._filesToCreate.has(p) || this._filesToUpdate.has(p)) { return observableOf(true); } else if (this._filesToDelete.has(p)) { @@ -46,22 +39,22 @@ export abstract class VirtualFileSystemSink extends SimpleSinkBase { } } - protected _overwriteFile(path: string, content: Buffer): Observable { + protected _overwriteFile(path: Path, content: Buffer): Observable { this._filesToUpdate.set(path, new UpdateBuffer(content)); return empty(); } - protected _createFile(path: string, content: Buffer): Observable { + protected _createFile(path: Path, content: Buffer): Observable { this._filesToCreate.set(path, new UpdateBuffer(content)); return empty(); } - protected _renameFile(from: string, to: string): Observable { + protected _renameFile(from: Path, to: Path): Observable { this._filesToRename.add([from, to]); return empty(); } - protected _deleteFile(path: string): Observable { + protected _deleteFile(path: Path): Observable { if (this._filesToCreate.has(path)) { this._filesToCreate.delete(path); this._filesToUpdate.delete(path); @@ -78,11 +71,15 @@ export abstract class VirtualFileSystemSink extends SimpleSinkBase { observableFrom([...this._filesToDelete.values()]).pipe( concatMap(path => this._host.delete(path))), observableFrom([...this._filesToCreate.entries()]).pipe( - concatMap(([path, buffer]) => this._host.write(path, buffer.generate()))), + concatMap(([path, buffer]) => { + return this._host.write(path, buffer.generate() as {} as virtualFs.FileBuffer); + })), observableFrom([...this._filesToRename.entries()]).pipe( concatMap(([_, [path, to]]) => this._host.rename(path, to))), observableFrom([...this._filesToUpdate.entries()]).pipe( - concatMap(([path, buffer]) => this._host.write(path, buffer.generate()))), + concatMap(([path, buffer]) => { + return this._host.write(path, buffer.generate() as {} as virtualFs.FileBuffer); + })), ).pipe(reduce(() => {})); } } diff --git a/packages/angular_devkit/schematics/src/sink/host_spec.ts b/packages/angular_devkit/schematics/src/sink/host_spec.ts new file mode 100644 index 0000000000..d850ec12a1 --- /dev/null +++ b/packages/angular_devkit/schematics/src/sink/host_spec.ts @@ -0,0 +1,114 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +import { normalize, virtualFs } from '@angular-devkit/core'; +import { FileSystemTree, HostSink } from '@angular-devkit/schematics'; +import { FileSystemCreateTree } from '../tree/filesystem'; +import { optimize } from '../tree/static'; + + +describe('FileSystemSink', () => { + it('works', done => { + const host = new virtualFs.test.TestHost({ + '/hello': 'world', + '/sub/directory/file2': '', + '/sub/file1': '', + }); + const tree = new FileSystemCreateTree(host); + + tree.create('/test', 'testing 1 2'); + const recorder = tree.beginUpdate('/test'); + recorder.insertLeft(8, 'testing '); + tree.commitUpdate(recorder); + + const files = ['/hello', '/sub/directory/file2', '/sub/file1', '/test']; + expect(tree.files).toEqual(files.map(normalize)); + + const outputHost = new virtualFs.test.TestHost(); + const sink = new HostSink(outputHost); + sink.commit(optimize(tree)) + .toPromise() + .then(() => { + const tmpFiles = outputHost.files; + expect(tmpFiles as string[]).toEqual(files); + expect(outputHost.sync.read(normalize('/test')).toString()) + .toBe('testing testing 1 2'); + }) + .then(done, done.fail); + }); + + describe('complex tests', () => { + beforeEach(done => { + // Commit a version of the tree. + const host = new virtualFs.test.TestHost({ + '/file0': '/file0', + '/sub/directory/file2': '/sub/directory/file2', + '/sub/file1': '/sub/file1', + }); + const tree = new FileSystemCreateTree(host); + + const outputHost = new virtualFs.test.TestHost(); + const sink = new HostSink(outputHost); + sink.commit(optimize(tree)) + .toPromise() + .then(done, done.fail); + }); + + it('can rename files', done => { + const host = new virtualFs.test.TestHost({ + '/file0': '/file0', + }); + const tree = new FileSystemTree(host); + tree.rename('/file0', '/file1'); + + const sink = new HostSink(host); + sink.commit(optimize(tree)) + .toPromise() + .then(() => { + expect(host.sync.exists(normalize('/file0'))).toBe(false); + expect(host.sync.exists(normalize('/file1'))).toBe(true); + }) + .then(done, done.fail); + }); + + + it('can rename nested files', done => { + const host = new virtualFs.test.TestHost({ + '/sub/directory/file2': '', + }); + const tree = new FileSystemTree(host); + tree.rename('/sub/directory/file2', '/another-directory/file2'); + + const sink = new HostSink(host); + sink.commit(optimize(tree)) + .toPromise() + .then(() => { + expect(host.sync.exists(normalize('/sub/directory/file2'))).toBe(false); + expect(host.sync.exists(normalize('/another-directory/file2'))).toBe(true); + }) + .then(done, done.fail); + }); + + it('can delete and create the same file', done => { + const host = new virtualFs.test.TestHost({ + '/file0': 'world', + }); + const tree = new FileSystemTree(host); + tree.delete('/file0'); + tree.create('/file0', 'hello'); + + const sink = new HostSink(host); + sink.commit(optimize(tree)) + .toPromise() + .then(() => { + expect(host.sync.read(normalize('/file0')).toString()).toBe('hello'); + }) + .then(done, done.fail); + }); + }); +}); diff --git a/packages/angular_devkit/schematics/src/tree/filesystem.ts b/packages/angular_devkit/schematics/src/tree/filesystem.ts index dcb7652ff3..5f647259d0 100644 --- a/packages/angular_devkit/schematics/src/tree/filesystem.ts +++ b/packages/angular_devkit/schematics/src/tree/filesystem.ts @@ -13,39 +13,24 @@ import { fragment, join, normalize, + virtualFs, } from '@angular-devkit/core'; import { LazyFileEntry } from './entry'; import { DirEntry, FileEntry, Tree } from './interface'; import { VirtualDirEntry, VirtualTree } from './virtual'; -export interface FileSystemTreeHost { - listDirectory: (path: string) => string[]; - isDirectory: (path: string) => boolean; - readFile: (path: string) => Buffer; - exists: (path: string) => boolean; - - join: (path1: string, other: string) => string; -} - - export class FileSystemDirEntry extends VirtualDirEntry { constructor( - protected _host: FileSystemTreeHost, + protected _host: virtualFs.SyncDelegateHost<{}>, tree: FileSystemTree, - protected _systemPath = '', path: Path = normalize('/'), ) { super(tree, path); } protected _createDir(name: PathFragment): DirEntry { - return new FileSystemDirEntry( - this._host, - this._tree as FileSystemTree, - this._host.join(this._systemPath, name), - join(this._path, name), - ); + return new FileSystemDirEntry(this._host, this._tree as FileSystemTree, join(this._path, name)); } get parent() { @@ -55,8 +40,8 @@ export class FileSystemDirEntry extends VirtualDirEntry { const result = new Set(); try { - this._host.listDirectory(this._systemPath) - .filter(name => this._host.isDirectory(this._host.join(this._systemPath, name))) + this._host.list(this._path) + .filter(name => this._host.isDirectory(join(this._path, name))) .forEach(name => result.add(fragment(name))); } catch (e) { if (e.code != 'ENOENT' && e.code != 'ENOTDIR') { @@ -76,8 +61,8 @@ export class FileSystemDirEntry extends VirtualDirEntry { const result = new Set(); try { - this._host.listDirectory(this._systemPath) - .filter(name => !this._host.isDirectory(this._host.join(this._systemPath, name))) + this._host.list(this._path) + .filter(name => !this._host.isDirectory(join(this._path, name))) .forEach(name => result.add(fragment(name))); } catch (e) { if (e.code != 'ENOENT' && e.code != 'ENOTDIR') { @@ -101,19 +86,24 @@ export class FileSystemDirEntry extends VirtualDirEntry { export class FileSystemTree extends VirtualTree { + // This needs to be SyncDelegateHost because schematics Trees are synchronous. + protected _host: virtualFs.SyncDelegateHost<{}>; protected _initialized = false; - constructor(private _host: FileSystemTreeHost) { + constructor(host: virtualFs.Host) { super(); - this._root = new FileSystemDirEntry(_host, this); + this._host = new virtualFs.SyncDelegateHost<{}>(host); + this._root = new FileSystemDirEntry(this._host, this); } get tree(): Map { const host = this._host; if (!this._initialized) { this._initialized = true; - this._recursiveFileList().forEach(([system, schematic]) => { - this._tree.set(schematic, new LazyFileEntry(schematic, () => host.readFile(system))); + this._recursiveFileList().forEach(path => { + this._tree.set(path, new LazyFileEntry(path, () => { + return new Buffer(host.read(path)); + })); }); } @@ -131,7 +121,7 @@ export class FileSystemTree extends VirtualTree { if (fileExists) { const host = this._host; - entry = new LazyFileEntry(normalizedPath, () => host.readFile(systemPath)); + entry = new LazyFileEntry(normalizedPath, () => new Buffer(host.read(systemPath))); this._tree.set(normalizedPath, entry); } } @@ -140,7 +130,7 @@ export class FileSystemTree extends VirtualTree { } branch(): Tree { - const newTree = new FileSystemTree(this._host); + const newTree = new FileSystemTree(this._host.delegate); this._copyTo(newTree); return newTree; @@ -161,23 +151,22 @@ export class FileSystemTree extends VirtualTree { } } - protected _recursiveFileList(): [ string, Path ][] { + protected _recursiveFileList(): Path[] { const host = this._host; - const list: [string, Path][] = []; + const list: Path[] = []; - function recurse(systemPath: string, schematicPath: string) { - for (const name of host.listDirectory(systemPath)) { - const systemName = host.join(systemPath, name); - const normalizedPath = normalize(schematicPath + '/' + name); + function recurse(schematicPath: Path) { + for (const name of host.list(schematicPath)) { + const normalizedPath = join(schematicPath, name); if (host.isDirectory(normalizedPath)) { - recurse(systemName, normalizedPath); + recurse(normalizedPath); } else { - list.push([systemName, normalizedPath]); + list.push(normalizedPath); } } } - recurse('', '/'); + recurse(normalize('/')); return list; } @@ -185,11 +174,11 @@ export class FileSystemTree extends VirtualTree { export class FileSystemCreateTree extends FileSystemTree { - constructor(host: FileSystemTreeHost) { + constructor(host: virtualFs.Host) { super(host); - this._recursiveFileList().forEach(([system, schematic]) => { - this.create(schematic, host.readFile(system)); + this._recursiveFileList().forEach(path => { + this.create(path, new Buffer(this._host.read(path))); }); this._initialized = true; } diff --git a/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts b/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts index e2be4a8694..fb042822f4 100644 --- a/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts +++ b/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts @@ -5,14 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { normalize, virtualFs } from '@angular-devkit/core'; import { FileSystemTree } from './filesystem'; -import { InMemoryFileSystemTreeHost } from './memory-host'; describe('FileSystem', () => { it('can create files', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': 'world', '/sub/directory/file2': '', '/sub/file1': '', diff --git a/packages/angular_devkit/schematics/src/tree/memory-host.ts b/packages/angular_devkit/schematics/src/tree/memory-host.ts deleted file mode 100644 index a9135218da..0000000000 --- a/packages/angular_devkit/schematics/src/tree/memory-host.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { normalize } from '@angular-devkit/core'; -import { FileSystemTreeHost } from './filesystem'; - - -export class InMemoryFileSystemTreeHost implements FileSystemTreeHost { - private _content: { [path: string]: Buffer }; - private _files: string[]; - constructor(content: { [path: string]: string }) { - this._content = Object.create(null); - Object.keys(content).forEach(path => { - path = normalize(path); - this._content[path] = new Buffer(content[path]); - }); - this._files = Object.keys(this._content); - } - - listDirectory(path: string) { - path = normalize(path).replace(/\/?$/, '/'); - - return Object.keys( - this._files - .filter(p => p.startsWith(path)) - .map(p => p.substr(path.length)) - .map(p => p.replace(/\/.*$/, '')) - .reduce((acc: {[k: string]: boolean}, p) => (acc[p] = true, acc), {}), - ).sort(); - } - isDirectory(path: string) { - path = normalize(path); - - return path == '/' || this._files.some(p => p.split('/').slice(0, -1).join('/') == path); - } - readFile(path: string) { - path = normalize(path); - - return this._content[path] || new Buffer(''); - } - exists(path: string) { - path = normalize(path); - - return this._content[path] != undefined; - } - - join(path1: string, path2: string) { - return normalize(path1 + '/' + path2); - } -} diff --git a/packages/angular_devkit/schematics/src/tree/node-host.ts b/packages/angular_devkit/schematics/src/tree/node-host.ts deleted file mode 100644 index 7736096a95..0000000000 --- a/packages/angular_devkit/schematics/src/tree/node-host.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import * as fs from 'fs'; -import { join } from 'path'; -import { FileSystemTreeHost } from './filesystem'; - - -export class NodeJsHost implements FileSystemTreeHost { - constructor(private _root: string) {} - - listDirectory(path: string) { - return fs.readdirSync(this.join(this._root, path)); - } - isDirectory(path: string) { - return fs.statSync(this.join(this._root, path)).isDirectory(); - } - readFile(path: string) { - return fs.readFileSync(this.join(this._root, path)); - } - exists(path: string) { - return fs.existsSync(this.join(this._root, path)); - } - - join(path1: string, path2: string) { - return join(path1, path2); - } -} diff --git a/packages/angular_devkit/schematics/src/tree/virtual_spec.ts b/packages/angular_devkit/schematics/src/tree/virtual_spec.ts index fd550c2a0d..a6fff947e8 100644 --- a/packages/angular_devkit/schematics/src/tree/virtual_spec.ts +++ b/packages/angular_devkit/schematics/src/tree/virtual_spec.ts @@ -6,11 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:non-null-operator -import { normalize } from '@angular-devkit/core'; +import { normalize, virtualFs } from '@angular-devkit/core'; import { FileAlreadyExistException, FileDoesNotExistException } from '../exception/exception'; import { FileSystemTree } from './filesystem'; import { FileEntry, MergeStrategy, Tree } from './interface'; -import { InMemoryFileSystemTreeHost } from './memory-host'; import { merge, partition } from './static'; import { VirtualTree } from './virtual'; @@ -33,7 +32,7 @@ describe('VirtualDirEntry', () => { '/sub1/sub2/file5': '/sub1/sub2/file5', '/sub3/file6': '', }; - const host = new InMemoryFileSystemTreeHost(files); + const host = new virtualFs.test.TestHost(files); const tree = new FileSystemTree(host); let allPaths: string[] = []; @@ -145,7 +144,7 @@ describe('VirtualTree', () => { describe('optimize', () => { it('works', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': 'world', }); const tree = new FileSystemTree(host); @@ -161,7 +160,7 @@ describe('VirtualTree', () => { }); it('works with branching', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': '', '/sub/file1': '', '/sub/directory/file2': '', @@ -176,7 +175,7 @@ describe('VirtualTree', () => { tree.overwrite('/test', 'test 3'); const expected = ['/hello', '/sub/directory/file2', '/sub/file1', '/test']; - expect(files(tree)).toEqual(expected.map(normalize)); + expect(files(tree).sort()).toEqual(expected.map(normalize)); const tree2 = tree.branch() as VirtualTree; expect(tree.actions.length).toBe(4); @@ -190,7 +189,7 @@ describe('VirtualTree', () => { describe('rename', () => { it('conflict fails', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': 'world', }); const tree = new FileSystemTree(host); @@ -204,7 +203,7 @@ describe('VirtualTree', () => { }); it('conflict works with overwrite', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': 'world', }); const tree = new FileSystemTree(host); @@ -220,7 +219,7 @@ describe('VirtualTree', () => { }); it('can rename files in base', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': 'world', }); const tree = new FileSystemTree(host); @@ -234,7 +233,7 @@ describe('VirtualTree', () => { }); it('can rename files created in staging', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ }); const tree = new FileSystemTree(host); @@ -248,7 +247,7 @@ describe('VirtualTree', () => { }); it('can rename branched and merged trees', () => { - const host = new InMemoryFileSystemTreeHost({ + const host = new virtualFs.test.TestHost({ '/hello': 'world', }); const tree = new FileSystemTree(host); diff --git a/packages/angular_devkit/schematics/tools/export-ref_spec.ts b/packages/angular_devkit/schematics/tools/export-ref_spec.ts index b7d9083132..2afb00dc91 100644 --- a/packages/angular_devkit/schematics/tools/export-ref_spec.ts +++ b/packages/angular_devkit/schematics/tools/export-ref_spec.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ import * as path from 'path'; +import { CollectionCannotBeResolvedException } from '.'; import { ExportStringRef } from './export-ref'; -import { FileSystemHost } from './file-system-host'; describe('ExportStringRef', () => { @@ -37,8 +37,10 @@ describe('ExportStringRef', () => { it('works on package names', () => { // META - const ref = new ExportStringRef('@angular-devkit/schematics/tools#FileSystemHost'); - expect(ref.ref).toEqual(FileSystemHost); + const ref = new ExportStringRef( + '@angular-devkit/schematics/tools#CollectionCannotBeResolvedException', + ); + expect(ref.ref).toEqual(CollectionCannotBeResolvedException); expect(ref.path).toBe(__dirname); expect(ref.module).toBe(path.join(__dirname, 'index.ts')); }); diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 6dfdda90fd..ccf399fff6 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -5,7 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException, JsonObject } from '@angular-devkit/core'; +import { BaseException, JsonObject, normalize, virtualFs } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { dirname, isAbsolute, join, resolve } from 'path'; import { Observable } from 'rxjs/Observable'; import { from as observableFrom } from 'rxjs/observable/from'; @@ -30,7 +31,6 @@ import { FileSystemSchematicDesc, FileSystemSchematicDescription, } from './description'; -import { FileSystemHost } from './file-system-host'; import { readJsonFile } from './file-system-utility'; @@ -245,9 +245,11 @@ export abstract class FileSystemEngineHostBase implements return (context: FileSystemSchematicContext) => { // Resolve all file:///a/b/c/d from the schematic's own path, and not the current // path. - const root = resolve(dirname(context.schematic.description.path), url.path || ''); + const root = normalize( + resolve(dirname(context.schematic.description.path), url.path || ''), + ); - return new FileSystemCreateTree(new FileSystemHost(root)); + return new FileSystemCreateTree(new virtualFs.ScopedHost(new NodeJsSyncHost(), root)); }; } diff --git a/packages/angular_devkit/schematics/tools/file-system-host.ts b/packages/angular_devkit/schematics/tools/file-system-host.ts index e349a4a7ee..cd8fba8d84 100644 --- a/packages/angular_devkit/schematics/tools/file-system-host.ts +++ b/packages/angular_devkit/schematics/tools/file-system-host.ts @@ -5,28 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { fs } from '@angular-devkit/core/node'; -import { existsSync, readFileSync, readdirSync } from 'fs'; -import { join } from 'path'; -import { FileSystemTreeHost } from '../src'; +import { normalize, virtualFs } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; -export class FileSystemHost implements FileSystemTreeHost { - constructor(private _root: string) {} - - listDirectory(path: string) { - return readdirSync(join(this._root, path)); - } - isDirectory(path: string) { - return fs.isDirectory(join(this._root, path)); - } - readFile(path: string) { - return readFileSync(join(this._root, path)); - } - exists(path: string) { - return existsSync(this.join(this._root, path)); - } - - join(path1: string, path2: string) { - return join(path1, path2); +/** + * @deprecated Please use a Host directly instead of this class. This will be removed prior to 1.0. + */ +export class FileSystemHost extends virtualFs.ScopedHost<{}> { + constructor(dir: string) { + super(new NodeJsSyncHost(), normalize(dir)); } } diff --git a/packages/angular_devkit/schematics/tools/index.ts b/packages/angular_devkit/schematics/tools/index.ts index 4ce36d5ec2..71bb85ca75 100644 --- a/packages/angular_devkit/schematics/tools/index.ts +++ b/packages/angular_devkit/schematics/tools/index.ts @@ -6,10 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ export * from './description'; -export * from './file-system-host'; export * from './file-system-engine-host-base'; +export * from './file-system-host'; -export { FallbackEngineHost } from './fallback-engine-host'; export { FileSystemEngineHost } from './file-system-engine-host'; export { NodeModulesEngineHost } from './node-module-engine-host'; export { NodeModulesTestEngineHost } from './node-modules-test-engine-host'; diff --git a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts index 26c4506644..003c0b5b75 100644 --- a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { NodeModulesEngineHost } from '../tools'; +import { NodeModulesEngineHost } from './node-module-engine-host'; /** diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index d78e3978d2..12ade640fd 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -7,23 +7,24 @@ * found in the LICENSE file at https://angular.io/license */ import { + normalize, schema, tags, terminal, + virtualFs, } from '@angular-devkit/core'; -import { createConsoleLogger } from '@angular-devkit/core/node'; +import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; import { DryRunEvent, DryRunSink, - FileSystemSink, FileSystemTree, + HostSink, SchematicEngine, Tree, formats, } from '@angular-devkit/schematics'; import { BuiltinTaskExecutor } from '@angular-devkit/schematics/tasks/node'; import { - FileSystemHost, NodeModulesEngineHost, validateOptionsWithSchema, } from '@angular-devkit/schematics/tools'; @@ -168,14 +169,17 @@ const debug: boolean = argv.debug === null ? isLocalCollection : argv.debug; const dryRun: boolean = argv['dry-run'] === null ? debug : argv['dry-run']; const force = argv['force']; +/** Create a Virtual FS Host scoped to where the process is being run. **/ +const fsHost = new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(process.cwd())); + /** This host is the original Tree created from the current directory. */ -const host = observableOf(new FileSystemTree(new FileSystemHost(process.cwd()))); +const host = observableOf(new FileSystemTree(fsHost)); // We need two sinks if we want to output what will happen, and actually do the work. // Note that fsSink is technically not used if `--dry-run` is passed, but creating the Sink // does not have any side effect. -const dryRunSink = new DryRunSink(process.cwd(), force); -const fsSink = new FileSystemSink(process.cwd(), force); +const dryRunSink = new DryRunSink(fsHost, force); +const fsSink = new HostSink(fsHost, force); // We keep a boolean to tell us whether an error would occur if we were to commit to an diff --git a/packages/schematics/package_update/utility/npm_spec.ts b/packages/schematics/package_update/utility/npm_spec.ts index 062a6d4381..3e7ed335f6 100644 --- a/packages/schematics/package_update/utility/npm_spec.ts +++ b/packages/schematics/package_update/utility/npm_spec.ts @@ -6,7 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:non-null-operator -import { FileSystemTree, InMemoryFileSystemTreeHost, Tree } from '@angular-devkit/schematics'; +import { virtualFs } from '@angular-devkit/core'; +import { FileSystemTree, Tree } from '@angular-devkit/schematics'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; import { updatePackageJson } from './npm'; @@ -20,7 +21,7 @@ describe('Schematic Update', () => { let inputTree: Tree; beforeEach(() => { - inputTree = new FileSystemTree(new InMemoryFileSystemTreeHost({ + inputTree = new FileSystemTree(new virtualFs.test.TestHost({ '/package.json': `{ "dependencies": { "@angular/core": "4.0.0", @@ -32,7 +33,6 @@ describe('Schematic Update', () => { }); it('works with a fixed version', done => { - debugger; const rule = updatePackageJson(['@angular/core', '@angular/compiler'], '4.1.0', false); schematicRunner.callRule(rule, inputTree) From b6d988bc2d0b3e714e1d0b4bed37ac950b125764 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 15:41:41 -0800 Subject: [PATCH 097/724] feat(@angular-devkit/core): add a PartiallyOrderedSet to utils in core --- .../angular_devkit/core/src/utils/index.ts | 1 + .../core/src/utils/partially-ordered-set.ts | 161 ++++++++++++++++++ .../src/utils/partially-ordered-set_spec.ts | 41 +++++ 3 files changed, 203 insertions(+) create mode 100644 packages/angular_devkit/core/src/utils/partially-ordered-set.ts create mode 100644 packages/angular_devkit/core/src/utils/partially-ordered-set_spec.ts diff --git a/packages/angular_devkit/core/src/utils/index.ts b/packages/angular_devkit/core/src/utils/index.ts index 4909fc7d13..4aa9bb9769 100644 --- a/packages/angular_devkit/core/src/utils/index.ts +++ b/packages/angular_devkit/core/src/utils/index.ts @@ -10,6 +10,7 @@ import * as strings from './strings'; export * from './object'; export * from './template'; +export * from './partially-ordered-set'; export * from './priority-queue'; export { tags, strings }; diff --git a/packages/angular_devkit/core/src/utils/partially-ordered-set.ts b/packages/angular_devkit/core/src/utils/partially-ordered-set.ts new file mode 100644 index 0000000000..6790734374 --- /dev/null +++ b/packages/angular_devkit/core/src/utils/partially-ordered-set.ts @@ -0,0 +1,161 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { BaseException } from '..'; + +export class DependencyNotFoundException extends BaseException { + constructor() { super('One of the dependencies is not part of the set.'); } +} +export class CircularDependencyFoundException extends BaseException { + constructor() { super('Circular dependencies found.'); } +} + +export class PartiallyOrderedSet implements Set { + private _items = new Map>(); + + protected _checkCircularDependencies(item: T, deps: Set) { + if (deps.has(item)) { + throw new CircularDependencyFoundException(); + } + + deps.forEach(dep => this._checkCircularDependencies(item, this._items.get(dep) || new Set())); + } + + clear() { + this._items.clear(); + } + has(item: T) { + return this._items.has(item); + } + get size() { + return this._items.size; + } + forEach( + callbackfn: (value: T, value2: T, set: PartiallyOrderedSet) => void, + thisArg?: any, // tslint:disable-line:no-any + ): void { + for (const x of this) { + callbackfn.call(thisArg, x, x, this); + } + } + + /** + * Returns an iterable of [v,v] pairs for every value `v` in the set. + */ + *entries(): IterableIterator<[T, T]> { + for (const item of this) { + yield [item, item]; + } + } + + /** + * Despite its name, returns an iterable of the values in the set, + */ + keys(): IterableIterator { + return this.values(); + } + + /** + * Returns an iterable of values in the set. + */ + values(): IterableIterator { + return this[Symbol.iterator](); + } + + + add(item: T, deps: (Set | T[]) = new Set()) { + if (Array.isArray(deps)) { + deps = new Set(deps); + } + + // Verify item is not already in the set. + if (this._items.has(item)) { + const itemDeps = this._items.get(item) || new Set(); + + // If the dependency list is equal, just return, otherwise remove and keep going. + let equal = true; + for (const dep of deps) { + if (!itemDeps.has(dep)) { + equal = false; + break; + } + } + if (equal) { + for (const dep of itemDeps) { + if (!deps.has(dep)) { + equal = false; + break; + } + } + } + + if (equal) { + return this; + } else { + this._items.delete(item); + } + } + + // Verify all dependencies are part of the Set. + for (const dep of deps) { + if (!this._items.has(dep)) { + throw new DependencyNotFoundException(); + } + } + + // Verify there's no dependency cycle. + this._checkCircularDependencies(item, deps); + + this._items.set(item, new Set(deps)); + + return this; + } + + delete(item: T) { + if (!this._items.has(item)) { + return false; + } + + // Remove it from all dependencies if force == true. + this._items.forEach(value => value.delete(item)); + + return this._items.delete(item); + } + + *[Symbol.iterator]() { + const copy: Map> = new Map(this._items); + + for (const [key, value] of copy.entries()) { + copy.set(key, new Set(value)); + } + + while (copy.size > 0) { + const run = []; + // Take the first item without dependencies. + for (const [item, deps] of copy.entries()) { + if (deps.size == 0) { + run.push(item); + } + } + + for (const item of run) { + copy.forEach(s => s.delete(item)); + copy.delete(item); + yield item; + } + + if (run.length == 0) { + // uh oh... + throw new CircularDependencyFoundException(); + } + } + } + + get [Symbol.toStringTag](): 'Set' { + return 'Set'; + } +} diff --git a/packages/angular_devkit/core/src/utils/partially-ordered-set_spec.ts b/packages/angular_devkit/core/src/utils/partially-ordered-set_spec.ts new file mode 100644 index 0000000000..31aa667cb5 --- /dev/null +++ b/packages/angular_devkit/core/src/utils/partially-ordered-set_spec.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { PartiallyOrderedSet } from './partially-ordered-set'; + +describe('PartiallyOrderedSet', () => { + it('can add an item', () => { + const set = new PartiallyOrderedSet(); + + set.add('hello'); + + expect([...set]).toEqual(['hello']); + }); + + it('can remove an item', () => { + const set = new PartiallyOrderedSet(); + + set.add('hello'); + set.add('world'); + + set.delete('world'); + + expect([...set]).toEqual(['hello']); + }); + + it('list items in determistic order of dependency', () => { + const set = new PartiallyOrderedSet(); + + set.add('red'); + set.add('yellow', ['red']); + set.add('green', ['red']); + set.add('blue'); + set.add('purple', ['red', 'blue']); + + expect([...set]).toEqual(['red', 'blue', 'yellow', 'green', 'purple']); + }); +}); From c40e3ca26fbb19b4ef96d26f544318cde4c5817a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 11:49:38 -0800 Subject: [PATCH 098/724] feat(@angular-devkit/core): add visitors for Json and Schema --- .../core/src/json/schema/index.ts | 1 + .../core/src/json/schema/registry.ts | 91 +-------- .../core/src/json/schema/visitor.ts | 184 ++++++++++++++++++ .../core/src/json/schema/visitor_spec.ts | 111 +++++++++++ 4 files changed, 301 insertions(+), 86 deletions(-) create mode 100644 packages/angular_devkit/core/src/json/schema/visitor.ts create mode 100644 packages/angular_devkit/core/src/json/schema/visitor_spec.ts diff --git a/packages/angular_devkit/core/src/json/schema/index.ts b/packages/angular_devkit/core/src/json/schema/index.ts index 3eabe58ebc..5824822c72 100644 --- a/packages/angular_devkit/core/src/json/schema/index.ts +++ b/packages/angular_devkit/core/src/json/schema/index.ts @@ -7,3 +7,4 @@ */ export * from './interface'; export * from './registry'; +export * from './visitor'; diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 732765df0d..fb7f430d95 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -11,7 +11,7 @@ import { Observable } from 'rxjs/Observable'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { of as observableOf } from 'rxjs/observable/of'; import { map } from 'rxjs/operators/map'; -import { JsonArray, JsonObject } from '../interface'; +import { JsonObject } from '../interface'; import { SchemaFormat, SchemaFormatter, @@ -19,88 +19,7 @@ import { SchemaValidator, SchemaValidatorResult, } from './interface'; - - -function _parseJsonPointer(pointer: string): string[] { - if (pointer === '') { return []; } - if (pointer.charAt(0) !== '/') { throw new Error('Invalid JSON pointer: ' + pointer); } - - return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); -} - - -interface JsonVisitor { - ( - current: JsonObject | JsonArray, - pointer: string, - parentSchema?: JsonObject | JsonArray, - index?: string, - ): void; -} - - -function _visitJsonSchema(schema: JsonObject, visitor: JsonVisitor) { - const keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - }; - - const propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true, - }; - - function _traverse( - schema: JsonObject | JsonArray, - jsonPtr: string, - rootSchema: JsonObject, - parentSchema?: JsonObject | JsonArray, - keyIndex?: string, - ) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - visitor(schema, jsonPtr, parentSchema, keyIndex); - - for (const key of Object.keys(schema)) { - const sch = schema[key]; - if (Array.isArray(sch)) { - if (key == 'items') { - for (let i = 0; i < sch.length; i++) { - _traverse( - sch[i] as JsonArray, - jsonPtr + '/' + key + '/' + i, - rootSchema, - schema, - '' + i, - ); - } - } - } else if (key in propsKeywords) { - if (sch && typeof sch == 'object') { - for (const prop of Object.keys(sch)) { - _traverse( - sch[prop] as JsonObject, - jsonPtr + '/' + key + '/' + prop.replace(/~/g, '~0').replace(/\//g, '~1'), - rootSchema, - schema, - prop, - ); - } - } - } else if (key in keywords) { - _traverse(sch as JsonObject, jsonPtr + '/' + key, rootSchema, schema, key); - } - } - } - } - - _traverse(schema, '', schema); -} +import { JsonPointer, parseJsonPointer, visitJsonSchema } from './visitor'; export class CoreSchemaRegistry implements SchemaRegistry { @@ -134,15 +53,15 @@ export class CoreSchemaRegistry implements SchemaRegistry { validate: ajv.ValidateFunction, parentDataCache: WeakMap, // tslint:disable-line:no-any ) { - _visitJsonSchema( + visitJsonSchema( schema, - (currentSchema: object, pointer: string, parentSchema?: object, index?: string) => { + (currentSchema: object, pointer: JsonPointer, parentSchema?: object, index?: string) => { // If we're at the root, skip. if (parentSchema === undefined || index === undefined) { return; } - const parsedPointer = _parseJsonPointer(pointer); + const parsedPointer = parseJsonPointer(pointer); // Every other path fragment is either 'properties', 'items', 'allOf', ... const nonPropertyParsedPP = parsedPointer.filter((_, i) => !(i % 2)); // Skip if it's part of a definitions or too complex for us to analyze. diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts new file mode 100644 index 0000000000..29b9c29966 --- /dev/null +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -0,0 +1,184 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Observable } from 'rxjs/Observable'; +import { from } from 'rxjs/observable/from'; +import { of as observableOf } from 'rxjs/observable/of'; +import { concat, concatMap, ignoreElements, mergeMap, tap } from 'rxjs/operators'; +import { observable } from 'rxjs/symbol/observable'; +import { JsonArray, JsonObject, JsonValue } from '..'; + +export type JsonPointer = string & { + __PRIVATE_DEVKIT_JSON_POINTER: void; +}; + +export interface JsonSchemaVisitor { + ( + current: JsonObject | JsonArray, + pointer: JsonPointer, + parentSchema?: JsonObject | JsonArray, + index?: string, + ): void; +} + +export interface JsonVisitor { + ( + value: JsonValue | undefined, + pointer: JsonPointer, + root?: JsonObject | JsonArray, + ): Observable | JsonValue | undefined; +} + + +export function buildJsonPointer(fragments: string[]): JsonPointer { + return ( + '/' + fragments.map(f => { + return f.replace(/~/g, '~0') + .replace(/\//g, '~1'); + }).join('/') + ) as JsonPointer; +} +export function joinJsonPointer(root: JsonPointer, ...others: string[]): JsonPointer { + if (root == '/') { + return buildJsonPointer(others); + } + + return (root + buildJsonPointer(others)) as JsonPointer; +} +export function parseJsonPointer(pointer: JsonPointer): string[] { + if (pointer === '') { return []; } + if (pointer.charAt(0) !== '/') { throw new Error('Relative pointer: ' + pointer); } + + return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); +} + +function _visitJsonRecursive( + json: JsonValue, + visitor: JsonVisitor, + ptr: JsonPointer, + root?: JsonObject | JsonArray, +): Observable { + const value = visitor(json, ptr, root); + + return ( + (typeof value == 'object' && value != null && observable in value) + ? value as Observable + : observableOf(value as JsonValue | undefined) + ).pipe( + concatMap((value: JsonValue | undefined) => { + if (Array.isArray(value)) { + return from(value).pipe( + mergeMap((item, i) => { + return _visitJsonRecursive( + item, + visitor, + joinJsonPointer(ptr, '' + i), + root || value, + ).pipe(tap(x => value[i] = x)); + }), + ignoreElements(), + concat(observableOf(value)), + ); + } else if (typeof value == 'object' && value !== null) { + return from(Object.getOwnPropertyNames(value)).pipe( + mergeMap(key => { + return _visitJsonRecursive( + value[key], + visitor, + joinJsonPointer(ptr, key), + root || value, + ).pipe(tap(x => value[key] = x)); + }), + ignoreElements(), + concat(observableOf(value)), + ); + } else { + return observableOf(value); + } + }), + ); +} + +/** + * Visit all the properties in a JSON object, allowing to transform them. It supports calling + * properties synchronously or asynchronously (through Observables). + * The original object can be mutated or replaced entirely. + * + * @param {JsonValue} json The Json value to visit. + * @param {JsonVisitor} visitor A function that will be called on every items. + * @returns {Observable< | undefined>} The observable of the new root, if the root changed. + */ +export function visitJson( + json: JsonValue, + visitor: JsonVisitor, +): Observable { + return _visitJsonRecursive(json, visitor, buildJsonPointer([])); +} + + +export function visitJsonSchema(schema: JsonObject, visitor: JsonSchemaVisitor) { + const keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true, + }; + + const propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true, + }; + + function _traverse( + schema: JsonObject | JsonArray, + jsonPtr: JsonPointer, + rootSchema: JsonObject, + parentSchema?: JsonObject | JsonArray, + keyIndex?: string, + ) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + visitor(schema, jsonPtr, parentSchema, keyIndex); + + for (const key of Object.keys(schema)) { + const sch = schema[key]; + if (Array.isArray(sch)) { + if (key == 'items') { + for (let i = 0; i < sch.length; i++) { + _traverse( + sch[i] as JsonArray, + joinJsonPointer(jsonPtr, key, '' + i), + rootSchema, + schema, + '' + i, + ); + } + } + } else if (key in propsKeywords) { + if (sch && typeof sch == 'object') { + for (const prop of Object.keys(sch)) { + _traverse( + sch[prop] as JsonObject, + joinJsonPointer(jsonPtr, key, prop), + rootSchema, + schema, + prop, + ); + } + } + } else if (key in keywords) { + _traverse(sch as JsonObject, joinJsonPointer(jsonPtr, key), rootSchema, schema, key); + } + } + } + } + + _traverse(schema, buildJsonPointer([]), schema); +} diff --git a/packages/angular_devkit/core/src/json/schema/visitor_spec.ts b/packages/angular_devkit/core/src/json/schema/visitor_spec.ts new file mode 100644 index 0000000000..8ee6a3bb55 --- /dev/null +++ b/packages/angular_devkit/core/src/json/schema/visitor_spec.ts @@ -0,0 +1,111 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Observable } from 'rxjs/Observable'; +import { from } from 'rxjs/observable/from'; +import { JsonObject, JsonValue } from '..'; +import { visitJson } from './visitor'; + + +function syncObs(obs: Observable): T { + let value: T; + let set = false; + + obs.forEach(x => { + if (set) { + throw new Error('Multiple value.'); + } + value = x; + set = true; + }); + + if (!set) { + throw new Error('Async observable.'); + } + + return value !; // tslint:disable-line:non-null-operator +} + + +describe('visitJson', () => { + it('works to replace the root', () => { + const json = { a: 1 }; + const newJson = {}; + + const result = syncObs(visitJson(json, () => newJson)); + expect(result).toBe(newJson); + }); + + it('goes through recursively if replacing root', () => { + const json = { a: 1 }; + const newJson = { b: 'hello ' }; + + const result = syncObs(visitJson(json, value => { + if (typeof value == 'object') { + return newJson; + } else { + return value + 'world'; + } + })); + expect(result).toEqual({ b: 'hello world' }); + expect(newJson).toEqual({ b: 'hello world' }); + }); + + it('goes through all replacements recursively', () => { + const json = { a: 1 }; + const newJson = { b: '' }; + const newJson2 = { c: [] }; + const newJson3 = [1, 2, 3]; + + const result = syncObs(visitJson(json, (value, ptr) => { + if (ptr.endsWith('a')) { + return newJson; + } else if (ptr.endsWith('b')) { + return newJson2; + } else if (ptr.endsWith('c')) { + return newJson3; + } else if (typeof value == 'number') { + return '_' + value; + } else if (ptr == '/') { + return value; + } else { + return 'abc'; + } + })); + + expect(result).toEqual({ a: { b: { c: ['_1', '_2', '_3'] } } }); + }); + + it('goes through all replacements recursively (async)', done => { + const json = { a: 1 }; + const newJson = { b: '' }; + const newJson2 = { c: [] }; + const newJson3 = [1, 2, 3]; + + visitJson(json, (value, ptr) => { + if (ptr.endsWith('a')) { + return from(Promise.resolve(newJson)); + } else if (ptr.endsWith('b')) { + return from(Promise.resolve(newJson2)); + } else if (ptr.endsWith('c')) { + return from(Promise.resolve(newJson3)); + } else if (typeof value == 'number') { + return from(Promise.resolve('_' + value)); + } else if (ptr == '/') { + return from(Promise.resolve(value)); + } else { + return from(Promise.resolve('abc')); + } + }).subscribe({ + next: result => { + expect(result).toEqual({ a: { b: { c: ['_1', '_2', '_3'] } } }); + }, + complete: done, + error: done.fail, + }); + }); +}); From 8d636bf6c0ae152e877a8fc4e5e7ebaf865b9bc7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Feb 2018 20:11:32 -0800 Subject: [PATCH 099/724] feat(@angular-devkit/core): add Pre/Post Data processing functions to registry --- .../core/src/json/schema/interface.ts | 2 + .../core/src/json/schema/registry.ts | 76 ++++++++++++------- .../core/src/json/schema/registry_spec.ts | 39 ++++++++++ 3 files changed, 90 insertions(+), 27 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index 71322f7136..774552bef3 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -6,9 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs/Observable'; +import { JsonValue } from '..'; export interface SchemaValidatorResult { + data: JsonValue; success: boolean; errors?: string[]; } diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index fb7f430d95..99fdfa89b4 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -10,8 +10,10 @@ import * as http from 'http'; import { Observable } from 'rxjs/Observable'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { of as observableOf } from 'rxjs/observable/of'; +import { concatMap, switchMap } from 'rxjs/operators'; import { map } from 'rxjs/operators/map'; -import { JsonObject } from '../interface'; +import { PartiallyOrderedSet } from '../../utils'; +import { JsonObject, JsonValue } from '../interface'; import { SchemaFormat, SchemaFormatter, @@ -19,12 +21,13 @@ import { SchemaValidator, SchemaValidatorResult, } from './interface'; -import { JsonPointer, parseJsonPointer, visitJsonSchema } from './visitor'; +import { JsonPointer, JsonVisitor, parseJsonPointer, visitJson, visitJsonSchema } from './visitor'; export class CoreSchemaRegistry implements SchemaRegistry { private _ajv: ajv.Ajv; private _uriCache = new Map(); + private _pre = new PartiallyOrderedSet(); constructor(formats: SchemaFormat[] = []) { /** @@ -148,6 +151,15 @@ export class CoreSchemaRegistry implements SchemaRegistry { }); } + /** + * Add a transformation step before the validation of any Json. + * @param {JsonVisitor} visitor The visitor to transform every value. + * @param {JsonVisitor[]} deps A list of other visitors to run before. + */ + addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]) { + this._pre.add(visitor, deps); + } + compile(schema: Object): Observable { // Supports both synchronous and asynchronous compilation, by trying the synchronous // version first, then if refs are missing this will fails. @@ -178,31 +190,41 @@ export class CoreSchemaRegistry implements SchemaRegistry { .pipe( // tslint:disable-next-line:no-any map(validate => (data: any): Observable => { - const result = validate(data); - const resultObs = typeof result == 'boolean' - ? observableOf(result) - : fromPromise(result as PromiseLike); - - return resultObs - .pipe( - map(result => { - if (result) { - // tslint:disable-next-line:no-any - const schemaDataMap = new WeakMap(); - schemaDataMap.set(schema, data); - - this._clean(data, schema as JsonObject, validate, schemaDataMap); - - return { success: true } as SchemaValidatorResult; - } - - return { - success: false, - errors: (validate.errors || []) - .map((err: ajv.ErrorObject) => `${err.dataPath} ${err.message}`), - } as SchemaValidatorResult; - }), - ); + let dataObs = observableOf(data); + this._pre.forEach(visitor => + dataObs = dataObs.pipe( + concatMap(data => visitJson(data as JsonValue, visitor)), + ), + ); + + return dataObs.pipe( + switchMap(updatedData => { + const result = validate(updatedData); + + return typeof result == 'boolean' + ? observableOf([updatedData, result]) + : fromPromise((result as PromiseLike) + .then(result => [updatedData, result])); + }), + map(([data, valid]) => { + if (valid) { + // tslint:disable-next-line:no-any + const schemaDataMap = new WeakMap(); + schemaDataMap.set(schema, data); + + this._clean(data, schema as JsonObject, validate, schemaDataMap); + + return { data, success: true } as SchemaValidatorResult; + } + + return { + data, + success: false, + errors: (validate.errors || []) + .map((err: ajv.ErrorObject) => `${err.dataPath} ${err.message}`), + } as SchemaValidatorResult; + }), + ); }), ); } diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index dd76cae266..bfbe11fdf3 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -5,6 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +// tslint:disable:no-any +// tslint:disable:non-null-operator import { of as observableOf } from 'rxjs/observable/of'; import { map, mergeMap } from 'rxjs/operators'; import { CoreSchemaRegistry } from './registry'; @@ -42,6 +44,43 @@ describe('CoreSchemaRegistry', () => { .subscribe(done, done.fail); }); + it('supports pre transforms', done => { + const registry = new CoreSchemaRegistry(); + const data: any = {}; // tslint:disable-line:no-any + + registry.addPreTransform((data, ptr) => { + if (ptr == '/') { + return { str: 'string' }; + } + + return data; + }); + + registry + .compile({ + properties: { + bool: { type: 'boolean' }, + str: { type: 'string', default: 'someString' }, + obj: { + properties: { + num: { type: 'number' }, + other: { type: 'number', default: 0 }, + }, + }, + }, + }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + const data = result.data as any; + expect(result.success).toBe(true); + expect(data.str).toBe('string'); + expect(data.obj.num).toBeUndefined(); + }), + ) + .subscribe(done, done.fail); + }); + // Synchronous failure is only used internally. // If it's meant to be used externally then this test should change to truly be synchronous // (i.e. not relyign on the observable). From bd01ef7b74cbe1f2bdeef501b6da324aac2068ba Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 8 Feb 2018 16:33:24 -0800 Subject: [PATCH 100/724] feat(@angular-devkit/core): add support for passing schema in visitors --- .../core/src/json/schema/visitor.ts | 71 +++++++++++++++++-- .../core/src/json/schema/visitor_spec.ts | 46 ++++++++++++ 2 files changed, 112 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index 29b9c29966..91a46dcaa3 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -29,11 +29,17 @@ export interface JsonVisitor { ( value: JsonValue | undefined, pointer: JsonPointer, + schema?: JsonObject, root?: JsonObject | JsonArray, ): Observable | JsonValue | undefined; } +export interface ReferenceResolver { + (ref: string, context?: ContextT): { context?: ContextT, schema?: JsonObject }; +} + + export function buildJsonPointer(fragments: string[]): JsonPointer { return ( '/' + fragments.map(f => { @@ -56,13 +62,53 @@ export function parseJsonPointer(pointer: JsonPointer): string[] { return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); } -function _visitJsonRecursive( +function _getObjectSubSchema( + schema: JsonObject | undefined, + key: string, +): JsonObject | undefined { + if (typeof schema !== 'object' || schema === null) { + return undefined; + } + + // Is it an object schema? + if (typeof schema.properties == 'object' || schema.type == 'object') { + if (typeof schema.properties == 'object' + && typeof (schema.properties as JsonObject)[key] == 'object') { + return (schema.properties as JsonObject)[key] as JsonObject; + } + if (typeof schema.additionalProperties == 'object') { + return schema.additionalProperties as JsonObject; + } + + return undefined; + } + + // Is it an array schema? + if (typeof schema.items == 'object' || schema.type == 'array') { + return typeof schema.items == 'object' ? (schema.items as JsonObject) : undefined; + } + + return undefined; +} + +function _visitJsonRecursive( json: JsonValue, visitor: JsonVisitor, ptr: JsonPointer, + schema?: JsonObject, + refResolver?: ReferenceResolver, + context?: ContextT, // tslint:disable-line:no-any root?: JsonObject | JsonArray, ): Observable { - const value = visitor(json, ptr, root); + if (schema && schema.hasOwnProperty('$ref') && typeof schema['$ref'] == 'string') { + if (refResolver) { + const resolved = refResolver(schema['$ref'] as string, context); + schema = resolved.schema; + context = resolved.context; + } + } + + const value = visitor(json, ptr, schema, root); return ( (typeof value == 'object' && value != null && observable in value) @@ -77,6 +123,9 @@ function _visitJsonRecursive( item, visitor, joinJsonPointer(ptr, '' + i), + _getObjectSubSchema(schema, '' + i), + refResolver, + context, root || value, ).pipe(tap(x => value[i] = x)); }), @@ -90,6 +139,9 @@ function _visitJsonRecursive( value[key], visitor, joinJsonPointer(ptr, key), + _getObjectSubSchema(schema, key), + refResolver, + context, root || value, ).pipe(tap(x => value[key] = x)); }), @@ -106,17 +158,26 @@ function _visitJsonRecursive( /** * Visit all the properties in a JSON object, allowing to transform them. It supports calling * properties synchronously or asynchronously (through Observables). - * The original object can be mutated or replaced entirely. + * The original object can be mutated or replaced entirely. In case where it's replaced, the new + * value is returned. When it's mutated though the original object will be changed. + * + * Please note it is possible to have an infinite loop here (which will result in a stack overflow) + * if you return 2 objects that references each others (or the same object all the time). * * @param {JsonValue} json The Json value to visit. * @param {JsonVisitor} visitor A function that will be called on every items. + * @param {JsonObject} schema A JSON schema to pass through to the visitor (where possible). + * @param refResolver a function to resolve references in the schema. * @returns {Observable< | undefined>} The observable of the new root, if the root changed. */ -export function visitJson( +export function visitJson( json: JsonValue, visitor: JsonVisitor, + schema?: JsonObject, + refResolver?: ReferenceResolver, + context?: ContextT, // tslint:disable-line:no-any ): Observable { - return _visitJsonRecursive(json, visitor, buildJsonPointer([])); + return _visitJsonRecursive(json, visitor, buildJsonPointer([]), schema, refResolver, context); } diff --git a/packages/angular_devkit/core/src/json/schema/visitor_spec.ts b/packages/angular_devkit/core/src/json/schema/visitor_spec.ts index 8ee6a3bb55..3d6f10cbc8 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor_spec.ts @@ -108,4 +108,50 @@ describe('visitJson', () => { error: done.fail, }); }); + + it('works with schema', () => { + const schema = { + properties: { + bool: { type: 'boolean' }, + str: { type: 'string', default: 'someString' }, + obj: { + properties: { + num: { type: 'number' }, + other: { type: 'number', default: 0 }, + }, + }, + }, + }; + + const allPointers: { [ptr: string]: JsonObject | undefined } = {}; + function visitor(value: JsonValue, ptr: string, schema?: JsonObject) { + expect(allPointers[ptr]).toBeUndefined(); + allPointers[ptr] = schema; + + return value; + } + + const json = { + bool: true, + str: 'hello', + obj: { + num: 1, + }, + }; + + const result = syncObs(visitJson(json, visitor, schema)); + + expect(result).toEqual({ + bool: true, + str: 'hello', + obj: { num: 1 }, + }); + expect(allPointers).toEqual({ + '/': schema, + '/bool': schema.properties.bool, + '/str': schema.properties.str, + '/obj': schema.properties.obj, + '/obj/num': schema.properties.obj.properties.num, + }); + }); }); From 68da660c0d18649ef53a19135d3643a3553b118a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 8 Feb 2018 17:16:22 -0800 Subject: [PATCH 101/724] feat(@angular-devkit/core): add post transforms to registry And move _clean to a post transform. --- .../core/src/json/schema/index.ts | 4 + .../core/src/json/schema/registry.ts | 138 +++++++++--------- .../core/src/json/schema/transforms.ts | 42 ++++++ .../src/formats/format-validator.ts | 7 +- 4 files changed, 115 insertions(+), 76 deletions(-) create mode 100644 packages/angular_devkit/core/src/json/schema/transforms.ts diff --git a/packages/angular_devkit/core/src/json/schema/index.ts b/packages/angular_devkit/core/src/json/schema/index.ts index 5824822c72..01c8e6e949 100644 --- a/packages/angular_devkit/core/src/json/schema/index.ts +++ b/packages/angular_devkit/core/src/json/schema/index.ts @@ -8,3 +8,7 @@ export * from './interface'; export * from './registry'; export * from './visitor'; + +import * as transforms from './transforms'; + +export { transforms }; diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 99fdfa89b4..6d541c850e 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -21,13 +21,15 @@ import { SchemaValidator, SchemaValidatorResult, } from './interface'; -import { JsonPointer, JsonVisitor, parseJsonPointer, visitJson, visitJsonSchema } from './visitor'; +import { addUndefinedDefaults } from './transforms'; +import { JsonVisitor, visitJson } from './visitor'; export class CoreSchemaRegistry implements SchemaRegistry { private _ajv: ajv.Ajv; private _uriCache = new Map(); private _pre = new PartiallyOrderedSet(); + private _post = new PartiallyOrderedSet(); constructor(formats: SchemaFormat[] = []) { /** @@ -48,74 +50,8 @@ export class CoreSchemaRegistry implements SchemaRegistry { }); this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - } - - private _clean( - data: any, // tslint:disable-line:no-any - schema: JsonObject, - validate: ajv.ValidateFunction, - parentDataCache: WeakMap, // tslint:disable-line:no-any - ) { - visitJsonSchema( - schema, - (currentSchema: object, pointer: JsonPointer, parentSchema?: object, index?: string) => { - // If we're at the root, skip. - if (parentSchema === undefined || index === undefined) { - return; - } - - const parsedPointer = parseJsonPointer(pointer); - // Every other path fragment is either 'properties', 'items', 'allOf', ... - const nonPropertyParsedPP = parsedPointer.filter((_, i) => !(i % 2)); - // Skip if it's part of a definitions or too complex for us to analyze. - if (nonPropertyParsedPP.some(f => f == 'definitions' || f == 'allOf' || f == 'anyOf')) { - return; - } - - let maybeParentData = parentDataCache.get(parentSchema); - if (!maybeParentData) { - // Every other path fragment is either 'properties' or 'items' in this model. - const parentDataPointer = parsedPointer.filter((_, i) => i % 2); - - // Find the parentData from the list. - maybeParentData = data; - for (const index of parentDataPointer.slice(0, -1)) { - if (maybeParentData[index] === undefined) { - // tslint:disable-next-line:no-any - if (parentSchema.hasOwnProperty('items') || (parentSchema as any)['type'] == 'array') { - maybeParentData[index] = []; - } else { - maybeParentData[index] = {}; - } - } - maybeParentData = maybeParentData[index]; - } - parentDataCache.set(parentSchema, maybeParentData); - } - - if (currentSchema.hasOwnProperty('$ref')) { - const $ref = (currentSchema as { $ref: string })['$ref']; - const refHash = $ref.split('#', 2)[1]; - const refUrl = $ref.startsWith('#') ? $ref : $ref.split('#', 1); - - let refVal = validate; - if (!$ref.startsWith('#')) { - // tslint:disable-next-line:no-any - refVal = (validate.refVal as any)[(validate.refs as any)[refUrl[0]]]; - } - if (refHash) { - // tslint:disable-next-line:no-any - refVal = (refVal.refVal as any)[(refVal.refs as any)['#' + refHash]]; - } - maybeParentData[index] = {}; - this._clean(maybeParentData[index], refVal.schema as JsonObject, refVal, parentDataCache); - - return; - } else if (!maybeParentData.hasOwnProperty(index)) { - maybeParentData[index] = undefined; - } - }); + this.addPostTransform(addUndefinedDefaults); } private _fetch(uri: string): Promise { @@ -160,7 +96,41 @@ export class CoreSchemaRegistry implements SchemaRegistry { this._pre.add(visitor, deps); } - compile(schema: Object): Observable { + /** + * Add a transformation step after the validation of any Json. The JSON will not be validated + * after the POST, so if transformations are not compatible with the Schema it will not result + * in an error. + * @param {JsonVisitor} visitor The visitor to transform every value. + * @param {JsonVisitor[]} deps A list of other visitors to run before. + */ + addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]) { + this._post.add(visitor, deps); + } + + protected _resolver( + ref: string, + validate: ajv.ValidateFunction, + ): { context?: ajv.ValidateFunction, schema?: JsonObject } { + if (!validate) { + return {}; + } + + const refHash = ref.split('#', 2)[1]; + const refUrl = ref.startsWith('#') ? ref : ref.split('#', 1); + + if (!ref.startsWith('#')) { + // tslint:disable-next-line:no-any + validate = (validate.refVal as any)[(validate.refs as any)[refUrl[0]]]; + } + if (validate && refHash) { + // tslint:disable-next-line:no-any + validate = (validate.refVal as any)[(validate.refs as any)['#' + refHash]]; + } + + return { context: validate, schema: validate && validate.schema as JsonObject }; + } + + compile(schema: JsonObject): Observable { // Supports both synchronous and asynchronous compilation, by trying the synchronous // version first, then if refs are missing this will fails. // We also add any refs from external fetched schemas so that those will also be used @@ -193,7 +163,9 @@ export class CoreSchemaRegistry implements SchemaRegistry { let dataObs = observableOf(data); this._pre.forEach(visitor => dataObs = dataObs.pipe( - concatMap(data => visitJson(data as JsonValue, visitor)), + concatMap(data => { + return visitJson(data as JsonValue, visitor, schema, this._resolver, validate); + }), ), ); @@ -206,14 +178,36 @@ export class CoreSchemaRegistry implements SchemaRegistry { : fromPromise((result as PromiseLike) .then(result => [updatedData, result])); }), + switchMap(([data, valid]) => { + if (valid) { + let dataObs = observableOf(data); + this._post.forEach(visitor => + dataObs = dataObs.pipe( + concatMap(data => { + return visitJson( + data as JsonValue, + visitor, + schema, + this._resolver, + validate, + ); + }), + ), + ); + + return dataObs.pipe( + map(data => [data, valid]), + ); + } else { + return observableOf([data, valid]); + } + }), map(([data, valid]) => { if (valid) { // tslint:disable-next-line:no-any const schemaDataMap = new WeakMap(); schemaDataMap.set(schema, data); - this._clean(data, schema as JsonObject, validate, schemaDataMap); - return { data, success: true } as SchemaValidatorResult; } diff --git a/packages/angular_devkit/core/src/json/schema/transforms.ts b/packages/angular_devkit/core/src/json/schema/transforms.ts new file mode 100644 index 0000000000..df0e656563 --- /dev/null +++ b/packages/angular_devkit/core/src/json/schema/transforms.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonArray, JsonObject, JsonValue } from '..'; +import { JsonPointer } from './visitor'; + + +export function addUndefinedDefaults( + value: JsonValue | undefined, + _pointer: JsonPointer, + schema?: JsonObject, + _root?: JsonObject | JsonArray, +): JsonValue | undefined { + if (value === undefined && schema) { + if (schema.items || schema.type == 'array') { + return []; + } + if (schema.properties || schema.type == 'object') { + const newValue: JsonObject = {}; + for (const propName of Object.getOwnPropertyNames(schema.properties || {})) { + newValue[propName] = undefined as any; // tslint:disable-line:no-any + } + + return newValue; + } + } else if (schema + && typeof value == 'object' && value + && (schema.properties || schema.type == 'object') + ) { + for (const propName of Object.getOwnPropertyNames(schema.properties || {})) { + (value as JsonObject)[propName] = (propName in value) + ? (value as JsonObject)[propName] + : undefined as any; // tslint:disable-line:no-any + } + } + + return value; +} diff --git a/packages/angular_devkit/schematics/src/formats/format-validator.ts b/packages/angular_devkit/schematics/src/formats/format-validator.ts index fec55c31e8..2bf673772d 100644 --- a/packages/angular_devkit/schematics/src/formats/format-validator.ts +++ b/packages/angular_devkit/schematics/src/formats/format-validator.ts @@ -5,15 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ - -import { schema } from '@angular-devkit/core'; +import { JsonObject, JsonValue, schema } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { mergeMap } from 'rxjs/operators'; export function formatValidator( - data: Object, - dataSchema: Object, + data: JsonValue, + dataSchema: JsonObject, formats: schema.SchemaFormat[], ): Observable { const registry = new schema.CoreSchemaRegistry(); From 9ff24826b6c3828a71724644330621474189c3dc Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Wed, 14 Feb 2018 15:42:05 +0200 Subject: [PATCH 102/724] feat(@angular-devkit/core): allow trailing commas in loose JSON --- .../angular_devkit/core/src/json/parser.ts | 19 ++++++++++++++----- .../core/src/json/parser_spec.ts | 7 +++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/core/src/json/parser.ts b/packages/angular_devkit/core/src/json/parser.ts index 4604a7602c..765b609425 100644 --- a/packages/angular_devkit/core/src/json/parser.ts +++ b/packages/angular_devkit/core/src/json/parser.ts @@ -378,7 +378,11 @@ function _readArray(context: JsonParserContext, comments = _readBlanks(context)) while (_peek(context) != ']') { _token(context, ','); - const node = _readValue(context); + const valueComments = _readBlanks(context); + if ((context.mode & JsonParseMode.TrailingCommasAllowed) !== 0 && _peek(context) === ']') { + break; + } + const node = _readValue(context, valueComments); elements.push(node); value.push(node.value); } @@ -505,7 +509,11 @@ function _readObject(context: JsonParserContext, while (_peek(context) != '}') { _token(context, ','); - const property = _readProperty(context); + const propertyComments = _readBlanks(context); + if ((context.mode & JsonParseMode.TrailingCommasAllowed) !== 0 && _peek(context) === '}') { + break; + } + const property = _readProperty(context, propertyComments); value[property.key.value] = property.value.value; properties.push(property); } @@ -607,11 +615,10 @@ function _readBlanks(context: JsonParserContext): (JsonAstComment | JsonAstMulti * Read a JSON value from the context, which can be any form of JSON value. * @private */ -function _readValue(context: JsonParserContext): JsonAstNode { +function _readValue(context: JsonParserContext, comments = _readBlanks(context)): JsonAstNode { let result: JsonAstNode; // Clean up before. - const comments = _readBlanks(context); const char = _peek(context); switch (char) { case undefined: @@ -673,9 +680,11 @@ export enum JsonParseMode { CommentsAllowed = 1 << 0, // Allows comments, both single or multi lines. SingleQuotesAllowed = 1 << 1, // Allow single quoted strings. IdentifierKeyNamesAllowed = 1 << 2, // Allow identifiers as objectp properties. + TrailingCommasAllowed = 1 << 3, Default = Strict, - Loose = CommentsAllowed | SingleQuotesAllowed | IdentifierKeyNamesAllowed, + Loose = CommentsAllowed | SingleQuotesAllowed | + IdentifierKeyNamesAllowed | TrailingCommasAllowed, } diff --git a/packages/angular_devkit/core/src/json/parser_spec.ts b/packages/angular_devkit/core/src/json/parser_spec.ts index 6f6a79a605..d6294306e5 100644 --- a/packages/angular_devkit/core/src/json/parser_spec.ts +++ b/packages/angular_devkit/core/src/json/parser_spec.ts @@ -240,6 +240,13 @@ describe('parseJson and parseJsonAst', () => { '{\n/* hello\n*/ }': [[0, 0, 0], [15, 2, 4], {}], '{}// ': [[0, 0, 0], [2, 0, 2], {}, '{}'], '{}//': [[0, 0, 0], [2, 0, 2], {}, '{}'], + '{hello:0,}': [[0, 0, 0], [10, 0, 10], {hello: 0}], + '{hello:0/**/,}': [[0, 0, 0], [14, 0, 14], {hello: 0}], + '{hello:0,/**/}': [[0, 0, 0], [14, 0, 14], {hello: 0}], + '{hi:["hello",]}': [[0, 0, 0], [15, 0, 15], {hi: ['hello']}], + '{hi:["hello",/* */]}': [[0, 0, 0], [20, 0, 20], {hi: ['hello']}], + '{hi:["hello"/* */,]}': [[0, 0, 0], [20, 0, 20], {hi: ['hello']}], + '{hi:["hello" , ] , }': [[0, 0, 0], [20, 0, 20], {hi: ['hello']}], }; const errors = [ '{1b: 0}', From c7f933a3b3b38a4a3157764bf17d4f55e8e36152 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 13 Feb 2018 09:09:38 -0800 Subject: [PATCH 103/724] ci: add validation for wip scope --- .circleci/config.yml | 2 +- package-lock.json | 35 +++++++++++++++++++++++++++++++ package.json | 4 +++- scripts/hooks/pre-push.ts | 42 +++++++++++++++++++++++++++++++++++++ scripts/validate-commits.ts | 20 ++++++++++++++++-- 5 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 scripts/hooks/pre-push.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index e2dc962485..921234b8c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: key: angular_devkit-{{ checksum "package-lock.json" }} - run: npm install --no-save - - run: npm run validate + - run: npm run validate -- --ci test: <<: *defaults diff --git a/package-lock.json b/package-lock.json index f0d4c2ded5..cf6a406165 100644 --- a/package-lock.json +++ b/package-lock.json @@ -442,6 +442,11 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, + "ci-info": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", + "integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==" + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -1995,6 +2000,28 @@ "sshpk": "1.13.1" } }, + "husky": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", + "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", + "requires": { + "is-ci": "1.1.0", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + } + } + }, "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", @@ -2048,6 +2075,14 @@ "builtin-modules": "1.1.1" } }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "requires": { + "ci-info": "1.1.2" + } + }, "is-dotfile": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", diff --git a/package.json b/package.json index d2cc9350f6..d4d42ff132 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "integration": "npm run build && npm run integration:build-optimizer", "integration:build-optimizer": "npm run integration:build-optimizer:simple && npm run integration:build-optimizer:aio", "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark", - "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark" + "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark", + "prepush": "node ./bin/devkit-admin hooks/pre-push" }, "repository": { "type": "git", @@ -61,6 +62,7 @@ "chokidar": "^1.7.0", "conventional-changelog": "^1.1.0", "glob": "^7.0.3", + "husky": "^0.14.3", "istanbul": "^0.4.5", "jasmine": "^2.6.0", "jasmine-spec-reporter": "^3.2.0", diff --git a/scripts/hooks/pre-push.ts b/scripts/hooks/pre-push.ts new file mode 100644 index 0000000000..34d599fdc3 --- /dev/null +++ b/scripts/hooks/pre-push.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-any +// tslint:disable:no-implicit-dependencies +import { logging } from '@angular-devkit/core'; +import * as readline from 'readline'; +import validateCommits from '../validate-commits'; + + +const emptySha = '0'.repeat(40); + + +export default function (_: {}, logger: logging.Logger) { + // Work on POSIX and Windows + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + terminal: false, + }); + + rl.on('line', line => { + const [, localSha, , remoteSha] = line.split(/\s+/); + + if (localSha == emptySha) { + // Deleted branch. + return; + } + + if (remoteSha == emptySha) { + // New branch. + validateCommits({ base: localSha }, logger); + } else { + validateCommits({ base: remoteSha, head: localSha }, logger); + } + }); + rl.on('end', () => process.exit(0)); +} diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index a69adc37ca..172e98cc80 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -11,7 +11,14 @@ import { execSync } from 'child_process'; import { packages } from '../lib/packages'; -export default function (_: {}, logger: logging.Logger) { +export interface ValidateCommitsOptions { + ci?: boolean; + base?: string; + head?: string; +} + + +export default function (argv: ValidateCommitsOptions, logger: logging.Logger) { logger.info('Getting merge base...'); const prNumber = process.env['CIRCLE_PR_NUMBER'] || ''; @@ -26,6 +33,9 @@ export default function (_: {}, logger: logging.Logger) { }).toString()); baseSha = prJson['base']['sha']; sha = prJson['head']['sha']; + } else if (argv.base) { + baseSha = argv.base; + sha = argv.head || 'HEAD'; } else { const parentRemote = process.env['GIT_REMOTE'] ? process.env['GIT_REMOTE'] + '/' : ''; const parentBranch = process.env['GIT_BRANCH'] || 'master'; @@ -110,9 +120,15 @@ export default function (_: {}, logger: logging.Logger) { } break; + case 'wip': + if (argv.ci) { + _invalid(sha, message, 'wip are not allowed in a PR'); + } + break; + // Unknown types. default: - _invalid(sha, message, 'has an unknown type'); + _invalid(sha, message, 'has an unknown type. You can use wip: to avoid this.'); } } From c9982b9cc5dc3f5001540aca47e3fc8b8272e595 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 13 Feb 2018 11:57:47 -0800 Subject: [PATCH 104/724] feat(@angular-devkit/schematics): add hidden and private to schematics description --- .../schematics/collection-schema.json | 10 ++++++ .../schematics/src/engine/collection.ts | 4 +-- .../schematics/src/engine/engine.ts | 16 ++++++++-- .../schematics/src/engine/interface.ts | 7 +++- .../schematics/src/rules/schematic.ts | 2 +- .../schematics/tools/description.ts | 2 +- .../tools/file-system-engine-host-base.ts | 6 +++- .../tools/file-system-engine-host_spec.ts | 32 +++++++++++++++++++ .../hidden-schematics/collection.json | 18 +++++++++++ .../private-schematics/collection.json | 18 +++++++++++ 10 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/hidden-schematics/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/private-schematics/collection.json diff --git a/packages/angular_devkit/schematics/collection-schema.json b/packages/angular_devkit/schematics/collection-schema.json index ac9642962f..02904358e1 100644 --- a/packages/angular_devkit/schematics/collection-schema.json +++ b/packages/angular_devkit/schematics/collection-schema.json @@ -41,6 +41,16 @@ "schema": { "type": "string", "description": "Location of the schema.json file of the schematic" + }, + "hidden": { + "type": "boolean", + "default": false, + "description": "Whether or not this schematic should be listed by the tooling. This does not prevent the tooling to run this schematic, just remove it name from listSchematicNames()." + }, + "private": { + "type": "boolean", + "default": false, + "description": "Whether or not this schematic can be called from an external schematic, or a tool. This implies hidden: true." } }, "required": [ diff --git a/packages/angular_devkit/schematics/src/engine/collection.ts b/packages/angular_devkit/schematics/src/engine/collection.ts index f7d36f1113..d15705c0fd 100644 --- a/packages/angular_devkit/schematics/src/engine/collection.ts +++ b/packages/angular_devkit/schematics/src/engine/collection.ts @@ -19,8 +19,8 @@ export class CollectionImpl'; } - createSchematic(name: string): Schematic { - return this._engine.createSchematic(name, this); + createSchematic(name: string, allowPrivate = false): Schematic { + return this._engine.createSchematic(name, this, allowPrivate); } listSchematicNames(): string[] { diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index a877e2f9fb..8981790dda 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -53,6 +53,12 @@ export class UnknownSchematicException extends BaseException { } } +export class PrivateSchematicException extends BaseException { + constructor(name: string, collection: CollectionDescription<{}>) { + super(`Schematic "${name}" not found in collection "${collection.name}".`); + } +} + export class SchematicEngineConflictingException extends BaseException { constructor() { super(`A schematic was called from a different engine as its parent.`); } } @@ -163,8 +169,10 @@ export class SchematicEngine): Schematic { + name: string, + collection: Collection, + allowPrivate = false, + ): Schematic { const collectionImpl = this._collectionCache.get(collection.description.name); const schematicMap = this._schematicCache.get(collection.description.name); if (!collectionImpl || !schematicMap || collectionImpl !== collection) { @@ -195,6 +203,10 @@ export class SchematicEngine(description, factory, collection, this); diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 746eccd98d..9b41c0ca47 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -31,6 +31,8 @@ export type SchematicDescription = SchematicMetadataT & { readonly collection: CollectionDescription; readonly name: string; + readonly private?: boolean; + readonly hidden?: boolean; }; @@ -111,7 +113,10 @@ export interface Collection; readonly baseDescriptions?: Array>; - createSchematic(name: string): Schematic; + createSchematic( + name: string, + allowPrivate?: boolean, + ): Schematic; listSchematicNames(): string[]; } diff --git a/packages/angular_devkit/schematics/src/rules/schematic.ts b/packages/angular_devkit/schematics/src/rules/schematic.ts index c9f1d57c5e..2aabae9ef2 100644 --- a/packages/angular_devkit/schematics/src/rules/schematic.ts +++ b/packages/angular_devkit/schematics/src/rules/schematic.ts @@ -39,7 +39,7 @@ export function externalSchematic(collectionName: string export function schematic(schematicName: string, options: OptionT): Rule { return (input: Tree, context: SchematicContext) => { const collection = context.schematic.collection; - const schematic = collection.createSchematic(schematicName); + const schematic = collection.createSchematic(schematicName, true); return schematic.call(options, observableOf(branch(input)), context); }; diff --git a/packages/angular_devkit/schematics/tools/description.ts b/packages/angular_devkit/schematics/tools/description.ts index c35dae3530..faf1857463 100644 --- a/packages/angular_devkit/schematics/tools/description.ts +++ b/packages/angular_devkit/schematics/tools/description.ts @@ -18,7 +18,7 @@ import { export interface FileSystemCollectionDescription { readonly path: string; readonly version?: string; - readonly schematics: { [name: string]: FileSystemSchematicJsonDescription }; + readonly schematics: { [name: string]: FileSystemSchematicDesc }; } diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index ccf399fff6..ce085e777c 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -108,11 +108,15 @@ export abstract class FileSystemEngineHostBase implements listSchematics(collection: FileSystemCollection): string[] { return this.listSchematicNames(collection.description); } - listSchematicNames(collection: FileSystemCollectionDescription) { + listSchematicNames(collection: FileSystemCollectionDesc) { const schematics: string[] = []; for (const key of Object.keys(collection.schematics)) { const schematic = collection.schematics[key]; + if (schematic.hidden || schematic.private) { + continue; + } + // If extends is present without a factory it is an alias, do not return it // unless it is from another collection. if (!schematic.extends || schematic.factory) { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts index 33dd6877f1..eb47b99976 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts @@ -209,4 +209,36 @@ describe('FileSystemEngineHost', () => { expect(() => engine.createCollection('invalid-aliases-2')).toThrow(); }); + + it('does not list hidden schematics', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + const collection = engine.createCollection('hidden-schematics'); + + expect(collection.listSchematicNames()).toEqual([ + 'schematic-1', + 'schematic-2', + ]); + }); + + it('does not list private schematics', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + const collection = engine.createCollection('private-schematics'); + + expect(collection.listSchematicNames()).toEqual([ + 'schematic-1', + 'schematic-2', + ]); + }); + + it('cannot instanciate a private schematic', () => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + + const collection = engine.createCollection('private-schematics'); + expect(() => engine.createSchematic('schematic-1', collection)).not.toThrow(); + expect(() => engine.createSchematic('private-schematic', collection)).toThrow(); + expect(() => collection.createSchematic('private-schematic')).toThrow(); + }); }); diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/hidden-schematics/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/hidden-schematics/collection.json new file mode 100644 index 0000000000..02a0e2af03 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/hidden-schematics/collection.json @@ -0,0 +1,18 @@ +{ + "name": "hidden-schematics", + "schematics": { + "schematic-1": { + "description": "1", + "factory": "../null-factory" + }, + "schematic-2": { + "description": "2", + "factory": "../null-factory" + }, + "hidden-schematic": { + "hidden": true, + "description": "h", + "factory": "../null-factory" + } + } +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/private-schematics/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/private-schematics/collection.json new file mode 100644 index 0000000000..ad46ecb87a --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/private-schematics/collection.json @@ -0,0 +1,18 @@ +{ + "name": "private-schematics", + "schematics": { + "schematic-1": { + "description": "1", + "factory": "../null-factory" + }, + "schematic-2": { + "description": "2", + "factory": "../null-factory" + }, + "private-schematic": { + "private": true, + "description": "h", + "factory": "../null-factory" + } + } +} From b2b754442b4b6ce6322648fb9732622e3f5a7d6b Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 15 Feb 2018 14:26:45 -0800 Subject: [PATCH 105/724] release: v0.4.0 --- .monorepo.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index aa21556ffd..f222d766ce 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.3.1", - "hash": "d99e730f5b1c9e8b585fb44ee61987c6" + "version": "0.4.0", + "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -53,8 +53,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.3.1", - "hash": "7b1a2ec24e8f7f829750a76da289224b", + "version": "0.4.0", + "hash": "5ff2fd3bdd025fe62471a4f3f7b77771", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/core": { @@ -65,8 +65,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.3.1", - "hash": "0d9f5622254e182f82887ab964e71f23", + "version": "0.4.0", + "hash": "4fa1b5f920f6910893231be350fef6ad", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -77,34 +77,34 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.3.1", - "hash": "d6db5094063c899602e29f1f819805d1", + "version": "0.4.0", + "hash": "6086c3641cd7aaa791969b4445ef8fa5", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.3.1", - "hash": "6910af904a9ed63d693c80ddac3ee2de", + "version": "0.4.0", + "hash": "7700a923b8e2aa023ce966949c73d62a", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.3.1", - "hash": "9293a8548489c8bde3b70ce94439d220", + "version": "0.4.0", + "hash": "131f18b9a0ca5897d13531c821a8e7ff", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.3.1", + "version": "0.4.0", "section": "Schematics", - "hash": "d7ede81252da518fb704a02a69ae06a1" + "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.3.1", + "version": "0.4.0", "section": "Schematics", - "hash": "9122b9f3dafd393f564d823a72ceffa8", + "hash": "bc5049e5880e03620a43791d12e4db57", "snapshotRepo": "angular/schematics-package-update-builds" } } From c6ae507c7d2ae480084df9d83289d9f869b1cbca Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 12 Feb 2018 13:26:14 -0500 Subject: [PATCH 106/724] refactor: set minimum node version to 8.9 --- .nvmrc | 2 +- package.json | 4 ++-- packages/angular_devkit/schematics_cli/package.json | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.nvmrc b/.nvmrc index 62f9457511..45a4fb75db 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -6 \ No newline at end of file +8 diff --git a/package.json b/package.json index d4d42ff132..067a86e201 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "url": "https://github.com/angular/devkit.git" }, "engines": { - "node": ">= 6.9.0", - "npm": ">= 3.0.0" + "node": ">= 8.9.0", + "npm": ">= 5.5.1" }, "author": "Angular Authors", "license": "MIT", diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index 4ce732692b..415b74c40f 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -16,6 +16,10 @@ "code generation", "schematics" ], + "engines": { + "node": ">= 8.9.0", + "npm": ">= 5.5.1" + }, "dependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", From f25116f85c7ee8a2e6c235cf66d75453470927b7 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 12 Feb 2018 13:39:55 -0500 Subject: [PATCH 107/724] build: update node types to support 8.9 --- package-lock.json | 12 ++++++------ package.json | 2 +- packages/angular_devkit/core/node/resolve.ts | 9 +++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index cf6a406165..79cf085c85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "requires": { "@types/events": "1.1.0", "@types/minimatch": "3.0.3", - "@types/node": "6.0.96" + "@types/node": "8.9.3" } }, "@types/istanbul": { @@ -45,9 +45,9 @@ "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" }, "@types/node": { - "version": "6.0.96", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.96.tgz", - "integrity": "sha512-fsOOY6tMQ3jCB2wD51XFDmmpgm4wVKkJECdcVRqapbJEa7awJDcr+SaH8toz+4r4KW8YQ3M7ybXMoSDo1QGewA==" + "version": "8.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.3.tgz", + "integrity": "sha512-wqrPE4Uvj2fmL0E5JFQiY7D/5bAKvVUfWTnQ5NEV35ULkAU0j3QuqIi9Qyrytz8M5hsrh8Kijt+FsdLQaZR+IA==" }, "@types/semver": { "version": "5.4.0", @@ -89,7 +89,7 @@ "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-3.8.2.tgz", "integrity": "sha512-q0MGM3Zfi63YQmj45j2pbfJ98GBbzVjMbJORe+O3T7X6aCyvJOd9e1fYsOPfwqpqD8Q/CfjyZOJmC/jE1WyYHg==", "requires": { - "@types/node": "6.0.96", + "@types/node": "8.9.3", "@types/tapable": "0.2.4", "@types/uglify-js": "2.6.30" } @@ -99,7 +99,7 @@ "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.4.tgz", "integrity": "sha512-IMdz6ipvym7Vag2a1pkfGqONZDE84+RRqeAZxGEFvBq2el82ymla4qvUVQt6+Kj+3OLRDeHnc2jCiSYAlPnHCw==", "requires": { - "@types/node": "6.0.96", + "@types/node": "8.9.3", "@types/source-list-map": "0.1.2", "source-map": "0.6.1" }, diff --git a/package.json b/package.json index 067a86e201..972b441c00 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/istanbul": "^0.4.29", "@types/jasmine": "^2.5.47", "@types/minimist": "^1.2.0", - "@types/node": "^6.0.36", + "@types/node": "^8.9.1", "@types/semver": "^5.3.30", "@types/source-map": "0.5.2", "@types/webpack": "^3.0.2", diff --git a/packages/angular_devkit/core/node/resolve.ts b/packages/angular_devkit/core/node/resolve.ts index b497121bbd..2846863bd1 100644 --- a/packages/angular_devkit/core/node/resolve.ts +++ b/packages/angular_devkit/core/node/resolve.ts @@ -58,14 +58,15 @@ function _getGlobalNodeModules() { globalPrefix = path.dirname(path.dirname(process.execPath)); // destdir only is respected on Unix - if (process.env.DESTDIR) { - globalPrefix = path.join(process.env.DESTDIR, globalPrefix); + const destdir = process.env.DESTDIR; + if (destdir) { + globalPrefix = path.join(destdir, globalPrefix); } } return (process.platform !== 'win32') - ? path.resolve(globalPrefix, 'lib', 'node_modules') - : path.resolve(globalPrefix, 'node_modules'); + ? path.resolve(globalPrefix || '', 'lib', 'node_modules') + : path.resolve(globalPrefix || '', 'node_modules'); } From cac7c7a41dee8a8fe599ad44d5971c4ca490cf9e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 12 Feb 2018 13:42:03 -0500 Subject: [PATCH 108/724] ci: update for node 8 --- .appveyor.yml | 2 +- .travis.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6824e4b356..bc5a2ad092 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ environment: matrix: - - nodejs_version: "6" + - nodejs_version: "8" matrix: fast_finish: true diff --git a/.travis.yml b/.travis.yml index d4cdd89768..a6f40ca5e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,10 @@ env: matrix: fast_finish: true include: - - node_js: "6" + - node_js: "8" os: linux env: SCRIPT=lint - - node_js: "6" + - node_js: "8" os: linux env: SCRIPT=test From 933d42757f0005693fe3b9770a3d8f9abf9d3093 Mon Sep 17 00:00:00 2001 From: ymeine Date: Mon, 5 Feb 2018 17:14:32 +0100 Subject: [PATCH 109/724] fix(@angular-devkit/schematics): VirtualDirEntry#subdirs, tests & misc. - `angular_devkit/schematics/tree/virtual` - the getter `subdirs` in class `VirtualDirEntry` was wrongly implemented, returning irrelevant data. Fix it. - simplify `subfiles` too. - testing was not done properly either, since a `FileSystemTree` instance was used (creating corresponding `FileSystemDirEntry` instances) in a test for `VirtualTree` (and its corresponding model `VirtualDirEntry`). Despite the inheritance, it wouldn't test it properly. Fix it. See below for more information on those tests. - fix in `angular_devkit/core/virtual-fs/path` - `split`: was not properly handling the case of the single root path (`/`) as well as paths with trailing slash; add some test cases - `dirname`: was not properly handling the case of a file directly under the root (`/file`) where it should return the root path (`/`); add some test cases - add a lot of test cases for `angular_devkit/schematics/tree/filesystem` and `angular_devkit/schematics/tree/virtual`, and make testing util common so we don't duplicate code and keep a consistent testing. - fix use case of root (`/`) in `angular_devkit/core/virtual-fs/host/memory:SimpleMemoryHost#_isDir` which was not returning true. Add according test. --- .../core/src/virtual-fs/host/memory.ts | 4 + .../core/src/virtual-fs/host/memory_spec.ts | 1 + .../core/src/virtual-fs/path.ts | 17 ++- .../core/src/virtual-fs/path_spec.ts | 4 + .../schematics/src/tree/common_spec.ts | 62 ++++++++++ .../schematics/src/tree/filesystem_spec.ts | 86 +++++++++++++- .../schematics/src/tree/virtual.ts | 22 +++- .../schematics/src/tree/virtual_spec.ts | 107 ++++++++++++------ 8 files changed, 257 insertions(+), 46 deletions(-) create mode 100644 packages/angular_devkit/schematics/src/tree/common_spec.ts diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index 61e6a031c0..b39fd4d045 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -41,6 +41,10 @@ export class SimpleMemoryHost implements Host<{}> { private _watchers = new Map][]>(); protected _isDir(path: Path) { + if (path === '/') { + return true; + } + for (const p of this._cache.keys()) { if (p.startsWith(path + NormalizedSep)) { return true; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts index 8721bbce49..be1c2c936b 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts @@ -107,6 +107,7 @@ describe('SimpleMemoryHost', () => { expect(host.isFile(normalize('/sub'))).toBe(false); expect(host.isFile(normalize('/sub1'))).toBe(false); + expect(host.isDirectory(normalize('/'))).toBe(true); expect(host.isDirectory(normalize('/sub'))).toBe(true); expect(host.isDirectory(normalize('/sub/sub1'))).toBe(true); expect(host.isDirectory(normalize('/sub/file1'))).toBe(false); diff --git a/packages/angular_devkit/core/src/virtual-fs/path.ts b/packages/angular_devkit/core/src/virtual-fs/path.ts index e435758a72..e9a9895ea0 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path.ts @@ -55,7 +55,12 @@ export const NormalizedRoot = NormalizedSep as Path; * @returns {Path[]} An array of path fragments. */ export function split(path: Path): PathFragment[] { - return path.split(NormalizedSep).map(x => fragment(x)); + const fragments = path.split(NormalizedSep).map(x => fragment(x)); + if (fragments[fragments.length - 1].length === 0) { + fragments.pop(); + } + + return fragments; } /** @@ -89,12 +94,14 @@ export function basename(path: Path): PathFragment { * Return the dirname of the path, as a Path. See path.dirname */ export function dirname(path: Path): Path { - const i = path.lastIndexOf(NormalizedSep); - if (i == -1) { + const index = path.lastIndexOf(NormalizedSep); + if (index === -1) { return '' as Path; - } else { - return normalize(path.substr(0, i)); } + + const endIndex = index === 0 ? 1 : index; // case of file under root: '/file' + + return normalize(path.substr(0, endIndex)); } diff --git a/packages/angular_devkit/core/src/virtual-fs/path_spec.ts b/packages/angular_devkit/core/src/virtual-fs/path_spec.ts index a3a485c69a..51b3289728 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path_spec.ts @@ -85,6 +85,9 @@ describe('path', () => { ['a', ['a']], ['/a/b', ['', 'a', 'b']], ['a/b', ['a', 'b']], + ['a/b/', ['a', 'b']], + ['', []], + ['/', ['']], ]; for (const goldens of tests) { @@ -142,6 +145,7 @@ describe('path', () => { it('dirname', () => { expect(dirname(normalize('a'))).toBe(''); + expect(dirname(normalize('/a'))).toBe('/'); expect(dirname(normalize('/a/b/c'))).toBe('/a/b'); expect(dirname(normalize('./c'))).toBe(''); expect(dirname(normalize('./a/b/c'))).toBe('a/b'); diff --git a/packages/angular_devkit/schematics/src/tree/common_spec.ts b/packages/angular_devkit/schematics/src/tree/common_spec.ts new file mode 100644 index 0000000000..1b23171159 --- /dev/null +++ b/packages/angular_devkit/schematics/src/tree/common_spec.ts @@ -0,0 +1,62 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:non-null-operator +import { normalize } from '@angular-devkit/core'; +import { Tree } from './interface'; + + +export interface VisitTestVisitSpec { + root: string; + expected?: string[]; + exception?: (spec: {path: string}) => Error; + focus?: boolean; +} + +export interface VisitTestSet { + name: string; + files: string[]; + visits: VisitTestVisitSpec[]; + focus?: boolean; +} + +export interface VisitTestSpec { + createTree: (paths: string[]) => Tree; + sets: VisitTestSet[]; +} + +export function testTreeVisit({createTree, sets}: VisitTestSpec) { + sets.forEach(({name, files: paths, visits, focus: focusSet}) => { + visits.forEach(({root, expected, exception, focus}) => { + if (expected == null) { expected = paths; } + + const that = focusSet || focus ? fit : it; + that(`can visit: ${name} from ${root}`, () => { + const tree = createTree(paths); + + const normalizedRoot = normalize(root); + + if (exception != null) { + expect(() => tree.getDir(normalizedRoot).visit(() => {})) + .toThrow(exception({path: normalizedRoot})); + + return; + } + + const allPaths: string[] = []; + tree.getDir(normalizedRoot) + .visit((path, entry) => { + expect(entry).not.toBeNull(); + expect(entry!.content.toString()).toEqual(path); + allPaths.push(path); + }); + + expect(allPaths).toEqual(expected!); + }); + }); + }); +} diff --git a/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts b/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts index fb042822f4..4d748943b5 100644 --- a/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts +++ b/packages/angular_devkit/schematics/src/tree/filesystem_spec.ts @@ -5,10 +5,94 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, virtualFs } from '@angular-devkit/core'; +// tslint:disable:non-null-operator +import { PathIsFileException, normalize, virtualFs } from '@angular-devkit/core'; +import { testTreeVisit } from './common_spec'; import { FileSystemTree } from './filesystem'; +describe('FileSystemDirEntry', () => { + testTreeVisit({ + createTree: paths => { + const files: {[key: string]: string} = {}; + paths.forEach(path => files[path] = path); + + const host = new virtualFs.test.TestHost(files); + const tree = new FileSystemTree(host); + + return tree; + }, + sets: [ + { + name: 'empty', + files: [], + visits: [ + {root: '/', expected: []}, + ], + }, + + { + name: 'file at root', + files: ['/file'], + visits: [ + {root: '/'}, + {root: '/file', exception: ({path}) => new PathIsFileException(path)}, + ], + }, + { + name: 'file under first level folder', + // duplicate use case: folder of single file at root + files: ['/folder/file'], + visits: [ + {root: '/'}, + {root: '/folder', expected: ['/folder/file']}, + {root: '/folder/file', exception: ({path}) => new PathIsFileException(path)}, + {root: '/wrong', expected: []}, + ], + }, + { + name: 'file under nested folder', + // duplicate use case: nested folder of files + files: ['/folder/nested_folder/file'], + visits: [ + {root: '/'}, + {root: '/folder', expected: ['/folder/nested_folder/file']}, + {root: '/folder/nested_folder', expected: ['/folder/nested_folder/file']}, + { + root: '/folder/nested_folder/file', + exception: ({path}) => new PathIsFileException(path), + }, + ], + }, + + { + name: 'nested folders', + // duplicate use case: folder of folders at root + // duplicate use case: folders of mixed + files: [ + '/folder/nested_folder0/file', + '/folder/nested_folder1/folder/file', + '/folder/nested_folder2/file', + '/folder/nested_folder2/folder/file', + ], + visits: [ + {root: '/'}, + {root: '/folder'}, + {root: '/folder/nested_folder0', expected: ['/folder/nested_folder0/file']}, + {root: '/folder/nested_folder1', expected: ['/folder/nested_folder1/folder/file']}, + {root: '/folder/nested_folder1/folder', expected: ['/folder/nested_folder1/folder/file']}, + {root: '/folder/nested_folder2', expected: [ + '/folder/nested_folder2/file', + '/folder/nested_folder2/folder/file', + ]}, + {root: '/folder/nested_folder2/folder', expected: ['/folder/nested_folder2/folder/file']}, + ], + }, + ], + }); +}); + + describe('FileSystem', () => { it('can create files', () => { const host = new virtualFs.test.TestHost({ diff --git a/packages/angular_devkit/schematics/src/tree/virtual.ts b/packages/angular_devkit/schematics/src/tree/virtual.ts index 219b2c5150..24d58f7916 100644 --- a/packages/angular_devkit/schematics/src/tree/virtual.ts +++ b/packages/angular_devkit/schematics/src/tree/virtual.ts @@ -49,15 +49,27 @@ export class VirtualDirEntry implements DirEntry { return this._path == '/' ? null : this._tree.getDir(dirname(this._path)); } get path() { return this._path; } + get subdirs() { - return this._tree.files - .filter(path => path.startsWith(this._path) && dirname(path) != this._path) - .map(path => basename(path)); + const directChildPartsCount = split(normalize(this._path)).length + 1; + + const directories = this._tree.files + // make sure entries belong to proper subbranch + .filter(path => path.startsWith(this._path)) + // get all existing directories & prune to direct children + .map(path => split(normalize(path)).slice(0, -1).slice(0, directChildPartsCount)) + // exclude current directory + .filter(parts => parts.length === directChildPartsCount) + // get directory name only + .map(parts => parts[parts.length - 1]); + + // make sure to have a unique set (directories contain multiple files so appear multiple times) + return Array.from(new Set(directories)); } get subfiles() { return this._tree.files - .filter(path => path.startsWith(this._path) && dirname(path) == this._path) - .map(path => basename(path)); + .filter(path => dirname(path) === this._path) + .map(path => basename(path)); } dir(name: PathFragment) { diff --git a/packages/angular_devkit/schematics/src/tree/virtual_spec.ts b/packages/angular_devkit/schematics/src/tree/virtual_spec.ts index a6fff947e8..43f01c3d7e 100644 --- a/packages/angular_devkit/schematics/src/tree/virtual_spec.ts +++ b/packages/angular_devkit/schematics/src/tree/virtual_spec.ts @@ -8,6 +8,7 @@ // tslint:disable:non-null-operator import { normalize, virtualFs } from '@angular-devkit/core'; import { FileAlreadyExistException, FileDoesNotExistException } from '../exception/exception'; +import { testTreeVisit } from './common_spec'; import { FileSystemTree } from './filesystem'; import { FileEntry, MergeStrategy, Tree } from './interface'; import { merge, partition } from './static'; @@ -23,41 +24,77 @@ function files(tree: Tree) { describe('VirtualDirEntry', () => { - it('can visit', () => { - const files = { - '/sub1/file1': '/sub1/file1', - '/sub1/file2': '/sub1/file2', - '/sub1/file3': '/sub1/file3', - '/sub1/sub2/file4': '/sub1/sub2/file4', - '/sub1/sub2/file5': '/sub1/sub2/file5', - '/sub3/file6': '', - }; - const host = new virtualFs.test.TestHost(files); - const tree = new FileSystemTree(host); - - let allPaths: string[] = []; - tree.getDir(normalize('/sub1')) - .visit((p, entry) => { - expect(entry).not.toBeNull(); - expect(entry !.content.toString()).toEqual(p); - allPaths.push(p); - }); - - expect(allPaths).toEqual([ - '/sub1/file1', - '/sub1/file2', - '/sub1/file3', - '/sub1/sub2/file4', - '/sub1/sub2/file5', - ]); - - allPaths = []; - tree.getDir(normalize('/')) - .visit((p, _entry) => { - allPaths.push(p); - }); - - expect(allPaths).toEqual(Object.keys(files)); + testTreeVisit({ + createTree: paths => { + const tree = new VirtualTree(); + paths.forEach(path => tree.create(path, path)); + + return tree; + }, + sets: [ + { + name: 'empty', + files: [], + visits: [ + {root: '/', expected: []}, + ], + }, + + { + name: 'file at root', + files: ['/file'], + visits: [ + {root: '/'}, + {root: '/file', expected: []}, + ], + }, + { + name: 'file under first level folder', + // duplicate use case: folder of single file at root + files: ['/folder/file'], + visits: [ + {root: '/'}, + {root: '/folder', expected: ['/folder/file']}, + {root: '/folder/file', expected: []}, + {root: '/wrong', expected: []}, + ], + }, + { + name: 'file under nested folder', + // duplicate use case: nested folder of files + files: ['/folder/nested_folder/file'], + visits: [ + {root: '/'}, + {root: '/folder', expected: ['/folder/nested_folder/file']}, + {root: '/folder/nested_folder', expected: ['/folder/nested_folder/file']}, + {root: '/folder/nested_folder/file', expected: []}, + ], + }, + + { + name: 'nested folders', + // duplicate use case: folder of folders at root + // duplicate use case: folders of mixed + files: [ + '/folder/nested_folder0/file', + '/folder/nested_folder1/folder/file', + '/folder/nested_folder2/file', + '/folder/nested_folder2/folder/file', + ], + visits: [ + {root: '/'}, + {root: '/folder'}, + {root: '/folder/nested_folder0', expected: ['/folder/nested_folder0/file']}, + {root: '/folder/nested_folder1', expected: ['/folder/nested_folder1/folder/file']}, + {root: '/folder/nested_folder1/folder', expected: ['/folder/nested_folder1/folder/file']}, + {root: '/folder/nested_folder2', expected: [ + '/folder/nested_folder2/file', + '/folder/nested_folder2/folder/file', + ]}, + {root: '/folder/nested_folder2/folder', expected: ['/folder/nested_folder2/folder/file']}, + ], + }, + ], }); }); From 96b427d316c31430dd18a98f7a52d302a6dde6e2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 7 Feb 2018 15:36:47 +0000 Subject: [PATCH 110/724] fix(@angular-devkit/core): support additionalProperties in schema --- .../core/src/json/schema/registry.ts | 8 ++- .../core/src/json/schema/registry_spec.ts | 50 ++++++++++++++++++- .../core/src/json/schema/visitor.ts | 2 + 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 6d541c850e..cd9a56407c 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -43,7 +43,6 @@ export class CoreSchemaRegistry implements SchemaRegistry { } this._ajv = ajv({ - removeAdditional: 'all', useDefaults: true, formats: formatsObj, loadSchema: (uri: string) => this._fetch(uri) as ajv.Thenable, @@ -215,7 +214,12 @@ export class CoreSchemaRegistry implements SchemaRegistry { data, success: false, errors: (validate.errors || []) - .map((err: ajv.ErrorObject) => `${err.dataPath} ${err.message}`), + .map((err) => `Data path ${JSON.stringify(err.dataPath)} ${err.message}${ + err.keyword === 'additionalProperties' && err.params + // tslint:disable-next-line:no-any + ? ` (${(err.params as any)['additionalProperty']}).` + : '.' + }`), } as SchemaValidatorResult; }), ); diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index bfbe11fdf3..df3240e264 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -81,6 +81,53 @@ describe('CoreSchemaRegistry', () => { .subscribe(done, done.fail); }); + it('supports local references', done => { + const registry = new CoreSchemaRegistry(); + const data = { numbers: { one: 1 } }; + + registry + .compile({ + properties: { + numbers: { + type: 'object', + additionalProperties: { '$ref': '#/definitions/myRef' }, + }, + }, + definitions: { + myRef: { type: 'integer' }, + }, + }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(true); + expect(data.numbers.one).not.toBeUndefined(); + }), + ) + .subscribe(done, done.fail); + }); + + it('fails on invalid additionalProperties', done => { + const registry = new CoreSchemaRegistry(); + const data = { notNum: 'foo' }; + + registry + .compile({ + properties: { + num: { type: 'number' }, + }, + additionalProperties: false, + }).pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(false); + expect(result.errors).toContain( + 'Data path "" should NOT have additional properties (notNum).'); + }), + ) + .subscribe(done, done.fail); + }); + // Synchronous failure is only used internally. // If it's meant to be used externally then this test should change to truly be synchronous // (i.e. not relyign on the observable). @@ -198,7 +245,8 @@ describe('CoreSchemaRegistry', () => { mergeMap(validator => validator(data)), map(result => { expect(result.success).toBe(false); - expect(result.errors && result.errors[0]).toBe('.banana should match format "is-hotdog"'); + expect(result.errors && result.errors[0]).toBe( + 'Data path ".banana" should match format "is-hotdog".'); }), ) .subscribe(done, done.fail); diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index 91a46dcaa3..17299e9191 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -195,7 +195,9 @@ export function visitJsonSchema(schema: JsonObject, visitor: JsonSchemaVisitor) definitions: true, properties: true, patternProperties: true, + additionalProperties: true, dependencies: true, + items: true, }; function _traverse( From 904c3a2025cc6fedf40e0161f5ca928b9c7f4742 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 9 Feb 2018 17:25:16 +0000 Subject: [PATCH 111/724] fix(@angular-devkit/core): add NodeJsSyncHost test --- packages/angular_devkit/core/node/host.ts | 26 +++++----- .../angular_devkit/core/node/host_spec.ts | 49 ++++++++++++++++++- 2 files changed, 63 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 2a473dfe24..0883709c0d 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -247,7 +247,7 @@ export class NodeJsSyncHost implements virtualFs.Host { return; } _createDir(dirname(path)); - fs.mkdirSync(path); + fs.mkdirSync(this._getSystemPath(path)); }; _createDir(dirname(path)); fs.writeFileSync(this._getSystemPath(path), new Uint8Array(content)); @@ -262,17 +262,21 @@ export class NodeJsSyncHost implements virtualFs.Host { } delete(path: Path): Observable { - if (this.isDirectory(path)) { - // Since this is synchronous, we can recurse and safely ignore the result. - for (const name of fs.readdirSync(this._getSystemPath(path))) { - this.delete(join(path, name)); - } - fs.rmdirSync(this._getSystemPath(path)); - } else { - fs.unlinkSync(this._getSystemPath(path)); - } + return this.isDirectory(path).pipe( + concatMap(isDir => { + if (isDir) { + // Since this is synchronous, we can recurse and safely ignore the result. + for (const name of fs.readdirSync(this._getSystemPath(path))) { + this.delete(join(path, name)).subscribe(); + } + fs.rmdirSync(this._getSystemPath(path)); + } else { + fs.unlinkSync(this._getSystemPath(path)); + } - return empty(); + return empty(); + }), + ); } rename(from: Path, to: Path): Observable { diff --git a/packages/angular_devkit/core/node/host_spec.ts b/packages/angular_devkit/core/node/host_spec.ts index bb249cb4e2..4b98b3d062 100644 --- a/packages/angular_devkit/core/node/host_spec.ts +++ b/packages/angular_devkit/core/node/host_spec.ts @@ -9,7 +9,7 @@ // tslint:disable:non-null-operator // tslint:disable:no-implicit-dependencies import { normalize, virtualFs } from '@angular-devkit/core'; -import { NodeJsAsyncHost } from '@angular-devkit/core/node'; +import { NodeJsAsyncHost, NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; import { Subscription } from 'rxjs/Subscription'; @@ -59,3 +59,50 @@ describe('NodeJsAsyncHost', () => { .then(done, done.fail); }, 10000000); }); + + +describe('NodeJsSyncHost', () => { + let root: string; + let host: virtualFs.SyncDelegateHost; + + beforeEach(() => { + root = temp.mkdirSync('core-node-spec-'); + host = new virtualFs.SyncDelegateHost( + new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(root))); + }); + afterEach(() => { + host.delete(normalize('/')); + }); + + it('can watch', done => { + let obs: Observable; + let subscription: Subscription; + const content = virtualFs.stringToFileBuffer('hello world'); + const content2 = virtualFs.stringToFileBuffer('hello world 2'); + const allEvents: virtualFs.HostWatchEvent[] = []; + + Promise.resolve() + .then(() => fs.mkdirSync(root + '/sub1')) + .then(() => fs.writeFileSync(root + '/sub1/file1', 'hello world')) + .then(() => { + obs = host.watch(normalize('/sub1'), { recursive: true })!; + expect(obs).not.toBeNull(); + subscription = obs.subscribe(event => { allEvents.push(event); }); + }) + .then(() => new Promise(resolve => setTimeout(resolve, 100))) + // Discard the events registered so far. + .then(() => allEvents.splice(0)) + .then(() => { + host.write(normalize('/sub1/sub2/file3'), content); + host.write(normalize('/sub1/file2'), content2); + host.delete(normalize('/sub1/file1')); + }) + .then(() => new Promise(resolve => setTimeout(resolve, 2000))) + .then(() => { + expect(allEvents.length).toBe(3); + subscription.unsubscribe(); + }) + .then(done, done.fail); + }, 10000000); + +}); From da1d37726993cd5e66ba6872d0e53b141fbb0e5a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 9 Feb 2018 17:35:21 +0000 Subject: [PATCH 112/724] feat(@angular-devkit/core): add fileBufferToString --- .../core/src/virtual-fs/host/buffer.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts b/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts index e2bc6296ba..c7b957571e 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts @@ -13,6 +13,12 @@ declare const TextEncoder: { }; }; +declare const TextDecoder: { + new(encoding: string): { + decode(bytes: Uint8Array): string; + }; +}; + export function stringToFileBuffer(str: string): FileBuffer { // If we're in Node... if (typeof Buffer !== 'undefined' && typeof Buffer.from === 'function') { @@ -38,3 +44,12 @@ export function stringToFileBuffer(str: string): FileBuffer { return buf; } } + +export function fileBufferToString(fileBuffer: FileBuffer): string { + if (typeof TextDecoder !== 'undefined') { + // Modern browsers implement TextEncode. + return new TextDecoder('utf-8').decode(new Uint8Array(fileBuffer)); + } else { + return String.fromCharCode.apply(null, new Uint8Array(fileBuffer)); + } +} From 7cd20a398f05f12c9d4488322968740c96de505e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 9 Feb 2018 17:40:52 +0000 Subject: [PATCH 113/724] feat(@angular-devkit/core): add getSystemPath --- packages/angular_devkit/core/node/host.ts | 73 +++++++------------ .../core/src/virtual-fs/path.ts | 8 ++ 2 files changed, 36 insertions(+), 45 deletions(-) diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 0883709c0d..8c6ff0d864 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -20,10 +20,9 @@ import { refCount } from 'rxjs/operators/refCount'; import { Path, PathFragment, - asPosixPath, - asWindowsPath, dirname, fragment, + getSystemPath, join, normalize, virtualFs, @@ -73,14 +72,6 @@ function _callFs(fn: Function, ...args: {}[]): Observable { * synchronous and one asynchronous. */ export class NodeJsAsyncHost implements virtualFs.Host { - protected _getSystemPath(path: Path): string { - if (process.platform.startsWith('win32')) { - return asWindowsPath(path); - } else { - return asPosixPath(path); - } - } - get capabilities(): virtualFs.HostCapabilities { return { synchronous: false }; } @@ -89,27 +80,27 @@ export class NodeJsAsyncHost implements virtualFs.Host { return new Observable(obs => { // Create folders if necessary. const _createDir = (path: Path) => { - if (fs.existsSync(this._getSystemPath(path))) { + if (fs.existsSync(getSystemPath(path))) { return; } if (dirname(path) === path) { throw new Error(); } _createDir(dirname(path)); - fs.mkdirSync(this._getSystemPath(path)); + fs.mkdirSync(getSystemPath(path)); }; _createDir(dirname(path)); _callFs( fs.writeFile, - this._getSystemPath(path), + getSystemPath(path), new Uint8Array(content), ).subscribe(obs); }); } read(path: Path): Observable { - return _callFs(fs.readFile, this._getSystemPath(path)).pipe( + return _callFs(fs.readFile, getSystemPath(path)).pipe( map(buffer => new Uint8Array(buffer).buffer as virtualFs.FileBuffer), ); } @@ -121,8 +112,8 @@ export class NodeJsAsyncHost implements virtualFs.Host { const allFiles: Path[] = []; const allDirs: Path[] = []; const _recurseList = (path: Path) => { - for (const fragment of fs.readdirSync(this._getSystemPath(path))) { - if (fs.statSync(this._getSystemPath(join(path, fragment))).isDirectory()) { + for (const fragment of fs.readdirSync(getSystemPath(path))) { + if (fs.statSync(getSystemPath(join(path, fragment))).isDirectory()) { _recurseList(join(path, fragment)); allDirs.push(join(path, fragment)); } else { @@ -134,26 +125,26 @@ export class NodeJsAsyncHost implements virtualFs.Host { return observableFrom(allFiles) .pipe( - mergeMap(p => _callFs(fs.unlink, this._getSystemPath(p))), + mergeMap(p => _callFs(fs.unlink, getSystemPath(p))), ignoreElements(), concat(observableFrom(allDirs).pipe( - concatMap(p => _callFs(fs.rmdir, this._getSystemPath(p))), + concatMap(p => _callFs(fs.rmdir, getSystemPath(p))), )), map(() => {}), ); } else { - return _callFs(fs.unlink, this._getSystemPath(path)); + return _callFs(fs.unlink, getSystemPath(path)); } }), ); } rename(from: Path, to: Path): Observable { - return _callFs(fs.rename, this._getSystemPath(from), this._getSystemPath(to)); + return _callFs(fs.rename, getSystemPath(from), getSystemPath(to)); } list(path: Path): Observable { - return _callFs(fs.readdir, this._getSystemPath(path)).pipe( + return _callFs(fs.readdir, getSystemPath(path)).pipe( map(names => names.map(name => fragment(name))), ); } @@ -169,19 +160,19 @@ export class NodeJsAsyncHost implements virtualFs.Host { } isDirectory(path: Path): Observable { - return _callFs(fs.stat, this._getSystemPath(path)).pipe( + return _callFs(fs.stat, getSystemPath(path)).pipe( map(stat => stat.isDirectory()), ); } isFile(path: Path): Observable { - return _callFs(fs.stat, this._getSystemPath(path)).pipe( + return _callFs(fs.stat, getSystemPath(path)).pipe( map(stat => stat.isDirectory()), ); } // Some hosts may not support stats. stats(path: Path): Observable> | null { - return _callFs(fs.stat, this._getSystemPath(path)); + return _callFs(fs.stat, getSystemPath(path)); } // Some hosts may not support watching. @@ -190,7 +181,7 @@ export class NodeJsAsyncHost implements virtualFs.Host { _options?: virtualFs.HostWatchOptions, ): Observable | null { return new Observable(obs => { - const watcher = new FSWatcher({ persistent: true }).add(this._getSystemPath(path)); + const watcher = new FSWatcher({ persistent: true }).add(getSystemPath(path)); watcher .on('change', path => { @@ -228,14 +219,6 @@ export class NodeJsAsyncHost implements virtualFs.Host { * An implementation of the Virtual FS using Node as the backend, synchronously. */ export class NodeJsSyncHost implements virtualFs.Host { - protected _getSystemPath(path: Path): string { - if (process.platform.startsWith('win32')) { - return asWindowsPath(path); - } else { - return asPosixPath(path); - } - } - get capabilities(): virtualFs.HostCapabilities { return { synchronous: true }; } @@ -243,20 +226,20 @@ export class NodeJsSyncHost implements virtualFs.Host { write(path: Path, content: virtualFs.FileBuffer): Observable { // Create folders if necessary. const _createDir = (path: Path) => { - if (fs.existsSync(this._getSystemPath(path))) { + if (fs.existsSync(getSystemPath(path))) { return; } _createDir(dirname(path)); - fs.mkdirSync(this._getSystemPath(path)); + fs.mkdirSync(getSystemPath(path)); }; _createDir(dirname(path)); - fs.writeFileSync(this._getSystemPath(path), new Uint8Array(content)); + fs.writeFileSync(getSystemPath(path), new Uint8Array(content)); return empty(); } read(path: Path): Observable { - const buffer = fs.readFileSync(this._getSystemPath(path)); + const buffer = fs.readFileSync(getSystemPath(path)); return observableOf(new Uint8Array(buffer).buffer as virtualFs.FileBuffer); } @@ -266,12 +249,12 @@ export class NodeJsSyncHost implements virtualFs.Host { concatMap(isDir => { if (isDir) { // Since this is synchronous, we can recurse and safely ignore the result. - for (const name of fs.readdirSync(this._getSystemPath(path))) { + for (const name of fs.readdirSync(getSystemPath(path))) { this.delete(join(path, name)).subscribe(); } - fs.rmdirSync(this._getSystemPath(path)); + fs.rmdirSync(getSystemPath(path)); } else { - fs.unlinkSync(this._getSystemPath(path)); + fs.unlinkSync(getSystemPath(path)); } return empty(); @@ -280,19 +263,19 @@ export class NodeJsSyncHost implements virtualFs.Host { } rename(from: Path, to: Path): Observable { - fs.renameSync(this._getSystemPath(from), this._getSystemPath(to)); + fs.renameSync(getSystemPath(from), getSystemPath(to)); return empty(); } list(path: Path): Observable { - return observableOf(fs.readdirSync(this._getSystemPath(path))).pipe( + return observableOf(fs.readdirSync(getSystemPath(path))).pipe( map(names => names.map(name => fragment(name))), ); } exists(path: Path): Observable { - return observableOf(fs.existsSync(this._getSystemPath(path))); + return observableOf(fs.existsSync(getSystemPath(path))); } isDirectory(path: Path): Observable { @@ -306,7 +289,7 @@ export class NodeJsSyncHost implements virtualFs.Host { // Some hosts may not support stats. stats(path: Path): Observable> | null { - return observableOf(fs.statSync(this._getSystemPath(path))); + return observableOf(fs.statSync(getSystemPath(path))); } // Some hosts may not support watching. @@ -316,7 +299,7 @@ export class NodeJsSyncHost implements virtualFs.Host { ): Observable | null { return new Observable(obs => { const opts = { persistent: false }; - const watcher = new FSWatcher(opts).add(this._getSystemPath(path)); + const watcher = new FSWatcher(opts).add(getSystemPath(path)); watcher .on('change', path => { diff --git a/packages/angular_devkit/core/src/virtual-fs/path.ts b/packages/angular_devkit/core/src/virtual-fs/path.ts index e9a9895ea0..e12b583f0d 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path.ts @@ -270,3 +270,11 @@ export function asWindowsPath(path: Path): WindowsPath { export function asPosixPath(path: Path): PosixPath { return path as string as PosixPath; } + +export function getSystemPath(path: Path): string { + if (process.platform.startsWith('win32')) { + return asWindowsPath(path); + } else { + return asPosixPath(path); + } +} From cf756ca6295a570c1ba542a7904cd0e64c01b172 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 7 Feb 2018 15:38:30 +0000 Subject: [PATCH 114/724] build: use v8-profiler as optional --- lib/packages.ts | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/packages.ts b/lib/packages.ts index 11ade6c101..7088b59432 100644 --- a/lib/packages.ts +++ b/lib/packages.ts @@ -88,6 +88,7 @@ function loadPackageJson(p: string) { case 'name': case 'main': case 'peerDependencies': + case 'optionalDependencies': case 'typings': case 'version': continue; diff --git a/package.json b/package.json index 972b441c00..09d39938b7 100644 --- a/package.json +++ b/package.json @@ -77,10 +77,12 @@ "ts-node": "^2.0.0", "tslint": "^5.5.0", "typescript": "~2.6.1", - "v8-profiler": "^5.7.0", "webpack-sources": "^1.0.1" }, "devDependencies": { "license-checker": "^16.0.0" + }, + "optionalDependencies": { + "v8-profiler": "^5.7.0" } } From 537ee8da39499f7fabbeec097acb86449b48dd01 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 9 Feb 2018 19:22:24 +0000 Subject: [PATCH 115/724] test: temporarily disable the tslint disable disabler for Angular CLI files --- rules/noGlobalTslintDisableRule.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rules/noGlobalTslintDisableRule.ts b/rules/noGlobalTslintDisableRule.ts index 1db5d0804b..d5158a0fae 100644 --- a/rules/noGlobalTslintDisableRule.ts +++ b/rules/noGlobalTslintDisableRule.ts @@ -51,7 +51,15 @@ class Walker extends Lint.RuleWalker { if (sourceFile.fileName.match(/_benchmark.ts$/)) { return; } - if (sourceFile.fileName.startsWith(path.join(process.cwd(), 'scripts'))) { + + // TODO(filipesilva): remove this once the files are cleaned up. + // Ignore Angular CLI files files. + if (sourceFile.fileName.includes('/angular-cli-files/')) { + return; + } + + const scriptsPath = path.join(process.cwd(), 'scripts').replace(/\\/g, '/'); + if (sourceFile.fileName.startsWith(scriptsPath)) { return; } From 6b81cbc1b1d798969f0c07b5106e092006f83b5e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 7 Feb 2018 15:42:38 +0000 Subject: [PATCH 116/724] feat(@angular-devkit/architect): add package --- .monorepo.json | 16 + README.md | 19 +- bin/architect | 14 + packages/angular_devkit/architect/README.md | 3 + .../angular_devkit/architect/package.json | 14 + .../angular_devkit/architect/src/architect.ts | 275 ++++++++++++++++++ .../architect/src/architect_spec.ts | 173 +++++++++++ .../angular_devkit/architect/src/builder.ts | 43 +++ .../architect/src/builders-schema.json | 42 +++ .../angular_devkit/architect/src/index.ts | 11 + .../architect/src/workspace-schema.json | 106 +++++++ .../angular_devkit/architect/src/workspace.ts | 30 ++ .../architect/test/browser/index.ts | 37 +++ .../architect/test/browser/schema.json | 22 ++ .../architect/test/builders.json | 10 + .../architect/test/package.json | 6 + .../angular-cli-workspace.schema.json | 92 ++++++ tsconfig.json | 3 +- 18 files changed, 907 insertions(+), 9 deletions(-) create mode 100644 bin/architect create mode 100644 packages/angular_devkit/architect/README.md create mode 100644 packages/angular_devkit/architect/package.json create mode 100644 packages/angular_devkit/architect/src/architect.ts create mode 100644 packages/angular_devkit/architect/src/architect_spec.ts create mode 100644 packages/angular_devkit/architect/src/builder.ts create mode 100644 packages/angular_devkit/architect/src/builders-schema.json create mode 100644 packages/angular_devkit/architect/src/index.ts create mode 100644 packages/angular_devkit/architect/src/workspace-schema.json create mode 100644 packages/angular_devkit/architect/src/workspace.ts create mode 100644 packages/angular_devkit/architect/test/browser/index.ts create mode 100644 packages/angular_devkit/architect/test/browser/schema.json create mode 100644 packages/angular_devkit/architect/test/builders.json create mode 100644 packages/angular_devkit/architect/test/package.json create mode 100644 tests/@angular_devkit/architect/angular-cli-workspace.schema.json diff --git a/.monorepo.json b/.monorepo.json index f222d766ce..8aefc5f050 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -45,6 +45,22 @@ "version": "0.4.0", "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, + "@angular-devkit/architect": { + "name": "Build Facade", + "links": [ + { + "label": "README", + "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" + } + ], + "version": "0.0.1", + "hash": "" + }, + "@angular-devkit/architect-cli": { + "name": "Architect CLI", + "version": "0.0.1", + "hash": "" + }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", "links": [ diff --git a/README.md b/README.md index 8fa9b28628..8ce8c0c2e1 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ ### Development tools and libraries specialized for Angular -[![CircleCI branch](https://img.shields.io/circleci/project/github/angular/devkit/master.svg?label=circleci)](https://circleci.com/gh/angular/devkit) [![Dependency Status](https://david-dm.org/angular/devkit.svg)](https://david-dm.org/angular/devkit) [![devDependency Status](https://david-dm.org/angular/devkit/dev-status.svg)](https://david-dm.org/angular/devkit?type=dev) +[![CircleCI branch](https://img.shields.io/circleci/project/github/angular/devkit/master.svg?label=circleci)](https://circleci.com/gh/angular/devkit) [![Dependency Status](https://david-dm.org/angular/devkit.svg)](https://david-dm.org/angular/devkit) [![devDependency Status](https://david-dm.org/angular/devkit/dev-status.svg)](https://david-dm.org/angular/devkit?type=dev) -[![License](https://img.shields.io/npm/l/@angular-devkit/core.svg)](https://github.com/angular/devkit/blob/master/LICENSE) +[![License](https://img.shields.io/npm/l/@angular-devkit/core.svg)](https://github.com/angular/devkit/blob/master/LICENSE) -[![GitHub forks](https://img.shields.io/github/forks/angular/devkit.svg?style=social&label=Fork)](https://github.com/angular/devkit/fork) [![GitHub stars](https://img.shields.io/github/stars/angular/devkit.svg?style=social&label=Star)](https://github.com/angular/devkit) +[![GitHub forks](https://img.shields.io/github/forks/angular/devkit.svg?style=social&label=Fork)](https://github.com/angular/devkit/fork) [![GitHub stars](https://img.shields.io/github/stars/angular/devkit.svg?style=social&label=Star)](https://github.com/angular/devkit) @@ -27,7 +27,7 @@ This is the home for all the tools and libraries built to assist developers with their Angular applications. ### Quick Links -[Gitter](https://gitter.im/angular/angular-cli) | [Contributing](https://github.com/angular/devkit/blob/master/CONTRIBUTING.md) | [Angular CLI](http://github.com/angular/angular-cli) | +[Gitter](https://gitter.im/angular/angular-cli) | [Contributing](https://github.com/angular/devkit/blob/master/CONTRIBUTING.md) | [Angular CLI](http://github.com/angular/angular-cli) | |---|---|---| @@ -50,17 +50,20 @@ This is a monorepo which contains many packages: | Project | Package | Version | Links | |---|---|---|---| +**Build Facade** | [`@angular-devkit/architect`](http://npmjs.com/packages/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) +**Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/packages/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect-cli) | **Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) +**Webpack Build Facade** | [`@angular-devkit/build-webpack`](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-webpack/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md) **Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) **Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) -**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | +**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | #### Schematics | Project | Package | Version | Links | |---|---|---|---| -**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | -**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | -**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | +**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | +**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | +**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | diff --git a/bin/architect b/bin/architect new file mode 100644 index 0000000000..c387b1c41d --- /dev/null +++ b/bin/architect @@ -0,0 +1,14 @@ +#!/usr/bin/env node +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +'use strict'; + + +require('../lib/bootstrap-local'); +const packages = require('../lib/packages').packages; +require(packages['@angular-devkit/architect'].bin['architect']); diff --git a/packages/angular_devkit/architect/README.md b/packages/angular_devkit/architect/README.md new file mode 100644 index 0000000000..3cfd751671 --- /dev/null +++ b/packages/angular_devkit/architect/README.md @@ -0,0 +1,3 @@ +# Angular Build Facade + +WIP diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json new file mode 100644 index 0000000000..4d797be5c2 --- /dev/null +++ b/packages/angular_devkit/architect/package.json @@ -0,0 +1,14 @@ +{ + "name": "@angular-devkit/architect", + "version": "0.0.0", + "description": "Angular Build Facade", + "main": "src/index.js", + "typings": "src/index.d.ts", + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "dependencies": { + "@angular-devkit/core": "0.0.0", + "rxjs": "^5.5.6" + } +} diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts new file mode 100644 index 0000000000..55e4e48742 --- /dev/null +++ b/packages/angular_devkit/architect/src/architect.ts @@ -0,0 +1,275 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + BaseException, + JsonObject, + JsonParseMode, + Path, + dirname, + getSystemPath, + join, + logging, + normalize, + parseJson, + resolve, + schema, + virtualFs, +} from '@angular-devkit/core'; +import { resolve as nodeResolve } from '@angular-devkit/core/node'; +import { Observable } from 'rxjs/Observable'; +import { of } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; +import { concatMap } from 'rxjs/operators'; +import { + BuildEvent, + Builder, + BuilderConstructor, + BuilderContext, + BuilderDescription, + BuilderMap, +} from './builder'; +import { Workspace } from './workspace'; + + +export class ProjectNotFoundException extends BaseException { + constructor(name?: string) { + const nameOrDefault = name ? `Project '${name}'` : `Default project`; + super(`${nameOrDefault} could not be found in workspace.`); + } +} + +export class TargetNotFoundException extends BaseException { + constructor(name?: string) { + const nameOrDefault = name ? `Target '${name}'` : `Default target`; + super(`${nameOrDefault} could not be found in workspace.`); + } +} + +export class ConfigurationNotFoundException extends BaseException { + constructor(name: string) { + super(`Configuration '${name}' could not be found in project.`); + } +} + +export class SchemaValidationException extends BaseException { + constructor(errors: string[]) { + super(`Schema validation failed with the following errors:\n ${errors.join('\n ')}`); + } +} + +// TODO: break this exception apart into more granular ones. +export class BuilderCannotBeResolvedException extends BaseException { + constructor(builder: string) { + super(`Builder '${builder}' cannot be resolved.`); + } +} + +export class WorkspaceNotYetLoadedException extends BaseException { + constructor() { super(`Workspace needs to be loaded before Architect is used.`); } +} + +export interface Target { + root: Path; + projectType: string; + builder: string; + options: OptionsT; +} + +export interface TargetOptions { + project?: string; + target?: string; + configuration?: string; + overrides?: Partial; +} + +export class Architect { + private readonly _workspaceSchema = join(normalize(__dirname), 'workspace-schema.json'); + private readonly _buildersSchema = join(normalize(__dirname), 'builders-schema.json'); + private _workspace: Workspace; + + constructor(private _root: Path, private _host: virtualFs.Host<{}>) { } + + loadWorkspaceFromHost(workspacePath: Path) { + return this._host.read(join(this._root, workspacePath)).pipe( + concatMap((buffer) => { + const json = JSON.parse(virtualFs.fileBufferToString(buffer)); + + return this.loadWorkspaceFromJson(json); + }), + ); + } + + loadWorkspaceFromJson(json: Workspace) { + return this._validateAgainstSchema(json, this._workspaceSchema).pipe( + concatMap((validatedWorkspace: Workspace) => { + this._workspace = validatedWorkspace; + + return of(this); + }), + ); + } + + getTarget(options: TargetOptions = {}): Target { + let { project, target: targetName } = options; + const { configuration, overrides } = options; + + if (!this._workspace) { + throw new WorkspaceNotYetLoadedException(); + } + + project = project || this._workspace.defaultProject as string; + const workspaceProject = this._workspace.projects[project]; + + if (!workspaceProject) { + throw new ProjectNotFoundException(project); + } + + targetName = targetName || workspaceProject.defaultTarget as string; + const workspaceTarget = workspaceProject.targets[targetName]; + + if (!workspaceTarget) { + throw new TargetNotFoundException(targetName); + } + + const workspaceTargetOptions = workspaceTarget.options; + let workspaceConfiguration; + + if (configuration) { + workspaceConfiguration = workspaceTarget.configurations + && workspaceTarget.configurations[configuration]; + + if (!workspaceConfiguration) { + throw new ConfigurationNotFoundException(configuration); + } + } + + // Resolve root for the target. + // TODO: add Path format to JSON schemas + const target: Target = { + root: resolve(this._root, normalize(workspaceProject.root)), + projectType: workspaceProject.projectType, + builder: workspaceTarget.builder, + options: { + ...workspaceTargetOptions, + ...workspaceConfiguration, + ...overrides as {}, + } as OptionsT, + }; + + return target; + } + + // Will run the target using the target. + run( + target: Target, + partialContext: Partial = {}, + ): Observable { + const context: BuilderContext = { + logger: new logging.NullLogger(), + architect: this, + host: this._host, + ...partialContext, + }; + + let builderDescription: BuilderDescription; + + return this.getBuilderDescription(target).pipe( + concatMap(description => { + builderDescription = description; + + return this.validateBuilderOptions(target, builderDescription); + }), + concatMap(() => of(this.getBuilder(builderDescription, context))), + concatMap(builder => builder.run(target)), + ); + } + + getBuilderDescription(target: Target): Observable { + return new Observable((obs) => { + // TODO: this probably needs to be more like NodeModulesEngineHost. + const basedir = getSystemPath(this._root); + const [pkg, builderName] = target.builder.split(':'); + const pkgJsonPath = nodeResolve(pkg, { basedir, resolvePackageJson: true }); + let buildersJsonPath: Path; + + // Read the `builders` entry of package.json. + return this._host.read(normalize(pkgJsonPath)).pipe( + concatMap(buffer => + of(parseJson(virtualFs.fileBufferToString(buffer), JsonParseMode.Loose))), + concatMap((pkgJson: JsonObject) => { + const pkgJsonBuildersentry = pkgJson['builders'] as string; + if (!pkgJsonBuildersentry) { + throw new BuilderCannotBeResolvedException(target.builder); + } + + buildersJsonPath = join(dirname(normalize(pkgJsonPath)), pkgJsonBuildersentry); + + return this._host.read(buildersJsonPath); + }), + concatMap((buffer) => of(JSON.parse(virtualFs.fileBufferToString(buffer)))), + // Validate builders json. + concatMap((builderMap) => + this._validateAgainstSchema(builderMap, this._buildersSchema)), + + + concatMap((builderMap) => { + const builderDescription = builderMap.builders[builderName]; + + if (!builderDescription) { + throw new BuilderCannotBeResolvedException(target.builder); + } + + // Resolve paths in the builder description. + const builderJsonDir = dirname(buildersJsonPath); + builderDescription.schema = join(builderJsonDir, builderDescription.schema); + builderDescription.class = join(builderJsonDir, builderDescription.class); + + // Validate options again builder schema. + return of(builderDescription); + }), + ).subscribe(obs); + }); + } + + validateBuilderOptions( + target: Target, builderDescription: BuilderDescription, + ): Observable { + return this._validateAgainstSchema(target.options, + normalize(builderDescription.schema)); + } + + getBuilder( + builderDescription: BuilderDescription, context: BuilderContext, + ): Builder { + // TODO: support more than the default export, maybe via builder#import-name. + const builderModule = require(getSystemPath(builderDescription.class)); + const builderClass = builderModule['default'] as BuilderConstructor; + + return new builderClass(context); + } + + // Warning: this method changes contentJson in place. + // TODO: add transforms to resolve paths. + private _validateAgainstSchema(contentJson: {}, schemaPath: Path): Observable { + const registry = new schema.CoreSchemaRegistry(); + + return this._host.read(schemaPath).pipe( + concatMap((buffer) => of(JSON.parse(virtualFs.fileBufferToString(buffer)))), + concatMap((schemaContent) => registry.compile(schemaContent)), + concatMap(validator => validator(contentJson)), + concatMap(validatorResult => { + if (validatorResult.success) { + return of(contentJson as T); + } else { + return _throw(new SchemaValidationException(validatorResult.errors as string[])); + } + }), + ); + } +} diff --git a/packages/angular_devkit/architect/src/architect_spec.ts b/packages/angular_devkit/architect/src/architect_spec.ts new file mode 100644 index 0000000000..c4f57a569b --- /dev/null +++ b/packages/angular_devkit/architect/src/architect_spec.ts @@ -0,0 +1,173 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { join, normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { concatMap, tap, toArray } from 'rxjs/operators'; +import { BrowserTargetOptions } from '../test/browser'; +import { + Architect, + BuilderCannotBeResolvedException, + ConfigurationNotFoundException, + ProjectNotFoundException, + Target, + TargetNotFoundException, +} from './architect'; +import { Workspace } from './workspace'; + + +describe('Architect', () => { + const host = new NodeJsSyncHost(); + const root = normalize(__dirname); + const workspace: Workspace = { + name: 'spec', + version: 1, + root: 'src', + defaultProject: 'app', + projects: { + app: { + root: 'app', + projectType: 'application', + defaultTarget: 'browser', + targets: { + browser: { + builder: '../test:browser', + options: { + browserOption: 1, + }, + configurations: { + prod: { + optimizationLevel: 1, + }, + }, + }, + karma: { + builder: '../test:karma', + options: {}, + }, + }, + }, + }, + }; + + it('works', (done) => { + const architect = new Architect(root, host); + architect.loadWorkspaceFromJson(workspace).subscribe({ + complete: () => { + const target = architect.getTarget(); + const options = target.options; + + // Check options were composed properly. + expect(target.root).toBe(join(root, 'app')); + expect(target.projectType).toBe('application'); + expect(target.builder).toBe('../test:browser'); + expect(options.browserOption).toBe(1); + + done(); + }, + error: done.fail, + }); + }); + + it('composes project with target and configuration', (done) => { + const architect = new Architect(root, host); + const targetOptions = { + project: 'app', + target: 'browser', + configuration: 'prod', + }; + architect.loadWorkspaceFromJson(workspace).subscribe({ + complete: () => { + const target = architect.getTarget(targetOptions); + const options = target.options; + + // Check options were composed properly. + expect(target.root).toBe(join(root, 'app')); + expect(target.projectType).toBe('application'); + expect(target.builder).toBe('../test:browser'); + expect(options.browserOption).toBe(1); + expect(options.optimizationLevel).toBe(1); + + done(); + }, + error: done.fail, + }); + }); + + it('throws when missing project is used', (done) => { + const architect = new Architect(root, host); + const targetOptions = { project: 'missing' }; + architect.loadWorkspaceFromJson(workspace).subscribe({ + complete: () => { + const err = new ProjectNotFoundException('missing'); + expect(() => architect.getTarget(targetOptions)).toThrow(err); + done(); + }, + error: done.fail, + }); + }); + + it('throws when missing target is used', (done) => { + const architect = new Architect(root, host); + const targetOptions = { target: 'missing' }; + architect.loadWorkspaceFromJson(workspace).subscribe({ + complete: () => { + const err = new TargetNotFoundException('missing'); + expect(() => architect.getTarget(targetOptions)).toThrow(err); + done(); + }, + error: done.fail, + }); + }); + + it('throws when missing configuration is used', (done) => { + const architect = new Architect(root, host); + const targetOptions = { configuration: 'missing' }; + architect.loadWorkspaceFromJson(workspace).subscribe({ + complete: () => { + const err = new ConfigurationNotFoundException('missing'); + expect(() => architect.getTarget(targetOptions)).toThrow(err); + done(); + }, + error: done.fail, + }); + }); + + it('runs targets', (done) => { + const architect = new Architect(root, host); + const targetOptions = { project: 'app', target: 'browser' }; + architect.loadWorkspaceFromJson(workspace).pipe( + concatMap((architect) => architect.run(architect.getTarget(targetOptions))), + toArray(), + tap(events => { + expect(events.length).toBe(3); + expect(events[0].success).toBe(true); + expect(events[1].success).toBe(false); + expect(events[2].success).toBe(true); + }), + ).subscribe(done, done.fail); + + }); + + it('throws when invalid target is used', (done) => { + let target: Target; + const architect = new Architect(root, host); + const targetOptions = { project: 'app', target: 'karma' }; + architect.loadWorkspaceFromJson(workspace).pipe( + concatMap((architect) => { + target = architect.getTarget(targetOptions); + + return architect.run(target); + }), + ).subscribe(() => done.fail(), (err: Error) => { + const expectedErr = new BuilderCannotBeResolvedException(target.builder); + expect(err.message).toEqual(expectedErr.message); + done(); + }); + }); +}); diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts new file mode 100644 index 0000000000..ff875af14f --- /dev/null +++ b/packages/angular_devkit/architect/src/builder.ts @@ -0,0 +1,43 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Path, logging, virtualFs } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; +import { Architect, Target } from './architect'; + + +export interface BuilderContext { + logger: logging.Logger; + host: virtualFs.Host<{}>; + architect: Architect; +} + +// TODO: use Build Event Protocol +// https://docs.bazel.build/versions/master/build-event-protocol.html +// https://github.com/googleapis/googleapis/tree/master/google/devtools/build/v1 +export interface BuildEvent { + success: boolean; +} + +export interface Builder { + run(_target: Target>): Observable; +} + +export interface BuilderMap { + builders: { [k: string]: BuilderDescription }; +} + +export interface BuilderDescription { + class: Path; + schema: Path; + description: string; +} + +export interface BuilderConstructor { + new(context: BuilderContext): Builder; +} diff --git a/packages/angular_devkit/architect/src/builders-schema.json b/packages/angular_devkit/architect/src/builders-schema.json new file mode 100644 index 0000000000..d111b24f01 --- /dev/null +++ b/packages/angular_devkit/architect/src/builders-schema.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "BuildersSchema", + "title": "Builders schema for validating a list of builders.", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "description": "Link to schema." + }, + "builders": { + "additionalProperties": { + "$ref": "#/definitions/builder" + } + } + }, + "definitions": { + "builder": { + "type": "object", + "description": "Target options.", + "properties": { + "class": { + "type": "string", + "description": "The builder class module." + }, + "schema": { + "type": "string", + "description": "Schema for builder option validation." + }, + "description": { + "type": "string", + "description": "Builder description." + } + }, + "required": [ + "class", + "schema", + "description" + ] + } + } +} diff --git a/packages/angular_devkit/architect/src/index.ts b/packages/angular_devkit/architect/src/index.ts new file mode 100644 index 0000000000..64ad39b023 --- /dev/null +++ b/packages/angular_devkit/architect/src/index.ts @@ -0,0 +1,11 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './architect'; +export * from './builder'; +export * from './workspace'; diff --git a/packages/angular_devkit/architect/src/workspace-schema.json b/packages/angular_devkit/architect/src/workspace-schema.json new file mode 100644 index 0000000000..7cfaf9b80c --- /dev/null +++ b/packages/angular_devkit/architect/src/workspace-schema.json @@ -0,0 +1,106 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "BuildFacaceWorkspaceSchema", + "title": "Workspace schema for validating a Architect workspace configuration file.", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "description": "Link to schema." + }, + "name": { + "type": "string", + "description": "Workspace name." + }, + "version": { + "type": "number", + "description": "Workspace Schema version." + }, + "root": { + "type": "string", + "description": "Workspace root.", + "default": "./" + }, + "defaultProject": { + "type": "string", + "description": "Default target to run." + }, + "projects": { + "type": "object", + "description": "A map of project names to project options.", + "additionalProperties": { + "$ref": "#/definitions/project" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "version", + "projects" + ], + "definitions": { + "project": { + "type": "object", + "description": "Project options.", + "properties": { + "defaultTarget": { + "type": "string", + "description": "Default target to run." + }, + "projectType": { + "type": "string", + "description": "Project type.", + "enum": [ + "application", + "library" + ] + }, + "root": { + "type": "string", + "description": "Root of the project sourcefiles." + }, + "targets": { + "type": "object", + "description": "A map of available project targets.", + "additionalProperties": { + "$ref": "#/definitions/target" + } + } + }, + "additionalProperties": false, + "required": [ + "projectType", + "root" + ] + }, + "target": { + "type": "object", + "description": "Target options.", + "properties": { + "builder": { + "type": "string", + "description": "The builder used for this package." + }, + "options": { + "$ref": "#/definitions/options" + }, + "configurations": { + "type": "object", + "description": "A map of alternative target options.", + "additionalProperties": { + "$ref": "#/definitions/options" + } + } + }, + "required": [ + "builder", + "options" + ] + }, + "options": { + "type": "object", + "description": "Target options." + } + } +} diff --git a/packages/angular_devkit/architect/src/workspace.ts b/packages/angular_devkit/architect/src/workspace.ts new file mode 100644 index 0000000000..2157d24680 --- /dev/null +++ b/packages/angular_devkit/architect/src/workspace.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { JsonObject } from '@angular-devkit/core'; + +export interface Workspace { + name: string; + version: number; + root: string; + defaultProject?: string; + projects: { [k: string]: WorkspaceProject }; +} + +export interface WorkspaceProject { + projectType: 'application' | 'library'; + root: string; + defaultTarget?: string; + targets: { [k: string]: WorkspaceTarget }; +} + +export interface WorkspaceTarget { + builder: string; + options: TargetOptions; + configurations?: { [k: string]: Partial }; +} diff --git a/packages/angular_devkit/architect/test/browser/index.ts b/packages/angular_devkit/architect/test/browser/index.ts new file mode 100644 index 0000000000..fee4853274 --- /dev/null +++ b/packages/angular_devkit/architect/test/browser/index.ts @@ -0,0 +1,37 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Observable } from 'rxjs/Observable'; +import { BuildEvent, Builder, Target } from '../../src'; + + +const successBuildEvent: BuildEvent = { + success: true, +}; + +const failBuildEvent: BuildEvent = { + success: false, +}; + +export interface BrowserTargetOptions { + browserOption: number; + optimizationLevel: number; +} + +export default class BrowserTarget implements Builder { + // constructor(public context: BuilderContext) { } + + run(_info: Target>): Observable { + return new Observable(obs => { + obs.next(successBuildEvent); + obs.next(failBuildEvent); + obs.next(successBuildEvent); + obs.complete(); + }); + } +} diff --git a/packages/angular_devkit/architect/test/browser/schema.json b/packages/angular_devkit/architect/test/browser/schema.json new file mode 100644 index 0000000000..064bafe1a8 --- /dev/null +++ b/packages/angular_devkit/architect/test/browser/schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "BrowserTargetSchema", + "title": "Browser target schema for testing Build Facade.", + "type": "object", + "description": "Target options", + "properties": { + "browserOption": { + "type": "number", + "description": "A required option" + }, + "optimize": { + "type": "boolean", + "description": "A non-required option with a default", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "browserOption" + ] +} diff --git a/packages/angular_devkit/architect/test/builders.json b/packages/angular_devkit/architect/test/builders.json new file mode 100644 index 0000000000..cdcf505625 --- /dev/null +++ b/packages/angular_devkit/architect/test/builders.json @@ -0,0 +1,10 @@ +{ + "$schema": "../src/builders-schema.json", + "builders": { + "browser": { + "class": "./browser", + "schema": "./browser/schema.json", + "description": "Build a browser app." + } + } +} diff --git a/packages/angular_devkit/architect/test/package.json b/packages/angular_devkit/architect/test/package.json new file mode 100644 index 0000000000..438977c186 --- /dev/null +++ b/packages/angular_devkit/architect/test/package.json @@ -0,0 +1,6 @@ +{ + "builders": "builders.json", + "dependencies": { + "rxjs": "^5.5.6" + } +} diff --git a/tests/@angular_devkit/architect/angular-cli-workspace.schema.json b/tests/@angular_devkit/architect/angular-cli-workspace.schema.json new file mode 100644 index 0000000000..4f60f41280 --- /dev/null +++ b/tests/@angular_devkit/architect/angular-cli-workspace.schema.json @@ -0,0 +1,92 @@ +{ + "$schema": "../../../packages/angular_devkit/architect/src/workspace-schema.json", + "name": "pet-finder", + "version": 1, + "root": "src", + "defaultProject": "myApp", + "projects": { + "myApp": { + "projectType": "application", + "root": "src/my-app", + "defaultTarget": "browser", + "targets": { + "browser": { + "builder": "@angular-devkit/build-webpack:browser", + "options": { + "tsConfigPath": "tsconfig.app.json", + "outputPath": "dist", + "indexPath": "index.html", + "entryPoints": { + "main": "main.ts", + "polyfills": "polyfills.ts" + } + }, + "configurations": { + "production": { + "optimizationLevel": 1 + } + } + }, + "devServer": { + "builder": "@angular-devkit/build-webpack:devServer", + "options": { + "browserTarget": "myApp:browser" + } + }, + "extractI18n": { + "builder": "@angular-devkit/build-webpack:extractI18n", + "options": { + "browserTarget": "myApp:browser" + } + }, + "karma": { + "builder": "@angular-devkit/build-webpack:karma", + "options": { + "tsConfigPath": "tsconfig.app.json", + "karmaConfigPath": "karma.conf.js", + "entryPoints": { + "main": "main.ts", + "polyfills": "polyfills.ts" + } + } + }, + "tslint": { + "builder": "@angular-devkit/build-webpack:tslint", + "options": { + "tsConfigPath": "tsconfig.app.json" + } + } + } + }, + "myLibrary": { + "projectType": "library", + "root": "./src/library", + "targets": { + "nodeModule": { + "builder": "@angular-devkit/build-ng-packagr:nodeModule", + "options": { + "tsConfigPath": "tsconfig.json", + "packageJsonPath": "package.json", + "entryPoints": { + "index": "index.ts" + } + } + } + } + }, + "e2e": { + "projectType": "application", + "root": "./e2e", + "defaultTarget": "browser", + "targets": { + "browser": { + "builder": "@angular-devkit/build-webpack:protractor", + "options": { + "protractorConfigPath": "protractor.conf.js", + "devServerTarget": "myApp:browser" + } + } + } + } + } +} diff --git a/tsconfig.json b/tsconfig.json index eb0656dee3..c8fd27ac6b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -43,7 +43,8 @@ "@angular-devkit/schematics/tasks/node": [ "./packages/angular_devkit/schematics/tasks/node/index" ], "@angular-devkit/schematics/tools": [ "./packages/angular_devkit/schematics/tools/index" ], "@angular-devkit/schematics/testing": [ "./packages/angular_devkit/schematics/testing/index" ], - "@angular-devkit/build_optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ] + "@angular-devkit/build-optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ], + "@angular-devkit/architect": [ "./packages/angular_devkit/architect/src/index" ] } }, "bazelOptions": { From 38a796d8dbba32bf8612a6c896323fbe85c3d794 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 13 Feb 2018 10:38:54 +0000 Subject: [PATCH 117/724] feat(@angular-devkit/architect-cli): add package --- bin/architect | 2 +- .../architect-cli/bin/architect.ts | 133 ++++++++++++++++++ .../architect_cli/architect-cli/package.json | 23 +++ 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 packages/angular_devkit/architect_cli/architect-cli/bin/architect.ts create mode 100644 packages/angular_devkit/architect_cli/architect-cli/package.json diff --git a/bin/architect b/bin/architect index c387b1c41d..7885feefe2 100644 --- a/bin/architect +++ b/bin/architect @@ -11,4 +11,4 @@ require('../lib/bootstrap-local'); const packages = require('../lib/packages').packages; -require(packages['@angular-devkit/architect'].bin['architect']); +require(packages['@angular-devkit/architect-cli'].bin['architect']); diff --git a/packages/angular_devkit/architect_cli/architect-cli/bin/architect.ts b/packages/angular_devkit/architect_cli/architect-cli/bin/architect.ts new file mode 100644 index 0000000000..865bf7e45c --- /dev/null +++ b/packages/angular_devkit/architect_cli/architect-cli/bin/architect.ts @@ -0,0 +1,133 @@ +#!/usr/bin/env node +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { dirname, normalize, tags } from '@angular-devkit/core'; +import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; +import { existsSync, readFileSync } from 'fs'; +import * as minimist from 'minimist'; +import * as path from 'path'; +import { _throw } from 'rxjs/observable/throw'; +import { concatMap } from 'rxjs/operators'; + + +function findUp(names: string | string[], from: string) { + if (!Array.isArray(names)) { + names = [names]; + } + const root = path.parse(from).root; + + let currentDir = from; + while (currentDir && currentDir !== root) { + for (const name of names) { + const p = path.join(currentDir, name); + if (existsSync(p)) { + return p; + } + } + + currentDir = path.dirname(currentDir); + } + + return null; +} + +/** + * Show usage of the CLI tool, and exit the process. + */ +function usage(exitCode = 0): never { + logger.info(tags.stripIndent` + architect [project][:target][:configuration] [options, ...] + + Run a project target. + If project/target/configuration are not specified, the workspace defaults will be used. + + Options: + --help Show available options for project target. + Shows this message instead when ran without the run argument. + + + Any additional option is passed the target, overriding existing options. + `); + + process.exit(exitCode); + throw 0; // The node typing sometimes don't have a never type for process.exit(). +} + +/** Parse the command line. */ +const argv = minimist(process.argv.slice(2), { boolean: ['help'] }); + +/** Create the DevKit Logger used through the CLI. */ +const logger = createConsoleLogger(argv['verbose']); + +// Check the target. +const targetStr = argv._.shift(); +if (!targetStr && argv.help) { + // Show architect usage if there's no target. + usage(); +} + +// Split a target into its parts. +let project: string, targetName: string, configuration: string; +if (targetStr) { + [project, targetName, configuration] = targetStr.split(':'); +} + +// Load workspace configuration file. +const currentPath = process.cwd(); +const configFileName = '.architect.json'; +const configFilePath = findUp([configFileName], currentPath); + +if (!configFilePath) { + logger.fatal(`Workspace configuration file (${configFileName}) cannot be found in ` + + `'${currentPath}' or in parent directories.`); + process.exit(3); + throw 3; // TypeScript doesn't know that process.exit() never returns. +} + +const workspacePath = dirname(normalize(configFilePath)); +const configContent = readFileSync(configFilePath, 'utf-8'); +const configJson = JSON.parse(configContent) as Workspace; + +const host = new NodeJsSyncHost(); +const architect = new Architect(workspacePath, host); +architect.loadWorkspaceFromJson(configJson).pipe( + concatMap(() => { + const overrides = { ...argv }; + delete overrides['help']; + delete overrides['_']; + + const targetOptions = { + project, + target: targetName, + configuration, + overrides, + }; + const target = architect.getTarget(targetOptions); + + // TODO: better logging of what's happening. + if (argv.help) { + // TODO: add target help + return _throw('Target help NYI.'); + // architect.help(targetOptions, logger); + } else { + return architect.run(target, { logger }); + } + }), +).subscribe({ + next: (event => logger.info(JSON.stringify(event, null, 2))), + complete: () => process.exit(0), + error: (err: Error) => { + logger.fatal(err.message); + if (err.stack) { + logger.fatal(err.stack); + } + process.exit(1); + }, +}); diff --git a/packages/angular_devkit/architect_cli/architect-cli/package.json b/packages/angular_devkit/architect_cli/architect-cli/package.json new file mode 100644 index 0000000000..c2162242d3 --- /dev/null +++ b/packages/angular_devkit/architect_cli/architect-cli/package.json @@ -0,0 +1,23 @@ +{ + "name": "@angular-devkit/architect-cli", + "version": "0.0.0", + "description": "Angular Architect CLI", + "bin": { + "architect": "./bin/architect.js" + }, + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "keywords": [ + "build system", + "build facade", + "build", + "tooling" + ], + "dependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/architect": "0.0.0", + "minimist": "^1.2.0", + "rxjs": "^5.5.2" + } +} From 90c8b47f5620822da2b261977a59ea30a91bfb84 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 7 Feb 2018 15:46:21 +0000 Subject: [PATCH 118/724] feat(@angular-devkit/build-webpack): add package --- .monorepo.json | 13 +- README.md | 22 +- package-lock.json | 11050 ++++++++++++++-- package.json | 69 +- .../angular_devkit/build_webpack/README.md | 3 + .../build_webpack/builders.json | 35 + .../angular_devkit/build_webpack/package.json | 62 + .../build_webpack/plugins/karma.ts | 9 + .../base-href-webpack-plugin.ts | 42 + .../base-href-webpack-plugin_spec.ts | 84 + .../lib/base-href-webpack/index.ts | 4 + .../angular-cli-files/models/build-options.ts | 51 + .../models/webpack-configs/browser.ts | 131 + .../models/webpack-configs/common.ts | 241 + .../models/webpack-configs/development.ts | 12 + .../models/webpack-configs/index.ts | 12 + .../models/webpack-configs/production.ts | 175 + .../models/webpack-configs/server.ts | 54 + .../models/webpack-configs/styles.ts | 273 + .../models/webpack-configs/test.ts | 80 + .../models/webpack-configs/typescript.ts | 168 + .../models/webpack-configs/utils.ts | 99 + .../plugins/bundle-budget.ts | 132 + .../plugins/cleancss-webpack-plugin.ts | 114 + .../plugins/glob-copy-webpack-plugin.ts | 96 + .../plugins/karma-context.html | 41 + .../plugins/karma-debug.html | 43 + .../plugins/karma-webpack-throw-error.ts | 17 + .../src/angular-cli-files/plugins/karma.ts | 266 + .../named-lazy-chunks-webpack-plugin.ts | 54 + .../plugins/scripts-webpack-plugin.ts | 143 + .../angular-cli-files/plugins/static-asset.ts | 17 + .../suppress-entry-chunks-webpack-plugin.ts | 55 + .../src/angular-cli-files/plugins/webpack.ts | 11 + .../utilities/bundle-calculator.ts | 209 + .../angular-cli-files/utilities/check-port.ts | 30 + .../angular-cli-files/utilities/find-up.ts | 33 + .../utilities/is-directory.ts | 12 + .../utilities/package-chunk-sort.ts | 44 + .../utilities/read-tsconfig.ts | 13 + .../utilities/require-project-module.ts | 9 + .../utilities/service-worker/index.ts | 94 + .../src/angular-cli-files/utilities/stats.ts | 79 + .../angular-cli-files/utilities/strip-bom.ts | 8 + .../build_webpack/src/browser/index.ts | 258 + .../build_webpack/src/browser/index_spec.ts | 93 + .../build_webpack/src/browser/schema.json | 283 + .../build_webpack/src/dev-server/index.ts | 405 + .../src/dev-server/index_spec.ts | 70 + .../build_webpack/src/dev-server/schema.json | 85 + .../build_webpack/src/extract-i18n/index.ts | 120 + .../src/extract-i18n/index_spec.ts | 57 + .../src/extract-i18n/schema.json | 40 + .../angular_devkit/build_webpack/src/index.ts | 14 + .../build_webpack/src/karma/index.ts | 150 + .../build_webpack/src/karma/index_spec.ts | 65 + .../build_webpack/src/karma/schema.json | 156 + .../build_webpack/src/protractor/index.ts | 151 + .../src/protractor/index_spec.ts | 45 + .../build_webpack/src/protractor/schema.json | 60 + .../build_webpack/src/tslint/index.ts | 172 + .../build_webpack/src/tslint/index_spec.ts | 55 + .../build_webpack/src/tslint/schema.json | 71 + .../build_webpack/src/utils/index.ts | 9 + .../utils/run-module-as-observable-fork.ts | 83 + .../src/utils/run-module-worker.js | 20 + scripts/validate-licenses.ts | 3 + .../hello-world-app/.angular-cli.json | 60 + .../hello-world-app/.editorconfig | 13 + .../build_webpack/hello-world-app/.gitignore | 45 + .../build_webpack/hello-world-app/README.md | 27 + .../hello-world-app/e2e/app.e2e-spec.ts | 14 + .../hello-world-app/e2e/app.po.ts | 11 + .../hello-world-app/e2e/tsconfig.e2e.json | 14 + .../hello-world-app/karma.conf.js | 33 + .../hello-world-app/package.json | 49 + .../hello-world-app/protractor.conf.js | 32 + .../hello-world-app/src/app/app.component.css | 0 .../src/app/app.component.html | 22 + .../src/app/app.component.spec.ts | 27 + .../hello-world-app/src/app/app.component.ts | 10 + .../hello-world-app/src/app/app.module.ts | 18 + .../hello-world-app/src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 3 + .../src/environments/environment.ts | 8 + .../hello-world-app/src/favicon.ico | Bin 0 -> 5430 bytes .../hello-world-app/src/index.html | 14 + .../build_webpack/hello-world-app/src/main.ts | 12 + .../hello-world-app/src/polyfills.ts | 66 + .../hello-world-app/src/styles.css | 1 + .../build_webpack/hello-world-app/src/test.ts | 20 + .../hello-world-app/src/tsconfig.app.json | 13 + .../hello-world-app/src/tsconfig.spec.json | 19 + .../hello-world-app/src/typings.d.ts | 5 + .../hello-world-app/tsconfig.json | 19 + .../build_webpack/hello-world-app/tslint.json | 143 + 96 files changed, 16537 insertions(+), 835 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/README.md create mode 100644 packages/angular_devkit/build_webpack/builders.json create mode 100644 packages/angular_devkit/build_webpack/package.json create mode 100644 packages/angular_devkit/build_webpack/plugins/karma.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/server.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/bundle-calculator.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/check-port.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/find-up.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/is-directory.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/read-tsconfig.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/strip-bom.ts create mode 100644 packages/angular_devkit/build_webpack/src/browser/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/browser/index_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/browser/schema.json create mode 100644 packages/angular_devkit/build_webpack/src/dev-server/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/dev-server/schema.json create mode 100644 packages/angular_devkit/build_webpack/src/extract-i18n/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/extract-i18n/schema.json create mode 100644 packages/angular_devkit/build_webpack/src/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/karma/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/karma/index_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/karma/schema.json create mode 100644 packages/angular_devkit/build_webpack/src/protractor/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/protractor/index_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/protractor/schema.json create mode 100644 packages/angular_devkit/build_webpack/src/tslint/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/tslint/index_spec.ts create mode 100644 packages/angular_devkit/build_webpack/src/tslint/schema.json create mode 100644 packages/angular_devkit/build_webpack/src/utils/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/utils/run-module-as-observable-fork.ts create mode 100644 packages/angular_devkit/build_webpack/src/utils/run-module-worker.js create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/.editorconfig create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/.gitignore create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/README.md create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.e2e-spec.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.po.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/package.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/protractor.conf.js create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.css create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.html create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.spec.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.module.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/assets/.gitkeep create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.prod.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/favicon.ico create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/index.html create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/main.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/polyfills.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/styles.css create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/test.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/typings.d.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/tslint.json diff --git a/.monorepo.json b/.monorepo.json index 8aefc5f050..b0f69486b6 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -46,7 +46,7 @@ "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/architect": { - "name": "Build Facade", + "name": "Architect", "links": [ { "label": "README", @@ -73,6 +73,17 @@ "hash": "5ff2fd3bdd025fe62471a4f3f7b77771", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, + "@angular-devkit/build-webpack": { + "name": "Build Webpack", + "links": [ + { + "label": "README", + "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" + } + ], + "version": "0.0.1", + "hash": "" + }, "@angular-devkit/core": { "name": "Core", "links": [ diff --git a/README.md b/README.md index 8ce8c0c2e1..75905a71f0 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ ### Development tools and libraries specialized for Angular -[![CircleCI branch](https://img.shields.io/circleci/project/github/angular/devkit/master.svg?label=circleci)](https://circleci.com/gh/angular/devkit) [![Dependency Status](https://david-dm.org/angular/devkit.svg)](https://david-dm.org/angular/devkit) [![devDependency Status](https://david-dm.org/angular/devkit/dev-status.svg)](https://david-dm.org/angular/devkit?type=dev) +[![CircleCI branch](https://img.shields.io/circleci/project/github/angular/devkit/master.svg?label=circleci)](https://circleci.com/gh/angular/devkit) [![Dependency Status](https://david-dm.org/angular/devkit.svg)](https://david-dm.org/angular/devkit) [![devDependency Status](https://david-dm.org/angular/devkit/dev-status.svg)](https://david-dm.org/angular/devkit?type=dev) -[![License](https://img.shields.io/npm/l/@angular-devkit/core.svg)](https://github.com/angular/devkit/blob/master/LICENSE) +[![License](https://img.shields.io/npm/l/@angular-devkit/core.svg)](https://github.com/angular/devkit/blob/master/LICENSE) -[![GitHub forks](https://img.shields.io/github/forks/angular/devkit.svg?style=social&label=Fork)](https://github.com/angular/devkit/fork) [![GitHub stars](https://img.shields.io/github/stars/angular/devkit.svg?style=social&label=Star)](https://github.com/angular/devkit) +[![GitHub forks](https://img.shields.io/github/forks/angular/devkit.svg?style=social&label=Fork)](https://github.com/angular/devkit/fork) [![GitHub stars](https://img.shields.io/github/stars/angular/devkit.svg?style=social&label=Star)](https://github.com/angular/devkit) @@ -27,7 +27,7 @@ This is the home for all the tools and libraries built to assist developers with their Angular applications. ### Quick Links -[Gitter](https://gitter.im/angular/angular-cli) | [Contributing](https://github.com/angular/devkit/blob/master/CONTRIBUTING.md) | [Angular CLI](http://github.com/angular/angular-cli) | +[Gitter](https://gitter.im/angular/angular-cli) | [Contributing](https://github.com/angular/devkit/blob/master/CONTRIBUTING.md) | [Angular CLI](http://github.com/angular/angular-cli) | |---|---|---| @@ -50,20 +50,20 @@ This is a monorepo which contains many packages: | Project | Package | Version | Links | |---|---|---|---| -**Build Facade** | [`@angular-devkit/architect`](http://npmjs.com/packages/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) -**Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/packages/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect-cli) | +**Architect** | [`@angular-devkit/architect`](http://npmjs.com/packages/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) +**Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/packages/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect-cli) | **Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) -**Webpack Build Facade** | [`@angular-devkit/build-webpack`](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-webpack/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md) +**Build Webpack** | [`@angular-devkit/build-webpack`](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-webpack/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md) **Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) **Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) -**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | +**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | #### Schematics | Project | Package | Version | Links | |---|---|---|---| -**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | -**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | -**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | +**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | +**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | +**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | diff --git a/package-lock.json b/package-lock.json index 79cf085c85..4a6e2d4cd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,16 +4,122 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@angular/common": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.2.tgz", + "integrity": "sha512-heon7Bdu6SUw/6ma9wEDxrxBJY2V+NSUv7ZVY7HaXESWvxKUGaser5vQIsWghvBg1injSxyw/3BqGFflua/3sQ==", + "requires": { + "tslib": "1.8.1" + } + }, + "@angular/compiler": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.2.tgz", + "integrity": "sha512-QkliIJJb9J2y4Y1yiSweP1eOStClOOOj46awVQ5wT+WzyvmIVAccx2u+r5TPRu676GlqrFfn6FD+zV6Zw7G+Tw==", + "requires": { + "tslib": "1.8.1" + } + }, + "@angular/compiler-cli": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.2.tgz", + "integrity": "sha512-XSojPIMQNvEnYIufTIlrr3GLpr20AUQP0bMzUp4/U/ATWmMWmdNRRG/ys5ncmbgImoAg1nW0hp4bonUSYf9nGQ==", + "requires": { + "chokidar": "1.7.0", + "minimist": "1.2.0", + "reflect-metadata": "0.1.10", + "tsickle": "0.26.0" + } + }, + "@angular/core": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.2.tgz", + "integrity": "sha512-SycTFvlJUHzYvqRYM0DQQUewSo0IPL3Vfo9MOwSJvhS5mXCP1+QW0IIhI8CyWy+40L3dIWlYnn0754z5IJikdg==", + "requires": { + "tslib": "1.8.1" + } + }, + "@angular/platform-browser": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.2.tgz", + "integrity": "sha512-jiiEEUiv4oOWtBP96hOnxHOY3ckukfSOaxtw+ENjSPAyv/eRbL1B2LFwIg+HYAFxvK8JOLAYZm3Hg9lpenlBMw==", + "requires": { + "tslib": "1.8.1" + } + }, + "@angular/platform-browser-dynamic": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.2.tgz", + "integrity": "sha512-PCg63japwHw6zGWGHZEpiDKeqPaCbOKnBl7bhRzE5imL+74toyvmE33sp7OzXKGi0mX5mUymfRsvfLdB6khGTQ==", + "requires": { + "tslib": "1.8.1" + } + }, + "@angular/service-worker": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.1.tgz", + "integrity": "sha512-z4+7S5MQYbcp9d4xtZk6tGJY3TkliVTXj/2HdIOXm97wCyDUAdvNLa9sor3N8OtH8IiRgqeXnqq3ehyWvbMZ4g==", + "requires": { + "tslib": "1.8.1" + } + }, "@ngtools/json-schema": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, + "@ngtools/webpack": { + "version": "1.10.0-rc.0", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.10.0-rc.0.tgz", + "integrity": "sha512-GVPBEtg8ScBGwczBej5MgCuBMDA4HoiT3Q1m7J2mXW8+K8GeSsbmSsY0p5ckDHLuEyP8RkbF/NHEkSdhLd9OMQ==", + "requires": { + "chalk": "2.2.2", + "enhanced-resolve": "3.4.1", + "loader-utils": "1.1.0", + "magic-string": "0.22.4", + "semver": "5.4.1", + "source-map": "0.5.7", + "tree-kill": "1.2.0", + "webpack-sources": "1.1.0" + } + }, + "@types/caseless": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", + "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==" + }, + "@types/common-tags": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@types/common-tags/-/common-tags-1.4.0.tgz", + "integrity": "sha512-HI1tSO87vmd1sPS3DOVSK4gvVKROvCBFvAnXlLiQtAus/+1xXMQcNyu9TX2ChwRXFeQZeB9+f+nMo99xLd5DdA==" + }, + "@types/copy-webpack-plugin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz", + "integrity": "sha512-+R4A5pYLCUhchrZdmTt9FRhtHAACxkgtENPTrciuSlk9+bloMqKAri97+41rbNlboAuV9OQLjz90aTvbzR/S+A==", + "requires": { + "@types/minimatch": "3.0.3", + "@types/webpack": "3.8.2" + } + }, + "@types/denodeify": { + "version": "1.2.31", + "resolved": "https://registry.npmjs.org/@types/denodeify/-/denodeify-1.2.31.tgz", + "integrity": "sha512-Jgy3dvCyIxhNb5RstVJkubeHZifw8KJXca13ov8OO4IqhDLPRHiJJ6VArJbZZ4HuEMJEB83yCuABodNMlYylzQ==" + }, "@types/events": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==" }, + "@types/form-data": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", + "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", + "requires": { + "@types/node": "6.0.96" + } + }, "@types/glob": { "version": "5.0.34", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", @@ -34,6 +140,15 @@ "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.3.tgz", "integrity": "sha512-BN0ho2/U55Td9k8RT2KqonDNmWZHTl1crIk8GIh+xNeCw8A60GMCIKN5a6u/Voz3pF3zzl3Ui+ldGrGxCSsYQw==" }, + "@types/loader-utils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.1.tgz", + "integrity": "sha512-HG9SyNEyGuJXuaEjhoFeaZE1dZscmPx9svXExM/SKsF3Rh9Bdy4sJB7IJFgfYHIy2eWKmAkxGIvrHL+Kk8MEvw==", + "requires": { + "@types/node": "6.0.96", + "@types/webpack": "3.8.2" + } + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -49,6 +164,27 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.3.tgz", "integrity": "sha512-wqrPE4Uvj2fmL0E5JFQiY7D/5bAKvVUfWTnQ5NEV35ULkAU0j3QuqIi9Qyrytz8M5hsrh8Kijt+FsdLQaZR+IA==" }, + "@types/q": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", + "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=" + }, + "@types/request": { + "version": "2.47.0", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.0.tgz", + "integrity": "sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q==", + "requires": { + "@types/caseless": "0.12.1", + "@types/form-data": "2.2.1", + "@types/node": "6.0.96", + "@types/tough-cookie": "2.3.2" + } + }, + "@types/selenium-webdriver": { + "version": "2.53.43", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", + "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==" + }, "@types/semver": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.4.0.tgz", @@ -64,11 +200,26 @@ "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==" }, + "@types/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=" + }, + "@types/strip-json-comments": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", + "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==" + }, "@types/tapable": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-0.2.4.tgz", "integrity": "sha512-pclMAvhPnXJcJu1ZZ8bQthuUcdDWzDuxDdbSf6l1U6s4fP6EBiZpPsOZYqFOrbqDV97sXGFSsb6AUpiLfv4xIA==" }, + "@types/tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA==" + }, "@types/uglify-js": { "version": "2.6.30", "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-2.6.30.tgz", @@ -125,6 +276,60 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" }, + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "requires": { + "mime-types": "2.1.17", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "requires": { + "acorn": "4.0.13" + } + }, + "addressparser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", + "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", + "optional": true + }, + "adm-zip": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", + "integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=" + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" + }, + "agent-base": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", + "requires": { + "extend": "3.0.1", + "semver": "5.0.3" + }, + "dependencies": { + "semver": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", + "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" + } + } + }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -136,6 +341,11 @@ "json-schema-traverse": "0.3.1" } }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" + }, "align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", @@ -146,11 +356,21 @@ "repeat-string": "1.6.1" } }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" + }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -173,6 +393,19 @@ "normalize-path": "2.1.1" } }, + "app-root-path": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.0.1.tgz", + "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=" + }, + "append-transform": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "requires": { + "default-require-extensions": "1.0.0" + } + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -208,21 +441,78 @@ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" }, + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=" + }, "array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=" }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.10.0" + } + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=" + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=" + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" }, + "arraybuffer.slice": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=" + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -231,19 +521,55 @@ "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, + "asn1.js": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", + "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "requires": { + "util": "0.10.3" + } + }, "assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "ast-types": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz", + "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==", + "optional": true + }, + "astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", + "requires": { + "acorn": "4.0.13" + } + }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", @@ -254,11 +580,39 @@ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" }, + "async-foreach": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", + "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=" + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "atob": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", + "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" + }, + "autoprefixer": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.3.tgz", + "integrity": "sha512-dqzVGiz3v934+s3YZA6nk7tAs9xuTz5wMJbX1M+L4cY/MTNkOUqP61c1GWkEVlUL/PEy1pKRSCFuoRZrXYx9qA==", + "requires": { + "browserslist": "2.10.0", + "caniuse-lite": "1.0.30000784", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.16", + "postcss-value-parser": "3.3.0" + } + }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", @@ -269,6 +623,15 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, + "axios": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", + "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", + "optional": true, + "requires": { + "follow-redirects": "1.0.0" + } + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -303,11 +666,140 @@ } } }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "2.5.3", + "regenerator-runtime": "0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.5", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.0", + "pascalcase": "0.1.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" + }, + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==" + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=" + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -317,6 +809,14 @@ "tweetnacl": "0.14.5" } }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "requires": { + "callsite": "1.0.0" + } + }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", @@ -327,6 +827,42 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" }, + "bl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", + "optional": true, + "requires": { + "readable-stream": "2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "optional": true + } + } + }, + "blob": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", + "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=" + }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -335,6 +871,66 @@ "inherits": "2.0.3" } }, + "blocking-proxy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", + "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", + "requires": { + "minimist": "1.2.0" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.1", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "1.6.15" + }, + "dependencies": { + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + } + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "requires": { + "array-flatten": "2.1.1", + "deep-equal": "1.0.1", + "dns-equal": "1.0.0", + "dns-txt": "2.0.2", + "multicast-dns": "6.2.1", + "multicast-dns-service-types": "1.1.0" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", @@ -362,25 +958,357 @@ "repeat-element": "1.1.2" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "browser-pack": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", + "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "JSONStream": "1.3.2", + "combine-source-map": "0.7.2", + "defined": "1.0.0", + "through2": "2.0.3", + "umd": "3.0.1" + } + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "requires": { + "resolve": "1.1.7" + } + }, + "browserify": { + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", + "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", + "requires": { + "JSONStream": "1.3.2", + "assert": "1.4.1", + "browser-pack": "6.0.2", + "browser-resolve": "1.11.2", + "browserify-zlib": "0.2.0", + "buffer": "5.0.8", + "cached-path-relative": "1.0.1", + "concat-stream": "1.5.2", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "defined": "1.0.0", + "deps-sort": "2.0.0", + "domain-browser": "1.1.7", + "duplexer2": "0.1.4", + "events": "1.1.1", + "glob": "7.1.2", + "has": "1.0.1", + "htmlescape": "1.1.1", + "https-browserify": "1.0.0", + "inherits": "2.0.3", + "insert-module-globals": "7.0.1", + "labeled-stream-splicer": "2.0.0", + "module-deps": "4.1.1", + "os-browserify": "0.3.0", + "parents": "1.0.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "read-only-stream": "2.0.0", + "readable-stream": "2.3.3", + "resolve": "1.1.7", + "shasum": "1.0.2", + "shell-quote": "1.6.1", + "stream-browserify": "2.0.1", + "stream-http": "2.7.2", + "string_decoder": "1.0.3", + "subarg": "1.0.0", + "syntax-error": "1.3.0", + "through2": "2.0.3", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4", + "xtend": "4.0.1" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + } + } + }, + "browserify-aes": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", + "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "requires": { + "browserify-aes": "1.1.1", + "browserify-des": "1.0.0", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.5" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "requires": { + "pako": "1.0.6" + } + }, + "browserslist": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.10.0.tgz", + "integrity": "sha512-WyvzSLsuAVPOjbljXnyeWl14Ae+ukAT8MUuagKVzIDvwBxl4UAwD1xqtyQs2eWYPGUKMeC3Ol62goqYuKqTTcw==", + "requires": { + "caniuse-lite": "1.0.30000784", + "electron-to-chromium": "1.3.28" + } + }, + "buffer": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz", + "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==", + "requires": { + "base64-js": "1.2.1", + "ieee754": "1.1.8" + } + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "buildmail": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", + "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", + "optional": true, + "requires": { + "addressparser": "1.0.1", + "libbase64": "0.1.0", + "libmime": "3.0.0", + "libqp": "1.1.0", + "nodemailer-fetch": "1.6.0", + "nodemailer-shared": "1.1.0", + "punycode": "1.4.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "cacache": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.1.tgz", + "integrity": "sha512-dRHYcs9LvG9cHgdPzjiI+/eS7e1xRhULrcyOx04RZQsszNJXU2SL9CyG60yLnge282Qq5nwTv+ieK2fH+WPZmA==", + "requires": { + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.1", + "mississippi": "1.3.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.0.0", + "unique-filename": "1.1.0", + "y18n": "3.2.1" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "cached-path-relative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=" + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + } + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "requires": { + "browserslist": "1.7.7", + "caniuse-db": "1.0.30000780", + "lodash.memoize": "4.1.2", + "lodash.uniq": "4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000780", + "electron-to-chromium": "1.3.28" + } + } } }, + "caniuse-db": { + "version": "1.0.30000780", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000780.tgz", + "integrity": "sha1-jRl3Vh0A/w8O0ra2YUAyirRQTAo=" + }, + "caniuse-lite": { + "version": "1.0.30000784", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz", + "integrity": "sha1-EpztdOmhKApEGIC2zSvOMO9Z5sA=" + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -390,16 +1318,15 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "optional": true, "requires": { "align-text": "0.1.4", "lazy-cache": "1.0.4" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", + "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", "requires": { "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", @@ -447,11 +1374,114 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", "integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==" }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "circular-dependency-plugin": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.3.0.tgz", + "integrity": "sha512-L3W9L1S0wC64rq+QSaZzmWnJW7cVBgimxI2lNEFEX5biwlRG8EHRM68JFi+CX5ZkCGUWJHIpnhdVs181Zlq3wA==" + }, + "clap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", + "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "requires": { + "chalk": "1.1.3" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "class-utils": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.5.tgz", + "integrity": "sha1-F+eTEDdQ+WJ7IXbqNM/RtWWQPIA=", + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "lazy-cache": "2.0.2", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.9.tgz", + "integrity": "sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE=", + "requires": { + "source-map": "0.5.7" + } + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "optional": true, "requires": { "center-align": "0.1.3", "right-align": "0.1.3", @@ -461,8 +1491,33 @@ "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "optional": true + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + } + } + }, + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=" + }, + "clone-deep": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.3.0.tgz", + "integrity": "sha1-NIxhrpzb4O3+BT2R/0zFIdeQ7eg=", + "requires": { + "for-own": "1.0.0", + "is-plain-object": "2.0.4", + "kind-of": "3.2.2", + "shallow-clone": "0.1.2" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "1.0.2" + } } } }, @@ -471,11 +1526,51 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, + "coa": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "requires": { + "q": "1.5.1" + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "codelyzer": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.0.2.tgz", + "integrity": "sha512-nYwOr49+IV09e7C4aXkVALRz0+XpHqZiUUcxHuDZH4xP1FBcHINyr3qvVhv5Gfm7XRmoLx32tsIhrQhW/gBcog==", + "requires": { + "app-root-path": "2.0.1", + "css-selector-tokenizer": "0.7.0", + "cssauron": "1.4.0", + "semver-dsl": "1.0.1", + "source-map": "0.5.7", + "sprintf-js": "1.0.3" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "requires": { + "clone": "1.0.3", + "color-convert": "1.9.1", + "color-string": "0.3.0" + } + }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -489,11 +1584,55 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "requires": { + "color-name": "1.1.3" + } + }, + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "requires": { + "color": "0.11.4", + "css-color-names": "0.0.4", + "has": "1.0.1" + } + }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" }, + "combine-lists": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", + "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", + "requires": { + "lodash": "4.17.4" + } + }, + "combine-source-map": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", + "requires": { + "convert-source-map": "1.1.3", + "inline-source-map": "0.6.2", + "lodash.memoize": "3.0.4", + "source-map": "0.5.7" + }, + "dependencies": { + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" + } + } + }, "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", @@ -507,6 +1646,19 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, + "common-tags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.5.1.tgz", + "integrity": "sha512-NrUYGY5TApAk9KB+IZXkR3GR4tA3g26HDsoiGt4kCMHZ727gOGkC+UNfq0Z22jE15bLkc/6RV5Jw1RBW6Usg6A==", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, "compare-func": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", @@ -516,16 +1668,113 @@ "dot-prop": "3.0.0" } }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" + }, + "compressible": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.12.tgz", + "integrity": "sha1-xZpcmdt2dn6YdlAOJx72OzSTvWY=", + "requires": { + "mime-db": "1.30.0" + } + }, + "compression": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.1.tgz", + "integrity": "sha1-7/JgPvwuIs+G810uuTWJ+YdTc9s=", + "requires": { + "accepts": "1.3.4", + "bytes": "3.0.0", + "compressible": "2.0.12", + "debug": "2.6.9", + "on-headers": "1.0.1", + "safe-buffer": "5.1.1", + "vary": "1.1.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "requires": { + "mime-types": "2.1.17", + "negotiator": "0.6.1" + } + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "connect": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz", + "integrity": "sha1-+43ee6B2OHfQ7J352sC0tA5yx9o=", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.0.6", + "parseurl": "1.3.2", + "utils-merge": "1.0.1" + } + }, + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=" + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "0.1.4" + } + }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, "conventional-changelog": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.7.tgz", @@ -677,11 +1926,156 @@ "trim-off-newlines": "1.0.1" } }, + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "requires": { + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + } + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "copy-webpack-plugin": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", + "integrity": "sha512-ojaz8MpS3zoLJT/JbYMusYM+dCEArhW24hGAUPYPydTCS+87NFh2TWr85sywG3So4Q4E68QoerqQ+Ns1g0fhDg==", + "requires": { + "cacache": "10.0.1", + "find-cache-dir": "1.0.0", + "globby": "7.1.1", + "is-glob": "4.0.0", + "loader-utils": "0.2.17", + "minimatch": "3.0.4", + "p-limit": "1.1.0", + "serialize-javascript": "1.4.0" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1", + "object-assign": "4.1.1" + } + } + } + }, + "core-js": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "requires": { + "is-directory": "0.3.1", + "js-yaml": "3.10.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "require-from-string": "1.2.1" + } + }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "sha.js": "2.4.9" + } + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.9" + } + }, + "cross-spawn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "requires": { + "lru-cache": "4.1.1", + "which": "1.3.0" + } + }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", @@ -690,6 +2084,243 @@ "boom": "2.10.1" } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "1.0.0", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.0", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "diffie-hellman": "5.0.2", + "inherits": "2.0.3", + "pbkdf2": "3.0.14", + "public-encrypt": "4.0.0", + "randombytes": "2.0.5", + "randomfill": "1.0.3" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=" + }, + "css-loader": { + "version": "0.28.7", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.7.tgz", + "integrity": "sha512-GxMpax8a/VgcfRrVy0gXD6yLd5ePYbXX/5zGgTVYp4wXtJklS8Z2VaUArJgc//f6/Dzil7BaJObdSv8eKKCPgg==", + "requires": { + "babel-code-frame": "6.26.0", + "css-selector-tokenizer": "0.7.0", + "cssnano": "3.10.0", + "icss-utils": "2.1.0", + "loader-utils": "1.1.0", + "lodash.camelcase": "4.3.0", + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-modules-extract-imports": "1.1.0", + "postcss-modules-local-by-default": "1.2.0", + "postcss-modules-scope": "1.1.0", + "postcss-modules-values": "1.3.0", + "postcss-value-parser": "3.3.0", + "source-list-map": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, + "css-parse": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=" + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "requires": { + "cssesc": "0.1.0", + "fastparse": "1.1.1", + "regexpu-core": "1.0.0" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + }, + "cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", + "requires": { + "through": "2.3.8" + } + }, + "cssesc": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=" + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "requires": { + "autoprefixer": "6.7.7", + "decamelize": "1.2.0", + "defined": "1.0.0", + "has": "1.0.1", + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-calc": "5.3.1", + "postcss-colormin": "2.2.2", + "postcss-convert-values": "2.6.1", + "postcss-discard-comments": "2.0.4", + "postcss-discard-duplicates": "2.1.0", + "postcss-discard-empty": "2.1.0", + "postcss-discard-overridden": "0.1.1", + "postcss-discard-unused": "2.2.3", + "postcss-filter-plugins": "2.0.2", + "postcss-merge-idents": "2.1.7", + "postcss-merge-longhand": "2.0.2", + "postcss-merge-rules": "2.1.2", + "postcss-minify-font-values": "1.0.5", + "postcss-minify-gradients": "1.0.5", + "postcss-minify-params": "1.2.2", + "postcss-minify-selectors": "2.1.1", + "postcss-normalize-charset": "1.1.1", + "postcss-normalize-url": "3.0.8", + "postcss-ordered-values": "2.2.3", + "postcss-reduce-idents": "2.4.0", + "postcss-reduce-initial": "1.0.1", + "postcss-reduce-transforms": "1.0.4", + "postcss-svgo": "2.1.6", + "postcss-unique-selectors": "2.0.2", + "postcss-value-parser": "3.3.0", + "postcss-zindex": "2.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "autoprefixer": { + "version": "6.7.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "requires": { + "browserslist": "1.7.7", + "caniuse-db": "1.0.30000780", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000780", + "electron-to-chromium": "1.3.28" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, + "csso": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "requires": { + "clap": "1.2.3", + "source-map": "0.5.7" + } + }, + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=" + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -698,6 +2329,24 @@ "array-find-index": "1.0.2" } }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "0.10.37" + } + }, "dargs": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", @@ -721,6 +2370,22 @@ } } }, + "data-uri-to-buffer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", + "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", + "optional": true + }, + "date-format": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", + "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=" + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, "dateformat": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", @@ -749,55 +2414,371 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, "deep-extend": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "optional": true }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { + "default-require-extensions": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" - }, - "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", - "dev": true, + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "requires": { - "asap": "2.0.6", - "wrappy": "1.0.2" + "strip-bom": "2.0.0" } }, - "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==" + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-obj": "1.0.1" + "is-descriptor": "1.0.1" } }, - "ecc-jsbn": { + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "degenerator": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", + "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", + "optional": true, + "requires": { + "ast-types": "0.10.1", + "escodegen": "1.8.1", + "esprima": "3.1.3" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "optional": true + } + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.2.8" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "denodeify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", + "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=" + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "requires": { + "JSONStream": "1.3.2", + "shasum": "1.0.2", + "subarg": "1.0.0", + "through2": "2.0.3" + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "2.0.1" + } + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "optional": true + }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=" + }, + "detective": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "requires": { + "acorn": "5.4.1", + "defined": "1.0.0" + }, + "dependencies": { + "acorn": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", + "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" + } + } + }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "2.0.6", + "wrappy": "1.0.2" + } + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=" + }, + "diff": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==" + }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.5" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "requires": { + "arrify": "1.0.1", + "path-type": "3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" + }, + "dns-packet": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.2.2.tgz", + "integrity": "sha512-kN+DjfGF7dJGUL7nWRktL9Z18t1rWP3aQlyZdY8XlpvU3Nc6GeFTQApftcjtWKxAZfiggZSGrCEoszNgvnpwDg==", + "requires": { + "ip": "1.1.5", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + } + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "requires": { + "buffer-indexof": "1.1.1" + } + }, + "dom-converter": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "requires": { + "utila": "0.3.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" + } + } + }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "requires": { + "custom-event": "1.0.1", + "ent": "2.2.0", + "extend": "3.0.1", + "void-elements": "2.0.1" + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" + } + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=" + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "requires": { + "is-obj": "1.0.1" + } + }, + "double-ended-queue": { + "version": "2.1.0-0", + "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", + "optional": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "requires": { + "readable-stream": "2.3.3" + } + }, + "duplexify": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "requires": { + "end-of-stream": "1.4.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + } + }, + "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", @@ -806,11 +2787,126 @@ "jsbn": "0.1.1" } }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", + "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=" + }, + "electron-to-chromium": { + "version": "1.3.28", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz", + "integrity": "sha1-jdTmRYCGZE6fnwoc8y4qH53/2e4=" + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" }, + "encodeurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" + }, + "end-of-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", + "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "requires": { + "once": "1.4.0" + } + }, + "engine.io": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.4.tgz", + "integrity": "sha1-PQIRtwpVLOhB/8fahiezAamkFi4=", + "requires": { + "accepts": "1.3.3", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "2.6.9", + "engine.io-parser": "2.1.1", + "uws": "0.14.5", + "ws": "3.3.2" + } + }, + "engine.io-client": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.4.tgz", + "integrity": "sha1-T88TcLRxY70s6b4nM5ckMDUNTqE=", + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "2.6.9", + "engine.io-parser": "2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "3.3.2", + "xmlhttprequest-ssl": "1.5.4", + "yeast": "0.1.2" + } + }, + "engine.io-parser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.1.tgz", + "integrity": "sha1-4Ps/DgRi9/WLt3waUun1p+JuRmg=", + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.4", + "has-binary2": "1.0.2" + } + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "object-assign": "4.1.1", + "tapable": "0.2.8" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, + "errno": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "requires": { + "prr": "0.0.0" + } + }, "error-ex": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", @@ -819,6 +2915,102 @@ "is-arrayish": "0.2.1" } }, + "es-abstract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", + "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.1", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, + "es5-ext": { + "version": "0.10.37", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz", + "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-promise": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", + "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -847,26 +3039,166 @@ } } }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + } + } + }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + } + } + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.37" + } + }, + "eventemitter3": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", + "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=" + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "requires": { + "original": "1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } + } + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" }, + "expand-braces": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", + "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", + "requires": { + "array-slice": "0.2.3", + "array-unique": "0.2.1", + "braces": "0.1.5" + }, + "dependencies": { + "braces": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", + "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", + "requires": { + "expand-range": "0.1.1" + } + }, + "expand-range": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", + "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", + "requires": { + "is-number": "0.1.1", + "repeat-string": "0.2.2" + } + }, + "is-number": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", + "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=" + }, + "repeat-string": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", + "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=" + } + } + }, "expand-brackets": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", @@ -883,11 +3215,110 @@ "fill-range": "2.2.3" } }, + "exports-loader": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-0.6.4.tgz", + "integrity": "sha1-1w/GEhl1s1/BKDDPUnVL4nQPyIY=", + "requires": { + "loader-utils": "1.1.0", + "source-map": "0.5.7" + } + }, + "express": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", + "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", + "requires": { + "accepts": "1.3.4", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "1.1.1", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.1", + "finalhandler": "1.1.0", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "2.0.2", + "qs": "6.5.1", + "range-parser": "1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.1", + "serve-static": "1.13.1", + "setprototypeof": "1.1.0", + "statuses": "1.3.1", + "type-is": "1.6.15", + "utils-merge": "1.0.1", + "vary": "1.1.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "requires": { + "mime-types": "2.1.17", + "negotiator": "0.6.1" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + } + } + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -896,6 +3327,27 @@ "is-extglob": "1.0.0" } }, + "extract-text-webpack-plugin": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz", + "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==", + "requires": { + "async": "2.6.0", + "loader-utils": "1.1.0", + "schema-utils": "0.3.0", + "webpack-sources": "1.1.0" + }, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + } + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -916,11 +3368,48 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, + "fastparse": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=" + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "requires": { + "websocket-driver": "0.7.0" + } + }, + "file-loader": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.5.tgz", + "integrity": "sha512-RzGHDatcVNpGISTvCpfUfOGpYuSR7HSsSg87ki+wF6rw1Hm0RALPTiAdsxAq1UwLf0RRhbe22/eHK6nhXspiOQ==", + "requires": { + "loader-utils": "1.1.0", + "schema-utils": "0.3.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + } + }, "fill-range": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", @@ -933,6 +3422,37 @@ "repeat-string": "1.6.1" } }, + "finalhandler": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", + "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + }, + "dependencies": { + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "requires": { + "commondir": "1.0.1", + "make-dir": "1.1.0", + "pkg-dir": "2.0.0" + } + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -942,6 +3462,29 @@ "pinkie-promise": "2.0.1" } }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" + }, + "flush-write-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", + "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "follow-redirects": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", + "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", + "optional": true, + "requires": { + "debug": "2.6.9" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -955,6 +3498,11 @@ "for-in": "1.0.2" } }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -970,6 +3518,52 @@ "mime-types": "2.1.17" } }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "requires": { + "null-check": "1.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "requires": { + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.3" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1779,12 +4373,54 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "optional": true, "requires": { "fstream": "1.0.11", "inherits": "2.0.3", "minimatch": "3.0.4" } }, + "ftp": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", + "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", + "optional": true, + "requires": { + "readable-stream": "1.1.14", + "xregexp": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "optional": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -1800,6 +4436,32 @@ "wide-align": "1.1.2" } }, + "gaze": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", + "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", + "requires": { + "globule": "1.2.0" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "requires": { + "is-property": "1.0.2" + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, "get-pkg-repo": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", @@ -1817,6 +4479,30 @@ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "get-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", + "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", + "optional": true, + "requires": { + "data-uri-to-buffer": "1.2.0", + "debug": "2.6.9", + "extend": "3.0.1", + "file-uri-to-path": "1.0.0", + "ftp": "0.3.10", + "readable-stream": "2.3.3" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1900,11 +4586,51 @@ "is-glob": "2.0.1" } }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.7", + "pify": "3.0.0", + "slash": "1.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "globule": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", + "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", + "requires": { + "glob": "7.1.2", + "lodash": "4.17.4", + "minimatch": "3.0.4" + } + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=" + }, "handlebars": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", @@ -1929,12 +4655,14 @@ "har-schema": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "optional": true }, "har-validator": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "optional": true, "requires": { "ajv": "4.11.8", "har-schema": "1.0.5" @@ -1944,6 +4672,7 @@ "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "optional": true, "requires": { "co": "4.6.0", "json-stable-stringify": "1.0.1" @@ -1951,6 +4680,14 @@ } } }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -1959,6 +4696,26 @@ "ansi-regex": "2.1.1" } }, + "has-binary2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.2.tgz", + "integrity": "sha1-6D26SfC5vk0CbSc2U1DZ8D9Uvpg=", + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" + }, "has-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", @@ -1969,27 +4726,322 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "requires": { + "inherits": "2.0.3" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" + }, + "hipchat-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", + "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", + "optional": true, + "requires": { + "lodash": "4.17.4", + "request": "2.83.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, "hoek": { "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "1.0.0" + } + }, "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "requires": { + "inherits": "2.0.3", + "obuf": "1.1.1", + "readable-stream": "2.3.3", + "wbuf": "1.7.2" + } + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=" + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, + "html-minifier": { + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.7.tgz", + "integrity": "sha512-GISXn6oKDo7+gVpKOgZJTbHMCUI2TSGfpg/8jgencWhWJsvEmsvp3M8emX7QocsXsYznWloLib3OeSfeyb/ewg==", + "requires": { + "camel-case": "3.0.0", + "clean-css": "4.1.9", + "commander": "2.12.2", + "he": "1.1.1", + "ncname": "1.0.0", + "param-case": "2.1.1", + "relateurl": "0.2.7", + "uglify-js": "3.2.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "uglify-js": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.2.1.tgz", + "integrity": "sha512-BhZTJPmOKPSUcjnx2nlfaOQKHLyjjT4HFyzFWF1BUErx9knJNpdW94ql5o8qVxeNL+8IAWjEjnPvASH2yZnkMg==", + "requires": { + "commander": "2.12.2", + "source-map": "0.6.1" + } + } + } + }, + "html-webpack-plugin": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz", + "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=", + "requires": { + "bluebird": "3.5.1", + "html-minifier": "3.5.7", + "loader-utils": "0.2.17", + "lodash": "4.17.4", + "pretty-error": "2.1.1", + "toposort": "1.0.6" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1", + "object-assign": "4.1.1" + } + } + } + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.1.0", + "domutils": "1.1.6", + "readable-stream": "1.0.34" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.4.0" + } + }, + "http-parser-js": { + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.9.tgz", + "integrity": "sha1-6hoE+2St/wJC6ZdPKX3Uw8rSceE=" + }, + "http-proxy": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz", + "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=", + "requires": { + "eventemitter3": "1.2.0", + "requires-port": "1.0.0" + } + }, + "http-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", + "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, + "http-proxy-middleware": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz", + "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", + "requires": { + "http-proxy": "1.16.2", + "is-glob": "3.1.0", + "lodash": "4.17.4", + "micromatch": "2.3.11" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, "http-signature": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", @@ -2000,6 +5052,35 @@ "sshpk": "1.13.1" } }, + "httpntlm": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", + "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", + "requires": { + "httpreq": "0.4.24", + "underscore": "1.7.0" + } + }, + "httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=" + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, "husky": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", @@ -2022,6 +5103,69 @@ } } }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=" + }, + "icss-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", + "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", + "requires": { + "postcss": "6.0.16" + } + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "optional": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "requires": { + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "in-publish": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", + "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=" + }, "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", @@ -2030,6 +5174,22 @@ "repeating": "2.0.1" } }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflection": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.10.0.tgz", + "integrity": "sha1-W//LEZetPoEFD44X4hZoCH7p6y8=", + "optional": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2049,6 +5209,109 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "requires": { + "source-map": "0.5.7" + } + }, + "insert-module-globals": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", + "requires": { + "JSONStream": "1.3.2", + "combine-source-map": "0.7.2", + "concat-stream": "1.5.2", + "is-buffer": "1.1.6", + "lexical-scope": "1.2.0", + "process": "0.11.10", + "through2": "2.0.3", + "xtend": "4.0.1" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + } + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "requires": { + "meow": "3.7.0" + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ip": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.0.1.tgz", + "integrity": "sha1-x+NWzeoiWucbNtcPLnGpK6TkJZA=", + "optional": true + }, + "ipaddr.js": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", + "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=" + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -2075,6 +5338,11 @@ "builtin-modules": "1.1.1" } }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" + }, "is-ci": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", @@ -2083,10 +5351,45 @@ "ci-info": "1.1.2" } }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, + "is-descriptor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.1.tgz", + "integrity": "sha512-G3fFVFTqfaqu7r4YuSBHKBAuOaLz8Sy7ekklUpFEliaLMP1Y2ZjoN9jS62YWCAPQrQpMUQSitRlrzibbuCZjdA==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" }, "is-equal-shallow": { "version": "0.1.3", @@ -2130,6 +5433,17 @@ "is-extglob": "1.0.0" } }, + "is-my-json-valid": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -2143,6 +5457,65 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, + "is-odd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-1.0.0.tgz", + "integrity": "sha1-O4qTLrAos3dcObsJ6RdnrM22kIg=", + "requires": { + "is-number": "3.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + } + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, "is-posix-bracket": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", @@ -2153,11 +5526,42 @@ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, "is-subset": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "requires": { + "html-comment-regex": "1.1.1" + } + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, "is-text-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", @@ -2176,11 +5580,21 @@ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isbinaryfile": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", + "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2239,6 +5653,110 @@ } } }, + "istanbul-api": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.2.1.tgz", + "integrity": "sha512-oFCwXvd65amgaPCzqrR+a2XjanS1MvpXN6l/MlMUTv6uiA1NOgGX+I0uyq8Lg3GDxsxPsaP1049krz3hIJ5+KA==", + "requires": { + "async": "2.6.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-report": "1.1.2", + "istanbul-lib-source-maps": "1.2.2", + "istanbul-reports": "1.1.3", + "js-yaml": "3.10.0", + "mkdirp": "0.5.1", + "once": "1.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", + "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==" + }, + "istanbul-lib-hook": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz", + "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz", + "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", + "requires": { + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" + } + }, + "istanbul-lib-report": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz", + "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz", + "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + } + } + }, + "istanbul-reports": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.3.tgz", + "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", + "requires": { + "handlebars": "4.0.11" + } + }, "jasmine": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", @@ -2262,6 +5780,16 @@ "colors": "1.1.2" } }, + "jasminewd2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", + "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=" + }, + "js-base64": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.0.tgz", + "integrity": "sha512-Wehd+7Pf9tFvGb+ydPm9TjYjV8X1YHOVyG8QyELZxEMqOhemVwGRmoG8iQ/soqI3n8v4xn59zaLxiCJiaaRzKA==" + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -2289,6 +5817,16 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==" + }, "json-parse-better-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", @@ -2309,6 +5847,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "optional": true, "requires": { "jsonify": "0.0.0" } @@ -2318,6 +5857,11 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=" + }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", @@ -2333,6 +5877,11 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -2351,6 +5900,155 @@ } } }, + "jszip": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", + "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", + "requires": { + "core-js": "2.3.0", + "es6-promise": "3.0.2", + "lie": "3.1.1", + "pako": "1.0.6", + "readable-stream": "2.0.6" + }, + "dependencies": { + "core-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", + "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "karma": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.0.tgz", + "integrity": "sha512-K9Kjp8CldLyL9ANSUctDyxC7zH3hpqXj/K09qVf06K3T/kXaHtFZ5tQciK7OzQu68FLvI89Na510kqQ2LCbpIw==", + "requires": { + "bluebird": "3.5.1", + "body-parser": "1.18.2", + "browserify": "14.5.0", + "chokidar": "1.7.0", + "colors": "1.1.2", + "combine-lists": "1.0.1", + "connect": "3.6.5", + "core-js": "2.5.3", + "di": "0.0.1", + "dom-serialize": "2.2.1", + "expand-braces": "0.1.2", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "http-proxy": "1.16.2", + "isbinaryfile": "3.0.2", + "lodash": "4.17.4", + "log4js": "2.3.12", + "mime": "1.6.0", + "minimatch": "3.0.4", + "optimist": "0.6.1", + "qjobs": "1.1.5", + "range-parser": "1.2.0", + "rimraf": "2.6.2", + "safe-buffer": "5.1.1", + "socket.io": "2.0.4", + "source-map": "0.6.1", + "tmp": "0.0.33", + "useragent": "2.2.1" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "karma-chrome-launcher": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", + "requires": { + "fs-access": "1.0.1", + "which": "1.3.0" + } + }, + "karma-cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", + "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", + "requires": { + "resolve": "1.1.7" + } + }, + "karma-coverage-istanbul-reporter": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.3.3.tgz", + "integrity": "sha512-MFkB6bh11J8nKygUdqyHb9sMz17XoBRYR4tiNxnSpi/UtDk0wk8eRGa0jRSJaILgCl4xyq1TL6Jidww1OWly/Q==", + "requires": { + "istanbul-api": "1.2.1", + "minimatch": "3.0.4" + } + }, + "karma-jasmine": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.1.tgz", + "integrity": "sha1-b+hA51oRYAydkehLM8RY4cRqNSk=" + }, + "karma-jasmine-html-reporter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", + "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", + "requires": { + "karma-jasmine": "1.1.1" + } + }, + "karma-source-map-support": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz", + "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=", + "requires": { + "source-map-support": "0.4.18" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "requires": { + "source-map": "0.5.7" + } + } + } + }, + "killable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", + "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=" + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -2359,51 +6057,174 @@ "is-buffer": "1.1.6" } }, + "labeled-stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", + "requires": { + "inherits": "2.0.3", + "isarray": "0.0.1", + "stream-splicer": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + } + } + }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "optional": true + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "invert-kv": "1.0.0" } }, - "license-checker": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-16.0.0.tgz", - "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", - "dev": true, + "less": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", + "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", "requires": { - "chalk": "0.5.1", - "debug": "2.6.9", - "mkdirp": "0.3.5", - "nopt": "2.2.1", - "read-installed": "4.0.3", - "semver": "5.4.1", - "spdx": "0.5.1", - "spdx-correct": "2.0.4", - "spdx-satisfies": "0.1.3", - "treeify": "1.0.1" + "errno": "0.1.4", + "graceful-fs": "4.1.11", + "image-size": "0.5.5", + "mime": "1.6.0", + "mkdirp": "0.5.1", + "promise": "7.3.1", + "request": "2.81.0", + "source-map": "0.5.7" }, "dependencies": { - "ansi-regex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", - "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", - "dev": true - }, - "ansi-styles": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", - "dev": true - }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + } + } + }, + "less-loader": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.5.tgz", + "integrity": "sha1-rhVadAbKxqzSk9eFWH/P8PR4xN0=", + "requires": { + "clone": "2.1.1", + "loader-utils": "1.1.0", + "pify": "2.3.0" + }, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" + } + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "lexical-scope": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "requires": { + "astw": "2.2.0" + } + }, + "libbase64": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", + "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=" + }, + "libmime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", + "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", + "requires": { + "iconv-lite": "0.4.15", + "libbase64": "0.1.0", + "libqp": "1.1.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" + } + } + }, + "libqp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", + "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=" + }, + "license-checker": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-16.0.0.tgz", + "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", + "dev": true, + "requires": { + "chalk": "0.5.1", + "debug": "2.6.9", + "mkdirp": "0.3.5", + "nopt": "2.2.1", + "read-installed": "4.0.3", + "semver": "5.4.1", + "spdx": "0.5.1", + "spdx-correct": "2.0.4", + "spdx-satisfies": "0.1.3", + "treeify": "1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, "chalk": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", @@ -2490,6 +6311,22 @@ } } }, + "license-webpack-plugin": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.1.1.tgz", + "integrity": "sha512-TjKOyiC0exqd4Idy/4M8/DETR22dXBZks387DuS5LbslxHiMRXGx/Q2F/j9IUtvEoH5uFvt72vRgk/G6f8j3Dg==", + "requires": { + "ejs": "2.5.7" + } + }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "requires": { + "immediate": "3.0.6" + } + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -2502,6 +6339,11 @@ "strip-bom": "2.0.0" } }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, "loader-utils": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", @@ -2512,6 +6354,22 @@ "json5": "0.5.1" } }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", @@ -2522,6 +6380,36 @@ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" + }, + "lodash.mergewith": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz", + "integrity": "sha1-FQzwoWeR9ZA7iJHqsVRgknS96lU=" + }, + "lodash.tail": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", + "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=" + }, "lodash.template": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", @@ -2539,11 +6427,161 @@ "lodash._reinterpolate": "3.0.0" } }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, + "log4js": { + "version": "2.3.12", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.3.12.tgz", + "integrity": "sha1-vAObJ6VOhRYp2IE8XaZTG8pTiGY=", + "requires": { + "axios": "0.15.3", + "date-format": "1.2.0", + "debug": "2.6.9", + "hipchat-notifier": "1.1.0", + "loggly": "1.1.1", + "mailgun-js": "0.7.15", + "nodemailer": "2.7.2", + "redis": "2.8.0", + "semver": "5.4.1", + "slack-node": "0.2.0", + "streamroller": "0.6.0" + } + }, + "loggly": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", + "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", + "optional": true, + "requires": { + "json-stringify-safe": "5.0.1", + "request": "2.75.0", + "timespan": "2.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "optional": true + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "optional": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "optional": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", + "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "optional": true, + "requires": { + "chalk": "1.1.3", + "commander": "2.12.2", + "is-my-json-valid": "2.16.1", + "pinkie-promise": "2.0.1" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", + "optional": true + }, + "qs": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "optional": true + }, + "request": { + "version": "2.75.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", + "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "bl": "1.1.2", + "caseless": "0.11.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.0.0", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "node-uuid": "1.4.8", + "oauth-sign": "0.8.2", + "qs": "6.2.3", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.4.3" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "optional": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "optional": true + } + } + }, + "loglevel": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.0.tgz", + "integrity": "sha1-rgyqVhERSYxboTcj1vtjHSQAOTQ=" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -2553,33 +6591,204 @@ "signal-exit": "3.0.2" } }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "macaddress": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", + "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=" + }, + "magic-string": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", + "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", + "requires": { + "vlq": "0.2.3" + } + }, + "mailcomposer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", + "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", + "optional": true, + "requires": { + "buildmail": "4.0.1", + "libmime": "3.0.0" + } + }, + "mailgun-js": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.7.15.tgz", + "integrity": "sha1-7jZqINrGTDwVwD1sGz4O15UlKrs=", + "optional": true, + "requires": { + "async": "2.1.5", + "debug": "2.2.0", + "form-data": "2.1.4", + "inflection": "1.10.0", + "is-stream": "1.1.0", + "path-proxy": "1.0.0", + "proxy-agent": "2.0.0", + "q": "1.4.1", + "tsscmp": "1.0.5" + }, + "dependencies": { + "async": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz", + "integrity": "sha1-5YfGhYCZSsZ/xW/4bTrFa9voELw=", + "optional": true, + "requires": { + "lodash": "4.17.4" + } + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "optional": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "optional": true + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", + "optional": true + } + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "requires": { + "pify": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, "make-error": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.2.tgz", "integrity": "sha512-l9ra35l5VWLF24y75Tg8XgfGLX0ueRhph118WKM6H5denx4bB5QF59+4UAm9oJ2qsPQZas/CQUDdtDdfvYHBdQ==" }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", + "object-visit": "1.0.1" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=" + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "1.1.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", "object-assign": "4.1.1", "read-pkg-up": "1.0.1", "redent": "1.0.0", "trim-newlines": "1.0.0" } }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, "micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", @@ -2600,6 +6809,20 @@ "regex-cache": "0.4.4" } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, "mime-db": { "version": "1.30.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", @@ -2613,6 +6836,21 @@ "mime-db": "1.30.0" } }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=" + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2649,6 +6887,58 @@ "minipass": "2.2.1" } }, + "mississippi": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.0.tgz", + "integrity": "sha1-0gFYPrEjJ+PFwWQqQEqcrPlONPU=", + "requires": { + "concat-stream": "1.6.0", + "duplexify": "3.5.1", + "end-of-stream": "1.4.0", + "flush-write-stream": "1.0.2", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "1.0.3", + "pumpify": "1.3.5", + "stream-each": "1.2.2", + "through2": "2.0.3" + } + }, + "mixin-deep": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.0.tgz", + "integrity": "sha512-dgaCvoh6i1nosAUBKb0l0pfJ78K8+S9fluyIR2YvAeUD/QuMahnFnF3xYty5eYXMjhGSsB0DsW6A0uAZyetoAg==", + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "requires": { + "for-in": "0.1.8", + "is-extendable": "0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -2669,20 +6959,266 @@ "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz", "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=" }, + "module-deps": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "requires": { + "JSONStream": "1.3.2", + "browser-resolve": "1.11.2", + "cached-path-relative": "1.0.1", + "concat-stream": "1.5.2", + "defined": "1.0.0", + "detective": "4.7.1", + "duplexer2": "0.1.4", + "inherits": "2.0.3", + "parents": "1.0.1", + "readable-stream": "2.3.3", + "resolve": "1.1.7", + "stream-combiner2": "1.1.1", + "subarg": "1.0.0", + "through2": "2.0.3", + "xtend": "4.0.1" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "requires": { + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + } + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "multicast-dns": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.1.tgz", + "integrity": "sha512-uV3/ckdsffHx9IrGQrx613mturMdMqQ06WTq+C09NsStJ9iNG6RcUWgPKs1Rfjy+idZT6tfQoXEusGNnEZhT3w==", + "requires": { + "dns-packet": "1.2.2", + "thunky": "0.1.0" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" + }, "nan": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" }, + "nanomatch": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.6.tgz", + "integrity": "sha512-WJ6XTCbvWXUFPbi/bDwKcYkCeOGUHzaJj72KbuPqGn78Ba/F5Vu26Zlo6SuMQbCIst1RGKL1zfWBCOGAlbRLAg==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "is-odd": "1.0.0", + "kind-of": "5.1.0", + "object.pick": "1.3.0", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "ncname": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", + "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", + "requires": { + "xml-char-classes": "1.0.0" + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", + "optional": true + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "requires": { + "lower-case": "1.1.4" + } + }, + "node-forge": { + "version": "0.6.33", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.33.tgz", + "integrity": "sha1-RjgRh59XPUUVWtap9D3ClujoXrw=" + }, + "node-gyp": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", + "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", + "requires": { + "fstream": "1.0.11", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "npmlog": "4.1.2", + "osenv": "0.1.4", + "request": "2.83.0", + "rimraf": "2.2.8", + "semver": "5.3.0", + "tar": "2.2.1", + "which": "1.3.0" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + } + } + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.1.7", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.3", + "stream-browserify": "2.0.1", + "stream-http": "2.7.2", + "string_decoder": "1.0.3", + "timers-browserify": "2.0.4", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "1.2.1", + "ieee754": "1.1.8", + "isarray": "1.0.0" + } + }, + "timers-browserify": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", + "integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==", + "requires": { + "setimmediate": "1.0.5" + } + } + } + }, "node-pre-gyp": { "version": "0.6.39", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", + "optional": true, "requires": { "detect-libc": "1.0.3", "hawk": "3.1.3", @@ -2690,7 +7226,6 @@ "nopt": "4.0.1", "npmlog": "4.1.2", "rc": "1.2.3", - "request": "2.81.0", "rimraf": "2.6.2", "semver": "5.4.1", "tar": "2.2.1", @@ -2701,6 +7236,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "optional": true, "requires": { "abbrev": "1.0.9", "osenv": "0.1.4" @@ -2710,6 +7246,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "optional": true, "requires": { "glob": "7.1.2" } @@ -2718,6 +7255,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "optional": true, "requires": { "block-stream": "0.0.9", "fstream": "1.0.11", @@ -2726,21 +7264,207 @@ } } }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "node-sass": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", + "integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==", "requires": { - "abbrev": "1.0.9" + "async-foreach": "0.1.3", + "chalk": "1.1.3", + "cross-spawn": "3.0.1", + "gaze": "1.1.2", + "get-stdin": "4.0.1", + "glob": "7.1.2", + "in-publish": "2.0.0", + "lodash.assign": "4.2.0", + "lodash.clonedeep": "4.5.0", + "lodash.mergewith": "4.6.0", + "meow": "3.7.0", + "mkdirp": "0.5.1", + "nan": "2.8.0", + "node-gyp": "3.6.2", + "npmlog": "4.1.2", + "request": "2.79.0", + "sass-graph": "2.2.4", + "stdout-stream": "1.4.0", + "true-case-path": "1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "requires": { + "chalk": "1.1.3", + "commander": "2.12.2", + "is-my-json-valid": "2.16.1", + "pinkie-promise": "2.0.1" + } + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=" + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.11.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "qs": "6.3.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.4.3", + "uuid": "3.1.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" + } } }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "nodemailer": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", + "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", + "optional": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", + "libmime": "3.0.0", + "mailcomposer": "4.0.1", + "nodemailer-direct-transport": "3.3.2", + "nodemailer-shared": "1.1.0", + "nodemailer-smtp-pool": "2.8.2", + "nodemailer-smtp-transport": "2.7.2", + "socks": "1.1.9" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "optional": true + }, + "socks": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", + "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", + "optional": true, + "requires": { + "ip": "1.1.5", + "smart-buffer": "1.1.15" + } + } + } + }, + "nodemailer-direct-transport": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", + "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-fetch": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", + "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=" + }, + "nodemailer-shared": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", + "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", + "requires": { + "nodemailer-fetch": "1.6.0" + } + }, + "nodemailer-smtp-pool": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", + "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "nodemailer-wellknown": "0.1.10", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-smtp-transport": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", + "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "nodemailer-wellknown": "0.1.10", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-wellknown": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", + "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=" + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1.0.9" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", "semver": "5.4.1", "validate-npm-package-license": "3.0.1" } @@ -2753,6 +7477,30 @@ "remove-trailing-separator": "1.1.0" } }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "requires": { + "object-assign": "4.1.1", + "prepend-http": "1.0.4", + "query-string": "4.3.4", + "sort-keys": "1.1.2" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "2.0.1" + } + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -2764,6 +7512,24 @@ "set-blocking": "2.0.0" } }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "requires": { + "boolbase": "1.0.0" + } + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=" + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -2779,6 +7545,68 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + } + } + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -2788,6 +7616,39 @@ "is-extendable": "0.1.1" } }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "obuf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz", + "integrity": "sha1-EEEktsYCxnlogaBCVB0220OlJk4=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2796,6 +7657,14 @@ "wrappy": "1.0.2" } }, + "opn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.1.0.tgz", + "integrity": "sha512-iPNl7SyM8L30Rm1sjGdLLheyHVw5YXVfi3SKWJzBI7efxRwHojfRFjwE/OLM6qp9xJYMgab8WicTU1cPoY+Hpg==", + "requires": { + "is-wsl": "1.1.0" + } + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -2832,11 +7701,48 @@ } } }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" + }, + "original": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", + "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", + "requires": { + "url-parse": "1.0.5" + }, + "dependencies": { + "url-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", + "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", + "requires": { + "querystringify": "0.0.4", + "requires-port": "1.0.0" + } + } + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -2851,6 +7757,110 @@ "os-tmpdir": "1.0.2" } }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" + }, + "pac-proxy-agent": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz", + "integrity": "sha512-QBELCWyLYPgE2Gj+4wUEiMscHrQ8nRPBzYItQNOHWavwBt25ohZHQC4qnd5IszdVVrFbLsQ+dPkm6eqdjJAmwQ==", + "optional": true, + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1", + "get-uri": "2.0.1", + "http-proxy-agent": "1.0.0", + "https-proxy-agent": "1.0.0", + "pac-resolver": "2.0.0", + "raw-body": "2.3.2", + "socks-proxy-agent": "2.1.1" + } + }, + "pac-resolver": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-2.0.0.tgz", + "integrity": "sha1-mbiNLxk/ve78HJpSnB8yYKtSd80=", + "optional": true, + "requires": { + "co": "3.0.6", + "degenerator": "1.0.4", + "ip": "1.0.1", + "netmask": "1.0.6", + "thunkify": "2.1.2" + }, + "dependencies": { + "co": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/co/-/co-3.0.6.tgz", + "integrity": "sha1-FEXyJsXrlWE45oyawwFn6n0ua9o=", + "optional": true + } + } + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "requires": { + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "requires": { + "no-case": "2.3.2" + } + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "requires": { + "path-platform": "0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "requires": { + "asn1.js": "4.9.2", + "browserify-aes": "1.1.1", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.14" + } + }, "parse-github-repo-url": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", @@ -2875,6 +7885,47 @@ "error-ex": "1.3.1" } }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "requires": { + "better-assert": "1.0.2" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "requires": { + "better-assert": "1.0.2" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", @@ -2888,11 +7939,48 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" + }, + "path-proxy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", + "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", + "optional": true, + "requires": { + "inflection": "1.3.8" + }, + "dependencies": { + "inflection": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", + "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", + "optional": true + } + } + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -2903,10 +7991,23 @@ "pinkie-promise": "2.0.1" } }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "requires": { + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.9" + } + }, "performance-now": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "optional": true }, "pify": { "version": "2.3.0", @@ -2926,626 +8027,1169 @@ "pinkie": "2.0.4" } }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "find-up": "2.1.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "requires": { - "kind-of": "3.2.2" + "locate-path": "2.0.0" + } + } + } + }, + "portfinder": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", + "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", + "requires": { + "async": "1.5.2", + "debug": "2.6.9", + "mkdirp": "0.5.1" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "postcss": { + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", + "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "requires": { + "chalk": "2.3.0", + "source-map": "0.6.1", + "supports-color": "5.1.0" + }, + "dependencies": { + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "requires": { - "is-buffer": "1.1.6" + "has-flag": "2.0.0" } } } }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "supports-color": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", + "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", "requires": { - "is-buffer": "1.1.6" + "has-flag": "2.0.0" } } } }, - "rc": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.3.tgz", - "integrity": "sha1-UVdakA+N1oOBxxC0cSwhVMPiA1s=", + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "postcss": "5.2.18", + "postcss-message-helpers": "2.0.0", + "reduce-css-calc": "1.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "read-installed": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", - "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", - "dev": true, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.12", - "readdir-scoped-modules": "1.0.2", - "semver": "5.4.1", - "slide": "1.1.6", - "util-extend": "1.0.3" + "colormin": "1.1.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "read-package-json": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", - "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", - "dev": true, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-better-errors": "1.0.1", - "normalize-package-data": "2.4.0", - "slash": "1.0.0" + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "readdir-scoped-modules": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", - "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", - "dev": true, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.4.0" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "postcss": "5.2.18", + "uniqs": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "postcss-filter-plugins": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", + "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", "requires": { - "is-equal-shallow": "0.1.3" + "postcss": "5.2.18", + "uniqid": "4.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "postcss-import": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.0.0.tgz", + "integrity": "sha1-qWLi34LTvFptpqOGhBdHIE9B71s=", "requires": { - "is-finite": "1.0.2" + "postcss": "6.0.16", + "postcss-value-parser": "3.3.0", + "read-cache": "1.0.0", + "resolve": "1.1.7" } }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1", + "postcss-load-options": "1.2.0", + "postcss-load-plugins": "2.3.0" } }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "optional": true, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", "requires": { - "align-text": "0.1.4" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" } }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" - }, - "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", "requires": { - "symbol-observable": "1.0.1" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" } }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - }, - "semver-intersect": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.2.0.tgz", - "integrity": "sha512-XwQtuo56XVJd4JDV90L9RWjBluxWcnKDlQivIlF+Jvdhqgvk7KAroAqs8aJ/hjQW0wNPSSWDxhJLzYX+dwb13A==", + "postcss-loader": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.0.10.tgz", + "integrity": "sha512-xQaDcEgJ/2JqFY18zpFkik8vyYs7oS5ZRbrjvDqkP97k2wYWfPT4+qA0m4o3pTSCsz0u26PNqs8ZO9FRUWAqrA==", "requires": { - "semver": "5.4.1" + "loader-utils": "1.1.0", + "postcss": "6.0.16", + "postcss-load-config": "1.2.0", + "schema-utils": "0.3.0" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", "requires": { - "hoek": "2.16.3" + "has": "1.0.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", "requires": { - "source-map": "0.5.7" - } - }, - "spdx": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", - "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", - "dev": true, - "requires": { - "spdx-exceptions": "1.0.5", - "spdx-license-ids": "1.2.2" + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "spdx-compare": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", - "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", - "dev": true, - "requires": { - "spdx-expression-parse": "1.0.4", - "spdx-ranges": "1.0.1" + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "requires": { + "browserslist": "1.7.7", + "caniuse-api": "1.6.1", + "postcss": "5.2.18", + "postcss-selector-parser": "2.2.3", + "vendors": "1.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000780", + "electron-to-chromium": "1.3.28" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "requires": { - "spdx-license-ids": "1.2.2" - } + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=" }, - "spdx-exceptions": { + "postcss-minify-font-values": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", - "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", - "dev": true - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" - }, - "spdx-ranges": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", - "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", - "dev": true - }, - "spdx-satisfies": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", - "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", - "dev": true, + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", "requires": { - "spdx-compare": "0.1.2", - "spdx-expression-parse": "1.0.4" + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", "requires": { - "through": "2.3.8" + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", "requires": { - "through2": "2.0.3" + "alphanum-sort": "1.0.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0", + "uniqs": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "alphanum-sort": "1.0.2", + "has": "1.0.1", + "postcss": "5.2.18", + "postcss-selector-parser": "2.2.3" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } } } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "postcss-modules-extract-imports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz", + "integrity": "sha1-thTJcgvmgW6u41+zpfqh26agXds=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "postcss": "6.0.16" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "postcss-modules-local-by-default": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", + "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", "requires": { - "safe-buffer": "5.1.1" + "css-selector-tokenizer": "0.7.0", + "postcss": "6.0.16" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + "postcss-modules-scope": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", + "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "requires": { + "css-selector-tokenizer": "0.7.0", + "postcss": "6.0.16" + } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "postcss-modules-values": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", + "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", "requires": { - "has-flag": "1.0.0" + "icss-replace-symbols": "1.1.0", + "postcss": "6.0.16" } }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "tar": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", - "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", "requires": { - "chownr": "1.0.1", - "minipass": "2.2.1", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "yallist": "3.0.2" + "postcss": "5.2.18" }, "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } } } }, - "tar-pack": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.3", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" + "is-absolute-url": "2.1.0", + "normalize-url": "1.9.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" }, "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "glob": "7.1.2" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } } }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" } } } }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", "requires": { - "os-tmpdir": "1.0.2", - "rimraf": "2.2.8" + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "text-extensions": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", - "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", "requires": { - "punycode": "1.4.1" + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } } }, - "treeify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.0.1.tgz", - "integrity": "sha1-abPNAiAioWhCTnz6HO1EyTnT6y8=", - "dev": true - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" - }, - "ts-node": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-2.1.2.tgz", - "integrity": "sha1-RQh7ReezcbPa8E7MRw7CmoNmVeo=", + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", "requires": { - "arrify": "1.0.1", - "chalk": "1.1.3", - "diff": "3.4.0", - "make-error": "1.3.2", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "pinkie": "2.0.4", - "source-map-support": "0.4.18", - "tsconfig": "6.0.0", - "v8flags": "2.1.1", - "xtend": "4.0.1", - "yn": "1.3.0" + "has": "1.0.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" }, "dependencies": { "ansi-styles": { @@ -3553,194 +9197,3830 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "requires": { + "flatten": "1.0.2", + "indexes-of": "1.0.1", + "uniq": "1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "requires": { + "is-svg": "2.1.0", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0", + "svgo": "0.7.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.18", + "uniqs": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, + "postcss-url": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.0.tgz", + "integrity": "sha512-VBP6uf6iL3AZra23nkPkOEkS/5azj1xf/toRrjfkolfFEgg9Gyzg9UhJZeIsz12EGKZTNVeGbPa2XtaZm/iZvg==", + "requires": { + "mime": "1.6.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "postcss": "6.0.16", + "xxhashjs": "0.2.1" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.18", + "uniqs": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "requires": { + "renderkid": "2.0.1", + "utila": "0.4.0" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "optional": true, + "requires": { + "asap": "2.0.6" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "protractor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.0.tgz", + "integrity": "sha512-8z1TWtc/I9Kn4fkfg87DhkSAi0arul7DHBEeJ70sy66teQAeffjQED1s0Gduigme7hxHRYdYEKbhHYz28fpv5w==", + "requires": { + "@types/node": "6.0.96", + "@types/q": "0.0.32", + "@types/selenium-webdriver": "2.53.43", + "blocking-proxy": "1.0.1", + "chalk": "1.1.3", + "glob": "7.1.2", + "jasmine": "2.8.0", + "jasminewd2": "2.2.0", + "optimist": "0.6.1", + "q": "1.4.1", + "saucelabs": "1.3.0", + "selenium-webdriver": "3.6.0", + "source-map-support": "0.4.18", + "webdriver-js-extender": "1.0.0", + "webdriver-manager": "12.0.6" + }, + "dependencies": { + "adm-zip": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", + "integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "requires": { + "source-map": "0.5.7" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "webdriver-manager": { + "version": "12.0.6", + "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", + "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", + "requires": { + "adm-zip": "0.4.7", + "chalk": "1.1.3", + "del": "2.2.2", + "glob": "7.1.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "q": "1.4.1", + "request": "2.83.0", + "rimraf": "2.6.2", + "semver": "5.4.1", + "xml2js": "0.4.19" + } + } + } + }, + "proxy-addr": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", + "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", + "requires": { + "forwarded": "0.1.2", + "ipaddr.js": "1.5.2" + } + }, + "proxy-agent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz", + "integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=", + "optional": true, + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1", + "http-proxy-agent": "1.0.0", + "https-proxy-agent": "1.0.0", + "lru-cache": "2.6.5", + "pac-proxy-agent": "1.1.0", + "socks-proxy-agent": "2.1.1" + }, + "dependencies": { + "lru-cache": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", + "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", + "optional": true + } + } + }, + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "parse-asn1": "5.1.0", + "randombytes": "2.0.5" + } + }, + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "requires": { + "end-of-stream": "1.4.0", + "once": "1.4.0" + } + }, + "pumpify": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.3.5.tgz", + "integrity": "sha1-G2ccYZlAq8rqwK0OOjwWS+dgmTs=", + "requires": { + "duplexify": "3.5.1", + "inherits": "2.0.3", + "pump": "1.0.3" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qjobs": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.5.tgz", + "integrity": "sha1-ZZ3p8s+NzCehSBJ28gU3cnI4LnM=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "optional": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "requires": { + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "querystringify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", + "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", + "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", + "requires": { + "randombytes": "2.0.5", + "safe-buffer": "5.1.1" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + } + }, + "raw-loader": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", + "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" + }, + "rc": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.3.tgz", + "integrity": "sha1-UVdakA+N1oOBxxC0cSwhVMPiA1s=", + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "requires": { + "pify": "2.3.0" + } + }, + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, + "requires": { + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.12", + "readdir-scoped-modules": "1.0.2", + "semver": "5.4.1", + "slide": "1.1.6", + "util-extend": "1.0.3" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "requires": { + "readable-stream": "2.3.3" + } + }, + "read-package-json": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", + "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", + "dev": true, + "requires": { + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "json-parse-better-errors": "1.0.1", + "normalize-package-data": "2.4.0", + "slash": "1.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "dev": true, + "requires": { + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "redis": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "optional": true, + "requires": { + "double-ended-queue": "2.1.0-0", + "redis-commands": "1.3.1", + "redis-parser": "2.6.0" + } + }, + "redis-commands": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz", + "integrity": "sha1-gdgm9F+pyLIBH0zXoP5ZfSQdRCs=", + "optional": true + }, + "redis-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", + "optional": true + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "requires": { + "balanced-match": "0.4.2", + "math-expression-evaluator": "1.2.17", + "reduce-function-call": "1.0.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "requires": { + "balanced-match": "0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + } + } + }, + "reflect-metadata": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", + "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=" + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regex-not": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.0.tgz", + "integrity": "sha1-Qvg+OXcWIt+CawKvF2Ul1qXxV/k=", + "requires": { + "extend-shallow": "2.0.1" + } + }, + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "requires": { + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "requires": { + "jsesc": "0.5.0" + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "requires": { + "css-select": "1.2.0", + "dom-converter": "0.1.4", + "htmlparser2": "3.3.0", + "strip-ansi": "3.0.1", + "utila": "0.3.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" + } + } + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "1.0.2" + } + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "requestretry": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.12.2.tgz", + "integrity": "sha512-wDYnH4imurLs5upu31WoPaOFfEu31qhFlF7KgpYbBsmBagFmreZZo8E/XpoQ3erCP5za+72t8k8QI4wlrtwVXw==", + "optional": true, + "requires": { + "extend": "3.0.1", + "lodash": "4.17.4", + "request": "2.83.0", + "when": "3.7.8" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "requires": { + "resolve-from": "3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "requires": { + "aproba": "1.2.0" + } + }, + "rxjs": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", + "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "sass-graph": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", + "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "requires": { + "glob": "7.1.2", + "lodash": "4.17.4", + "scss-tokenizer": "0.2.3", + "yargs": "7.1.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "requires": { + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "5.0.0" + } + } + } + }, + "sass-loader": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", + "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", + "requires": { + "async": "2.6.0", + "clone-deep": "0.3.0", + "loader-utils": "1.1.0", + "lodash.tail": "4.1.1", + "pify": "3.0.0" + }, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "saucelabs": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", + "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", + "requires": { + "https-proxy-agent": "1.0.0" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "requires": { + "ajv": "5.5.2" + } + }, + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "requires": { + "js-base64": "2.4.0", + "source-map": "0.4.4" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + }, + "selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "requires": { + "jszip": "3.1.5", + "rimraf": "2.6.2", + "tmp": "0.0.30", + "xml2js": "0.4.19" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", + "requires": { + "os-tmpdir": "1.0.2" + } + } + } + }, + "selfsigned": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.1.tgz", + "integrity": "sha1-v4y3uDJWxFUeMTR8YxF3jbme7FI=", + "requires": { + "node-forge": "0.6.33" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "requires": { + "semver": "5.4.1" + } + }, + "semver-intersect": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.2.0.tgz", + "integrity": "sha512-XwQtuo56XVJd4JDV90L9RWjBluxWcnKDlQivIlF+Jvdhqgvk7KAroAqs8aJ/hjQW0wNPSSWDxhJLzYX+dwb13A==", + "requires": { + "semver": "5.4.1" + } + }, + "send": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", + "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "requires": { + "debug": "2.6.9", + "depd": "1.1.1", + "destroy": "1.0.4", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.3.1" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + } + } + }, + "serialize-javascript": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", + "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=" + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "requires": { + "accepts": "1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "1.0.3", + "http-errors": "1.6.2", + "mime-types": "2.1.17", + "parseurl": "1.3.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "requires": { + "mime-types": "2.1.17", + "negotiator": "0.6.1" + } + } + } + }, + "serve-static": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "requires": { + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "requires": { + "to-object-path": "0.3.0" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + }, + "sha.js": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", + "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "requires": { + "is-extendable": "0.1.1", + "kind-of": "2.0.1", + "lazy-cache": "0.2.7", + "mixin-object": "2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "requires": { + "json-stable-stringify": "0.0.1", + "sha.js": "2.4.9" + }, + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "requires": { + "jsonify": "0.0.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "requires": { + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "silent-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", + "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", + "requires": { + "debug": "2.6.9" + } + }, + "slack-node": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", + "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", + "optional": true, + "requires": { + "requestretry": "1.12.2" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "smart-buffer": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", + "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" + }, + "smtp-connection": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", + "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", + "requires": { + "httpntlm": "1.6.1", + "nodemailer-shared": "1.1.0" + } + }, + "snapdragon": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", + "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "2.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "3.2.2" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.16.3" + } + }, + "socket.io": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", + "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", + "requires": { + "debug": "2.6.9", + "engine.io": "3.1.4", + "socket.io-adapter": "1.1.1", + "socket.io-client": "2.0.4", + "socket.io-parser": "3.1.2" + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" + }, + "socket.io-client": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", + "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "2.6.9", + "engine.io-client": "3.1.4", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "3.1.2", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.2.tgz", + "integrity": "sha1-28IoIVH8T6675Aru3Ady66YZ9/I=", + "requires": { + "component-emitter": "1.2.1", + "debug": "2.6.9", + "has-binary2": "1.0.2", + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + } + } + }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "requires": { + "faye-websocket": "0.10.0", + "uuid": "3.1.0" + } + }, + "sockjs-client": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", + "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", + "requires": { + "debug": "2.6.9", + "eventsource": "0.1.6", + "faye-websocket": "0.11.1", + "inherits": "2.0.3", + "json3": "3.3.2", + "url-parse": "1.2.0" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "requires": { + "websocket-driver": "0.7.0" + } + } + } + }, + "socks": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", + "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "requires": { + "ip": "1.1.5", + "smart-buffer": "1.1.15" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + } + } + }, + "socks-proxy-agent": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", + "integrity": "sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw==", + "requires": { + "agent-base": "2.1.1", + "extend": "3.0.1", + "socks": "1.1.10" + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "1.1.0" + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-loader": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.3.tgz", + "integrity": "sha512-MYbFX9DYxmTQFfy2v8FC1XZwpwHKYxg3SK8Wb7VPBKuhDjz8gi9re2819MsG4p49HDyiOSUKlmZ+nQBArW5CGw==", + "requires": { + "async": "2.6.0", + "loader-utils": "0.2.17", + "source-map": "0.6.1" + }, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1", + "object-assign": "4.1.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "requires": { + "atob": "2.0.3", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", + "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", + "requires": { + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "spdx": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", + "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", + "dev": true, + "requires": { + "spdx-exceptions": "1.0.5", + "spdx-license-ids": "1.2.2" + } + }, + "spdx-compare": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", + "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", + "dev": true, + "requires": { + "spdx-expression-parse": "1.0.4", + "spdx-ranges": "1.0.1" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-exceptions": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", + "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", + "dev": true + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "spdx-ranges": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", + "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", + "dev": true + }, + "spdx-satisfies": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", + "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", + "dev": true, + "requires": { + "spdx-compare": "0.1.2", + "spdx-expression-parse": "1.0.4" + } + }, + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "requires": { + "debug": "2.6.9", + "handle-thing": "1.2.5", + "http-deceiver": "1.2.7", + "safe-buffer": "5.1.1", + "select-hose": "2.0.0", + "spdy-transport": "2.0.20" + } + }, + "spdy-transport": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", + "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", + "requires": { + "debug": "2.6.9", + "detect-node": "2.0.3", + "hpack.js": "2.1.6", + "obuf": "1.1.1", + "readable-stream": "2.3.3", + "safe-buffer": "5.1.1", + "wbuf": "1.7.2" + } + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "requires": { + "through": "2.3.8" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "requires": { + "through2": "2.0.3" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "ssri": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz", + "integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "stdout-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", + "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "requires": { + "readable-stream": "2.3.3" + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "requires": { + "duplexer2": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "requires": { + "end-of-stream": "1.4.0", + "stream-shift": "1.0.0" + } + }, + "stream-http": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "streamroller": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.6.0.tgz", + "integrity": "sha1-CV17BsfMUlg1ytLlmPdrseDuaTo=", + "requires": { + "date-format": "1.2.0", + "debug": "2.6.9", + "mkdirp": "0.5.1", + "readable-stream": "2.3.3" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "requires": { + "get-stdin": "4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "style-loader": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz", + "integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==", + "requires": { + "loader-utils": "1.1.0", + "schema-utils": "0.3.0" + } + }, + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "requires": { + "css-parse": "1.7.0", + "debug": "2.6.9", + "glob": "7.0.6", + "mkdirp": "0.5.1", + "sax": "0.5.8", + "source-map": "0.1.43" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "stylus-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.1.tgz", + "integrity": "sha1-d/SzT9Aw0lsmF7z1UT21sHMMQIk=", + "requires": { + "loader-utils": "1.1.0", + "lodash.clonedeep": "4.5.0", + "when": "3.6.4" + }, + "dependencies": { + "when": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", + "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=" + } + } + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "requires": { + "minimist": "1.2.0" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "requires": { + "has-flag": "1.0.0" + } + }, + "svgo": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "requires": { + "coa": "1.0.4", + "colors": "1.1.2", + "csso": "2.3.2", + "js-yaml": "3.7.0", + "mkdirp": "0.5.1", + "sax": "1.2.4", + "whet.extend": "0.9.9" + }, + "dependencies": { + "js-yaml": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "requires": { + "argparse": "1.0.9", + "esprima": "2.7.3" + } + } + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + }, + "syntax-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", + "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", + "requires": { + "acorn": "4.0.13" + } + }, + "tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" + }, + "tar": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", + "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", + "requires": { + "chownr": "1.0.1", + "minipass": "2.2.1", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "yallist": "3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + } + } + }, + "tar-pack": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", + "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", + "optional": true, + "requires": { + "debug": "2.6.9", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.2", + "tar": "2.2.1", + "uid-number": "0.0.6" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "optional": true, + "requires": { + "glob": "7.1.2" + } + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "optional": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + } + } + }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "requires": { + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" + } + }, + "text-extensions": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", + "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "thunkify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", + "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", + "optional": true + }, + "thunky": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", + "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=" + }, + "time-stamp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.0.0.tgz", + "integrity": "sha1-lcakRTDhW6jW9KPsuMOj+sRto1c=" + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "requires": { + "process": "0.11.10" + } + }, + "timespan": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", + "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", + "optional": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.1.tgz", + "integrity": "sha1-FTWL7kosg712N3uh3ASdDxiDeq4=", + "requires": { + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "regex-not": "1.0.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + } + } + } + }, + "toposort": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", + "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=" + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "tree-kill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==" + }, + "treeify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.0.1.tgz", + "integrity": "sha1-abPNAiAioWhCTnz6HO1EyTnT6y8=", + "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "true-case-path": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", + "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "requires": { + "glob": "6.0.4" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "ts-node": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-4.1.0.tgz", + "integrity": "sha512-xcZH12oVg9PShKhy3UHyDmuDLV3y7iKwX25aMVPt1SIXSuAfWkFiGPEkg+th8R4YKW/QCxDoW7lJdb15lx6QWg==", + "requires": { + "arrify": "1.0.1", + "chalk": "2.3.0", + "diff": "3.4.0", + "make-error": "1.3.2", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map-support": "0.5.0", + "tsconfig": "7.0.0", + "v8flags": "3.0.1", + "yn": "2.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "2.0.0" + } + }, + "tsconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", + "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", + "requires": { + "@types/strip-bom": "3.0.0", + "@types/strip-json-comments": "0.0.30", + "strip-bom": "3.0.0", + "strip-json-comments": "2.0.1" + } + }, + "v8flags": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.1.tgz", + "integrity": "sha1-3Oj8N5wX2fLJ6e142JzgAFKxt2s=", + "requires": { + "homedir-polyfill": "1.0.1" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, + "tsickle": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.26.0.tgz", + "integrity": "sha512-eWJ2CUfttGK0LqF9iJ/Avnxbj4M+fCyJ50Zag3wm73Fut1hsasPRHKxKdrMWVj4BMHnQNx7TO+DdNmLmJTSuNw==", + "requires": { + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map": "0.5.7", + "source-map-support": "0.4.18" + }, + "dependencies": { + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "requires": { + "source-map": "0.5.7" + } + } + } + }, + "tslib": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", + "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" + }, + "tslint": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "requires": { + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.3.0", + "commander": "2.12.2", + "diff": "3.4.0", + "glob": "7.1.2", + "js-yaml": "3.10.0", + "minimatch": "3.0.4", + "resolve": "1.5.0", + "semver": "5.4.1", + "tslib": "1.8.1", + "tsutils": "2.16.0" + }, + "dependencies": { + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "requires": { + "path-parse": "1.0.5" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "tsscmp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", + "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", + "optional": true + }, + "tsutils": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", + "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", + "requires": { + "tslib": "1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.17" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=" + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.1.8.tgz", + "integrity": "sha512-XG8/QmR1pyPeE1kj2aigo5kos8umefB31zW+PMvAAytHSB0T/vQvN6sqt8+Sh+y0b0A7zlmxNi2dzRnj0wcqGA==", + "requires": { + "cacache": "10.0.1", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.2", + "serialize-javascript": "1.4.0", + "source-map": "0.6.1", + "uglify-es": "3.3.8", + "webpack-sources": "1.1.0", + "worker-farm": "1.5.2" + }, + "dependencies": { + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "schema-utils": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.2.tgz", + "integrity": "sha512-LCuuUj7L43TbSIqeERp+/Z2FH/NxSA48mqcWlGTSYUUKsevGafj2SpyaFVTxyWWFLkIAS3p7jDTLpNsrU7PXoA==", + "requires": { + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.3.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "2.0.0" + } + }, + "uglify-es": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.8.tgz", + "integrity": "sha512-j8li0jWcAN6yBuAVYFZEFyYINZAm4WEdMwkA6qXFi4TLrze3Mp0Le7QjW6LR9HQjQJ2zRa9VgnFLs3PatijWOw==", + "requires": { + "commander": "2.13.0", + "source-map": "0.6.1" + } + } + } + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "optional": true + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "umd": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=" + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, + "uniqid": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-4.1.1.tgz", + "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", + "requires": { + "macaddress": "0.2.8" + } + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=" + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "requires": { + "unique-slug": "2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "requires": { + "imurmurhash": "0.1.4" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-loader": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.6.2.tgz", + "integrity": "sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q==", + "requires": { + "loader-utils": "1.1.0", + "mime": "1.6.0", + "schema-utils": "0.3.0" + } + }, + "url-parse": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", + "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==", + "requires": { + "querystringify": "1.0.0", + "requires-port": "1.0.0" + }, + "dependencies": { + "querystringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", + "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=" + } + } + }, + "use": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", + "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=", + "requires": { + "define-property": "0.2.5", + "isobject": "3.0.1", + "lazy-cache": "2.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "0.1.0" + } + } + } + }, + "useragent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", + "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", + "requires": { + "lru-cache": "2.2.4", + "tmp": "0.0.33" + }, + "dependencies": { + "lru-cache": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=" + } + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", + "dev": true + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "uws": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz", + "integrity": "sha1-Z6rzPEaypYel9mZtAPdpEyjxSdw=", + "optional": true + }, + "v8-profiler": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/v8-profiler/-/v8-profiler-5.7.0.tgz", + "integrity": "sha1-6DgcvrtbX9DKjSsJ9qAYGhWNs00=", + "optional": true, + "requires": { + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" + } + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "vendors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", + "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" + }, + "watchpack": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", + "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", + "requires": { + "async": "2.6.0", + "chokidar": "1.7.0", + "graceful-fs": "4.1.11" + }, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "wbuf": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.2.tgz", + "integrity": "sha1-1pe5nx9ZUS3ydRvkJ2nBWAtYAf4=", + "requires": { + "minimalistic-assert": "1.0.0" + } + }, + "webdriver-js-extender": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", + "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", + "requires": { + "@types/selenium-webdriver": "2.53.43", + "selenium-webdriver": "2.53.3" + }, + "dependencies": { + "sax": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz", + "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=" + }, + "selenium-webdriver": { + "version": "2.53.3", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", + "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", + "requires": { + "adm-zip": "0.4.4", + "rimraf": "2.2.8", + "tmp": "0.0.24", + "ws": "1.1.5", + "xml2js": "0.4.4" + } + }, + "tmp": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", + "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=" + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" + }, + "ws": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", + "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "requires": { + "options": "0.0.6", + "ultron": "1.0.2" + } + }, + "xml2js": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", + "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", + "requires": { + "sax": "0.6.1", + "xmlbuilder": "9.0.4" + } + } + } + }, + "webpack": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz", + "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==", + "requires": { + "acorn": "5.4.1", + "acorn-dynamic-import": "2.0.2", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "async": "2.6.0", + "enhanced-resolve": "3.4.1", + "escope": "3.6.0", + "interpret": "1.1.0", + "json-loader": "0.5.7", + "json5": "0.5.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "mkdirp": "0.5.1", + "node-libs-browser": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.5.0", + "tapable": "0.2.8", + "uglifyjs-webpack-plugin": "0.4.6", + "watchpack": "1.4.0", + "webpack-sources": "1.1.0", + "yargs": "8.0.2" + }, + "dependencies": { + "acorn": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", + "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "2.0.0" + } + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "requires": { + "source-map": "0.5.7", + "uglify-js": "2.8.29", + "webpack-sources": "1.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "requires": { + "source-list-map": "0.1.8", + "source-map": "0.4.4" + }, + "dependencies": { + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=" + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "webpack-dev-middleware": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz", + "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", + "requires": { + "memory-fs": "0.4.1", + "mime": "1.6.0", + "path-is-absolute": "1.0.1", + "range-parser": "1.2.0", + "time-stamp": "2.0.0" + } + }, + "webpack-dev-server": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.0.tgz", + "integrity": "sha512-lXzc36DGjKUVinETNmDWhfZFRbHMhatuF+lKex+czqY+JVe0Qf2V+Ig6/svDdbt/DmXFXuLQmSqhncYCqYf3qA==", + "requires": { + "ansi-html": "0.0.7", + "array-includes": "3.0.3", + "bonjour": "3.5.0", + "chokidar": "2.0.0", + "compression": "1.7.1", + "connect-history-api-fallback": "1.5.0", + "debug": "3.1.0", + "del": "3.0.0", + "express": "4.16.2", + "html-entities": "1.2.1", + "http-proxy-middleware": "0.17.4", + "import-local": "1.0.0", + "internal-ip": "1.2.0", + "ip": "1.1.5", + "killable": "1.0.0", + "loglevel": "1.6.0", + "opn": "5.1.0", + "portfinder": "1.0.13", + "selfsigned": "1.10.1", + "serve-index": "1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.1.4", + "spdy": "3.4.7", + "strip-ansi": "4.0.0", + "supports-color": "5.1.0", + "webpack-dev-middleware": "1.12.2", + "yargs": "6.6.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "3.1.4", + "normalize-path": "2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.0.tgz", + "integrity": "sha512-P4O8UQRdGiMLWSizsApmXVQDBS6KCt7dSexgLKBmH5Hr1CZq7vsnscFh8oR1sP1ab1Zj0uCHCEzZeV6SfUf3rA==", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.1", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.1" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "chokidar": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.0.tgz", + "integrity": "sha512-OgXCNv2U6TnG04D3tth0gsvdbV4zdbxFG3sYUqcoQMoEFVd1j1pZR6TZ8iknC45o9IJ6PeQI/J6wT/+cHcniAw==", + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.0", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + } + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "requires": { + "globby": "6.1.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "p-map": "1.2.0", + "pify": "3.0.0", + "rimraf": "2.2.8" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "extglob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.2.tgz", + "integrity": "sha512-I0+eZBH+jFGL8F5BnIz2ON2nKCjTS3AS3H/5PeSmCp7UVC70Ym8IhdRiQly2juKYQ//f7z1aj1BRpQniFJoU1w==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "micromatch": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.4.tgz", + "integrity": "sha512-kFRtviKYoAJT+t7HggMl0tBFGNAKLw/S7N+CO9qfEQyisob1Oy4pao+geRbkyeEd+V9aOkvZ4mhuyPvI/q9Sfg==", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.0", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "extglob": "2.0.2", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.6", + "object.pick": "1.3.0", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "tsconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", - "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", - "requires": { - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "strip-bom": { + "pify": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - } - } - }, - "tslib": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", - "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" - }, - "tslint": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", - "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", - "requires": { - "babel-code-frame": "6.26.0", - "builtin-modules": "1.1.1", - "chalk": "2.3.0", - "commander": "2.12.2", - "diff": "3.4.0", - "glob": "7.1.2", - "js-yaml": "3.10.0", - "minimatch": "3.0.4", - "resolve": "1.5.0", - "semver": "5.4.1", - "tslib": "1.8.1", - "tsutils": "2.16.0" - }, - "dependencies": { - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "path-parse": "1.0.5" + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", + "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "requires": { + "has-flag": "2.0.0" + } + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "requires": { + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "4.2.1" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "requires": { + "camelcase": "3.0.0" } } } }, - "tsutils": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", - "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", - "requires": { - "tslib": "1.8.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "optional": true, - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", - "dev": true - }, - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" - }, - "v8-profiler": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/v8-profiler/-/v8-profiler-5.7.0.tgz", - "integrity": "sha1-6DgcvrtbX9DKjSsJ9qAYGhWNs00=", - "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" - } - }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "requires": { - "user-home": "1.1.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "webpack-merge": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.1.tgz", + "integrity": "sha512-geQsZ86YkXOVOjvPC5yv3JSNnL6/X3Kzh935AQ/gJNEYXEfJDQFu/sdFuktS9OW2JcH/SJec8TGfRdrpHshH7A==", "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } + "lodash": "4.17.4" } }, "webpack-sources": { @@ -3759,6 +13039,39 @@ } } }, + "webpack-subresource-integrity": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.3.tgz", + "integrity": "sha1-wGBtQAkLBwzeQovsjfNgMhbkcus=", + "requires": { + "webpack-core": "0.6.9" + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "requires": { + "http-parser-js": "0.4.9", + "websocket-extensions": "0.1.3" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" + }, + "when": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", + "optional": true + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=" + }, "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", @@ -3767,6 +13080,11 @@ "isexe": "2.0.0" } }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", @@ -3778,29 +13096,103 @@ "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "optional": true + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, + "worker-farm": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.2.tgz", + "integrity": "sha512-XxiQ9kZN5n6mmnW+mFJ+wXjNNI/Nx4DIdaAKLX1Bn6LYBWlN/zaBhu34DQYPZ1AJobQuu67S2OfDdNSVULvXkQ==", + "requires": { + "errno": "0.1.4", + "xtend": "4.0.1" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "ws": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz", + "integrity": "sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==", + "requires": { + "async-limiter": "1.0.0", + "safe-buffer": "5.1.1", + "ultron": "1.1.1" + } + }, + "xml-char-classes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", + "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=" + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": "1.2.4", + "xmlbuilder": "9.0.4" + } + }, + "xmlbuilder": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", + "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=" + }, + "xmlhttprequest-ssl": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.4.tgz", + "integrity": "sha1-BPVgkVcks4kIhxXMDteBPpZ3v1c=" + }, + "xregexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", + "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", + "optional": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, + "xxhashjs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.1.tgz", + "integrity": "sha1-m76b6JYUKXbfo0wGGy0GjEPTDeA=", + "requires": { + "cuint": "0.2.2" + } + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, "yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "optional": true, "requires": { "camelcase": "1.2.1", "cliui": "2.1.0", @@ -3811,18 +13203,34 @@ "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "optional": true + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" } } }, - "yn": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-1.3.0.tgz", - "integrity": "sha1-GwgSq7jYBdSJZvjfOF3J2syaGdg=", + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", "requires": { - "object-assign": "4.1.1" + "camelcase": "3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + } } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" + }, + "zone.js": { + "version": "0.8.20", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.20.tgz", + "integrity": "sha512-FXlA37ErSXCMy5RNBcGFgCI/Zivqzr0D19GuvDxhcYIJc7xkFp6c29DKyODJu0Zo+EMyur/WPPgcBh1EHjB9jA==" } } } diff --git a/package.json b/package.json index 09d39938b7..fa5eaed6fc 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "description": "Software Development Kit for Angular", "bin": { + "architect": "./bin/architect", "build-optimizer": "./bin/build-optimizer", "devkit-admin": "./bin/devkit-admin", "purify": "./bin/purify", @@ -48,36 +49,100 @@ }, "homepage": "https://github.com/angular/devkit", "dependencies": { + "@angular/common": "^5.2.1", + "@angular/compiler": "^5.2.1", + "@angular/compiler-cli": "^5.2.1", + "@angular/core": "^5.2.1", + "@angular/platform-browser": "^5.2.1", + "@angular/platform-browser-dynamic": "^5.2.1", + "@angular/service-worker": "^5.2.1", "@ngtools/json-schema": "^1.0.9", + "@ngtools/webpack": "^1.10.0-rc.0", + "@types/common-tags": "^1.4.0", + "@types/copy-webpack-plugin": "^4.0.1", + "@types/denodeify": "^1.2.31", "@types/glob": "^5.0.29", "@types/istanbul": "^0.4.29", "@types/jasmine": "^2.5.47", + "@types/loader-utils": "^1.1.1", "@types/minimist": "^1.2.0", "@types/node": "^8.9.1", + "@types/request": "^2.47.0", "@types/semver": "^5.3.30", "@types/source-map": "0.5.2", "@types/webpack": "^3.0.2", "@types/webpack-sources": "^0.1.3", "ajv": "^5.5.1", + "autoprefixer": "^7.2.3", + "chalk": "~2.2.2", "chokidar": "^1.7.0", + "circular-dependency-plugin": "^4.3.0", + "clean-css": "^4.1.9", + "codelyzer": "^4.0.2", + "common-tags": "^1.5.1", "conventional-changelog": "^1.1.0", + "copy-webpack-plugin": "^4.2.3", + "css-loader": "^0.28.7", + "denodeify": "^1.2.1", + "exports-loader": "^0.6.4", + "extract-text-webpack-plugin": "^3.0.2", + "file-loader": "^1.1.5", "glob": "^7.0.3", + "html-webpack-plugin": "^2.30.1", "husky": "^0.14.3", "istanbul": "^0.4.5", "jasmine": "^2.6.0", "jasmine-spec-reporter": "^3.2.0", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "karma-source-map-support": "^1.2.0", + "less": "^2.7.3", + "less-loader": "^4.0.5", + "license-webpack-plugin": "^1.1.1", "loader-utils": "^1.1.0", + "lodash": "^4.17.4", + "memory-fs": "^0.4.1", + "minimatch": "^3.0.4", "minimist": "^1.2.0", + "node-sass": "^4.7.2", + "opn": "^5.1.0", + "portfinder": "^1.0.13", + "postcss-import": "^11.0.0", + "postcss-loader": "^2.0.10", + "postcss-url": "^7.3.0", + "protractor": "^5.1.2", + "raw-loader": "^0.5.1", + "request": "^2.83.0", "rxjs": "^5.5.6", + "sass-loader": "^6.0.6", "semver": "^5.3.0", "semver-intersect": "^1.1.2", + "silent-error": "^1.1.0", "source-map": "^0.5.6", + "source-map-loader": "^0.2.3", + "source-map-support": "^0.5.0", + "style-loader": "^0.19.1", + "stylus": "^0.54.5", + "stylus-loader": "^3.0.1", "tar": "^3.1.5", "temp": "^0.8.3", - "ts-node": "^2.0.0", + "tree-kill": "^1.2.0", + "ts-node": "^4.1.0", "tslint": "^5.5.0", "typescript": "~2.6.1", - "webpack-sources": "^1.0.1" + "uglifyjs-webpack-plugin": "^1.1.6", + "url-loader": "^0.6.2", + "webpack": "^3.10.0", + "webpack-dev-middleware": "^1.12.2", + "webpack-dev-server": "^2.11.0", + "webpack-merge": "^4.1.1", + "webpack-sources": "^1.0.1", + "webpack-subresource-integrity": "^1.0.3", + "zone.js": "^0.8.19" }, "devDependencies": { "license-checker": "^16.0.0" diff --git a/packages/angular_devkit/build_webpack/README.md b/packages/angular_devkit/build_webpack/README.md new file mode 100644 index 0000000000..1c5c8a806b --- /dev/null +++ b/packages/angular_devkit/build_webpack/README.md @@ -0,0 +1,3 @@ +# Angular Webpack Build Facade + +WIP \ No newline at end of file diff --git a/packages/angular_devkit/build_webpack/builders.json b/packages/angular_devkit/build_webpack/builders.json new file mode 100644 index 0000000000..244d219724 --- /dev/null +++ b/packages/angular_devkit/build_webpack/builders.json @@ -0,0 +1,35 @@ +{ + "$schema": "../architect/src/builders-schema.json", + "builders": { + "browser": { + "class": "./src/browser", + "schema": "./src/browser/schema.json", + "description": "Build a browser app." + }, + "devServer": { + "class": "./src/dev-server", + "schema": "./src/dev-server/schema.json", + "description": "Serve a browser app." + }, + "extractI18n": { + "class": "./src/extract-i18n", + "schema": "./src/extract-i18n/schema.json", + "description": "Extract i18n strings from a browser app." + }, + "karma": { + "class": "./src/karma", + "schema": "./src/karma/schema.json", + "description": "Run Karma unit tests." + }, + "protractor": { + "class": "./src/protractor", + "schema": "./src/protractor/schema.json", + "description": "Run protractor over a dev server." + }, + "tslint": { + "class": "./src/tslint", + "schema": "./src/tslint/schema.json", + "description": "Run tslint over a TS project." + } + } +} diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json new file mode 100644 index 0000000000..7da1fe91ab --- /dev/null +++ b/packages/angular_devkit/build_webpack/package.json @@ -0,0 +1,62 @@ +{ + "name": "@angular-devkit/build-webpack", + "version": "0.0.0", + "description": "Angular Webpack Build Facade", + "main": "src/index.js", + "typings": "src/index.d.ts", + "builders": "builders.json", + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "dependencies": { + "@angular-devkit/build-optimizer": "0.0.0", + "@angular-devkit/architect": "0.0.0", + "@angular-devkit/core": "0.0.0", + "@ngtools/webpack": "^1.10.0-rc.0", + "autoprefixer": "^7.2.3", + "chalk": "~2.2.2", + "circular-dependency-plugin": "^4.3.0", + "clean-css": "^4.1.9", + "common-tags": "^1.5.1", + "copy-webpack-plugin": "^4.2.3", + "css-loader": "^0.28.7", + "denodeify": "^1.2.1", + "exports-loader": "^0.6.4", + "extract-text-webpack-plugin": "^3.0.2", + "file-loader": "^1.1.5", + "glob": "^7.0.3", + "html-webpack-plugin": "^2.30.1", + "karma-source-map-support": "^1.2.0", + "less": "^2.7.3", + "less-loader": "^4.0.5", + "license-webpack-plugin": "^1.1.1", + "lodash": "^4.17.4", + "memory-fs": "^0.4.1", + "minimatch": "^3.0.4", + "node-sass": "^4.7.2", + "opn": "^5.1.0", + "portfinder": "^1.0.13", + "postcss-import": "^11.0.0", + "postcss-loader": "^2.0.10", + "postcss-url": "^7.3.0", + "raw-loader": "^0.5.1", + "request": "^2.83.0", + "rxjs": "^5.5.6", + "sass-loader": "^6.0.6", + "silent-error": "^1.1.0", + "source-map-loader": "^0.2.3", + "source-map-support": "^0.5.0", + "style-loader": "^0.19.1", + "stylus": "^0.54.5", + "stylus-loader": "^3.0.1", + "tree-kill": "^1.2.0", + "uglifyjs-webpack-plugin": "^1.1.6", + "url-loader": "^0.6.2", + "webpack": "^3.10.0", + "webpack-dev-middleware": "^1.12.2", + "webpack-dev-server": "^2.11.0", + "webpack-merge": "^4.1.1", + "webpack-sources": "^1.0.1", + "webpack-subresource-integrity": "^1.0.3" + } +} diff --git a/packages/angular_devkit/build_webpack/plugins/karma.ts b/packages/angular_devkit/build_webpack/plugins/karma.ts new file mode 100644 index 0000000000..067f419b58 --- /dev/null +++ b/packages/angular_devkit/build_webpack/plugins/karma.ts @@ -0,0 +1,9 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +module.exports = require('../src/angular-cli-files/plugins/karma'); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts new file mode 100644 index 0000000000..3887d4727a --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts @@ -0,0 +1,42 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +export interface BaseHrefWebpackPluginOptions { + baseHref: string; +} + +export class BaseHrefWebpackPlugin { + constructor(public readonly options: BaseHrefWebpackPluginOptions) { } + + apply(compiler: any): void { + // Ignore if baseHref is not passed + if (!this.options.baseHref && this.options.baseHref !== '') { + return; + } + + compiler.plugin('compilation', (compilation: any) => { + compilation.plugin( + 'html-webpack-plugin-before-html-processing', + (htmlPluginData: any, callback: Function) => { + // Check if base tag already exists + const baseTagRegex = //i; + const baseTagMatches = htmlPluginData.html.match(baseTagRegex); + if (!baseTagMatches) { + // Insert it in top of the head if not exist + htmlPluginData.html = htmlPluginData.html.replace( + //i, '$&' + `` + ); + } else { + // Replace only href attribute if exists + const modifiedBaseTag = baseTagMatches[0].replace( + /href="\S+"/i, `href="${this.options.baseHref}"` + ); + htmlPluginData.html = htmlPluginData.html.replace(baseTagRegex, modifiedBaseTag); + } + + callback(null, htmlPluginData); + } + ); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts new file mode 100644 index 0000000000..2766f3b0a8 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts @@ -0,0 +1,84 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import {oneLineTrim} from 'common-tags'; +import {BaseHrefWebpackPlugin} from './base-href-webpack-plugin'; + + +function mockCompiler(indexHtml: string, callback: Function) { + return { + plugin: function (_event: any, compilerCallback: Function) { + const compilation = { + plugin: function (_hook: any, compilationCallback: Function) { + const htmlPluginData = { + html: indexHtml + }; + compilationCallback(htmlPluginData, callback); + } + }; + compilerCallback(compilation); + } + }; +} + +describe('base href webpack plugin', () => { + const html = oneLineTrim` + + + + + `; + + it('should do nothing when baseHref is null', () => { + const plugin = new BaseHrefWebpackPlugin({ baseHref: null } as any); + + const compiler = mockCompiler(html, (_x: any, htmlPluginData: any) => { + expect(htmlPluginData.html).toEqual(''); + }); + plugin.apply(compiler); + }); + + it('should insert base tag when not exist', function () { + const plugin = new BaseHrefWebpackPlugin({ baseHref: '/' }); + const compiler = mockCompiler(html, (_x: any, htmlPluginData: any) => { + expect(htmlPluginData.html).toEqual(oneLineTrim` + + + + + `); + }); + + plugin.apply(compiler); + }); + + it('should replace href attribute when base tag already exists', function () { + const plugin = new BaseHrefWebpackPlugin({ baseHref: '/myUrl/' }); + + const compiler = mockCompiler(oneLineTrim` + + + `, (_x: any, htmlPluginData: any) => { + expect(htmlPluginData.html).toEqual(oneLineTrim` + + + `); + }); + plugin.apply(compiler); + }); + + it('should replace href attribute when baseHref is empty', function () { + const plugin = new BaseHrefWebpackPlugin({ baseHref: '' }); + + const compiler = mockCompiler(oneLineTrim` + + + `, (_x: any, htmlPluginData: any) => { + expect(htmlPluginData.html).toEqual(oneLineTrim` + + + `); + }); + plugin.apply(compiler); + }); +}); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/index.ts new file mode 100644 index 0000000000..625047983c --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/index.ts @@ -0,0 +1,4 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +export * from './base-href-webpack-plugin'; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts new file mode 100644 index 0000000000..210316cb82 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts @@ -0,0 +1,51 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +export interface BuildOptions { + target?: string; + environment?: string; + outputPath: string; + aot?: boolean; + sourcemaps?: boolean; + evalSourcemaps?: boolean; + vendorChunk?: boolean; + commonChunk?: boolean; + baseHref?: string; + deployUrl?: string; + verbose?: boolean; + progress?: boolean; + i18nFile?: string; + i18nFormat?: string; + i18nOutFile?: string; + i18nOutFormat?: string; + locale?: string; + missingTranslation?: string; + extractCss?: boolean; + bundleDependencies?: 'none' | 'all'; + watch?: boolean; + outputHashing?: string; + poll?: number; + app?: string; + deleteOutputPath?: boolean; + preserveSymlinks?: boolean; + extractLicenses?: boolean; + showCircularDependencies?: boolean; + buildOptimizer?: boolean; + namedChunks?: boolean; + subresourceIntegrity?: boolean; + forceTsCommonjs?: boolean; + serviceWorker?: boolean; + skipAppShell?: boolean; +} + +export interface WebpackConfigOptions { + projectRoot: string; + buildOptions: T; + appConfig: any; + tsConfig: any; + supportES2015: boolean; +} + +export interface WebpackTestOptions extends BuildOptions { + codeCoverage?: boolean; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts new file mode 100644 index 0000000000..1c37fc8dd7 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -0,0 +1,131 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as fs from 'fs'; +import * as webpack from 'webpack'; +import * as path from 'path'; +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const SubresourceIntegrityPlugin = require('webpack-subresource-integrity'); + +import { packageChunkSort } from '../../utilities/package-chunk-sort'; +import { findUp } from '../../utilities/find-up'; +import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; +import { extraEntryParser, lazyChunksFilter } from './utils'; +import { WebpackConfigOptions } from '../build-options'; + + +export function getBrowserConfig(wco: WebpackConfigOptions) { + const { projectRoot, buildOptions, appConfig } = wco; + + const appRoot = path.resolve(projectRoot, appConfig.root); + + let extraPlugins: any[] = []; + + // figure out which are the lazy loaded entry points + const lazyChunks = lazyChunksFilter([ + ...extraEntryParser(appConfig.scripts, appRoot, 'scripts'), + ...extraEntryParser(appConfig.styles, appRoot, 'styles') + ]); + + if (buildOptions.vendorChunk) { + // Separate modules from node_modules into a vendor chunk. + // const nodeModules = path.resolve(projectRoot, 'node_modules'); + const nodeModules = findUp('node_modules', projectRoot); + if (!nodeModules) { + throw new Error('Cannot locale node_modules directory.') + } + // Resolves all symlink to get the actual node modules folder. + const realNodeModules = fs.realpathSync(nodeModules); + // --aot puts the generated *.ngfactory.ts in src/$$_gendir/node_modules. + const genDirNodeModules = path.resolve(appRoot, '$$_gendir', 'node_modules'); + + extraPlugins.push(new webpack.optimize.CommonsChunkPlugin({ + name: 'vendor', + chunks: ['main'], + minChunks: (module: any) => { + return module.resource + && ( module.resource.startsWith(nodeModules) + || module.resource.startsWith(genDirNodeModules) + || module.resource.startsWith(realNodeModules)); + } + })); + } + + if (buildOptions.sourcemaps) { + // See https://webpack.js.org/configuration/devtool/ for sourcemap types. + if (buildOptions.evalSourcemaps && buildOptions.target === 'development') { + // Produce eval sourcemaps for development with serve, which are faster. + extraPlugins.push(new webpack.EvalSourceMapDevToolPlugin({ + moduleFilenameTemplate: '[resource-path]', + sourceRoot: 'webpack:///' + })); + } else { + // Produce full separate sourcemaps for production. + extraPlugins.push(new webpack.SourceMapDevToolPlugin({ + filename: '[file].map[query]', + moduleFilenameTemplate: '[resource-path]', + fallbackModuleFilenameTemplate: '[resource-path]?[hash]', + sourceRoot: 'webpack:///' + })); + } + } + + if (buildOptions.commonChunk) { + extraPlugins.push(new webpack.optimize.CommonsChunkPlugin({ + name: 'main', + async: 'common', + children: true, + minChunks: 2 + })); + } + + if (buildOptions.subresourceIntegrity) { + extraPlugins.push(new SubresourceIntegrityPlugin({ + hashFuncNames: ['sha384'] + })); + } + + return { + resolve: { + mainFields: [ + ...(wco.supportES2015 ? ['es2015'] : []), + 'browser', 'module', 'main' + ] + }, + output: { + crossOriginLoading: buildOptions.subresourceIntegrity ? 'anonymous' : false + }, + plugins: [ + new HtmlWebpackPlugin({ + template: path.resolve(appRoot, appConfig.index), + filename: path.resolve(projectRoot, buildOptions.outputPath as any, appConfig.index), + chunksSortMode: packageChunkSort(appConfig), + excludeChunks: lazyChunks, + xhtml: true, + minify: buildOptions.target === 'production' ? { + caseSensitive: true, + collapseWhitespace: true, + keepClosingSlash: true + } : false + }), + new BaseHrefWebpackPlugin({ + baseHref: buildOptions.baseHref as any + }), + new webpack.optimize.CommonsChunkPlugin({ + minChunks: Infinity, + name: 'inline' + }) + ].concat(extraPlugins), + node: { + fs: 'empty', + global: true, + crypto: 'empty', + tls: 'empty', + net: 'empty', + process: true, + module: false, + clearImmediate: false, + setImmediate: false + } + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts new file mode 100644 index 0000000000..5e05ebbd7a --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -0,0 +1,241 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as webpack from 'webpack'; +import * as path from 'path'; +import * as CopyWebpackPlugin from 'copy-webpack-plugin'; +import { NamedLazyChunksWebpackPlugin } from '../../plugins/named-lazy-chunks-webpack-plugin'; +import { extraEntryParser, getOutputHashFormat, AssetPattern } from './utils'; +import { isDirectory } from '../../utilities/is-directory'; +import { requireProjectModule } from '../../utilities/require-project-module'; +import { WebpackConfigOptions } from '../build-options'; +import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; +import { findUp } from '../../utilities/find-up'; + +const ProgressPlugin = require('webpack/lib/ProgressPlugin'); +const CircularDependencyPlugin = require('circular-dependency-plugin'); +const SilentError = require('silent-error'); + +/** + * Enumerate loaders and their dependencies from this file to let the dependency validator + * know they are used. + * + * require('source-map-loader') + * require('raw-loader') + * require('url-loader') + * require('file-loader') + * require('@angular-devkit/build-optimizer') + */ + +export function getCommonConfig(wco: WebpackConfigOptions) { + const { projectRoot, buildOptions, appConfig } = wco; + + const appRoot = path.resolve(projectRoot, appConfig.root); + const nodeModules = findUp('node_modules', projectRoot); + if (!nodeModules) { + throw new Error('Cannot locale node_modules directory.') + } + + let extraPlugins: any[] = []; + let extraRules: any[] = []; + let entryPoints: { [key: string]: string[] } = {}; + + if (appConfig.main) { + entryPoints['main'] = [path.resolve(appRoot, appConfig.main)]; + } + + if (appConfig.polyfills) { + entryPoints['polyfills'] = [path.resolve(appRoot, appConfig.polyfills)]; + } + + // determine hashing format + const hashFormat = getOutputHashFormat(buildOptions.outputHashing as any); + + // process global scripts + if (appConfig.scripts.length > 0) { + const globalScripts = extraEntryParser(appConfig.scripts, appRoot, 'scripts'); + const globalScriptsByEntry = globalScripts + .reduce((prev: { entry: string, paths: string[], lazy: boolean }[], curr) => { + + let existingEntry = prev.find((el) => el.entry === curr.entry); + if (existingEntry) { + existingEntry.paths.push(curr.path as string); + // All entries have to be lazy for the bundle to be lazy. + (existingEntry as any).lazy = existingEntry.lazy && curr.lazy; + } else { + prev.push({ entry: curr.entry as string, paths: [curr.path as string], + lazy: curr.lazy as boolean }); + } + return prev; + }, []); + + + // Add a new asset for each entry. + globalScriptsByEntry.forEach((script) => { + // Lazy scripts don't get a hash, otherwise they can't be loaded by name. + const hash = script.lazy ? '' : hashFormat.script; + extraPlugins.push(new ScriptsWebpackPlugin({ + name: script.entry, + sourceMap: buildOptions.sourcemaps, + filename: `${script.entry}${hash}.bundle.js`, + scripts: script.paths, + basePath: projectRoot, + })); + }); + } + + // process asset entries + if (appConfig.assets) { + const copyWebpackPluginPatterns = appConfig.assets.map((asset: string | AssetPattern) => { + // Convert all string assets to object notation. + asset = typeof asset === 'string' ? { glob: asset } : asset; + // Add defaults. + // Input is always resolved relative to the appRoot. + asset.input = path.resolve(appRoot, asset.input || '').replace(/\\/g, '/'); + asset.output = asset.output || ''; + asset.glob = asset.glob || ''; + + // Prevent asset configurations from writing outside of the output path, except if the user + // specify a configuration flag. + // Also prevent writing outside the project path. That is not overridable. + const absoluteOutputPath = path.resolve(buildOptions.outputPath as string); + const absoluteAssetOutput = path.resolve(absoluteOutputPath, asset.output); + const outputRelativeOutput = path.relative(absoluteOutputPath, absoluteAssetOutput); + + if (outputRelativeOutput.startsWith('..') || path.isAbsolute(outputRelativeOutput)) { + + const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); + if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) { + const message = 'An asset cannot be written to a location outside the project.'; + throw new SilentError(message); + } + + if (!asset.allowOutsideOutDir) { + const message = 'An asset cannot be written to a location outside of the output path. ' + + 'You can override this message by setting the `allowOutsideOutDir` ' + + 'property on the asset to true in the CLI configuration.'; + throw new SilentError(message); + } + } + + // Prevent asset configurations from reading files outside of the project. + const projectRelativeInput = path.relative(projectRoot, asset.input); + if (projectRelativeInput.startsWith('..') || path.isAbsolute(projectRelativeInput)) { + const message = 'An asset cannot be read from a location outside the project.'; + throw new SilentError(message); + } + + // Ensure trailing slash. + if (isDirectory(path.resolve(asset.input))) { + asset.input += '/'; + } + + // Convert dir patterns to globs. + if (isDirectory(path.resolve(asset.input, asset.glob))) { + asset.glob = asset.glob + '/**/*'; + } + + // Escape the input in case it has special charaters and use to make glob absolute + const escapedInput = asset.input + .replace(/[\\|\*|\?|\!|\(|\)|\[|\]|\{|\}]/g, (substring) => `\\${substring}`); + + return { + context: asset.input, + to: asset.output, + from: { + glob: path.resolve(escapedInput, asset.glob), + dot: true + } + }; + }); + const copyWebpackPluginOptions = { ignore: ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'] }; + + const copyWebpackPluginInstance = new CopyWebpackPlugin(copyWebpackPluginPatterns, + copyWebpackPluginOptions); + + // Save options so we can use them in eject. + (copyWebpackPluginInstance as any)['copyWebpackPluginPatterns'] = copyWebpackPluginPatterns; + (copyWebpackPluginInstance as any)['copyWebpackPluginOptions'] = copyWebpackPluginOptions; + + extraPlugins.push(copyWebpackPluginInstance); + } + + if (buildOptions.progress) { + extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose, colors: true })); + } + + if (buildOptions.showCircularDependencies) { + extraPlugins.push(new CircularDependencyPlugin({ + exclude: /(\\|\/)node_modules(\\|\/)/ + })); + } + + if (buildOptions.buildOptimizer) { + extraRules.push({ + test: /\.js$/, + use: [{ + loader: '@angular-devkit/build-optimizer/webpack-loader', + options: { sourceMap: buildOptions.sourcemaps } + }] + }); + } + + if (buildOptions.namedChunks) { + extraPlugins.push(new NamedLazyChunksWebpackPlugin()); + } + + // Load rxjs path aliases. + // https://github.com/ReactiveX/rxjs/blob/master/doc/lettable-operators.md#build-and-treeshaking + let alias = {}; + try { + const rxjsPathMappingImport = wco.supportES2015 + ? 'rxjs/_esm2015/path-mapping' + : 'rxjs/_esm5/path-mapping'; + const rxPaths = requireProjectModule(projectRoot, rxjsPathMappingImport); + alias = rxPaths(nodeModules); + } catch (e) { } + + return { + resolve: { + extensions: ['.ts', '.js'], + modules: ['node_modules', nodeModules], + symlinks: !buildOptions.preserveSymlinks, + alias + }, + resolveLoader: { + modules: [nodeModules, 'node_modules'] + }, + context: __dirname, + entry: entryPoints, + output: { + path: path.resolve(projectRoot, buildOptions.outputPath as string), + publicPath: buildOptions.deployUrl, + filename: `[name]${hashFormat.chunk}.bundle.js`, + chunkFilename: `[id]${hashFormat.chunk}.chunk.js` + }, + module: { + rules: [ + { test: /\.html$/, loader: 'raw-loader' }, + { + test: /\.(eot|svg|cur)$/, + loader: 'file-loader', + options: { + name: `[name]${hashFormat.file}.[ext]`, + limit: 10000 + } + }, + { + test: /\.(jpg|png|webp|gif|otf|ttf|woff|woff2|ani)$/, + loader: 'url-loader', + options: { + name: `[name]${hashFormat.file}.[ext]`, + limit: 10000 + } + } + ].concat(extraRules) + }, + plugins: [ + new webpack.NoEmitOnErrorsPlugin() + ].concat(extraPlugins) + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts new file mode 100644 index 0000000000..dd90b2dad8 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts @@ -0,0 +1,12 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import { NamedModulesPlugin } from 'webpack'; + +import { WebpackConfigOptions } from '../build-options'; + +export function getDevConfig(_wco: WebpackConfigOptions) { + return { + plugins: [new NamedModulesPlugin()] + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts new file mode 100644 index 0000000000..4e42632183 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts @@ -0,0 +1,12 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +export * from './browser'; +export * from './common'; +export * from './development'; +export * from './production'; +export * from './server'; +export * from './styles'; +export * from './test'; +export * from './typescript'; +export * from './utils'; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts new file mode 100644 index 0000000000..8faa0e903e --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts @@ -0,0 +1,175 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; +import * as webpack from 'webpack'; +import * as fs from 'fs'; +import * as semver from 'semver'; +import { stripIndent } from 'common-tags'; +import { LicenseWebpackPlugin } from 'license-webpack-plugin'; +import { PurifyPlugin } from '@angular-devkit/build-optimizer'; +import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; +import { StaticAssetPlugin } from '../../plugins/static-asset'; +import { GlobCopyWebpackPlugin } from '../../plugins/glob-copy-webpack-plugin'; +import { WebpackConfigOptions } from '../build-options'; +import { NEW_SW_VERSION } from '../../utilities/service-worker'; + +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); + +const OLD_SW_VERSION = '>= 1.0.0-beta.5 < 2.0.0'; + +/** + * license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to + * let the dependency validator know it is used. + * + * require('webpack-sources') + */ + + +export function getProdConfig(wco: WebpackConfigOptions) { + const { projectRoot, buildOptions, appConfig } = wco; + + let extraPlugins: any[] = []; + let entryPoints: { [key: string]: string[] } = {}; + + if (appConfig.serviceWorker) { + const nodeModules = path.resolve(projectRoot, 'node_modules'); + const swModule = path.resolve(nodeModules, '@angular/service-worker'); + + // @angular/service-worker is required to be installed when serviceWorker is true. + if (!fs.existsSync(swModule)) { + throw new Error(stripIndent` + Your project is configured with serviceWorker = true, but @angular/service-worker + is not installed. Run \`npm install --save-dev @angular/service-worker\` + and try again, or run \`ng set apps.0.serviceWorker=false\` in your .angular-cli.json. + `); + } + + // Read the version of @angular/service-worker and throw if it doesn't match the + // expected version. + const swPackageJson = fs.readFileSync(`${swModule}/package.json`).toString(); + const swVersion = JSON.parse(swPackageJson)['version']; + + const isLegacySw = semver.satisfies(swVersion, OLD_SW_VERSION); + const isModernSw = semver.gte(swVersion, NEW_SW_VERSION); + + if (!isLegacySw && !isModernSw) { + throw new Error(stripIndent` + The installed version of @angular/service-worker is ${swVersion}. This version of the CLI + requires the @angular/service-worker version to satisfy ${OLD_SW_VERSION}. Please upgrade + your service worker version. + `); + } + + if (isLegacySw) { + // Path to the worker script itself. + const workerPath = path.resolve(swModule, 'bundles/worker-basic.min.js'); + + // Path to a small script to register a service worker. + const registerPath = path.resolve(swModule, 'build/assets/register-basic.min.js'); + + // Sanity check - both of these files should be present in @angular/service-worker. + if (!fs.existsSync(workerPath) || !fs.existsSync(registerPath)) { + throw new Error(stripIndent` + The installed version of @angular/service-worker isn't supported by the CLI. + Please install a supported version. The following files should exist: + - ${registerPath} + - ${workerPath} + `); + } + + // CopyWebpackPlugin replaces GlobCopyWebpackPlugin, but AngularServiceWorkerPlugin depends + // on specific behaviour from latter. + // AngularServiceWorkerPlugin expects the ngsw-manifest.json to be present in the 'emit' phase + // but with CopyWebpackPlugin it's only there on 'after-emit'. + // So for now we keep it here, but if AngularServiceWorkerPlugin changes we remove it. + extraPlugins.push(new GlobCopyWebpackPlugin({ + patterns: [ + 'ngsw-manifest.json', + { glob: 'ngsw-manifest.json', + input: path.resolve(projectRoot, appConfig.root), output: '' } + ], + globOptions: { + cwd: projectRoot, + optional: true, + }, + })); + + // Load the Webpack plugin for manifest generation and install it. + const AngularServiceWorkerPlugin = require('@angular/service-worker/build/webpack') + .AngularServiceWorkerPlugin; + extraPlugins.push(new AngularServiceWorkerPlugin({ + baseHref: buildOptions.baseHref || '/', + })); + + // Copy the worker script into assets. + const workerContents = fs.readFileSync(workerPath).toString(); + extraPlugins.push(new StaticAssetPlugin('worker-basic.min.js', workerContents)); + + // Add a script to index.html that registers the service worker. + // TODO(alxhub): inline this script somehow. + entryPoints['sw-register'] = [registerPath]; + } + } + + extraPlugins.push(new BundleBudgetPlugin({ + budgets: appConfig.budgets + })); + + if (buildOptions.extractLicenses) { + extraPlugins.push(new LicenseWebpackPlugin({ + pattern: /^(MIT|ISC|BSD.*)$/, + suppressErrors: true, + perChunkOutput: false, + outputFilename: `3rdpartylicenses.txt` + })); + } + + const uglifyCompressOptions: any = { + // Disabled because of an issue with Mapbox GL when using the Webpack node global and UglifyJS: + // https://github.com/mapbox/mapbox-gl-js/issues/4359#issuecomment-303880888 + // https://github.com/angular/angular-cli/issues/5804 + // https://github.com/angular/angular-cli/pull/7931 + typeofs : false + }; + + if (buildOptions.buildOptimizer) { + // This plugin must be before webpack.optimize.UglifyJsPlugin. + extraPlugins.push(new PurifyPlugin()); + uglifyCompressOptions.pure_getters = true; + // PURE comments work best with 3 passes. + // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. + uglifyCompressOptions.passes = 3; + } + + return { + entry: entryPoints, + plugins: [ + new webpack.EnvironmentPlugin({ + 'NODE_ENV': 'production' + }), + new webpack.HashedModuleIdsPlugin(), + new webpack.optimize.ModuleConcatenationPlugin(), + ...extraPlugins, + // Uglify should be the last plugin as PurifyPlugin needs to be before it. + new UglifyJSPlugin({ + sourceMap: buildOptions.sourcemaps, + parallel: true, + uglifyOptions: { + ecma: wco.supportES2015 ? 6 : 5, + warnings: buildOptions.verbose, + ie8: false, + mangle: { + safari10: true, + }, + compress: uglifyCompressOptions, + output: { + ascii_only: true, + comments: false, + webkit: true, + }, + } + }), + ] + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/server.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/server.ts new file mode 100644 index 0000000000..6e735b209b --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/server.ts @@ -0,0 +1,54 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import { WebpackConfigOptions } from '../build-options'; + +/** + * Returns a partial specific to creating a bundle for node + * @param wco Options which are include the build options and app config + */ +export function getServerConfig(wco: WebpackConfigOptions) { + + const config: any = { + resolve: { + mainFields: [ + ...(wco.supportES2015 ? ['es2015'] : []), + 'main', 'module', + ], + }, + target: 'node', + output: { + libraryTarget: 'commonjs' + }, + node: false, + }; + + if (wco.buildOptions.bundleDependencies == 'none') { + config.externals = [ + /^@angular/, + (_: any, request: any, callback: (error?: any, result?: any) => void) => { + // Absolute & Relative paths are not externals + if (request.match(/^\.{0,2}\//)) { + return callback(); + } + + try { + // Attempt to resolve the module via Node + const e = require.resolve(request); + if (/node_modules/.test(e)) { + // It's a node_module + callback(null, request); + } else { + // It's a system thing (.ie util, fs...) + callback(); + } + } catch (e) { + // Node couldn't find it, so it must be user-aliased + callback(); + } + } + ]; + } + + return config; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts new file mode 100644 index 0000000000..7811292dda --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts @@ -0,0 +1,273 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as webpack from 'webpack'; +import * as path from 'path'; +import { + SuppressExtractedTextChunksWebpackPlugin +} from '../../plugins/suppress-entry-chunks-webpack-plugin'; +import { extraEntryParser, getOutputHashFormat } from './utils'; +import { WebpackConfigOptions } from '../build-options'; +// import { pluginArgs, postcssArgs } from '../../tasks/eject'; +import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; + +const postcssUrl = require('postcss-url'); +const autoprefixer = require('autoprefixer'); +const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const postcssImports = require('postcss-import'); + +/** + * Enumerate loaders and their dependencies from this file to let the dependency validator + * know they are used. + * + * require('exports-loader') + * require('style-loader') + * require('postcss-loader') + * require('css-loader') + * require('stylus') + * require('stylus-loader') + * require('less') + * require('less-loader') + * require('node-sass') + * require('sass-loader') + */ + +interface PostcssUrlAsset { + url: string; + hash: string; + absolutePath: string; +} + +export function getStylesConfig(wco: WebpackConfigOptions) { + const { projectRoot, buildOptions, appConfig } = wco; + + const appRoot = path.resolve(projectRoot, appConfig.root); + const entryPoints: { [key: string]: string[] } = {}; + const globalStylePaths: string[] = []; + const extraPlugins: any[] = []; + const cssSourceMap = buildOptions.sourcemaps; + + // Maximum resource size to inline (KiB) + const maximumInlineSize = 10; + // Minify/optimize css in production. + const minimizeCss = buildOptions.target === 'production'; + // Convert absolute resource URLs to account for base-href and deploy-url. + const baseHref = wco.buildOptions.baseHref || ''; + const deployUrl = wco.buildOptions.deployUrl || ''; + + const postcssPluginCreator = function(loader: webpack.loader.LoaderContext) { + return [ + postcssImports({ + resolve: (url: string, context: string) => { + return new Promise((resolve, reject) => { + if (url && url.startsWith('~')) { + url = url.substr(1); + } + loader.resolve(context, url, (err: Error, result: string) => { + if (err) { + reject(err); + return; + } + + resolve(result); + }); + }); + }, + load: (filename: string) => { + return new Promise((resolve, reject) => { + loader.fs.readFile(filename, (err: Error, data: Buffer) => { + if (err) { + reject(err); + return; + } + + const content = data.toString(); + resolve(content); + }); + }); + } + }), + postcssUrl({ + filter: ({ url }: PostcssUrlAsset) => url.startsWith('~'), + url: ({ url }: PostcssUrlAsset) => { + const fullPath = path.join(projectRoot, 'node_modules', url.substr(1)); + return path.relative(loader.context, fullPath).replace(/\\/g, '/'); + } + }), + postcssUrl([ + { + // Only convert root relative URLs, which CSS-Loader won't process into require(). + filter: ({ url }: PostcssUrlAsset) => url.startsWith('/') && !url.startsWith('//'), + url: ({ url }: PostcssUrlAsset) => { + if (deployUrl.match(/:\/\//) || deployUrl.startsWith('/')) { + // If deployUrl is absolute or root relative, ignore baseHref & use deployUrl as is. + return `${deployUrl.replace(/\/$/, '')}${url}`; + } else if (baseHref.match(/:\/\//)) { + // If baseHref contains a scheme, include it as is. + return baseHref.replace(/\/$/, '') + + `/${deployUrl}/${url}`.replace(/\/\/+/g, '/'); + } else { + // Join together base-href, deploy-url and the original URL. + // Also dedupe multiple slashes into single ones. + return `/${baseHref}/${deployUrl}/${url}`.replace(/\/\/+/g, '/'); + } + } + }, + { + // TODO: inline .cur if not supporting IE (use browserslist to check) + filter: (asset: PostcssUrlAsset) => { + return maximumInlineSize > 0 && !asset.hash && !asset.absolutePath.endsWith('.cur'); + }, + url: 'inline', + // NOTE: maxSize is in KB + maxSize: maximumInlineSize, + fallback: 'rebase', + }, + { url: 'rebase' }, + ]), + autoprefixer(), + ]; + }; + // (postcssPluginCreator as any)[postcssArgs] = { + // variableImports: { + // 'autoprefixer': 'autoprefixer', + // 'postcss-url': 'postcssUrl', + // 'postcss-import': 'postcssImports', + // }, + // variables: { minimizeCss, baseHref, deployUrl, projectRoot, maximumInlineSize } + // }; + + // determine hashing format + const hashFormat = getOutputHashFormat(buildOptions.outputHashing as string); + + // use includePaths from appConfig + const includePaths: string[] = []; + let lessPathOptions: { paths: string[] } = {paths: []}; + + if (appConfig.stylePreprocessorOptions + && appConfig.stylePreprocessorOptions.includePaths + && appConfig.stylePreprocessorOptions.includePaths.length > 0 + ) { + appConfig.stylePreprocessorOptions.includePaths.forEach((includePath: string) => + includePaths.push(path.resolve(appRoot, includePath))); + lessPathOptions = { + paths: includePaths, + }; + } + + // process global styles + if (appConfig.styles.length > 0) { + const globalStyles = extraEntryParser(appConfig.styles, appRoot, 'styles'); + // add style entry points + globalStyles.forEach(style => + entryPoints[style.entry as any] + ? entryPoints[style.entry as any].push(style.path as string) + : entryPoints[style.entry as any] = [style.path as any] + ); + // add global css paths + globalStylePaths.push(...globalStyles.map((style) => style.path as any)); + } + + // set base rules to derive final rules from + const baseRules: webpack.NewUseRule[] = [ + { test: /\.css$/, use: [] }, + { test: /\.scss$|\.sass$/, use: [{ + loader: 'sass-loader', + options: { + sourceMap: cssSourceMap, + // bootstrap-sass requires a minimum precision of 8 + precision: 8, + includePaths + } + }] + }, + { test: /\.less$/, use: [{ + loader: 'less-loader', + options: { + sourceMap: cssSourceMap, + ...lessPathOptions, + } + }] + }, + { + test: /\.styl$/, use: [{ + loader: 'stylus-loader', + options: { + sourceMap: cssSourceMap, + paths: includePaths + } + }] + } + ]; + + const commonLoaders: webpack.Loader[] = [ + { + loader: 'css-loader', + options: { + sourceMap: cssSourceMap, + import: false, + } + }, + { + loader: 'postcss-loader', + options: { + // A non-function property is required to workaround a webpack option handling bug + ident: 'postcss', + plugins: postcssPluginCreator, + sourceMap: cssSourceMap + } + } + ]; + + // load component css as raw strings + const rules: webpack.Rule[] = baseRules.map(({test, use}) => ({ + exclude: globalStylePaths, test, use: [ + 'exports-loader?module.exports.toString()', + ...commonLoaders, + ...(use as webpack.Loader[]) + ] + })); + + // load global css as css files + if (globalStylePaths.length > 0) { + rules.push(...baseRules.map(({test, use}) => { + const extractTextPlugin = { + use: [ + ...commonLoaders, + ...(use as webpack.Loader[]) + ], + // publicPath needed as a workaround https://github.com/angular/angular-cli/issues/4035 + publicPath: '' + }; + const ret: any = { + include: globalStylePaths, + test, +        use: buildOptions.extractCss ? ExtractTextPlugin.extract(extractTextPlugin) + : ['style-loader', ...extractTextPlugin.use] + }; + // Save the original options as arguments for eject. + // if (buildOptions.extractCss) { + // ret[pluginArgs] = extractTextPlugin; + // } + return ret; + })); + } + + if (buildOptions.extractCss) { + // extract global css from js files into own css file + extraPlugins.push( + new ExtractTextPlugin({ filename: `[name]${hashFormat.extract}.bundle.css` })); + // suppress empty .js files in css only entry points + extraPlugins.push(new SuppressExtractedTextChunksWebpackPlugin()); + } + + if (minimizeCss) { + extraPlugins.push(new CleanCssWebpackPlugin({ sourceMap: cssSourceMap })); + } + + return { + entry: entryPoints, + module: { rules }, + plugins: [].concat(extraPlugins as any) + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts new file mode 100644 index 0000000000..f4449f08d9 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts @@ -0,0 +1,80 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; +import * as glob from 'glob'; +import * as webpack from 'webpack'; + +// import { CliConfig } from '../config'; +import { WebpackConfigOptions, WebpackTestOptions } from '../build-options'; + + +/** + * Enumerate loaders and their dependencies from this file to let the dependency validator + * know they are used. + * + * require('istanbul-instrumenter-loader') + * + */ + + +export function getTestConfig(wco: WebpackConfigOptions) { + const { projectRoot, buildOptions, appConfig } = wco; + + const nodeModules = path.resolve(projectRoot, 'node_modules'); + const extraRules: any[] = []; + const extraPlugins: any[] = []; + + // if (buildOptions.codeCoverage && CliConfig.fromProject()) { + if (buildOptions.codeCoverage) { + // const codeCoverageExclude = CliConfig.fromProject().get('test.codeCoverage.exclude'); + const codeCoverageExclude: string[] = []; + let exclude: (string | RegExp)[] = [ + /\.(e2e|spec)\.ts$/, + /node_modules/ + ]; + + if (codeCoverageExclude) { + codeCoverageExclude.forEach((excludeGlob: string) => { + const excludeFiles = glob + .sync(path.join(projectRoot, excludeGlob), { nodir: true }) + .map(file => path.normalize(file)); + exclude.push(...excludeFiles); + }); + } + + extraRules.push({ + test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader', + options: { esModules: true }, + enforce: 'post', + exclude + }); + } + + return { + resolve: { + mainFields: [ + ...(wco.supportES2015 ? ['es2015'] : []), + 'browser', 'module', 'main' + ] + }, + devtool: buildOptions.sourcemaps ? 'inline-source-map' : 'eval', + entry: { + main: path.resolve(projectRoot, appConfig.root, appConfig.main) + }, + module: { + rules: [].concat(extraRules as any) + }, + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ + minChunks: Infinity, + name: 'inline' + }), + new webpack.optimize.CommonsChunkPlugin({ + name: 'vendor', + chunks: ['main'], + minChunks: (module: any) => module.resource && module.resource.startsWith(nodeModules) + }) + ].concat(extraPlugins) + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts new file mode 100644 index 0000000000..bf65ade398 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -0,0 +1,168 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; +import { stripIndent } from 'common-tags'; +import { + AotPlugin, + AotPluginOptions, + AngularCompilerPlugin, + AngularCompilerPluginOptions, + PLATFORM +} from '@ngtools/webpack'; +import { WebpackConfigOptions } from '../build-options'; + +const SilentError = require('silent-error'); + + +const g: any = global; +const webpackLoader: string = g['angularCliIsLocal'] + ? g.angularCliPackages['@ngtools/webpack'].main + : '@ngtools/webpack'; + + +function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = true) { + const { appConfig, projectRoot, buildOptions } = wco; + options.compilerOptions = options.compilerOptions || {}; + + if (wco.buildOptions.preserveSymlinks) { + options.compilerOptions.preserveSymlinks = true; + } + + // Forcing commonjs seems to drastically improve rebuild speeds on webpack. + // Dev builds on watch mode will set this option to true. + if (wco.buildOptions.forceTsCommonjs) { + options.compilerOptions.module = 'commonjs'; + } + + // Read the environment, and set it in the compiler host. + let hostReplacementPaths: any = {}; + // process environment file replacement + if (appConfig.environments) { + if (!appConfig.environmentSource) { + let migrationMessage = ''; + if ('source' in appConfig.environments) { + migrationMessage = '\n\n' + stripIndent` + A new environmentSource entry replaces the previous source entry inside environments. + + To migrate angular-cli.json follow the example below: + + Before: + + "environments": { + "source": "environments/environment.ts", + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + + + After: + + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + `; + } + throw new SilentError( + `Environment configuration does not contain "environmentSource" entry.${migrationMessage}` + ); + + } + if (!(buildOptions.environment as any in appConfig.environments)) { + throw new SilentError(`Environment "${buildOptions.environment}" does not exist.`); + } + + const appRoot = path.resolve(projectRoot, appConfig.root); + const sourcePath = appConfig.environmentSource; + const envFile = appConfig.environments[buildOptions.environment as any]; + + hostReplacementPaths = { + [path.resolve(appRoot, sourcePath)]: path.resolve(appRoot, envFile) + }; + } + + if (AngularCompilerPlugin.isSupported()) { + const pluginOptions: AngularCompilerPluginOptions = Object.assign({}, { + mainPath: useMain ? path.join(projectRoot, appConfig.root, appConfig.main) : undefined, + i18nInFile: buildOptions.i18nFile, + i18nInFormat: buildOptions.i18nFormat, + i18nOutFile: buildOptions.i18nOutFile, + i18nOutFormat: buildOptions.i18nOutFormat, + locale: buildOptions.locale, + platform: appConfig.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser, + missingTranslation: buildOptions.missingTranslation, + hostReplacementPaths, + sourceMap: buildOptions.sourcemaps, + }, options); + return new AngularCompilerPlugin(pluginOptions); + } else { + const pluginOptions: AotPluginOptions = Object.assign({}, { + mainPath: path.join(projectRoot, appConfig.root, appConfig.main), + i18nFile: buildOptions.i18nFile, + i18nFormat: buildOptions.i18nFormat, + locale: buildOptions.locale, + replaceExport: appConfig.platform === 'server', + missingTranslation: buildOptions.missingTranslation, + hostReplacementPaths, + sourceMap: buildOptions.sourcemaps, + // If we don't explicitely list excludes, it will default to `['**/*.spec.ts']`. + exclude: [] + }, options); + return new AotPlugin(pluginOptions); + } +} + +export function getNonAotConfig(wco: WebpackConfigOptions) { + const { appConfig, projectRoot } = wco; + const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); + + return { + module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, + plugins: [ _createAotPlugin(wco, { tsConfigPath, skipCodeGeneration: true }) ] + }; +} + +export function getAotConfig(wco: WebpackConfigOptions) { + const { projectRoot, buildOptions, appConfig } = wco; + const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); + + let pluginOptions: any = { tsConfigPath }; + + let boLoader: any = []; + if (buildOptions.buildOptimizer) { + boLoader = [{ + loader: '@angular-devkit/build-optimizer/webpack-loader', + options: { sourceMap: buildOptions.sourcemaps } + }]; + } + + const test = AngularCompilerPlugin.isSupported() + ? /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/ + : /\.ts$/; + + return { + module: { rules: [{ test, use: [...boLoader, webpackLoader] }] }, + plugins: [ _createAotPlugin(wco, pluginOptions) ] + }; +} + +export function getNonAotTestConfig(wco: WebpackConfigOptions) { + const { projectRoot, appConfig } = wco; + const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); + + let pluginOptions: any = { tsConfigPath, skipCodeGeneration: true }; + + if (appConfig.polyfills) { + // TODO: remove singleFileIncludes for 2.0, this is just to support old projects that did not + // include 'polyfills.ts' in `tsconfig.spec.json'. + const polyfillsPath = path.resolve(projectRoot, appConfig.root, appConfig.polyfills); + pluginOptions.singleFileIncludes = [polyfillsPath]; + } + + return { + module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, + plugins: [ _createAotPlugin(wco, pluginOptions, false) ] + }; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts new file mode 100644 index 0000000000..1fa119ad93 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts @@ -0,0 +1,99 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; + +export const ngAppResolve = (resolvePath: string): string => { + return path.resolve(process.cwd(), resolvePath); +}; + +const webpackOutputOptions = { + colors: true, + hash: true, + timings: true, + chunks: true, + chunkModules: false, + children: false, // listing all children is very noisy in AOT and hides warnings/errors + modules: false, + reasons: false, + warnings: true, + assets: false, // listing all assets is very noisy when using assets directories + version: false +}; + +const verboseWebpackOutputOptions = { + children: true, + assets: true, + version: true, + reasons: true, + chunkModules: false // TODO: set to true when console to file output is fixed +}; + +export function getWebpackStatsConfig(verbose = false) { + return verbose + ? Object.assign(webpackOutputOptions, verboseWebpackOutputOptions) + : webpackOutputOptions; +} + +export interface ExtraEntry { + input: string; + output?: string; + lazy?: boolean; + path?: string; + entry?: string; +} + +// Filter extra entries out of a arran of extraEntries +export function lazyChunksFilter(extraEntries: ExtraEntry[]) { + return extraEntries + .filter(extraEntry => extraEntry.lazy) + .map(extraEntry => extraEntry.entry); +} + +// convert all extra entries into the object representation, fill in defaults +export function extraEntryParser( + extraEntries: (string | ExtraEntry)[], + appRoot: string, + defaultEntry: string +): ExtraEntry[] { + return extraEntries + .map((extraEntry: string | ExtraEntry) => + typeof extraEntry === 'string' ? { input: extraEntry } : extraEntry) + .map((extraEntry: ExtraEntry) => { + extraEntry.path = path.resolve(appRoot, extraEntry.input); + if (extraEntry.output) { + extraEntry.entry = extraEntry.output.replace(/\.(js|css)$/i, ''); + } else if (extraEntry.lazy) { + extraEntry.entry = extraEntry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, ''); + } else { + extraEntry.entry = defaultEntry; + } + return extraEntry; + }); +} + +export interface HashFormat { + chunk: string; + extract: string; + file: string; + script: string; +} + +export function getOutputHashFormat(option: string, length = 20): HashFormat { + /* tslint:disable:max-line-length */ + const hashFormats: { [option: string]: HashFormat } = { + none: { chunk: '', extract: '', file: '' , script: '' }, + media: { chunk: '', extract: '', file: `.[hash:${length}]`, script: '' }, + bundles: { chunk: `.[chunkhash:${length}]`, extract: `.[contenthash:${length}]`, file: '' , script: `.[hash:${length}]` }, + all: { chunk: `.[chunkhash:${length}]`, extract: `.[contenthash:${length}]`, file: `.[hash:${length}]`, script: `.[hash:${length}]` }, + }; + /* tslint:enable:max-line-length */ + return hashFormats[option] || hashFormats['none']; +} + +export interface AssetPattern { + glob: string; + input?: string; + output?: string; + allowOutsideOutDir?: boolean; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts new file mode 100644 index 0000000000..3ec03181da --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts @@ -0,0 +1,132 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Budget, calculateBytes, calculateSizes } from '../utilities/bundle-calculator'; + +interface Thresholds { + maximumWarning?: number; + maximumError?: number; + minimumWarning?: number; + minimumError?: number; + warningLow?: number; + warningHigh?: number; + errorLow?: number; + errorHigh?: number; +} + +export interface BundleBudgetPluginOptions { + budgets: Budget[]; +} + +export class BundleBudgetPlugin { + constructor(private options: BundleBudgetPluginOptions) {} + + apply(compiler: any): void { + const { budgets } = this.options; + compiler.plugin('after-emit', (compilation: any, cb: Function) => { + if (!budgets || budgets.length === 0) { + cb(); + return; + } + + budgets.map(budget => { + const thresholds = this.calcualte(budget); + return { + budget, + thresholds, + sizes: calculateSizes(budget, compilation) + }; + }) + .forEach(budgetCheck => { + budgetCheck.sizes.forEach(size => { + if (budgetCheck.thresholds.maximumWarning) { + if (budgetCheck.thresholds.maximumWarning < size.size) { + compilation.warnings.push(`budgets, maximum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.maximumError) { + if (budgetCheck.thresholds.maximumError < size.size) { + compilation.errors.push(`budgets, maximum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.minimumWarning) { + if (budgetCheck.thresholds.minimumWarning > size.size) { + compilation.warnings.push(`budgets, minimum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.minimumError) { + if (budgetCheck.thresholds.minimumError > size.size) { + compilation.errors.push(`budgets, minimum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.warningLow) { + if (budgetCheck.thresholds.warningLow > size.size) { + compilation.warnings.push(`budgets, minimum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.warningHigh) { + if (budgetCheck.thresholds.warningHigh < size.size) { + compilation.warnings.push(`budgets, maximum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.errorLow) { + if (budgetCheck.thresholds.errorLow > size.size) { + compilation.errors.push(`budgets, minimum exceeded for ${size.label}.`); + } + } + if (budgetCheck.thresholds.errorHigh) { + if (budgetCheck.thresholds.errorHigh < size.size) { + compilation.errors.push(`budgets, maximum exceeded for ${size.label}.`); + } + } + }); + + }); + cb(); + }); + } + + private calcualte(budget: Budget): Thresholds { + let thresholds: Thresholds = {}; + if (budget.maximumWarning) { + thresholds.maximumWarning = calculateBytes(budget.maximumWarning, budget.baseline, 'pos'); + } + + if (budget.maximumError) { + thresholds.maximumError = calculateBytes(budget.maximumError, budget.baseline, 'pos'); + } + + if (budget.minimumWarning) { + thresholds.minimumWarning = calculateBytes(budget.minimumWarning, budget.baseline, 'neg'); + } + + if (budget.minimumError) { + thresholds.minimumError = calculateBytes(budget.minimumError, budget.baseline, 'neg'); + } + + if (budget.warning) { + thresholds.warningLow = calculateBytes(budget.warning, budget.baseline, 'neg'); + } + + if (budget.warning) { + thresholds.warningHigh = calculateBytes(budget.warning, budget.baseline, 'pos'); + } + + if (budget.error) { + thresholds.errorLow = calculateBytes(budget.error, budget.baseline, 'neg'); + } + + if (budget.error) { + thresholds.errorHigh = calculateBytes(budget.error, budget.baseline, 'pos'); + } + + return thresholds; + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts new file mode 100644 index 0000000000..bf5a34257c --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts @@ -0,0 +1,114 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Compiler } from 'webpack'; +import { RawSource, SourceMapSource } from 'webpack-sources'; + +const CleanCSS = require('clean-css'); + +interface Chunk { + files: string[]; +} + +export interface CleanCssWebpackPluginOptions { + sourceMap: boolean; +} + +export class CleanCssWebpackPlugin { + + constructor(private options: Partial = {}) {} + + apply(compiler: Compiler): void { + compiler.plugin('compilation', (compilation: any) => { + compilation.plugin('optimize-chunk-assets', + (chunks: Array, callback: (err?: Error) => void) => { + + const cleancss = new CleanCSS({ + compatibility: 'ie9', + level: 2, + inline: false, + returnPromise: true, + sourceMap: this.options.sourceMap, + }); + + const files: string[] = [...compilation.additionalChunkAssets]; + + chunks.forEach(chunk => { + if (chunk.files && chunk.files.length > 0) { + files.push(...chunk.files); + } + }); + + const actions = files + .filter(file => file.endsWith('.css')) + .map(file => { + const asset = compilation.assets[file]; + if (!asset) { + return Promise.resolve(); + } + + let content: string; + let map: any; + if (asset.sourceAndMap) { + const sourceAndMap = asset.sourceAndMap(); + content = sourceAndMap.source; + map = sourceAndMap.map; + } else { + content = asset.source(); + } + + if (content.length === 0) { + return Promise.resolve(); + } + + return Promise.resolve() + .then(() => cleancss.minify(content, map)) + .then((output: any) => { + let hasWarnings = false; + if (output.warnings && output.warnings.length > 0) { + compilation.warnings.push(...output.warnings); + hasWarnings = true; + } + + if (output.errors && output.errors.length > 0) { + output.errors + .forEach((error: string) => compilation.errors.push(new Error(error))); + return; + } + + // generally means invalid syntax so bail + if (hasWarnings && output.stats.minifiedSize === 0) { + return; + } + + let newSource; + if (output.sourceMap) { + newSource = new SourceMapSource( + output.styles, + file, + output.sourceMap.toString(), + content, + map, + ); + } else { + newSource = new RawSource(output.styles); + } + + compilation.assets[file] = newSource; + }); + }); + + Promise.all(actions) + .then(() => callback()) + .catch(err => callback(err)); + }); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts new file mode 100644 index 0000000000..a1fa11460f --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts @@ -0,0 +1,96 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as fs from 'fs'; +import * as path from 'path'; +import * as glob from 'glob'; +import * as denodeify from 'denodeify'; +import { AssetPattern } from '../models/webpack-configs/utils'; +import { isDirectory } from '../utilities/is-directory'; + +const flattenDeep = require('lodash/flattenDeep'); +const globPromise = denodeify(glob); +const statPromise = denodeify(fs.stat); + +interface Asset { + originPath: string; + destinationPath: string; + relativePath: string; +} + +export interface GlobCopyWebpackPluginOptions { + patterns: (string | AssetPattern)[]; + globOptions: any; +} + +// Adds an asset to the compilation assets; +function addAsset(compilation: any, asset: Asset) { + const realPath = path.resolve(asset.originPath, asset.relativePath); + // Make sure that asset keys use forward slashes, otherwise webpack dev server + const servedPath = path.join(asset.destinationPath, asset.relativePath).replace(/\\/g, '/'); + + // Don't re-add existing assets. + if (compilation.assets[servedPath]) { + return Promise.resolve(); + } + + // Read file and add it to assets; + return statPromise(realPath) + .then((stat: any) => compilation.assets[servedPath] = { + size: () => stat.size, + source: () => fs.readFileSync(realPath) + }); +} + +export class GlobCopyWebpackPlugin { + constructor(private options: GlobCopyWebpackPluginOptions) { } + + apply(compiler: any): void { + let { patterns, globOptions } = this.options; + const defaultCwd = globOptions.cwd || compiler.options.context; + + // Force nodir option, since we can't add dirs to assets. + globOptions.nodir = true; + + // Process patterns. + patterns = patterns.map(pattern => { + // Convert all string patterns to Pattern type. + pattern = typeof pattern === 'string' ? { glob: pattern } : pattern; + // Add defaults + // Input is always resolved relative to the defaultCwd (appRoot) + pattern.input = path.resolve(defaultCwd, pattern.input || ''); + pattern.output = pattern.output || ''; + pattern.glob = pattern.glob || ''; + // Convert dir patterns to globs. + if (isDirectory(path.resolve(pattern.input, pattern.glob))) { + pattern.glob = pattern.glob + '/**/*'; + } + return pattern; + }); + + compiler.plugin('emit', (compilation: any, cb: any) => { + // Create an array of promises for each pattern glob + const globs = patterns.map((pattern: AssetPattern) => new Promise((resolve, reject) => + // Individual patterns can override cwd + globPromise(pattern.glob, Object.assign({}, globOptions, { cwd: pattern.input })) + // Map the results onto an Asset + .then((globResults: string[]) => globResults.map(res => ({ + originPath: pattern.input, + destinationPath: pattern.output, + relativePath: res + }))) + .then((asset: Asset) => resolve(asset)) + .catch(reject) + )); + + // Wait for all globs. + Promise.all(globs) + // Flatten results. + .then(assets => flattenDeep(assets)) + // Add each asset to the compilation. + .then(assets => + Promise.all(assets.map((asset: Asset) => addAsset(compilation, asset)))) + .then(() => cb()); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html new file mode 100644 index 0000000000..1c8f49c653 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + %SCRIPTS% + + + + + + + diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html new file mode 100644 index 0000000000..649d59817e --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html @@ -0,0 +1,43 @@ + + + + + +%X_UA_COMPATIBLE% + Karma DEBUG RUNNER + + + + + + + + + + + + + + %SCRIPTS% + + + + + + + diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts new file mode 100644 index 0000000000..2844ab6025 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts @@ -0,0 +1,17 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +// Force Webpack to throw compilation errors. Useful with karma-webpack when in single-run mode. +// Workaround for https://github.com/webpack-contrib/karma-webpack/issues/66 + +export class KarmaWebpackThrowError { + constructor() { } + + apply(compiler: any): void { + compiler.plugin('done', (stats: any) => { + if (stats.compilation.errors.length > 0) { + throw new Error(stats.compilation.errors.map((err: any) => err.message || err)); + } + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts new file mode 100644 index 0000000000..e5459978e4 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts @@ -0,0 +1,266 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; +import * as fs from 'fs'; +import * as glob from 'glob'; +import * as webpack from 'webpack'; +const webpackDevMiddleware = require('webpack-dev-middleware'); + +import { AssetPattern } from '../models/webpack-configs/utils'; +import { isDirectory } from '../utilities/is-directory'; +import { KarmaWebpackThrowError } from './karma-webpack-throw-error'; + +/** + * Enumerate needed (but not require/imported) dependencies from this file + * to let the dependency validator know they are used. + * + * require('source-map-support') + * require('karma-source-map-support') + */ + + +let blocked: any[] = []; +let isBlocked = false; + +// Add files to the Karma files array. +function addKarmaFiles(files: any[], newFiles: any[], prepend = false) { + const defaults = { + included: true, + served: true, + watched: true + }; + + const processedFiles = newFiles + // Remove globs that do not match any files, otherwise Karma will show a warning for these. + .filter(file => glob.sync(file.pattern, { nodir: true }).length != 0) + // Fill in pattern properties with defaults. + .map(file => ({ ...defaults, ...file })); + + // It's important to not replace the array, because + // karma already has a reference to the existing array. + if (prepend) { + files.unshift(...processedFiles); + } else { + files.push(...processedFiles); + } +} + +const init: any = (config: any, emitter: any, customFileHandlers: any) => { + const options: any = config.webpackBuildFacade.options; + const appRoot = path.join(config.basePath, options.root); + + if (options.sourcemaps) { + // Add a reporter that fixes sourcemap urls. + config.reporters.unshift('@angular-devkit/build-webpack'); + + // Code taken from https://github.com/tschaub/karma-source-map-support. + // We can't use it directly because we need to add it conditionally in this file, and karma + // frameworks cannot be added dynamically. + const smsPath = path.dirname(require.resolve('source-map-support')); + const ksmsPath = path.dirname(require.resolve('karma-source-map-support')); + + addKarmaFiles(config.files, [ + { pattern: path.join(smsPath, 'browser-source-map-support.js'), watched: false }, + { pattern: path.join(ksmsPath, 'client.js'), watched: false } + ], true); + } + + // Add assets. This logic is mimics the one present in GlobCopyWebpackPlugin. + if (options.assets) { + config.proxies = config.proxies || {}; + options.assets.forEach((pattern: AssetPattern) => { + // Convert all string patterns to Pattern type. + pattern = typeof pattern === 'string' ? { glob: pattern } : pattern; + // Add defaults. + // Input is always resolved relative to the appRoot. + pattern.input = path.resolve(appRoot, pattern.input || ''); + pattern.output = pattern.output || ''; + pattern.glob = pattern.glob || ''; + + // Build karma file pattern. + const assetPath = path.join(pattern.input, pattern.glob); + const filePattern = isDirectory(assetPath) ? assetPath + '/**' : assetPath; + addKarmaFiles(config.files, [{ pattern: filePattern, included: false }]); + + // The `files` entry serves the file from `/base/{asset.input}/{asset.glob}`. + // We need to add a URL rewrite that exposes the asset as `/{asset.output}/{asset.glob}`. + let relativePath: string, proxyPath: string; + if (fs.existsSync(assetPath)) { + relativePath = path.relative(config.basePath, assetPath); + proxyPath = path.join(pattern.output, pattern.glob); + } else { + // For globs (paths that don't exist), proxy pattern.output to pattern.input. + relativePath = path.relative(config.basePath, pattern.input); + proxyPath = path.join(pattern.output); + + } + // Proxy paths must have only forward slashes. + proxyPath = proxyPath.replace(/\\/g, '/'); + config.proxies['/' + proxyPath] = '/base/' + relativePath; + }); + } + + // Add webpack config. + const webpackConfig = config.webpackBuildFacade.webpackConfig; + const webpackMiddlewareConfig = { + noInfo: true, // Hide webpack output because its noisy. + watchOptions: { poll: options.poll }, + publicPath: '/_karma_webpack_/', + stats: { // Also prevent chunk and module display output, cleaner look. Only emit errors. + assets: false, + colors: true, + version: false, + hash: false, + timings: false, + chunks: false, + chunkModules: false + } + }; + + // If Karma is being ran in single run mode, throw errors. + if (config.singleRun) { + webpackConfig.plugins.push(new KarmaWebpackThrowError()); + } + + // Use existing config if any. + config.webpack = Object.assign(webpackConfig, config.webpack); + config.webpackMiddleware = Object.assign(webpackMiddlewareConfig, config.webpackMiddleware); + + // When using code-coverage, auto-add coverage-istanbul. + config.reporters = config.reporters || []; + if (options.codeCoverage && config.reporters.indexOf('coverage-istanbul') === -1) { + config.reporters.push('coverage-istanbul'); + } + + // Our custom context and debug files list the webpack bundles directly instead of using + // the karma files array. + config.customContextFile = `${__dirname}/karma-context.html`; + config.customDebugFile = `${__dirname}/karma-debug.html`; + + // Add the request blocker. + config.beforeMiddleware = config.beforeMiddleware || []; + config.beforeMiddleware.push('devkitBuildWebpackBlocker'); + + // Delete global styles entry, we don't want to load them. + delete webpackConfig.entry.styles; + + // The webpack tier owns the watch behavior so we want to force it in the config. + webpackConfig.watch = options.watch; + if (!options.watch) { + // There's no option to turn off file watching in webpack-dev-server, but + // we can override the file watcher instead. + webpackConfig.plugins.unshift({ + apply: (compiler: any) => { // tslint:disable-line:no-any + compiler.plugin('after-environment', () => { + compiler.watchFileSystem = { watch: () => { } }; + }); + }, + }); + } + // Files need to be served from a custom path for Karma. + webpackConfig.output.path = '/_karma_webpack_/'; + webpackConfig.output.publicPath = '/_karma_webpack_/'; + + let compiler: any; + try { + compiler = webpack(webpackConfig); + } catch (e) { + console.error(e.stack || e); + if (e.details) { + console.error(e.details); + } + throw e; + } + + ['invalid', 'watch-run', 'run'].forEach(function (name) { + compiler.plugin(name, function (_: any, callback: () => void) { + isBlocked = true; + + if (typeof callback === 'function') { + callback(); + } + }); + }); + + compiler.plugin('done', (stats: any) => { + // Don't refresh karma when there are webpack errors. + if (stats.compilation.errors.length === 0) { + emitter.refreshFiles(); + isBlocked = false; + blocked.forEach((cb) => cb()); + blocked = []; + } + }); + + const middleware = new webpackDevMiddleware(compiler, webpackMiddlewareConfig); + + // Forward requests to webpack server. + customFileHandlers.push({ + urlRegex: /^\/_karma_webpack_\/.*/, + handler: function handler(req: any, res: any) { + middleware(req, res, function () { + // Ensure script and style bundles are served. + // They are mentioned in the custom karma context page and we don't want them to 404. + const alwaysServe = [ + '/_karma_webpack_/inline.bundle.js', + '/_karma_webpack_/polyfills.bundle.js', + '/_karma_webpack_/scripts.bundle.js', + '/_karma_webpack_/vendor.bundle.js', + ]; + if (alwaysServe.indexOf(req.url) != -1) { + res.statusCode = 200; + res.end(); + } else { + res.statusCode = 404; + res.end('Not found'); + } + }); + } + }); + + emitter.on('exit', (done: any) => { + middleware.close(); + done(); + }); +}; + +init.$inject = ['config', 'emitter', 'customFileHandlers']; + +// Dummy preprocessor, just to keep karma from showing a warning. +const preprocessor: any = () => (content: any, _file: string, done: any) => done(null, content); +preprocessor.$inject = []; + +// Block requests until the Webpack compilation is done. +function requestBlocker() { + return function (_request: any, _response: any, next: () => void) { + if (isBlocked) { + blocked.push(next); + } else { + next(); + } + }; +} + +// Strip the server address and webpack scheme (webpack://) from error log. +const initSourcemapReporter: any = function (this: any, baseReporterDecorator: any) { + baseReporterDecorator(this); + const urlRegexp = /\(http:\/\/localhost:\d+\/_karma_webpack_\/webpack:\//gi; + + this.onSpecComplete = function (_browser: any, result: any) { + if (!result.success && result.log.length > 0) { + result.log.forEach((log: string, idx: number) => { + result.log[idx] = log.replace(urlRegexp, ''); + }); + } + }; +}; + +initSourcemapReporter.$inject = ['baseReporterDecorator']; + +module.exports = Object.assign({ + 'framework:@angular-devkit/build-webpack': ['factory', init], + 'preprocessor:@angular-devkit/build-webpack': ['factory', preprocessor], + 'reporter:@angular-devkit/build-webpack': ['type', initSourcemapReporter], + 'middleware:devkitBuildWebpackBlocker': ['factory', requestBlocker] +}); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts new file mode 100644 index 0000000000..ffb118de50 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts @@ -0,0 +1,54 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as webpack from 'webpack'; +import { basename } from 'path'; +const AsyncDependenciesBlock = require('webpack/lib/AsyncDependenciesBlock'); +const ContextElementDependency = require('webpack/lib/dependencies/ContextElementDependency'); +const ImportDependency = require('webpack/lib/dependencies/ImportDependency'); + +// This just extends webpack.NamedChunksPlugin to prevent name collisions. +export class NamedLazyChunksWebpackPlugin extends webpack.NamedChunksPlugin { + constructor() { + // Append a dot and number if the name already exists. + const nameMap = new Map(); + function getUniqueName(baseName: string, request: string) { + let name = baseName; + let num = 0; + while (nameMap.has(name) && nameMap.get(name) !== request) { + name = `${baseName}.${num++}`; + } + nameMap.set(name, request); + return name; + } + + const nameResolver = (chunk: any) => { + // Entry chunks have a name already, use it. + if (chunk.name) { + return chunk.name; + } + + // Try to figure out if it's a lazy loaded route or import(). + if (chunk.blocks + && chunk.blocks.length > 0 + && chunk.blocks[0] instanceof AsyncDependenciesBlock + && chunk.blocks[0].dependencies.length === 1 + && (chunk.blocks[0].dependencies[0] instanceof ContextElementDependency + || chunk.blocks[0].dependencies[0] instanceof ImportDependency) + ) { + // Create chunkname from file request, stripping ngfactory and extension. + const request = chunk.blocks[0].dependencies[0].request; + const chunkName = basename(request).replace(/(\.ngfactory)?\.(js|ts)$/, ''); + if (!chunkName || chunkName === '') { + // Bail out if something went wrong with the name. + return null; + } + return getUniqueName(chunkName, request); + } + + return null; + }; + + super(nameResolver); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts new file mode 100644 index 0000000000..21be453fc0 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts @@ -0,0 +1,143 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Compiler, loader } from 'webpack'; +import { CachedSource, ConcatSource, OriginalSource, RawSource, Source } from 'webpack-sources'; +import { interpolateName } from 'loader-utils'; +import * as path from 'path'; + +const Chunk = require('webpack/lib/Chunk'); + +export interface ScriptsWebpackPluginOptions { + name: string; + sourceMap: boolean; + scripts: string[]; + filename: string; + basePath: string; +} + +interface ScriptOutput { + filename: string; + source: CachedSource; +} + +export class ScriptsWebpackPlugin { + private _lastBuildTime?: number; + private _cachedOutput?: ScriptOutput; + + constructor(private options: Partial = {}) {} + + shouldSkip(compilation: any, scripts: string[]): boolean { + if (this._lastBuildTime == undefined) { + this._lastBuildTime = Date.now(); + return false; + } + + for (let i = 0; i < scripts.length; i++) { + const scriptTime = compilation.fileTimestamps[scripts[i]]; + if (!scriptTime || scriptTime > this._lastBuildTime) { + this._lastBuildTime = Date.now(); + return false; + } + } + + return true; + } + + private _insertOutput(compilation: any, { filename, source }: ScriptOutput, cached = false) { + const chunk = new Chunk(); + chunk.rendered = !cached; + chunk.id = this.options.name; + chunk.ids = [chunk.id]; + chunk.name = this.options.name; + chunk.isInitial = () => true; + chunk.files.push(filename); + + compilation.chunks.push(chunk); + compilation.assets[filename] = source; + } + + apply(compiler: Compiler): void { + if (!this.options.scripts || this.options.scripts.length === 0) { + return; + } + + const scripts = this.options.scripts + .filter(script => !!script) + .map(script => path.resolve(this.options.basePath || '', script)); + + compiler.plugin('this-compilation', (compilation: any) => { + compilation.plugin('additional-assets', (callback: (err?: Error) => void) => { + if (this.shouldSkip(compilation, scripts)) { + if (this._cachedOutput) { + this._insertOutput(compilation, this._cachedOutput, true); + } + compilation.fileDependencies.push(...scripts); + + callback(); + + return; + } + + const sourceGetters = scripts.map(fullPath => { + return new Promise((resolve, reject) => { + compilation.inputFileSystem.readFile(fullPath, (err: Error, data: Buffer) => { + if (err) { + reject(err); + return; + } + + const content = data.toString(); + + let source; + if (this.options.sourceMap) { + // TODO: Look for source map file (for '.min' scripts, etc.) + + let adjustedPath = fullPath; + if (this.options.basePath) { + adjustedPath = path.relative(this.options.basePath, fullPath); + } + source = new OriginalSource(content, adjustedPath); + } else { + source = new RawSource(content); + } + + resolve(source); + }); + }); + }); + + Promise.all(sourceGetters) + .then(sources => { + const concatSource = new ConcatSource(); + sources.forEach(source => { + concatSource.add(source); + concatSource.add('\n;'); + }); + + const combinedSource = new CachedSource(concatSource); + const filename = interpolateName( + { resourcePath: 'scripts.js' } as loader.LoaderContext, + this.options.filename as any, + { content: combinedSource.source() }, + ); + + const output = { filename, source: combinedSource }; + this._insertOutput(compilation, output); + this._cachedOutput = output; + compilation.fileDependencies.push(...scripts); + + callback(); + }) + .catch((err: Error) => callback(err)); + }); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts new file mode 100644 index 0000000000..76670e16ed --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts @@ -0,0 +1,17 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +export class StaticAssetPlugin { + + constructor(private name: string, private contents: string) {} + + apply(compiler: any): void { + compiler.plugin('emit', (compilation: any, cb: Function) => { + compilation.assets[this.name] = { + size: () => this.contents.length, + source: () => this.contents, + }; + cb(); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts new file mode 100644 index 0000000000..8b3c84d695 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts @@ -0,0 +1,55 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +// Remove .js files from entry points consisting entirely of .css|scss|sass|less|styl. +// To be used together with ExtractTextPlugin. + +export class SuppressExtractedTextChunksWebpackPlugin { + constructor() { } + + apply(compiler: any): void { + compiler.plugin('compilation', function (compilation: any) { + // find which chunks have css only entry points + const cssOnlyChunks: string[] = []; + const entryPoints = compilation.options.entry; + // determine which entry points are composed entirely of css files + for (let entryPoint of Object.keys(entryPoints)) { + let entryFiles: string[]|string = entryPoints[entryPoint]; + // when type of entryFiles is not array, make it as an array + entryFiles = entryFiles instanceof Array ? entryFiles : [entryFiles]; + if (entryFiles.every((el: string) => + el.match(/\.(css|scss|sass|less|styl)$/) !== null)) { + cssOnlyChunks.push(entryPoint); + } + } + // Remove the js file for supressed chunks + compilation.plugin('after-seal', (callback: any) => { + compilation.chunks + .filter((chunk: any) => cssOnlyChunks.indexOf(chunk.name) !== -1) + .forEach((chunk: any) => { + let newFiles: string[] = []; + chunk.files.forEach((file: string) => { + if (file.match(/\.js(\.map)?$/)) { + // remove js files + delete compilation.assets[file]; + } else { + newFiles.push(file); + } + }); + chunk.files = newFiles; + }); + callback(); + }); + // Remove scripts tags with a css file as source, because HtmlWebpackPlugin will use + // a css file as a script for chunks without js files. + compilation.plugin('html-webpack-plugin-alter-asset-tags', + (htmlPluginData: any, callback: any) => { + const filterFn = (tag: any) => + !(tag.tagName === 'script' && tag.attributes.src.match(/\.css$/)); + htmlPluginData.head = htmlPluginData.head.filter(filterFn); + htmlPluginData.body = htmlPluginData.body.filter(filterFn); + callback(null, htmlPluginData); + }); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts new file mode 100644 index 0000000000..972e2782b4 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts @@ -0,0 +1,11 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +// Exports the webpack plugins we use internally. +export { BaseHrefWebpackPlugin } from '../lib/base-href-webpack/base-href-webpack-plugin'; +export { CleanCssWebpackPlugin, CleanCssWebpackPluginOptions } from './cleancss-webpack-plugin'; +export { GlobCopyWebpackPlugin, GlobCopyWebpackPluginOptions } from './glob-copy-webpack-plugin'; +export { BundleBudgetPlugin, BundleBudgetPluginOptions } from './bundle-budget'; +export { NamedLazyChunksWebpackPlugin } from './named-lazy-chunks-webpack-plugin'; +export { ScriptsWebpackPlugin, ScriptsWebpackPluginOptions } from './scripts-webpack-plugin'; +export { SuppressExtractedTextChunksWebpackPlugin } from './suppress-entry-chunks-webpack-plugin'; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/bundle-calculator.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/bundle-calculator.ts new file mode 100644 index 0000000000..59d4b54903 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/bundle-calculator.ts @@ -0,0 +1,209 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export type BudgetType = 'all' | 'allScript' | 'any' | 'anyScript' | 'bundle' | 'initial'; + +export interface Budget { + /** + * The type of budget + */ + type: BudgetType; + /** + * The name of the bundle + */ + name?: string; + /** + * The baseline size for comparison. + */ + baseline?: string; + /** + * The maximum threshold for warning relative to the baseline. + */ + maximumWarning?: string; + /** + * The maximum threshold for error relative to the baseline. + */ + maximumError?: string; + /** + * The minimum threshold for warning relative to the baseline. + */ + minimumWarning?: string; + /** + * The minimum threshold for error relative to the baseline. + */ + minimumError?: string; + /** + * The threshold for warning relative to the baseline (min & max). + */ + warning?: string; + /** + * The threshold for error relative to the baseline (min & max). + */ + error?: string; +} + +export interface Compilation { + assets: any; + chunks: any[]; + warnings: string[]; + errors: string[]; +} + +export interface Size { + size: number; + label?: string; +} + +export function calculateSizes(budget: Budget, compilation: Compilation): Size[] { + const calculatorMap = { + all: AllCalculator, + allScript: AllScriptCalculator, + any: AnyCalculator, + anyScript: AnyScriptCalculator, + bundle: BundleCalculator, + initial: InitialCalculator, + }; + const ctor = calculatorMap[budget.type]; + const calculator = new ctor(budget, compilation); + return calculator.calculate(); +} + +export abstract class Calculator { + constructor (protected budget: Budget, protected compilation: Compilation) {} + + abstract calculate(): Size[]; +} + +/** + * A named bundle. + */ +class BundleCalculator extends Calculator { + calculate() { + const size: number = this.compilation.chunks + .filter(chunk => chunk.name === this.budget.name) + .reduce((files, chunk) => [...files, ...chunk.files], []) + .map((file: string) => this.compilation.assets[file].size()) + .reduce((total: number, size: number) => total + size, 0); + return [{size, label: this.budget.name}]; + } +} + +/** + * The sum of all initial chunks (marked as initial by webpack). + */ +class InitialCalculator extends Calculator { + calculate() { + const initialChunks = this.compilation.chunks.filter(chunk => chunk.isInitial); + const size: number = initialChunks + .reduce((files, chunk) => [...files, ...chunk.files], []) + .map((file: string) => this.compilation.assets[file].size()) + .reduce((total: number, size: number) => total + size, 0); + return [{size, label: 'initial'}]; + } +} + +/** + * The sum of all the scripts portions. + */ +class AllScriptCalculator extends Calculator { + calculate() { + const size: number = Object.keys(this.compilation.assets) + .filter(key => /\.js$/.test(key)) + .map(key => this.compilation.assets[key]) + .map(asset => asset.size()) + .reduce((total: number, size: number) => total + size, 0); + return [{size, label: 'total scripts'}]; + } +} + +/** + * All scripts and assets added together. + */ +class AllCalculator extends Calculator { + calculate() { + const size: number = Object.keys(this.compilation.assets) + .map(key => this.compilation.assets[key].size()) + .reduce((total: number, size: number) => total + size, 0); + return [{size, label: 'total'}]; + } +} + +/** + * Any script, individually. + */ +class AnyScriptCalculator extends Calculator { + calculate() { + return Object.keys(this.compilation.assets) + .filter(key => /\.js$/.test(key)) + .map(key => { + const asset = this.compilation.assets[key]; + return { + size: asset.size(), + label: key + }; + }); + } +} + +/** + * Any script or asset (images, css, etc). + */ +class AnyCalculator extends Calculator { + calculate() { + return Object.keys(this.compilation.assets) + .map(key => { + const asset = this.compilation.assets[key]; + return { + size: asset.size(), + label: key + }; + }); + } +} + +/** + * Calculate the bytes given a string value. + */ +export function calculateBytes(val: string, baseline?: string, factor?: ('pos' | 'neg')): number { + if (/^\d+$/.test(val)) { + return parseFloat(val); + } + + if (/^(\d+)%$/.test(val)) { + return calculatePercentBytes(val, baseline, factor); + } + + const multiplier = getMultiplier(val); + + const numberVal = parseFloat(val.replace(/((k|m|M|)b?)$/, '')); + const baselineVal = baseline ? parseFloat(baseline.replace(/((k|m|M|)b?)$/, '')) : 0; + const baselineMultiplier = baseline ? getMultiplier(baseline) : 1; + const factorMultiplier = factor ? (factor === 'pos' ? 1 : -1) : 1; + + return numberVal * multiplier + baselineVal * baselineMultiplier * factorMultiplier; +} + +function getMultiplier(val: string): number { + if (/^(\d+)b?$/.test(val)) { + return 1; + } else if (/^(\d+)kb$/.test(val)) { + return 1000; + } else if (/^(\d+)(m|M)b$/.test(val)) { + return 1000 * 1000; + } else { + return 1; + } +} + +function calculatePercentBytes(val: string, baseline?: string, factor?: ('pos' | 'neg')): number { + const baselineBytes = calculateBytes(baseline as string); + const percentage = parseFloat(val.replace(/%/g, '')); + return baselineBytes + baselineBytes * percentage / 100 * (factor === 'pos' ? 1 : -1); +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/check-port.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/check-port.ts new file mode 100644 index 0000000000..6f5478da19 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/check-port.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Observable } from 'rxjs/Observable'; +const portfinder = require('portfinder'); + + +export function checkPort(port: number, host: string, basePort = 49152): Observable { + return new Observable(obs => { + portfinder.basePort = basePort; + // tslint:disable:no-any + portfinder.getPort({ port, host }, (err: any, foundPort: number) => { + if (err) { + obs.error(err); + } else if (port !== foundPort && port !== 0) { + // If the port isn't available and we weren't looking for any port, throw error. + obs.error(`Port ${port} is already in use. Use '--port' to specify a different port.`); + } else { + // Otherwise, our found port is good. + obs.next(foundPort); + obs.complete(); + } + }); + }); +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/find-up.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/find-up.ts new file mode 100644 index 0000000000..6e01d70d6e --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/find-up.ts @@ -0,0 +1,33 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; +import { existsSync } from 'fs'; + +export function findUp(names: string | string[], from: string, stopOnNodeModules = false) { + if (!Array.isArray(names)) { + names = [names]; + } + const root = path.parse(from).root; + + let currentDir = from; + while (currentDir && currentDir !== root) { + for (const name of names) { + const p = path.join(currentDir, name); + if (existsSync(p)) { + return p; + } + } + + if (stopOnNodeModules) { + const nodeModuleP = path.join(currentDir, 'node_modules'); + if (existsSync(nodeModuleP)) { + return null; + } + } + + currentDir = path.dirname(currentDir); + } + + return null; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/is-directory.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/is-directory.ts new file mode 100644 index 0000000000..d9f072c864 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/is-directory.ts @@ -0,0 +1,12 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as fs from 'fs'; + +export function isDirectory(path: string) { + try { + return fs.statSync(path).isDirectory(); + } catch (_) { + return false; + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts new file mode 100644 index 0000000000..3f53669bc8 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -0,0 +1,44 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import { ExtraEntry, extraEntryParser } from '../models/webpack-configs/utils'; + +// Sort chunks according to a predefined order: +// inline, polyfills, all styles, vendor, main +export function packageChunkSort(appConfig: any) { + let entryPoints = ['inline', 'polyfills', 'sw-register']; + + const pushExtraEntries = (extraEntry: ExtraEntry) => { + if (entryPoints.indexOf(extraEntry.entry as string) === -1) { + entryPoints.push(extraEntry.entry as string); + } + }; + + if (appConfig.styles) { + extraEntryParser(appConfig.styles, './', 'styles').forEach(pushExtraEntries); + } + + if (appConfig.scripts) { + extraEntryParser(appConfig.scripts, './', 'scripts').forEach(pushExtraEntries); + } + + entryPoints.push(...['vendor', 'main']); + + function sort(left: any, right: any) { + let leftIndex = entryPoints.indexOf(left.names[0]); + let rightindex = entryPoints.indexOf(right.names[0]); + + if (leftIndex > rightindex) { + return 1; + } else if (leftIndex < rightindex) { + return -1; + } else { + return 0; + } + } + + // We need to list of entry points for the Ejected webpack config to work (we reuse the function + // defined above). + (sort as any).entryPoints = entryPoints; + return sort; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/read-tsconfig.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/read-tsconfig.ts new file mode 100644 index 0000000000..c8638cd1d6 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/read-tsconfig.ts @@ -0,0 +1,13 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import * as path from 'path'; +import { requireProjectModule } from '../utilities/require-project-module'; + +export function readTsconfig(tsconfigPath: string) { + const projectTs = requireProjectModule(path.dirname(tsconfigPath), 'typescript'); + const configResult = projectTs.readConfigFile(tsconfigPath, projectTs.sys.readFile); + const tsConfig = projectTs.parseJsonConfigFileContent(configResult.config, projectTs.sys, + path.dirname(tsconfigPath), undefined, tsconfigPath); + return tsConfig; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts new file mode 100644 index 0000000000..a6b068a294 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts @@ -0,0 +1,9 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +const resolve = require('resolve'); + +// require dependencies within the target project +export function requireProjectModule(root: string, moduleName: string) { + return require(resolve.sync(moduleName, { basedir: root })); +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts new file mode 100644 index 0000000000..95b375674b --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts @@ -0,0 +1,94 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import { Filesystem } from '@angular/service-worker/config'; +import { oneLine } from 'common-tags'; +import * as crypto from 'crypto'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as semver from 'semver'; + +export const NEW_SW_VERSION = '5.0.0-rc.0'; + +class CliFilesystem implements Filesystem { + constructor(private base: string) {} + + list(_path: string): Promise { + return Promise.resolve(this.syncList(_path)); + } + + private syncList(_path: string): string[] { + const dir = this.canonical(_path); + const entries = fs.readdirSync(dir).map( + (entry: string) => ({entry, stats: fs.statSync(path.posix.join(dir, entry))})); + const files = entries.filter((entry: any) => !entry.stats.isDirectory()) + .map((entry: any) => path.posix.join(_path, entry.entry)); + + return entries.filter((entry: any) => entry.stats.isDirectory()) + .map((entry: any) => path.posix.join(_path, entry.entry)) + .reduce((list: string[], subdir: string) => list.concat(this.syncList(subdir)), files); + } + + read(_path: string): Promise { + const file = this.canonical(_path); + return Promise.resolve(fs.readFileSync(file).toString()); + } + + hash(_path: string): Promise { + const sha1 = crypto.createHash('sha1'); + const file = this.canonical(_path); + const contents: Buffer = fs.readFileSync(file); + sha1.update(contents); + return Promise.resolve(sha1.digest('hex')); + } + + write(_path: string, contents: string): Promise { + const file = this.canonical(_path); + fs.writeFileSync(file, contents); + return Promise.resolve(); + } + + private canonical(_path: string): string { return path.posix.join(this.base, _path); } +} + +export function usesServiceWorker(projectRoot: string): boolean { + const nodeModules = path.resolve(projectRoot, 'node_modules'); + const swModule = path.resolve(nodeModules, '@angular/service-worker'); + if (!fs.existsSync(swModule)) { + return false; + } + + const swPackageJson = fs.readFileSync(`${swModule}/package.json`).toString(); + const swVersion = JSON.parse(swPackageJson)['version']; + + return semver.gte(swVersion, NEW_SW_VERSION); +} + +export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string, + outputPath: string, baseHref: string): Promise { + const nodeModules = path.resolve(projectRoot, 'node_modules'); + const swModule = path.resolve(nodeModules, '@angular/service-worker'); + + // Path to the worker script itself. + const workerPath = path.resolve(swModule, 'ngsw-worker.js'); + const configPath = path.resolve(appRoot, 'ngsw-config.json'); + + if (!fs.existsSync(configPath)) { + throw new Error(oneLine`Error: Expected to find an ngsw-config.json configuration + file in the ${appRoot} folder. Either provide one or disable Service Worker + in .angular-cli.json.`); + } + const config = fs.readFileSync(configPath, 'utf8'); + + const Generator = require('@angular/service-worker/config').Generator; + const gen = new Generator(new CliFilesystem(outputPath), baseHref); + return gen + .process(JSON.parse(config)) + .then((output: Object) => { + const manifest = JSON.stringify(output, null, 2); + fs.writeFileSync(path.resolve(outputPath, 'ngsw.json'), manifest); + // Copy worker script to dist directory. + const workerCode = fs.readFileSync(workerPath); + fs.writeFileSync(path.resolve(outputPath, 'ngsw-worker.js'), workerCode); + }); +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts new file mode 100644 index 0000000000..7017906443 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts @@ -0,0 +1,79 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +import chalk from 'chalk'; +import { stripIndents } from 'common-tags'; + + +// Force basic color support on terminals with no color support. +// Chalk typings don't have the correct constructor parameters. +const chalkCtx = new (chalk.constructor as any)(chalk.supportsColor ? {} : { level: 1 }); +const { bold, green, red, reset, white, yellow } = chalkCtx; + +function _formatSize(size: number): string { + if (size <= 0) { + return '0 bytes'; + } + + const abbreviations = ['bytes', 'kB', 'MB', 'GB']; + const index = Math.floor(Math.log(size) / Math.log(1000)); + + return `${+(size / Math.pow(1000, index)).toPrecision(3)} ${abbreviations[index]}`; +} + + +export function statsToString(json: any, statsConfig: any) { + const colors = statsConfig.colors; + const rs = (x: string) => colors ? reset(x) : x; + const w = (x: string) => colors ? bold(white(x)) : x; + const g = (x: string) => colors ? bold(green(x)) : x; + const y = (x: string) => colors ? bold(yellow(x)) : x; + + const changedChunksStats = json.chunks + .filter((chunk: any) => chunk.rendered) + .map((chunk: any) => { + const asset = (json.assets || []).filter((x: any) => x.name == chunk.files[0])[0]; + const size = asset ? ` ${_formatSize(asset.size)}` : ''; + const files = chunk.files.join(', '); + const names = chunk.names ? ` (${chunk.names.join(', ')})` : ''; + const initial = y(chunk.entry ? '[entry]' : chunk.initial ? '[initial]' : ''); + const flags = ['rendered', 'recorded'] + .map(f => f && chunk[f] ? g(` [${f}]`) : '') + .join(''); + + return `chunk {${y(chunk.id)}} ${g(files)}${names}${size} ${initial}${flags}`; + }); + + const unchangedChunkNumber = json.chunks.length - changedChunksStats.length; + + if (unchangedChunkNumber > 0) { + return rs(stripIndents` + Date: ${w(new Date().toISOString())} • Hash: ${w(json.hash)} • Time: ${w('' + json.time)}ms + ${unchangedChunkNumber} unchanged chunks + ${changedChunksStats.join('\n')} + `); + } else { + return rs(stripIndents` + Date: ${w(new Date().toISOString())} + Hash: ${w(json.hash)} + Time: ${w('' + json.time)}ms + ${changedChunksStats.join('\n')} + `); + } +} + +export function statsWarningsToString(json: any, statsConfig: any) { + const colors = statsConfig.colors; + const rs = (x: string) => colors ? reset(x) : x; + const y = (x: string) => colors ? bold(yellow(x)) : x; + + return rs('\n' + json.warnings.map((warning: any) => y(`WARNING in ${warning}`)).join('\n\n')); +} + +export function statsErrorsToString(json: any, statsConfig: any) { + const colors = statsConfig.colors; + const rs = (x: string) => colors ? reset(x) : x; + const r = (x: string) => colors ? bold(red(x)) : x; + + return rs('\n' + json.errors.map((error: any) => r(`ERROR in ${error}`)).join('\n')); +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/strip-bom.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/strip-bom.ts new file mode 100644 index 0000000000..a878f64b4d --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/strip-bom.ts @@ -0,0 +1,8 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +// Strip BOM from file data. +// https://stackoverflow.com/questions/24356713 +export function stripBom(data: string) { + return data.replace(/^\uFEFF/, ''); +} diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts new file mode 100644 index 0000000000..c3a5d2897f --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -0,0 +1,258 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { getSystemPath } from '@angular-devkit/core'; +import { writeFileSync } from 'fs'; +import { resolve } from 'path'; +import { Observable } from 'rxjs/Observable'; +import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies +import * as webpack from 'webpack'; +import { + getAotConfig, + getBrowserConfig, + getCommonConfig, + getDevConfig, + getNonAotConfig, + getProdConfig, + getStylesConfig, +} from '../angular-cli-files/models/webpack-configs'; +import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; +import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { + statsErrorsToString, + statsToString, + statsWarningsToString, +} from '../angular-cli-files/utilities/stats'; +const webpackMerge = require('webpack-merge'); + + +// TODO: Use quicktype to build our TypeScript interfaces from the JSON Schema itself, in +// the build system. +export interface BrowserBuilderOptions { + outputPath: string; + index: string; + main: string; + tsConfig: string; // previously 'tsconfig'. + aot: boolean; + vendorChunk: boolean; + commonChunk: boolean; + verbose: boolean; + progress: boolean; + extractCss: boolean; + bundleDependencies: 'none' | 'all'; + watch: boolean; + outputHashing: 'none' | 'all' | 'media' | 'bundles'; + deleteOutputPath: boolean; + preserveSymlinks: boolean; + extractLicenses: boolean; + showCircularDependencies: boolean; + buildOptimizer: boolean; + namedChunks: boolean; + subresourceIntegrity: boolean; + serviceWorker: boolean; + skipAppShell: boolean; + + // Options with no defaults. + // TODO: reconsider this list. + polyfills?: string; + baseHref?: string; + deployUrl?: string; + i18nFile?: string; + i18nFormat?: string; + i18nOutFile?: string; + i18nOutFormat?: string; + poll?: number; + + // A couple of options have different names. + sourceMap: boolean; // previously 'sourcemaps'. + evalSourceMap: boolean; // previously 'evalSourcemaps'. + optimizationLevel: number; // previously 'target'. + i18nLocale?: string; // previously 'locale'. + i18nMissingTranslation?: string; // previously 'missingTranslation'. + + // These options were not available as flags. + assets: AssetPattern[]; + scripts: ExtraEntryPoint[]; + styles: ExtraEntryPoint[]; + stylePreprocessorOptions: { includePaths: string[] }; + platform: 'browser' | 'server'; + + // Some options are not needed anymore. + // app?: string; // apps aren't used with build facade + + // TODO: figure out what to do about these. + environment?: string; // Maybe replace with 'fileReplacement' object? + forceTsCommonjs?: boolean; // Remove with webpack 4. + statsJson: boolean; +} + +export interface AssetPattern { + glob: string; + input: string; + output: string; + allowOutsideOutDir: boolean; +} + +export interface ExtraEntryPoint { + input: string; + output?: string; + lazy: boolean; +} + +export interface WebpackConfigOptions { + projectRoot: string; + buildOptions: BrowserBuilderOptions; + appConfig: BrowserBuilderOptions; + tsConfig: ts.ParsedCommandLine; + supportES2015: boolean; +} + +export class BrowserBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + return new Observable(obs => { + const root = getSystemPath(target.root); + const options = target.options; + + // Ensure Build Optimizer is only used with AOT. + if (options.buildOptimizer && !options.aot) { + throw new Error('The `--build-optimizer` option cannot be used without `--aot`.'); + } + + if (options.deleteOutputPath) { + // TODO: do this in a webpack plugin https://github.com/johnagan/clean-webpack-plugin + // fs.removeSync(resolve(options.root, options.outputPath)); + } + + const webpackConfig = this.buildWebpackConfig(root, options); + const webpackCompiler = webpack(webpackConfig); + const statsConfig = getWebpackStatsConfig(options.verbose); + + const callback: webpack.compiler.CompilerCallback = (err, stats) => { + if (err) { + return obs.error(err); + } + + const json = stats.toJson('verbose'); + if (options.verbose) { + this.context.logger.info(stats.toString(statsConfig)); + } else { + this.context.logger.info(statsToString(json, statsConfig)); + } + + if (stats.hasWarnings()) { + this.context.logger.warn(statsWarningsToString(json, statsConfig)); + } + if (stats.hasErrors()) { + this.context.logger.error(statsErrorsToString(json, statsConfig)); + } + + // TODO: what should these events look like and contain? + obs.next({ success: true }); + + if (options.watch) { + return; + } else if (options.statsJson) { + writeFileSync( + resolve(root, options.outputPath, 'stats.json'), + JSON.stringify(stats.toJson(), null, 2), + ); + } + + if (stats.hasErrors()) { + obs.error(); + } else { + // if (!!app.serviceWorker && runTaskOptions.target === 'production' && + // usesServiceWorker(this.project.root) && runTaskOptions.serviceWorker !== false) { + // const appRoot = path.resolve(this.project.root, app.root); + // augmentAppWithServiceWorker(this.project.root, appRoot, path.resolve(outputPath), + // runTaskOptions.baseHref || '/') + // .then(() => resolve(), (err: any) => reject(err)); + // } else { + obs.complete(); + } + }; + + try { + // if (options.watch) { + // webpackCompiler.watch({ poll: options.poll }, callback); + // } else { + webpackCompiler.run(callback); + // } + } catch (err) { + if (err) { + this.context.logger.error( + '\nAn error occured during the build:\n' + ((err && err.stack) || err)); + } + throw err; + } + }); + } + + buildWebpackConfig(projectRoot: string, options: BrowserBuilderOptions) { + let wco: WebpackConfigOptions; + + // TODO: make target defaults into configurations instead + // options = this.addTargetDefaults(options); + + const tsconfigPath = resolve(projectRoot, options.tsConfig as string); + const tsConfig = readTsconfig(tsconfigPath); + + const projectTs = requireProjectModule(projectRoot, 'typescript') as typeof ts; + + const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 + && tsConfig.options.target !== projectTs.ScriptTarget.ES5; + + + // TODO: inside the configs, always use the project root and not the workspace root. + // Until then we have to pretend the app root is relative (``) but the same as `projectRoot`. + (options as any).root = ''; // tslint:disable-line:no-any + + wco = { + projectRoot, + // TODO: use only this.options, it contains all flags and configs items already. + buildOptions: options, + appConfig: options, + tsConfig, + supportES2015, + }; + + let targetConfig = {}; + switch (options.optimizationLevel) { + case 0: + targetConfig = getDevConfig(wco); + break; + case 1: + targetConfig = getProdConfig(wco); + break; + } + + const webpackConfigs: {}[] = [ + getCommonConfig(wco), + getBrowserConfig(wco), + getStylesConfig(wco), + // TODO: use project configurations for the --prod meta options. + targetConfig, + ]; + + if (wco.appConfig.main || wco.appConfig.polyfills) { + const typescriptConfigPartial = wco.buildOptions.aot + ? getAotConfig(wco) + : getNonAotConfig(wco); + webpackConfigs.push(typescriptConfigPartial); + } + + return webpackMerge(webpackConfigs); + } +} + +export default BrowserBuilder; diff --git a/packages/angular_devkit/build_webpack/src/browser/index_spec.ts b/packages/angular_devkit/build_webpack/src/browser/index_spec.ts new file mode 100644 index 0000000000..617cc3279c --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/browser/index_spec.ts @@ -0,0 +1,93 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { existsSync, readFileSync } from 'fs'; +import { relative, resolve } from 'path'; +import { concatMap, tap, toArray } from 'rxjs/operators'; + +const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any +const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); +const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); +const relativeBuilderPath = relative(root, builderPath); +const outputPath = resolve(root, 'dist'); +const host = new NodeJsSyncHost(); + +export const getWorkspace = (): Workspace => ({ + name: 'spec', + version: 1, + root: '', + defaultProject: 'app', + projects: { + app: { + root: 'src', + projectType: 'application', + defaultTarget: 'browser', + targets: { + browser: { + builder: `${relativeBuilderPath}:browser`, + options: { + outputPath: '../dist', + index: 'index.html', + main: 'main.ts', + polyfills: 'polyfills.ts', + tsConfig: 'tsconfig.app.json', + progress: false, + aot: false, + styles: [{ input: 'styles.css', lazy: false }], + scripts: [], + assets: [ + { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, + { glob: '**/*', input: 'assets', output: './', allowOutsideOutDir: false }, + ], + }, + }, + }, + }, + }, +}); + +describe('Browser Builder', () => { + it('builds targets', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + toArray(), + tap(events => expect(events.length).toBe(1)), + tap(() => { + expect(existsSync(resolve(outputPath, 'inline.bundle.js'))).toBe(true); + expect(existsSync(resolve(outputPath, 'main.bundle.js'))).toBe(true); + expect(existsSync(resolve(outputPath, 'polyfills.bundle.js'))).toBe(true); + expect(existsSync(resolve(outputPath, 'styles.bundle.js'))).toBe(true); + expect(existsSync(resolve(outputPath, 'vendor.bundle.js'))).toBe(true); + expect(existsSync(resolve(outputPath, 'favicon.ico'))).toBe(true); + expect(existsSync(resolve(outputPath, 'index.html'))).toBe(true); + }), + ).subscribe(done, done.fail); + }, 30000); + + it('builds aot target', (done) => { + const workspace = getWorkspace(); + workspace.projects.app.targets.browser.options.aot = true; + + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(workspace).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + toArray(), + tap(events => expect(events.length).toBe(1)), + tap(() => { + const mainBundlePath = resolve(outputPath, 'main.bundle.js'); + expect(existsSync(mainBundlePath)).toBe(true); + expect(readFileSync(mainBundlePath, 'utf-8')).toMatch( + /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); + }), + ).subscribe(done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json new file mode 100644 index 0000000000..8e30ac5d78 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -0,0 +1,283 @@ +{ + "title": "Webpack browser schema for Build Facade.", + "description": "Browser target options", + "properties": { + "assets": { + "type": "array", + "description": "List of static application assets.", + "default": [], + "items": { + "$ref": "#/definitions/assetPattern" + } + }, + "platform": { + "type": "string", + "description": "The runtime platform of the app.", + "default": "browser", + "enum": [ + "browser", + "server" + ] + }, + "main": { + "type": "string", + "description": "The name of the main entry-point file." + }, + "polyfills": { + "type": "string", + "description": "The name of the polyfills file." + }, + "tsConfig": { + "type": "string", + "default": "tsconfig.app.json", + "description": "The name of the TypeScript configuration file." + }, + "scripts": { + "description": "Global scripts to be included in the build.", + "type": "array", + "default": [], + "items": { + "$ref": "#/definitions/extraEntryPoint" + } + }, + "styles": { + "description": "Global styles to be included in the build.", + "type": "array", + "default": [], + "items": { + "$ref": "#/definitions/extraEntryPoint" + } + }, + "stylePreprocessorOptions": { + "description": "Options to pass to style preprocessors", + "type": "object", + "properties": { + "includePaths": { + "description": "Paths to include. Paths will be resolved to project root.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + "additionalProperties": false + }, + "optimizationLevel": { + "type": "number", + "description": "Defines the optimization level of the build.", + "default": 0 + }, + "environment": { + "type": "string", + "description": "Defines the build environment." + }, + "outputPath": { + "type": "string", + "description": "Path where output will be placed." + }, + "aot": { + "type": "boolean", + "description": "Build using Ahead of Time compilation.", + "default": false + }, + "sourceMap": { + "type": "boolean", + "description": "Output sourcemaps.", + "default": true + }, + "evalSourceMap": { + "type": "boolean", + "description": "Output in-file eval sourcemaps.", + "default": false + }, + "vendorChunk": { + "type": "boolean", + "description": "Use a separate bundle containing only vendor libraries.", + "default": true + }, + "commonChunk": { + "type": "boolean", + "description": "Use a separate bundle containing code used across multiple bundles.", + "default": true + }, + "baseHref": { + "type": "string", + "description": "Base url for the application being built." + }, + "deployUrl": { + "type": "string", + "description": "URL where files will be deployed." + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging.", + "default": false + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building.", + "default": true + }, + "i18nFile": { + "type": "string", + "description": "Localization file to use for i18n." + }, + "i18nFormat": { + "type": "string", + "description": "Format of the localization file specified with --i18n-file." + }, + "i18nLocale": { + "type": "string", + "description": "Locale to use for i18n." + }, + "i18nMissingTranslation": { + "type": "string", + "description": "How to handle missing translations for i18n." + }, + "extractCss": { + "type": "boolean", + "description": "Extract css from global styles onto css files instead of js ones.", + "default": false + }, + "watch": { + "type": "boolean", + "description": "Run build when files change.", + "default": false + }, + "outputHashing": { + "type": "string", + "description": "Define the output filename cache-busting hashing mode.", + "default": "none", + "enum": [ + "none", + "all", + "media", + "bundles" + ] + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." + }, + "deleteOutputPath": { + "type": "boolean", + "description": "delete-output-path", + "default": true + }, + "preserveSymlinks": { + "type": "boolean", + "description": "Do not use the real path when resolving modules.", + "default": false + }, + "extractLicenses": { + "type": "boolean", + "description": "Extract all licenses in a separate file, in the case of production builds only.", + "default": true + }, + "showCircularDependencies": { + "type": "boolean", + "description": "Show circular dependency warnings on builds.", + "default": true + }, + "buildOptimizer": { + "type": "boolean", + "description": "Enables @angular-devkit/build-optimizer optimizations when using the 'aot' option.", + "default": false + }, + "namedChunks": { + "type": "boolean", + "description": "Use file name for lazy loaded chunks.", + "default": true + }, + "subresourceIntegrity": { + "type": "boolean", + "description": "Enables the use of subresource integrity validation.", + "default": false + }, + "bundleDependencies": { + "type": "string", + "description": "Available on server platform only. Which external dependencies to bundle into the module. By default, all of node_modules will be kept as requires.", + "default": "none", + "enum": [ + "none", + "all" + ] + }, + "serviceWorker": { + "type": "boolean", + "description": "Generates a service worker config for production builds.", + "default": false + }, + "skipAppShell": { + "type": "boolean", + "description": "Flag to prevent building an app shell.", + "default": false + }, + "index": { + "type": "string", + "description": "The name of the index HTML file." + }, + "statsJson": { + "type": "boolean", + "description": "Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "outputPath", + "index", + "main", + "tsConfig" + ], + "definitions": { + "assetPattern": { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input path dir in which to apply 'glob'.", + "default": "./" + }, + "output": { + "type": "string", + "description": "The output path, relative to 'outputPath'.", + "default": "./" + }, + "allowOutsideOutDir": { + "type": "boolean", + "description": "Allow assets to be copied outside the outDir.", + "default": false + } + }, + "additionalProperties": false + }, + "extraEntryPoint": { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include." + }, + "output": { + "type": "string", + "description": "The output path and filename, relative to 'outputPath'." + }, + "lazy": { + "type": "boolean", + "description": "Allow assets to be copied outside the outDir.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "input" + ] + } + } +} diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts new file mode 100644 index 0000000000..4fe0f9573f --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -0,0 +1,405 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { getSystemPath, tags } from '@angular-devkit/core'; +import { existsSync, readFileSync } from 'fs'; +import * as path from 'path'; +import { Observable } from 'rxjs/Observable'; +import { concatMap } from 'rxjs/operators'; +import * as url from 'url'; +import * as webpack from 'webpack'; +import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; +import { checkPort } from '../angular-cli-files/utilities/check-port'; +import { + statsErrorsToString, + statsToString, + statsWarningsToString, +} from '../angular-cli-files/utilities/stats'; +import { + BrowserBuilder, + BrowserBuilderOptions, +} from '../browser/'; +const opn = require('opn'); +const WebpackDevServer = require('webpack-dev-server'); + + +export interface DevServerBuilderOptions { + browserTarget: string; + port: number; + host: string; + proxyConfig?: string; + ssl: boolean; + sslKey?: string; + sslCert?: string; + open: boolean; + liveReload: boolean; + publicHost?: string; + servePath?: string; + disableHostCheck: boolean; + hmr: boolean; + watch: boolean; + hmrWarning: boolean; + servePathDefaultWarning: boolean; +} + +interface WebpackDevServerConfigurationOptions { + contentBase?: boolean | string | string[]; + hot?: boolean; + historyApiFallback?: { [key: string]: any } | boolean; // tslint:disable-line:no-any + compress?: boolean; + proxy?: { [key: string]: string }; + staticOptions?: any; // tslint:disable-line:no-any + quiet?: boolean; + noInfo?: boolean; + lazy?: boolean; + filename?: string; + watchOptions?: { + aggregateTimeout?: number; + poll?: number; + }; + publicPath?: string; + headers?: { [key: string]: string }; + stats?: { [key: string]: boolean } | string; + inline: boolean; + https?: boolean; + key?: string; + cert?: string; + overlay?: boolean | { errors: boolean, warnings: boolean }; + public?: string; + disableHostCheck?: boolean; +} + +export class DevServerBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + const root = getSystemPath(target.root); + const options = target.options; + + return checkPort(options.port, options.host).pipe( + concatMap((port) => { + options.port = port; + + return this._getBrowserOptions(options); + }), + concatMap((browserOptions) => new Observable(obs => { + const browserBuilder = new BrowserBuilder(this.context); + const webpackConfig = browserBuilder.buildWebpackConfig(root, browserOptions); + const webpackCompiler = webpack(webpackConfig); + const statsConfig = getWebpackStatsConfig(browserOptions.verbose); + const webpackDevServerConfig = this._buildServerConfig(root, options, browserOptions); + + // Resolve public host and client address. + let clientAddress = `${options.ssl ? 'https' : 'http'}://0.0.0.0:0`; + if (options.publicHost) { + let publicHost = options.publicHost; + if (!/^\w+:\/\//.test(publicHost)) { + publicHost = `${options.ssl ? 'https' : 'http'}://${publicHost}`; + } + const clientUrl = url.parse(publicHost); + options.publicHost = clientUrl.host; + clientAddress = url.format(clientUrl); + } + + // Resolve serve address. + const serverAddress = url.format({ + protocol: options.ssl ? 'https' : 'http', + hostname: options.host === '0.0.0.0' ? 'localhost' : options.host, + port: options.port.toString(), + }); + + // Add live reload config. + if (options.liveReload) { + this._addLiveReload(options, browserOptions, webpackConfig, clientAddress); + } else if (options.hmr) { + this.context.logger.warn('Live reload is disabled. HMR option ignored.'); + } + + if (!options.watch) { + // There's no option to turn off file watching in webpack-dev-server, but + // we can override the file watcher instead. + webpackConfig.plugins.unshift({ + apply: (compiler: any) => { // tslint:disable-line:no-any + compiler.plugin('after-environment', () => { + compiler.watchFileSystem = { watch: () => { } }; + }); + }, + }); + } + + if (browserOptions.optimizationLevel > 0) { + this.context.logger.error(tags.stripIndents` + **************************************************************************************** + This is a simple server for use in testing or debugging Angular applications locally. + It hasn't been reviewed for security issues. + + DON'T USE IT FOR PRODUCTION! + **************************************************************************************** + `); + } + + this.context.logger.info(tags.oneLine` + ** + Angular Live Development Server is listening on ${options.host}: + ${options.port}, open your browser on ${serverAddress}${webpackDevServerConfig.publicPath} + ** + `); + + const server = new WebpackDevServer(webpackCompiler, webpackDevServerConfig); + if (!browserOptions.verbose) { + webpackCompiler.plugin('done', (stats: any) => { // tslint:disable-line:no-any + const json = stats.toJson(statsConfig); + this.context.logger.info(statsToString(json, statsConfig)); + if (stats.hasWarnings()) { + this.context.logger.info(statsWarningsToString(json, statsConfig)); + } + if (stats.hasErrors()) { + this.context.logger.info(statsErrorsToString(json, statsConfig)); + } + obs.next(); + }); + } + + const httpServer = server.listen( + options.port, + options.host, + (err: any, _stats: any) => { // tslint:disable-line:no-any + if (err) { + obs.error(err); + + return; + } else if (options.open) { + opn(serverAddress + webpackDevServerConfig.publicPath); + } + }); + + // Node 8 has a keepAliveTimeout bug which doesn't respect active connections. + // Connections will end after ~5 seconds (arbitrary), often not letting the full download + // of large pieces of content, such as a vendor javascript file. This results in browsers + // throwing a "net::ERR_CONTENT_LENGTH_MISMATCH" error. + // https://github.com/angular/angular-cli/issues/7197 + // https://github.com/nodejs/node/issues/13391 + // https://github.com/nodejs/node/commit/2cb6f2b281eb96a7abe16d58af6ebc9ce23d2e96 + if (/^v8.\d.\d+$/.test(process.version)) { + httpServer.keepAliveTimeout = 30000; // 30 seconds + } + + // Teardown logic. Close the server when unsubscribed from. + return () => server.close(); + }))); + } + + private _buildServerConfig( + root: string, + options: DevServerBuilderOptions, + browserOptions: BrowserBuilderOptions, + ) { + if (options.disableHostCheck) { + this.context.logger.warn(tags.oneLine` + WARNING: Running a server with --disable-host-check is a security risk. + See https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a + for more information. + `); + } + + const servePath = this._buildServePath(options, browserOptions); + + const config: WebpackDevServerConfigurationOptions = { + headers: { 'Access-Control-Allow-Origin': '*' }, + historyApiFallback: { + index: `${servePath}/${browserOptions.index}`, + disableDotRule: true, + htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], + }, + stats: 'none', // We have our own stats function. + inline: true, + compress: browserOptions.optimizationLevel > 0, + watchOptions: { + poll: browserOptions.poll, + }, + https: options.ssl, + overlay: { + errors: browserOptions.optimizationLevel === 0, + warnings: false, + }, + contentBase: false, + public: options.publicHost, + disableHostCheck: options.disableHostCheck, + publicPath: servePath, + hot: options.hmr, + }; + + if (options.ssl) { + this._addSslConfig(root, options, config); + } + + if (options.proxyConfig) { + this._addProxyConfig(root, options, config); + } + + return config; + } + + private _addLiveReload( + options: DevServerBuilderOptions, + browserOptions: BrowserBuilderOptions, + webpackConfig: any, // tslint:disable-line:no-any + clientAddress: string, + ) { + // This allows for live reload of page when changes are made to repo. + // https://webpack.js.org/configuration/dev-server/#devserver-inline + const entryPoints = [ + `webpack-dev-server/client?${clientAddress}`, + ]; + if (options.hmr) { + const webpackHmrLink = 'https://webpack.js.org/guides/hot-module-replacement'; + + this.context.logger.warn( + tags.oneLine`NOTICE: Hot Module Replacement (HMR) is enabled for the dev server.`); + + const showWarning = options.hmrWarning; + if (showWarning) { + this.context.logger.info(tags.stripIndents` + The project will still live reload when HMR is enabled, + but to take advantage of HMR additional application code is required' + (not included in an Angular CLI project by default).' + See ${webpackHmrLink} + for information on working with HMR for Webpack.`, + ); + this.context.logger.warn( + tags.oneLine`To disable this warning use "ng set warnings.hmrWarning=false".`); + } + entryPoints.push('webpack/hot/dev-server'); + webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin()); + if (browserOptions.extractCss) { + this.context.logger.warn(tags.oneLine`NOTICE: (HMR) does not allow for CSS hot reload + when used together with '--extract-css'.`); + } + } + if (!webpackConfig.entry.main) { webpackConfig.entry.main = []; } + webpackConfig.entry.main.unshift(...entryPoints); + } + + private _addSslConfig( + root: string, + options: DevServerBuilderOptions, + config: WebpackDevServerConfigurationOptions, + ) { + let sslKey: string | undefined = undefined; + let sslCert: string | undefined = undefined; + const keyPath = path.resolve(root, options.sslKey as string); + if (existsSync(keyPath)) { + sslKey = readFileSync(keyPath, 'utf-8'); + } + const certPath = path.resolve(root, options.sslCert as string); + if (existsSync(certPath)) { + sslCert = readFileSync(certPath, 'utf-8'); + } + + config.https = true; + if (sslKey != null && sslCert != null) { + config.key = sslKey; + config.cert = sslCert; + } + } + + private _addProxyConfig( + root: string, + options: DevServerBuilderOptions, + config: WebpackDevServerConfigurationOptions, + ) { + let proxyConfig = {}; + const proxyPath = path.resolve(root, options.proxyConfig as string); + if (existsSync(proxyPath)) { + proxyConfig = require(proxyPath); + } else { + const message = 'Proxy config file ' + proxyPath + ' does not exist.'; + throw new Error(message); + } + config.proxy = proxyConfig; + } + + private _buildServePath(options: DevServerBuilderOptions, browserOptions: BrowserBuilderOptions) { + let servePath = options.servePath; + if (!servePath && servePath !== '') { + const defaultServePath = + this._findDefaultServePath(browserOptions.baseHref, browserOptions.deployUrl); + const showWarning = options.servePathDefaultWarning; + if (defaultServePath == null && showWarning) { + this.context.logger.warn(tags.oneLine` + WARNING: --deploy-url and/or --base-href contain + unsupported values for ng serve. Default serve path of '/' used. + Use --serve-path to override. + `); + } + servePath = defaultServePath || ''; + } + if (servePath.endsWith('/')) { + servePath = servePath.substr(0, servePath.length - 1); + } + if (!servePath.startsWith('/')) { + servePath = `/${servePath}`; + } + + return servePath; + } + + private _findDefaultServePath(baseHref?: string, deployUrl?: string): string | null { + if (!baseHref && !deployUrl) { + return ''; + } + + if (/^(\w+:)?\/\//.test(baseHref || '') || /^(\w+:)?\/\//.test(deployUrl || '')) { + // If baseHref or deployUrl is absolute, unsupported by ng serve + return null; + } + + // normalize baseHref + // for ng serve the starting base is always `/` so a relative + // and root relative value are identical + const baseHrefParts = (baseHref || '') + .split('/') + .filter(part => part !== ''); + if (baseHref && !baseHref.endsWith('/')) { + baseHrefParts.pop(); + } + const normalizedBaseHref = baseHrefParts.length === 0 ? '/' : `/${baseHrefParts.join('/')}/`; + + if (deployUrl && deployUrl[0] === '/') { + if (baseHref && baseHref[0] === '/' && normalizedBaseHref !== deployUrl) { + // If baseHref and deployUrl are root relative and not equivalent, unsupported by ng serve + return null; + } + + return deployUrl; + } + + // Join together baseHref and deployUrl + return `${normalizedBaseHref}${deployUrl || ''}`; + } + + private _getBrowserOptions(options: DevServerBuilderOptions) { + const [project, target, configuration] = options.browserTarget.split(':'); + // Override browser build watch setting. + const overrides = { watch: options.watch }; + let browserTarget: Target; + + const browserTargetOptions = { project, target, configuration, overrides }; + browserTarget = this.context.architect.getTarget(browserTargetOptions); + + return this.context.architect.getBuilderDescription(browserTarget).pipe( + concatMap(browserDescription => + this.context.architect.validateBuilderOptions(browserTarget, browserDescription)), + ); + } +} + + +export default DevServerBuilder; diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts b/packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts new file mode 100644 index 0000000000..f285d0a2d1 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts @@ -0,0 +1,70 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { IncomingMessage } from 'http'; +import { relative, resolve } from 'path'; +import * as _request from 'request'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { concatMap, take, tap } from 'rxjs/operators'; +import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec'; + + +const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any +const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); +const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); +const relativeBuilderPath = relative(root, builderPath); +const host = new NodeJsSyncHost(); + +export const getWorkspace = (): Workspace => { + const workspace = getBrowserWorkspace(); + workspace.projects.app.defaultTarget = 'devServer'; + workspace.projects.app.targets['devServer'] = { + builder: `${relativeBuilderPath}:devServer`, + options: { + browserTarget: 'app:browser', + watch: false, + }, + }; + + return workspace; +}; + +describe('Dev Server Target', () => { + it('runs', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + concatMap(() => fromPromise(request('http://localhost:4200/index.html'))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); + +export function request(url: string): Promise { + return new Promise((resolve, reject) => { + const options = { + url: url, + headers: { 'Accept': 'text/html' }, + agentOptions: { rejectUnauthorized: false }, + }; + // tslint:disable-next-line:no-any + _request(options, (error: any, response: IncomingMessage, body: string) => { + if (error) { + reject(error); + } else if (response.statusCode && response.statusCode >= 400) { + reject(new Error(`Requesting "${url}" returned status code ${response.statusCode}.`)); + } else { + resolve(body); + } + }); + }); +} diff --git a/packages/angular_devkit/build_webpack/src/dev-server/schema.json b/packages/angular_devkit/build_webpack/src/dev-server/schema.json new file mode 100644 index 0000000000..56d6902bd2 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/dev-server/schema.json @@ -0,0 +1,85 @@ +{ + "title": "Karma Target", + "description": "Karma target options for Build Facade.", + "type": "object", + "properties": { + "browserTarget": { + "type": "string", + "description": "Target to serve." + }, + "port": { + "type": "number", + "description": "Port to listen on.", + "default": 4200 + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "proxyConfig": { + "type": "string", + "description": "Proxy configuration file." + }, + "ssl": { + "type": "boolean", + "description": "Serve using HTTPS.", + "default": false + }, + "sslKey": { + "type": "string", + "description": "SSL key to use for serving HTTPS." + }, + "sslCert": { + "type": "string", + "description": "SSL certificate to use for serving HTTPS." + }, + "open": { + "type": "boolean", + "description": "Opens the url in default browser.", + "default": false + }, + "liveReload": { + "type": "boolean", + "description": "Whether to reload the page on change, using live-reload.", + "default": true + }, + "publicHost": { + "type": "string", + "description": "Specify the URL that the browser client will use." + }, + "servePath": { + "type": "string", + "description": "The pathname where the app will be served." + }, + "disableHostCheck": { + "type": "boolean", + "description": "Don't verify connected clients are part of allowed hosts.", + "default": false + }, + "hmr": { + "type": "boolean", + "description": "Enable hot module replacement.", + "default": false + }, + "watch": { + "type": "boolean", + "description": "Rebuild on change.", + "default": true + }, + "hmrWarning": { + "type": "boolean", + "description": "Show a warning when the --hmr option is enabled.", + "default": true + }, + "servePathDefaultWarning": { + "type": "boolean", + "description": "Show a warning when deploy-url/base-href use unsupported serve path values.", + "default": true + } + }, + "additionalProperties": false, + "required": [ + "browserTarget" + ] +} diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts new file mode 100644 index 0000000000..59910249d4 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts @@ -0,0 +1,120 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { getSystemPath } from '@angular-devkit/core'; +import * as path from 'path'; +import { Observable } from 'rxjs/Observable'; +import { concatMap } from 'rxjs/operators'; +import * as webpack from 'webpack'; +import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; +import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; +import { BrowserBuilder, BrowserBuilderOptions } from '../browser'; +const MemoryFS = require('memory-fs'); + + +export interface ExtractI18nBuilderOptions { + browserTarget: string; + i18nFormat: string; + i18nLocale: string; + outputPath?: string; + outFile?: string; +} + +export class ExtractI18nBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + + const root = getSystemPath(target.root); + const options = target.options; + + + const [project, targetName, configuration] = options.browserTarget.split(':'); + // Override browser build watch setting. + const overrides = { watch: false }; + + const browserTargetOptions = { project, target: targetName, configuration, overrides }; + const browserTarget = this.context.architect + .getTarget(browserTargetOptions); + + return this.context.architect.getBuilderDescription(browserTarget).pipe( + concatMap(browserDescription => + this.context.architect.validateBuilderOptions(browserTarget, browserDescription)), + concatMap((validatedBrowserOptions) => new Observable(obs => { + const browserOptions = validatedBrowserOptions; + const browserBuilder = new BrowserBuilder(this.context); + + // We need to determine the outFile name so that AngularCompiler can retrieve it. + let outFile = options.outFile || getI18nOutfile(options.i18nFormat); + if (options.outputPath) { + // AngularCompilerPlugin doesn't support genDir so we have to adjust outFile instead. + outFile = path.join(options.outputPath, outFile); + } + + // Extracting i18n uses the browser target webpack config with some specific options. + const webpackConfig = browserBuilder.buildWebpackConfig(root, { + ...browserOptions, + optimizationLevel: 0, + i18nLocale: options.i18nLocale, + i18nOutFormat: options.i18nFormat, + i18nOutFile: outFile, + aot: true, + }); + + const webpackCompiler = webpack(webpackConfig); + webpackCompiler.outputFileSystem = new MemoryFS(); + const statsConfig = getWebpackStatsConfig(); + + const callback: webpack.compiler.CompilerCallback = (err, stats) => { + if (err) { + return obs.error(err); + } + + const json = stats.toJson('verbose'); + if (stats.hasWarnings()) { + this.context.logger.warn(statsWarningsToString(json, statsConfig)); + } + + if (stats.hasErrors()) { + obs.error(statsErrorsToString(json, statsConfig)); + } else { + obs.complete(); + } + }; + + try { + webpackCompiler.run(callback); + } catch (err) { + if (err) { + this.context.logger.error( + '\nAn error occured during the extraction:\n' + ((err && err.stack) || err)); + } + throw err; + } + }))); + } +} + +function getI18nOutfile(format: string) { + switch (format) { + case 'xmb': + return 'messages.xmb'; + case 'xlf': + case 'xlif': + case 'xliff': + case 'xlf2': + case 'xliff2': + return 'messages.xlf'; + default: + throw new Error(`Unsupported format "${format}"`); + } +} + +export default ExtractI18nBuilder; diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts new file mode 100644 index 0000000000..2f69d70cf8 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts @@ -0,0 +1,57 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { existsSync, readFileSync, unlinkSync } from 'fs'; +import { relative, resolve } from 'path'; +import { concatMap, tap, toArray } from 'rxjs/operators'; +import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec'; + + +describe('Extract i18n Target', () => { + const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any + const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); + const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); + const relativeBuilderPath = relative(root, builderPath); + const host = new NodeJsSyncHost(); + const extractionFile = resolve(root, 'src', 'messages.xlf'); + + const getWorkspace = (): Workspace => { + const workspace = getBrowserWorkspace(); + workspace.projects.app.defaultTarget = 'extractI18n'; + workspace.projects.app.targets['extractI18n'] = { + builder: `${relativeBuilderPath}:extractI18n`, + options: { + browserTarget: 'app:browser', + }, + }; + + return workspace; + }; + + beforeEach(() => { + if (existsSync(extractionFile)) { + unlinkSync(extractionFile); + } + }); + + it('builds targets', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + toArray(), + tap(events => expect(events.length).toBe(0)), + tap(() => { + expect(existsSync(extractionFile)).toBe(true); + expect(readFileSync(extractionFile)).toMatch(/i18n test/); + }), + ).subscribe(done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json b/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json new file mode 100644 index 0000000000..9db5c54059 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json @@ -0,0 +1,40 @@ +{ + "title": "Extract i18n Target", + "description": "Extract i18n target options for Build Facade.", + "type": "object", + "properties": { + "browserTarget": { + "type": "string", + "description": "Target to extract from." + }, + "i18nFormat": { + "type": "string", + "description": "Output format for the generated file.", + "default": "xlf", + "enum": [ + "xmb", + "xlf", + "xlif", + "xliff", + "xlf2", + "xliff2" + ] + }, + "i18nLocale": { + "type": "string", + "description": "Specifies the source language of the application." + }, + "outputPath": { + "type": "string", + "description": "Path where output will be placed." + }, + "outFile": { + "type": "boolean", + "description": "Name of the file to output." + } + }, + "additionalProperties": false, + "required": [ + "browserTarget" + ] +} diff --git a/packages/angular_devkit/build_webpack/src/index.ts b/packages/angular_devkit/build_webpack/src/index.ts new file mode 100644 index 0000000000..8101bf131e --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/index.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './browser'; +export * from './dev-server'; +export * from './extract-i18n'; +export * from './karma'; +export * from './protractor'; +export * from './tslint'; diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts new file mode 100644 index 0000000000..5e04f7ebdd --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -0,0 +1,150 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { getSystemPath } from '@angular-devkit/core'; +import * as path from 'path'; +import { Observable } from 'rxjs/Observable'; +import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies +import { + getCommonConfig, + getDevConfig, + getNonAotTestConfig, + getStylesConfig, + getTestConfig, +} from '../angular-cli-files/models/webpack-configs'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; +import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { + AssetPattern, + ExtraEntryPoint, +} from '../browser'; +const webpackMerge = require('webpack-merge'); + + +export interface KarmaBuilderOptions { + main: string; + tsConfig: string; // previously 'tsconfig'. + karmaConfig: string; // previously 'config'. + watch: boolean; + codeCoverage: boolean; + progress: boolean; + preserveSymlinks?: boolean; + + // Options with no defaults. + polyfills?: string; + poll?: number; + port?: number; + browsers?: string; + + // A couple of options have different names. + sourceMap: boolean; // previously 'sourcemaps'. + + // These options were not available as flags. + assets: AssetPattern[]; + scripts: ExtraEntryPoint[]; + styles: ExtraEntryPoint[]; + stylePreprocessorOptions: { includePaths: string[] }; + + // Some options are not needed anymore. + // app?: string; // apps aren't used with build facade + // singleRun?: boolean; // same as watch + // colors: boolean; // we just passed it to the karma config + // logLevel?: string; // same as above + // reporters?: string; // same as above + + // TODO: figure out what to do about these. + environment?: string; // Maybe replace with 'fileReplacement' object? + forceTsCommonjs?: boolean; // Remove with webpack 4. +} + +export class KarmaBuilder implements Builder { + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + + const root = getSystemPath(target.root); + const options = target.options; + + return new Observable(obs => { + const karma = requireProjectModule(root, 'karma'); + const karmaConfig = path.resolve(root, options.karmaConfig); + + // TODO: adjust options to account for not passing them blindly to karma. + // const karmaOptions: any = Object.assign({}, options); + // tslint:disable-next-line:no-any + const karmaOptions: any = { + singleRun: !options.watch, + }; + + // Convert browsers from a string to an array + if (options.browsers) { + karmaOptions.browsers = options.browsers.split(','); + } + + karmaOptions.webpackBuildFacade = { + options: options, + webpackConfig: this._buildWebpackConfig(root, options), + }; + + // TODO: inside the configs, always use the project root and not the workspace root. + // Until then we pretend the app root is relative (``) but the same as `projectRoot`. + (karmaOptions.webpackBuildFacade.options as any).root = ''; // tslint:disable-line:no-any + + // Assign additional karmaConfig options to the local ngapp config + karmaOptions.configFile = karmaConfig; + + // :shipit: + const karmaServer = new karma.Server(karmaOptions, () => obs.complete()); + karmaServer.start(); + }); + } + + private _buildWebpackConfig(projectRoot: string, options: KarmaBuilderOptions) { + // tslint:disable-next-line:no-any + let wco: any; + + const tsconfigPath = path.resolve(projectRoot, options.tsConfig as string); + const tsConfig = readTsconfig(tsconfigPath); + + const projectTs = requireProjectModule(projectRoot, 'typescript') as typeof ts; + + const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 + && tsConfig.options.target !== projectTs.ScriptTarget.ES5; + + const compatOptions = { + ...options, + // TODO: inside the configs, always use the project root and not the workspace root. + // Until then we have to pretend the app root is relative (``) but the same as `projectRoot`. + root: '', + // Some asset logic inside getCommonConfig needs outputPath to be set. + outputPath: '', + }; + + wco = { + projectRoot, + // TODO: use only this.options, it contains all flags and configs items already. + buildOptions: compatOptions, + appConfig: compatOptions, + tsConfig, + supportES2015, + }; + + const webpackConfigs: {}[] = [ + getCommonConfig(wco), + getStylesConfig(wco), + getDevConfig(wco), + getNonAotTestConfig(wco), + getTestConfig(wco), + ]; + + return webpackMerge(webpackConfigs); + } +} + +export default KarmaBuilder; diff --git a/packages/angular_devkit/build_webpack/src/karma/index_spec.ts b/packages/angular_devkit/build_webpack/src/karma/index_spec.ts new file mode 100644 index 0000000000..d770259972 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/karma/index_spec.ts @@ -0,0 +1,65 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { relative, resolve } from 'path'; +import { concatMap, tap, toArray } from 'rxjs/operators'; + + +describe('Karma Target', () => { + const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any + const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); + const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); + const relativeBuilderPath = relative(root, builderPath); + const host = new NodeJsSyncHost(); + + const getWorkspace = (): Workspace => ({ + name: 'spec', + version: 1, + root: '', + defaultProject: 'app', + projects: { + app: { + root: 'src', + projectType: 'application', + defaultTarget: 'karma', + targets: { + karma: { + builder: `${relativeBuilderPath}:karma`, + options: { + main: 'test.ts', + polyfills: 'polyfills.ts', + // Use Chrome Headless for CI envs. + browsers: 'ChromeHeadless', + tsConfig: 'tsconfig.spec.json', + karmaConfig: '../karma.conf.js', + progress: false, + styles: [{ input: 'styles.css', lazy: false }], + scripts: [], + assets: [ + { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, + { glob: '**/*', input: 'assets', output: './', allowOutsideOutDir: false }, + ], + }, + }, + }, + }, + }, + }); + + it('runs', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + toArray(), + tap(events => expect(events.length).toBe(0)), + ).subscribe(done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/src/karma/schema.json b/packages/angular_devkit/build_webpack/src/karma/schema.json new file mode 100644 index 0000000000..2297c4ed5d --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/karma/schema.json @@ -0,0 +1,156 @@ +{ + "title": "Karma Target", + "description": "Karma target options for Build Facade.", + "type": "object", + "properties": { + "main": { + "type": "string", + "description": "The name of the main entry-point file." + }, + "tsConfig": { + "type": "string", + "default": "tsconfig.app.json", + "description": "The name of the TypeScript configuration file." + }, + "karmaConfig": { + "type": "string", + "default": "tsconfig.app.json", + "description": "The name of the TypeScript configuration file." + }, + "polyfills": { + "type": "string", + "description": "The name of the polyfills file." + }, + "assets": { + "type": "array", + "description": "List of static application assets.", + "default": [], + "items": { + "$ref": "#/definitions/assetPattern" + } + }, + "scripts": { + "description": "Global scripts to be included in the build.", + "type": "array", + "default": [], + "items": { + "$ref": "#/definitions/extraEntryPoint" + } + }, + "styles": { + "description": "Global styles to be included in the build.", + "type": "array", + "default": [], + "items": { + "$ref": "#/definitions/extraEntryPoint" + } + }, + "stylePreprocessorOptions": { + "description": "Options to pass to style preprocessors", + "type": "object", + "properties": { + "includePaths": { + "description": "Paths to include. Paths will be resolved to project root.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + "additionalProperties": false + }, + "environment": { + "type": "string", + "description": "Defines the build environment." + }, + "sourceMap": { + "type": "boolean", + "description": "Output sourcemaps.", + "default": true + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building.", + "default": true + }, + "watch": { + "type": "boolean", + "description": "Run build when files change.", + "default": false + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." + }, + "preserveSymlinks": { + "type": "boolean", + "description": "Do not use the real path when resolving modules.", + "default": false + }, + "browsers": { + "type": "string", + "description": "Override which browsers tests are run against." + }, + "codeCoverage": { + "type": "boolean", + "description": "Override which browsers tests are run against.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "main", + "tsConfig", + "karmaConfig" + ], + "definitions": { + "assetPattern": { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input path dir in which to apply 'glob'.", + "default": "./" + }, + "output": { + "type": "string", + "description": "The output path, relative to 'outputPath'.", + "default": "./" + }, + "allowOutsideOutDir": { + "type": "boolean", + "description": "Allow assets to be copied outside the outDir.", + "default": false + } + }, + "additionalProperties": false + }, + "extraEntryPoint": { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include." + }, + "output": { + "type": "string", + "description": "The output path and filename, relative to 'outputPath'." + }, + "lazy": { + "type": "boolean", + "description": "Allow assets to be copied outside the outDir.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "input" + ] + } + } +} diff --git a/packages/angular_devkit/build_webpack/src/protractor/index.ts b/packages/angular_devkit/build_webpack/src/protractor/index.ts new file mode 100644 index 0000000000..0601264a92 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/protractor/index.ts @@ -0,0 +1,151 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + BuildEvent, + Builder, + BuilderContext, + BuilderDescription, + Target, +} from '@angular-devkit/architect'; +import { getSystemPath, tags } from '@angular-devkit/core'; +import { resolve } from 'path'; +import { Observable } from 'rxjs/Observable'; +import { empty } from 'rxjs/observable/empty'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { of } from 'rxjs/observable/of'; +import { concatMap } from 'rxjs/operators'; +import * as url from 'url'; +import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { DevServerBuilderOptions } from '../dev-server'; +import { runModuleAsObservableFork } from '../utils'; + + +export interface ProtractorBuilderOptions { + protractorConfig: string; + devServerTarget?: string; + specs: string[]; + suite?: string; + elementExplorer: boolean; + webdriverUpdate: boolean; + port?: number; + host: string; + baseUrl: string; +} + +export class ProtractorBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + + const root = getSystemPath(target.root); + const options = target.options; + + return (options.devServerTarget ? this._startDevServer(options) : empty()).pipe( + concatMap(() => options.webdriverUpdate ? this._updateWebdriver(root) : empty()), + concatMap(() => this._runProtractor(root, options)), + ); + } + + private _startDevServer(options: ProtractorBuilderOptions) { + const [project, targetName, configuration] = (options.devServerTarget as string).split(':'); + // Override browser build watch setting. + const overrides = { watch: false, host: options.host, port: options.port }; + const browserTargetOptions = { project, target: targetName, configuration, overrides }; + const devServerTarget = this.context.architect + .getTarget(browserTargetOptions); + let devServerDescription: BuilderDescription; + let baseUrl: string; + + return this.context.architect.getBuilderDescription(devServerTarget).pipe( + concatMap(description => { + devServerDescription = description; + + return this.context.architect.validateBuilderOptions(devServerTarget, + devServerDescription); + }), + concatMap(() => { + // Compute baseUrl from devServerOptions. + if (options.devServerTarget && devServerTarget.options.publicHost) { + let publicHost = devServerTarget.options.publicHost; + if (!/^\w+:\/\//.test(publicHost)) { + publicHost = `${devServerTarget.options.ssl + ? 'https' + : 'http'}://${publicHost}`; + } + const clientUrl = url.parse(publicHost); + baseUrl = url.format(clientUrl); + } else if (options.devServerTarget) { + baseUrl = url.format({ + protocol: devServerTarget.options.ssl ? 'https' : 'http', + hostname: options.host, + port: devServerTarget.options.port.toString(), + }); + } + + // Save the computed baseUrl back so that Protractor can use it. + options.baseUrl = baseUrl; + + return of(this.context.architect.getBuilder(devServerDescription, this.context)); + }), + concatMap(builder => builder.run(devServerTarget)), + ); + } + + private _updateWebdriver(root: string) { + // The webdriver-manager update command can only be accessed via a deep import. + const webdriverDeepImport = 'webdriver-manager/built/lib/cmds/update'; + let webdriverUpdate: any; // tslint:disable-line:no-any + + try { + // When using npm, webdriver is within protractor/node_modules. + webdriverUpdate = requireProjectModule(root, + `protractor/node_modules/${webdriverDeepImport}`); + } catch (e) { + try { + // When using yarn, webdriver is found as a root module. + webdriverUpdate = requireProjectModule(root, webdriverDeepImport); + } catch (e) { + throw new Error(tags.stripIndents` + Cannot automatically find webdriver-manager to update. + Update webdriver-manager manually and run 'ng e2e --no-webdriver-update' instead. + `); + } + } + + // run `webdriver-manager update --standalone false --gecko false --quiet` + // if you change this, update the command comment in prev line, and in `eject` task + return fromPromise(webdriverUpdate.program.run({ + standalone: false, + gecko: false, + quiet: true, + })); + } + + private _runProtractor(root: string, options: ProtractorBuilderOptions): Observable { + const additionalProtractorConfig = { + elementExplorer: options.elementExplorer, + baseUrl: options.baseUrl, + spec: options.specs.length ? options.specs : undefined, + suite: options.suite, + }; + + // TODO: Protractor manages process.exit itself, so this target will allways quit the + // process. To work around this we run it in a subprocess. + // https://github.com/angular/protractor/issues/4160 + return runModuleAsObservableFork( + root, + 'protractor/built/launcher', + 'init', + [resolve(root, options.protractorConfig), additionalProtractorConfig], + ); + } +} + +export default ProtractorBuilder; diff --git a/packages/angular_devkit/build_webpack/src/protractor/index_spec.ts b/packages/angular_devkit/build_webpack/src/protractor/index_spec.ts new file mode 100644 index 0000000000..c5e4ce86c8 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/protractor/index_spec.ts @@ -0,0 +1,45 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { relative, resolve } from 'path'; +import { concatMap, take } from 'rxjs/operators'; +import { getWorkspace as getDevServerWorkspace } from '../dev-server/index_spec'; + + +describe('Protractor Target', () => { + const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any + const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); + const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); + const relativeBuilderPath = relative(root, builderPath); + const host = new NodeJsSyncHost(); + + const getWorkspace = (): Workspace => { + const workspace = getDevServerWorkspace(); + workspace.projects.app.defaultTarget = 'protractor'; + workspace.projects.app.targets['protractor'] = { + builder: `${relativeBuilderPath}:protractor`, + options: { + protractorConfig: '../protractor.conf.js', + devServerTarget: 'app:devServer', + }, + }; + + return workspace; + }; + + it('runs', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + take(1), + ).subscribe(done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/src/protractor/schema.json b/packages/angular_devkit/build_webpack/src/protractor/schema.json new file mode 100644 index 0000000000..a7c0740cad --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/protractor/schema.json @@ -0,0 +1,60 @@ +{ + "title": "Protractor Target", + "description": "Protractor target options for Build Facade.", + "type": "object", + "properties": { + "protractorConfig": { + "type": "string", + "description": "The name of the Protractor configuration file." + }, + "devServerTarget": { + "type": "string", + "description": "Dev server target to run tests against." + }, + "specs": { + "type": "array", + "description": "Override specs in the protractor config.", + "default": [], + "items": { + "type": "string", + "description": "Spec name." + } + }, + "suite": { + "type": "string", + "description": "Override suite in the protractor config." + }, + "elementExplorer": { + "type": "boolean", + "description": "Start Protractor's Element Explorer for debugging.", + "default": false + }, + "webdriverUpdate": { + "type": "boolean", + "description": "Try to update webdriver.", + "default": true + }, + "serve": { + "type": "boolean", + "description": "Compile and Serve the app.", + "default": true + }, + "port": { + "type": "number", + "description": "The port to use to serve the application." + }, + "host": { + "type": "string", + "description": "Host to listen on.", + "default": "localhost" + }, + "baseUrl": { + "type": "string", + "description": "Base URL for protractor to connect to." + } + }, + "additionalProperties": false, + "required": [ + "protractorConfig" + ] +} diff --git a/packages/angular_devkit/build_webpack/src/tslint/index.ts b/packages/angular_devkit/build_webpack/src/tslint/index.ts new file mode 100644 index 0000000000..a882035e59 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/tslint/index.ts @@ -0,0 +1,172 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { getSystemPath } from '@angular-devkit/core'; +import { readFileSync } from 'fs'; +import * as glob from 'glob'; +import { Minimatch } from 'minimatch'; +import * as path from 'path'; +import { Observable } from 'rxjs/Observable'; +import * as tslint from 'tslint'; // tslint:disable-line:no-implicit-dependencies +import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies +import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { stripBom } from '../angular-cli-files/utilities/strip-bom'; + + +export interface TslintBuilderOptions { + tslintConfig: string; + tsConfig?: string; + fix: boolean; + typeCheck: boolean; + force: boolean; + silent: boolean; + format: string; + exclude: string[]; + files: string[]; +} + +export class TslintBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + + const root = getSystemPath(target.root); + const options = target.options; + + if (!options.tsConfig && options.typeCheck) { + throw new Error('A "project" must be specified to enable type checking.'); + } + + return new Observable(obs => { + const projectTslint = requireProjectModule(root, 'tslint') as typeof tslint; + const Linter = projectTslint.Linter; + const Configuration = projectTslint.Configuration; + + let program: ts.Program | undefined = undefined; + if (options.tsConfig) { + program = Linter.createProgram(path.resolve(root, options.tsConfig)); + } + + const files = getFilesToLint(options, Linter, program); + const lintOptions = { + fix: options.fix, + formatter: options.format, + }; + + const linter = new Linter(lintOptions, program); + + let lastDirectory; + let configLoad; + for (const file of files) { + const contents = getFileContents(file, options, program); + + // Only check for a new tslint config if path changes + const currentDirectory = path.dirname(file); + if (currentDirectory !== lastDirectory) { + configLoad = Configuration.findConfiguration( + path.resolve(root, options.tslintConfig), file); + lastDirectory = currentDirectory; + } + + if (contents && configLoad) { + linter.lint(file, contents, configLoad.results); + } + } + + const result = linter.getResult(); + + if (!options.silent) { + const Formatter = projectTslint.findFormatter(options.format); + if (!Formatter) { + throw new Error(`Invalid lint format "${options.format}".`); + } + const formatter = new Formatter(); + + const output = formatter.format(result.failures, result.fixes); + if (output) { + this.context.logger.info(output); + } + } + + // Print formatter output directly for non human-readable formats. + if (['prose', 'verbose', 'stylish'].indexOf(options.format) == -1) { + options.silent = true; + } + + if (result.warningCount > 0 && !options.silent) { + this.context.logger.warn('Lint warnings found in the listed files.'); + } + + if (result.errorCount > 0 && !options.silent) { + this.context.logger.error('Lint errors found in the listed files.'); + } + + if (result.warningCount === 0 && result.errorCount === 0 && !options.silent) { + this.context.logger.info('All files pass linting.'); + } + + return options.force || result.errorCount === 0 ? obs.complete() : obs.error(); + }); + } +} + +function getFilesToLint( + options: TslintBuilderOptions, + linter: typeof tslint.Linter, + program?: ts.Program, +): string[] { + const ignore = options.exclude; + + if (options.files.length > 0) { + return options.files + .map(file => glob.sync(file, { ignore, nodir: true })) + .reduce((prev, curr) => prev.concat(curr), []); + } + + if (!program) { + return []; + } + + let programFiles = linter.getFileNames(program); + + if (ignore && ignore.length > 0) { + const ignoreMatchers = ignore.map(pattern => new Minimatch(pattern, { dot: true })); + + programFiles = programFiles + .filter(file => !ignoreMatchers.some(matcher => matcher.match(file))); + } + + return programFiles; +} + +function getFileContents( + file: string, + options: TslintBuilderOptions, + program?: ts.Program, +): string | undefined { + // The linter retrieves the SourceFile TS node directly if a program is used + if (program) { + if (program.getSourceFile(file) == undefined) { + const message = `File '${file}' is not part of the TypeScript project '${options.tsConfig}'.`; + throw new Error(message); + } + + return undefined; + } + + // NOTE: The tslint CLI checks for and excludes MPEG transport streams; this does not. + try { + return stripBom(readFileSync(file, 'utf-8')); + } catch (e) { + throw new Error(`Could not read file '${file}'.`); + } +} + +export default TslintBuilder; diff --git a/packages/angular_devkit/build_webpack/src/tslint/index_spec.ts b/packages/angular_devkit/build_webpack/src/tslint/index_spec.ts new file mode 100644 index 0000000000..bcb7f0d9a8 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/tslint/index_spec.ts @@ -0,0 +1,55 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { relative, resolve } from 'path'; +import { concatMap, tap, toArray } from 'rxjs/operators'; + + +describe('Tslint Target', () => { + const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any + const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); + const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); + const relativeBuilderPath = relative(root, builderPath); + const host = new NodeJsSyncHost(); + + const getWorkspace = (): Workspace => ({ + name: 'spec', + version: 1, + root: '', + defaultProject: 'app', + projects: { + app: { + root: 'src', + projectType: 'application', + defaultTarget: 'tslint', + targets: { + tslint: { + builder: `${relativeBuilderPath}:tslint`, + options: { + tslintConfig: '../tslint.json', + tsConfig: 'tsconfig.app.json', + exclude: ['**/node_modules/**'], + }, + }, + }, + }, + }, + }); + + it('runs', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + toArray(), + tap(events => expect(events.length).toBe(0)), + ).subscribe(done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/src/tslint/schema.json b/packages/angular_devkit/build_webpack/src/tslint/schema.json new file mode 100644 index 0000000000..6df6e96dc6 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/tslint/schema.json @@ -0,0 +1,71 @@ +{ + "title": "TSlint Target", + "description": "TSlint target options for Build Facade.", + "type": "object", + "properties": { + "tslintConfig": { + "type": "string", + "description": "The name of the TSLint configuration file." + }, + "tsConfig": { + "type": "string", + "description": "The name of the TypeScript configuration file." + }, + "fix": { + "type": "boolean", + "description": "Fixes linting errors (may overwrite linted files).", + "default": false + }, + "typeCheck": { + "type": "boolean", + "description": "Controls the type check for linting.", + "default": false + }, + "force": { + "type": "boolean", + "description": "Succeeds even if there was linting errors.", + "default": false + }, + "silent": { + "type": "boolean", + "description": "Show output text.", + "default": false + }, + "format": { + "type": "string", + "description": "Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist).", + "default": "prose", + "enum": [ + "prose", + "json", + "stylish", + "verbose", + "pmd", + "msbuild", + "checkstyle", + "vso", + "fileslist" + ] + }, + "exclude": { + "type": "array", + "description": "Files to exclude from linting.", + "default": [], + "items": { + "type": "string" + } + }, + "files": { + "type": "array", + "description": "Files to include in linting.", + "default": [], + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "tslintConfig" + ] +} diff --git a/packages/angular_devkit/build_webpack/src/utils/index.ts b/packages/angular_devkit/build_webpack/src/utils/index.ts new file mode 100644 index 0000000000..ef85078838 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/utils/index.ts @@ -0,0 +1,9 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './run-module-as-observable-fork'; diff --git a/packages/angular_devkit/build_webpack/src/utils/run-module-as-observable-fork.ts b/packages/angular_devkit/build_webpack/src/utils/run-module-as-observable-fork.ts new file mode 100644 index 0000000000..c73ff048d4 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/utils/run-module-as-observable-fork.ts @@ -0,0 +1,83 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { BuildEvent } from '@angular-devkit/architect'; +import { ForkOptions, fork } from 'child_process'; +import { resolve } from 'path'; +import { Observable } from 'rxjs/Observable'; +const treeKill = require('tree-kill'); + + +export function runModuleAsObservableFork( + cwd: string, + modulePath: string, + exportName: string | undefined, + // tslint:disable-next-line:no-any + args: any[], +): Observable { + return new Observable(obs => { + const workerPath: string = resolve(__dirname, './run-module-worker.js'); + + const debugArgRegex = /--inspect(?:-brk|-port)?|--debug(?:-brk|-port)/; + const execArgv = process.execArgv.filter((arg) => { + // Remove debug args. + // Workaround for https://github.com/nodejs/node/issues/9435 + return !debugArgRegex.test(arg); + }); + const forkOptions: ForkOptions = { + cwd, + execArgv, + } as {} as ForkOptions; + + // TODO: support passing in a logger to use as stdio streams + // if (logger) { + // (forkOptions as any).stdio = [ + // 'ignore', + // logger.info, // make it a stream + // logger.error, // make it a stream + // ]; + // } + + const forkedProcess = fork(workerPath, undefined, forkOptions); + + // Cleanup. + const killForkedProcess = () => { + if (forkedProcess && forkedProcess.pid) { + treeKill(forkedProcess.pid, 'SIGTERM'); + } + }; + + // Handle child process exit. + const handleChildProcessExit = (code?: number) => { + killForkedProcess(); + if (code && code !== 0) { + obs.error(); + } + obs.next({ success: true }); + obs.complete(); + }; + forkedProcess.once('exit', handleChildProcessExit); + forkedProcess.once('SIGINT', handleChildProcessExit); + forkedProcess.once('uncaughtException', handleChildProcessExit); + + // Handle parent process exit. + const handleParentProcessExit = () => { + killForkedProcess(); + }; + process.once('exit', handleParentProcessExit); + process.once('SIGINT', handleParentProcessExit); + process.once('uncaughtException', handleParentProcessExit); + + // Run module. + forkedProcess.send({ + hash: '5d4b9a5c0a4e0f9977598437b0e85bcc', + modulePath, + exportName, + args, + }); + }); +} diff --git a/packages/angular_devkit/build_webpack/src/utils/run-module-worker.js b/packages/angular_devkit/build_webpack/src/utils/run-module-worker.js new file mode 100644 index 0000000000..fe6e862fa2 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/utils/run-module-worker.js @@ -0,0 +1,20 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +process.on('message', (message) => { + // Only process messages with the hash in 'run-module-as-observable-fork.ts'. + if (message.hash = '5d4b9a5c0a4e0f9977598437b0e85bcc') { + const requiredModule = require(message.modulePath); + if (message.exportName) { + requiredModule[message.exportName](...message.args); + } else { + requiredModule(...message.args); + } + } +}); + diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts index 6f1577fa67..d47cdab9de 100644 --- a/scripts/validate-licenses.ts +++ b/scripts/validate-licenses.ts @@ -64,9 +64,12 @@ const ignoredPackages = [ 'map-stream@0.1.0', // MIT, license but it's not listed in package.json. 'xmldom@0.1.27', // LGPL,MIT but has a broken licenses array. 'true-case-path@1.0.2', // Apache-2.0 but broken license in package.json + 'pako@1.0.6', // MIT but broken license in package.json 'jsonify@0.0.0', // TODO(hansl): fix this. this is not an acceptable license, but is 8 deps down // so hard to manage. In talk with owner and users to switch over. + + 'uws@0.14.5', // TODO(filipesilva): remove this when karma is moved to e2e tests. ]; // Find all folders directly under a `node_modules` that have a package.json. diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json new file mode 100644 index 0000000000..19f81d409d --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json @@ -0,0 +1,60 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "hello-world-app" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.ico" + ], + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", + "prefix": "app", + "styles": [ + "styles.css" + ], + "scripts": [], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "lint": [ + { + "project": "src/tsconfig.app.json", + "exclude": "**/node_modules/**" + }, + { + "project": "src/tsconfig.spec.json", + "exclude": "**/node_modules/**" + }, + { + "project": "e2e/tsconfig.e2e.json", + "exclude": "**/node_modules/**" + } + ], + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "component": {} + } +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.editorconfig b/tests/@angular_devkit/build_webpack/hello-world-app/.editorconfig new file mode 100644 index 0000000000..6e87a003da --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore b/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore new file mode 100644 index 0000000000..d0448e8d4e --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore @@ -0,0 +1,45 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/dist-server +/tmp +/out-tsc + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +testem.log +/typings + +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db + +src/messages.xlf diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/README.md b/tests/@angular_devkit/build_webpack/hello-world-app/README.md new file mode 100644 index 0000000000..fa1c5ca7d3 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/README.md @@ -0,0 +1,27 @@ +# HelloWorldApp + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.0-beta.1. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.e2e-spec.ts new file mode 100644 index 0000000000..9a9926c44f --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('hello-world-app App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to app!'); + }); +}); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.po.ts b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.po.ts new file mode 100644 index 0000000000..82ea75ba50 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json new file mode 100644 index 0000000000..1d9e5edf09 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js new file mode 100644 index 0000000000..aba937c321 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js @@ -0,0 +1,33 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-webpack'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-webpack/plugins/karma') + ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/package.json b/tests/@angular_devkit/build_webpack/hello-world-app/package.json new file mode 100644 index 0000000000..a09e45fde5 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/package.json @@ -0,0 +1,49 @@ +{ + "name": "hello-world-app", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19" + }, + "devDependencies": { + "@angular/cli": "1.7.0-beta.1", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", + "@types/jasmine": "~2.8.3", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~4.1.0", + "tslint": "~5.9.1", + "typescript": "~2.5.3" + } +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/protractor.conf.js b/tests/@angular_devkit/build_webpack/hello-world-app/protractor.conf.js new file mode 100644 index 0000000000..22088b6492 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/protractor.conf.js @@ -0,0 +1,32 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter } = require('jasmine-spec-reporter'); +const { resolve } = require('path'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './e2e/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome', + chromeOptions: { + args: ["--headless", "--disable-gpu", "--window-size=800,600"] + } + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function () { } + }, + onPrepare() { + require('ts-node').register({ + project: resolve(__dirname, './e2e/tsconfig.e2e.json') + }); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + } +}; diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.css b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.html b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.html new file mode 100644 index 0000000000..2486321488 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.html @@ -0,0 +1,22 @@ + +
+

+ Welcome to {{ title }}! +

+ Angular Logo +
+

Here are some links to help you start:

+ + +

i18n test

+ diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.spec.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.spec.ts new file mode 100644 index 0000000000..bcbdf36b3e --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.spec.ts @@ -0,0 +1,27 @@ +import { TestBed, async } from '@angular/core/testing'; +import { AppComponent } from './app.component'; +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + it(`should have as title 'app'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('app'); + })); + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); + })); +}); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.ts new file mode 100644 index 0000000000..7b0f672831 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'app'; +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.module.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.module.ts new file mode 100644 index 0000000000..926975afe8 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.module.ts @@ -0,0 +1,18 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; + + +import { AppComponent } from './app.component'; + + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule + ], + providers: [], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/assets/.gitkeep b/tests/@angular_devkit/build_webpack/hello-world-app/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.prod.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.prod.ts new file mode 100644 index 0000000000..3612073bc3 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.ts new file mode 100644 index 0000000000..b7f639aeca --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.ts @@ -0,0 +1,8 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const environment = { + production: false +}; diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/favicon.ico b/tests/@angular_devkit/build_webpack/hello-world-app/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8081c7ceaf2be08bf59010158c586170d9d2d517 GIT binary patch literal 5430 zcmc(je{54#6vvCoAI3i*G5%$U7!sA3wtMZ$fH6V9C`=eXGJb@R1%(I_{vnZtpD{6n z5Pl{DmxzBDbrB>}`90e12m8T*36WoeDLA&SD_hw{H^wM!cl_RWcVA!I+x87ee975; z@4kD^=bYPn&pmG@(+JZ`rqQEKxW<}RzhW}I!|ulN=fmjVi@x{p$cC`)5$a!)X&U+blKNvN5tg=uLvuLnuqRM;Yc*swiexsoh#XPNu{9F#c`G zQLe{yWA(Y6(;>y|-efAy11k<09(@Oo1B2@0`PtZSkqK&${ zgEY}`W@t{%?9u5rF?}Y7OL{338l*JY#P!%MVQY@oqnItpZ}?s z!r?*kwuR{A@jg2Chlf0^{q*>8n5Ir~YWf*wmsh7B5&EpHfd5@xVaj&gqsdui^spyL zB|kUoblGoO7G(MuKTfa9?pGH0@QP^b#!lM1yHWLh*2iq#`C1TdrnO-d#?Oh@XV2HK zKA{`eo{--^K&MW66Lgsktfvn#cCAc*(}qsfhrvOjMGLE?`dHVipu1J3Kgr%g?cNa8 z)pkmC8DGH~fG+dlrp(5^-QBeEvkOvv#q7MBVLtm2oD^$lJZx--_=K&Ttd=-krx(Bb zcEoKJda@S!%%@`P-##$>*u%T*mh+QjV@)Qa=Mk1?#zLk+M4tIt%}wagT{5J%!tXAE;r{@=bb%nNVxvI+C+$t?!VJ@0d@HIyMJTI{vEw0Ul ze(ha!e&qANbTL1ZneNl45t=#Ot??C0MHjjgY8%*mGisN|S6%g3;Hlx#fMNcL<87MW zZ>6moo1YD?P!fJ#Jb(4)_cc50X5n0KoDYfdPoL^iV`k&o{LPyaoqMqk92wVM#_O0l z09$(A-D+gVIlq4TA&{1T@BsUH`Bm=r#l$Z51J-U&F32+hfUP-iLo=jg7Xmy+WLq6_tWv&`wDlz#`&)Jp~iQf zZP)tu>}pIIJKuw+$&t}GQuqMd%Z>0?t%&BM&Wo^4P^Y z)c6h^f2R>X8*}q|bblAF?@;%?2>$y+cMQbN{X$)^R>vtNq_5AB|0N5U*d^T?X9{xQnJYeU{ zoZL#obI;~Pp95f1`%X3D$Mh*4^?O?IT~7HqlWguezmg?Ybq|7>qQ(@pPHbE9V?f|( z+0xo!#m@Np9PljsyxBY-UA*{U*la#8Wz2sO|48_-5t8%_!n?S$zlGe+NA%?vmxjS- zHE5O3ZarU=X}$7>;Okp(UWXJxI%G_J-@IH;%5#Rt$(WUX?6*Ux!IRd$dLP6+SmPn= z8zjm4jGjN772R{FGkXwcNv8GBcZI#@Y2m{RNF_w8(Z%^A*!bS*!}s6sh*NnURytky humW;*g7R+&|Ledvc- + + + + HelloWorldApp + + + + + + + + + diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/main.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/main.ts new file mode 100644 index 0000000000..91ec6da5f0 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/polyfills.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/polyfills.ts new file mode 100644 index 0000000000..d68672ffe4 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/polyfills.ts @@ -0,0 +1,66 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; + + +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/platform-browser/animations`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/styles.css b/tests/@angular_devkit/build_webpack/hello-world-app/src/styles.css new file mode 100644 index 0000000000..90d4ee0072 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/test.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/test.ts new file mode 100644 index 0000000000..16317897b1 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/test.ts @@ -0,0 +1,20 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json new file mode 100644 index 0000000000..39ba8dbacb --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "baseUrl": "./", + "module": "es2015", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json new file mode 100644 index 0000000000..ac22a298ac --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "baseUrl": "./", + "module": "commonjs", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/typings.d.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/typings.d.ts new file mode 100644 index 0000000000..ef5c7bd620 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/typings.d.ts @@ -0,0 +1,5 @@ +/* SystemJS module definition */ +declare var module: NodeModule; +interface NodeModule { + id: string; +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json b/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json new file mode 100644 index 0000000000..a6c016bf38 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/tslint.json b/tests/@angular_devkit/build_webpack/hello-world-app/tslint.json new file mode 100644 index 0000000000..69973de2a5 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/tslint.json @@ -0,0 +1,143 @@ +{ + "rulesDirectory": [ + "../../../../node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs", + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} From a956474168aa2eaeee48797c94d15daadac9c3b2 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Sun, 18 Feb 2018 18:06:54 -0800 Subject: [PATCH 119/724] build: allow users to have no //:node_modules (#445) --- packages/angular_devkit/build_optimizer/BUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD index da70aee0de..c77a095030 100644 --- a/packages/angular_devkit/build_optimizer/BUILD +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -25,8 +25,8 @@ ts_library( "**/*_spec.ts", ], ), - # Note, intentionally no node_modules attribute - so it will use the - # compile-time deps in the downstream repository's //:node_modules. - # This creates the assumption that every consumer does have that target. tsconfig = "//:tsconfig.json", + # Borrow the compile-time deps of the typescript compiler + # Just to avoid an extra npm install action. + node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules", ) From f000d892d9d4f52149abd05db2b99f7c81f632b2 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 20 Feb 2018 13:54:52 -0800 Subject: [PATCH 120/724] build: update to newer rules_typescript (#452) it has a transitive dep on an updated tsickle that picks up a fix in source-map typings --- WORKSPACE | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index faaa5f6710..e39639b51a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -12,11 +12,13 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi check_bazel_version("0.9.0") node_repositories(package_json = ["//:package.json"]) +# Pick up the fix for source-map typings +RULES_TYPESCRIPT_VERSION = "00f8fd5467f2b12ac2fbb8d74ea81d2dd5636d31" http_archive( name = "build_bazel_rules_typescript", - url = "https://github.com/bazelbuild/rules_typescript/archive/0.10.1.zip", - strip_prefix = "rules_typescript-0.10.1", - sha256 = "a2c81776a4a492ff9f878f9705639f5647bef345f7f3e1da09c9eeb8dec80485", + url = "https://github.com/bazelbuild/rules_typescript/archive/%s.zip" % RULES_TYPESCRIPT_VERSION, + strip_prefix = "rules_typescript-%s" % RULES_TYPESCRIPT_VERSION, + sha256 = "3606b97a4859cc3f73b47888618b14290cf4b93c411b1bedd821e8bb39b3442b", ) load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") From 2c0356f3c0c0d7fd1a924dd9434b2459ab53e381 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 21 Feb 2018 11:36:51 -0800 Subject: [PATCH 121/724] test: add test for extra properties in schematics json (#442) --- .../core/src/virtual-fs/host/test.ts | 1 - packages/angular_devkit/schematics/BUILD | 1 + .../tools/file-system-engine-host_spec.ts | 25 ++++++++++++++++++- .../package_update/utility/npm_spec.ts | 1 - .../extra-properties/collection.json | 11 ++++++++ .../extra-properties/factory.ts | 21 ++++++++++++++++ 6 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/collection.json create mode 100644 tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts diff --git a/packages/angular_devkit/core/src/virtual-fs/host/test.ts b/packages/angular_devkit/core/src/virtual-fs/host/test.ts index e06a23ef69..331a64fbe0 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/test.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/test.ts @@ -19,7 +19,6 @@ export class TestHost extends SimpleMemoryHost { for (const filePath of Object.getOwnPropertyNames(map)) { this.write(normalize(filePath), stringToFileBuffer(map[filePath])); } - debugger; } get files(): Path[] { diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index 5f9afa2a02..9330a9ef25 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -103,6 +103,7 @@ ts_library( deps = [ ":schematics", ":tools", + "//packages/angular_devkit/core", # @deps: rxjs # @typings: jasmine ], diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts index eb47b99976..b88c2e0bc6 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts @@ -7,9 +7,12 @@ */ // tslint:disable:no-any // tslint:disable:no-implicit-dependencies -import { SchematicEngine } from '@angular-devkit/schematics'; +import { normalize, virtualFs } from '@angular-devkit/core'; +import { FileSystemTree, HostSink, SchematicEngine } from '@angular-devkit/schematics'; import { FileSystemEngineHost } from '@angular-devkit/schematics/tools'; import * as path from 'path'; +import { of as observableOf } from 'rxjs/observable/of'; + describe('FileSystemEngineHost', () => { const devkitRoot = (global as any)._DevKitRoot; @@ -241,4 +244,24 @@ describe('FileSystemEngineHost', () => { expect(() => engine.createSchematic('private-schematic', collection)).toThrow(); expect(() => collection.createSchematic('private-schematic')).toThrow(); }); + + it('allows extra properties on schema', done => { + const engineHost = new FileSystemEngineHost(root); + const engine = new SchematicEngine(engineHost); + const host = new virtualFs.test.TestHost(); + + const collection = engine.createCollection('extra-properties'); + const schematic = collection.createSchematic('schematic1'); + + schematic.call({}, observableOf(new FileSystemTree(host))).toPromise() + .then(tree => { + return new HostSink(host).commit(tree).toPromise(); + }) + .then(() => { + expect(host.files as string[]).toEqual(['/extra-schematic']); + expect(host.sync.read(normalize('/extra-schematic')).toString()) + .toEqual('extra-collection'); + }) + .then(done, done.fail); + }); }); diff --git a/packages/schematics/package_update/utility/npm_spec.ts b/packages/schematics/package_update/utility/npm_spec.ts index 3e7ed335f6..e44a9b962c 100644 --- a/packages/schematics/package_update/utility/npm_spec.ts +++ b/packages/schematics/package_update/utility/npm_spec.ts @@ -48,7 +48,6 @@ describe('Schematic Update', () => { }); it('works with a peer dependencies', done => { - debugger; const rule = updatePackageJson(['@angular/compiler'], '4.1.0', false); schematicRunner.callRule(rule, inputTree) diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/collection.json b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/collection.json new file mode 100644 index 0000000000..e38161e28c --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/collection.json @@ -0,0 +1,11 @@ +{ + "name": "extra-properties", + "schematics": { + "schematic1": { + "description": "1", + "factory": "./factory", + "extra": "extra-schematic" + } + }, + "extra": "extra-collection" +} diff --git a/tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts new file mode 100644 index 0000000000..6c1beda510 --- /dev/null +++ b/tests/@angular_devkit/schematics/tools/file-system-engine-host/extra-properties/factory.ts @@ -0,0 +1,21 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable-next-line:no-implicit-dependencies +import { SchematicContext, Tree } from '@angular-devkit/schematics'; + +export default function(options: {}) { + return (tree: Tree, context: SchematicContext) => { + debugger; + // We pass information back to the test. + tree.create( + (context.schematic.description as any).extra, // tslint:disable-line:no-any + (context.schematic.collection.description as any).extra, // tslint:disable-line:no-any + ); + }; +} + From 9ce1aed331ad0742463b587f1f5555486ccc202f Mon Sep 17 00:00:00 2001 From: Karthik K Date: Thu, 22 Feb 2018 01:07:11 +0530 Subject: [PATCH 122/724] upgrade jasmine to 2.99, ts-node to 5.0 and protractor to 5.3.0 (#448) * feat(@schematics/angular): upgrade jasmine to 2.99, ts-node to 5.0 and protractor to 5.3.0 * feat(@schematics/angular): upgrade types/node to 8.x --- .../angular/application/files/package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index f68379bebe..9e808bb67e 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -30,19 +30,19 @@ "@angular/cli": "~<%= version %>", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0",<% if (!minimal) { %> - "@types/jasmine": "~2.8.3", - "@types/jasminewd2": "~2.0.2", - "@types/node": "~6.0.60", - "codelyzer": "^4.0.1", - "jasmine-core": "~2.8.0", + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~8.9.4", + "codelyzer": "~4.1.0", + "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "^1.2.1", - "karma-jasmine": "~1.1.0", + "karma-coverage-istanbul-reporter": "~1.4.1", + "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.1.2", - "ts-node": "~4.1.0", + "protractor": "~5.3.0", + "ts-node": "~5.0.0", "tslint": "~5.9.1",<% } %> "typescript": "~2.5.3" } From de7a44f23514594274394322adaf40ac87c38d8b Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 21 Feb 2018 11:37:26 -0800 Subject: [PATCH 123/724] Revert "upgrade jasmine to 2.99, ts-node to 5.0 and protractor to 5.3.0 (#448)" This reverts commit 9ce1aed331ad0742463b587f1f5555486ccc202f. --- .../angular/application/files/package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index 9e808bb67e..f68379bebe 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -30,19 +30,19 @@ "@angular/cli": "~<%= version %>", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0",<% if (!minimal) { %> - "@types/jasmine": "~2.8.6", - "@types/jasminewd2": "~2.0.3", - "@types/node": "~8.9.4", - "codelyzer": "~4.1.0", - "jasmine-core": "~2.99.1", + "@types/jasmine": "~2.8.3", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~1.4.1", - "karma-jasmine": "~1.1.1", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.3.0", - "ts-node": "~5.0.0", + "protractor": "~5.1.2", + "ts-node": "~4.1.0", "tslint": "~5.9.1",<% } %> "typescript": "~2.5.3" } From 95d1c4c1ffbb50e0b1aef1466df7d8bdbe3b59da Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Feb 2018 11:43:06 -0800 Subject: [PATCH 124/724] ci: add blacklist of SHAs to commit validation --- scripts/validate-commits.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index 172e98cc80..982efec197 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -11,6 +11,12 @@ import { execSync } from 'child_process'; import { packages } from '../lib/packages'; +const blacklist = [ + '9ce1aed331ad0742463b587f1f5555486ccc202f', + 'de7a44f23514594274394322adaf40ac87c38d8b', +]; + + export interface ValidateCommitsOptions { ci?: boolean; base?: string; @@ -67,6 +73,11 @@ export default function (argv: ValidateCommitsOptions, logger: logging.Logger) { } for (const [sha, message] of commits) { + if (blacklist.indexOf(sha) !== -1) { + // Some commits are better ignored. + continue; + } + const subject = message.match(/^([^:(]+)(?:\((.*?)\))?:/); if (!subject) { _invalid(sha, message, 'does not have a subject'); From cf88d61f7c2e129dd7dffdf663a7e2e23eb2572c Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Feb 2018 11:44:42 -0800 Subject: [PATCH 125/724] ci: fix SHA shorthand --- scripts/validate-commits.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index 982efec197..1c164f41ad 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -73,7 +73,7 @@ export default function (argv: ValidateCommitsOptions, logger: logging.Logger) { } for (const [sha, message] of commits) { - if (blacklist.indexOf(sha) !== -1) { + if (blacklist.find(i => i.startsWith(sha)) !== -1) { // Some commits are better ignored. continue; } From 88136f82ea1e1a36ea937a3d5f70ec1c45420fd1 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Feb 2018 11:45:17 -0800 Subject: [PATCH 126/724] ci: fix build --- scripts/validate-commits.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index 1c164f41ad..aba664175f 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -73,7 +73,7 @@ export default function (argv: ValidateCommitsOptions, logger: logging.Logger) { } for (const [sha, message] of commits) { - if (blacklist.find(i => i.startsWith(sha)) !== -1) { + if (blacklist.find(i => i.startsWith(sha))) { // Some commits are better ignored. continue; } From 6c9efcd0528aa96380da4cfda43bd4e4a2eb51c2 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 21 Feb 2018 09:30:43 -0500 Subject: [PATCH 127/724] feat(@angular-devkit/build-optimizer): update TypeScript to 2.7 --- packages/angular_devkit/build_optimizer/package.json | 4 ++-- .../build_optimizer/src/transforms/class-fold.ts | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/package.json b/packages/angular_devkit/build_optimizer/package.json index 31ec0f8f63..967928026c 100644 --- a/packages/angular_devkit/build_optimizer/package.json +++ b/packages/angular_devkit/build_optimizer/package.json @@ -14,7 +14,7 @@ "dependencies": { "loader-utils": "^1.1.0", "source-map": "^0.5.6", - "typescript": "~2.6.2", - "webpack-sources": "^1.0.1" + "typescript": "~2.7.2", + "webpack-sources": "^1.1.0" } } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/class-fold.ts b/packages/angular_devkit/build_optimizer/src/transforms/class-fold.ts index 3dd0a82471..be7aae7cb9 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/class-fold.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/class-fold.ts @@ -162,15 +162,14 @@ function findClassStaticPropertyAssignments( } const decls = symbol.declarations; - if (decls === undefined || decls.length !== 1) { + if (decls == undefined || decls.length === 0) { return; } - const classIdx = classes - .map((clazz) => clazz.class).indexOf(decls[0] as ts.VariableDeclaration); - if (classIdx === -1) { + + const hostClass = classes.find((clazz => decls.includes(clazz.class))); + if (!hostClass) { return; } - const hostClass = classes[classIdx]; const statement: StatementData = { expressionStatement, hostClass }; hostClass.statements.push(statement); From abf251c15a0136b9a661c5ee32060e51a4356956 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 21 Feb 2018 11:50:49 -0800 Subject: [PATCH 128/724] feat(@schematics/angular): upgrade jasmine to 2.99, ts-node to 5.0 and protractor to 5.3.0 See #448 --- .../angular/application/files/package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json index f68379bebe..9e808bb67e 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/application/files/package.json @@ -30,19 +30,19 @@ "@angular/cli": "~<%= version %>", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0",<% if (!minimal) { %> - "@types/jasmine": "~2.8.3", - "@types/jasminewd2": "~2.0.2", - "@types/node": "~6.0.60", - "codelyzer": "^4.0.1", - "jasmine-core": "~2.8.0", + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~8.9.4", + "codelyzer": "~4.1.0", + "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "^1.2.1", - "karma-jasmine": "~1.1.0", + "karma-coverage-istanbul-reporter": "~1.4.1", + "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.1.2", - "ts-node": "~4.1.0", + "protractor": "~5.3.0", + "ts-node": "~5.0.0", "tslint": "~5.9.1",<% } %> "typescript": "~2.5.3" } From 72c96d48ab80c9f1c70b1bb732c6e595b0bf7cf9 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Feb 2018 21:52:01 +0000 Subject: [PATCH 129/724] build: add architect, architect-cli and build-webpack snapshot repos (#457) --- .monorepo.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index b0f69486b6..70d3a12fef 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -54,12 +54,14 @@ } ], "version": "0.0.1", - "hash": "" + "hash": "", + "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", "version": "0.0.1", - "hash": "" + "hash": "", + "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { "name": "Build Optimizer", @@ -82,7 +84,8 @@ } ], "version": "0.0.1", - "hash": "" + "hash": "", + "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, "@angular-devkit/core": { "name": "Core", From 94e7f3b40b7b6545dd2fdebbf5b8fce1192d863f Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Thu, 22 Feb 2018 09:42:47 +0900 Subject: [PATCH 130/724] feat(@schematics/angular): add zone-error import in polyfill (#414) --- .../files/__sourcedir__/environments/environment.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/schematics/angular/application/files/__sourcedir__/environments/environment.ts b/packages/schematics/angular/application/files/__sourcedir__/environments/environment.ts index b7f639aeca..4b5d1b15e9 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/environments/environment.ts +++ b/packages/schematics/angular/application/files/__sourcedir__/environments/environment.ts @@ -6,3 +6,11 @@ export const environment = { production: false }; + +/* + * In development mode, to ignore zone related error stack frames such as + * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can + * import the following file, but please comment it out in production mode + * because it will have performance impact when throw error + */ +// import 'zone.js/dist/zone-error'; // Included with Angular CLI. From 1161683cd72870f38df97cc60206885859aaa139 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Thu, 22 Feb 2018 09:43:25 +0900 Subject: [PATCH 131/724] fix(@schematics/angular): ignore yarn-error.log (#441) --- packages/schematics/angular/application/files/__dot__gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/schematics/angular/application/files/__dot__gitignore b/packages/schematics/angular/application/files/__dot__gitignore index 4ae2c37916..eabf65e51a 100755 --- a/packages/schematics/angular/application/files/__dot__gitignore +++ b/packages/schematics/angular/application/files/__dot__gitignore @@ -31,6 +31,7 @@ /coverage /libpeerconnection.log npm-debug.log +yarn-error.log testem.log /typings From 9d1d8c5d51110c788d3c44ed33d7fb6c3ed7ee15 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Feb 2018 00:44:07 +0000 Subject: [PATCH 132/724] fix(@angular-devkit/architect-cli): fix package location (#446) --- .../architect_cli/{architect-cli => }/bin/architect.ts | 0 .../angular_devkit/architect_cli/{architect-cli => }/package.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/angular_devkit/architect_cli/{architect-cli => }/bin/architect.ts (100%) rename packages/angular_devkit/architect_cli/{architect-cli => }/package.json (100%) diff --git a/packages/angular_devkit/architect_cli/architect-cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts similarity index 100% rename from packages/angular_devkit/architect_cli/architect-cli/bin/architect.ts rename to packages/angular_devkit/architect_cli/bin/architect.ts diff --git a/packages/angular_devkit/architect_cli/architect-cli/package.json b/packages/angular_devkit/architect_cli/package.json similarity index 100% rename from packages/angular_devkit/architect_cli/architect-cli/package.json rename to packages/angular_devkit/architect_cli/package.json From fae5b928b43cd7802ef043e387de00f1a6b81511 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 2 Feb 2018 10:40:11 -0500 Subject: [PATCH 133/724] build: compile with TS 2.7 --- package-lock.json | 149 +++++++++++++++-------------- package.json | 7 +- scripts/patch-dependencies.ts | 19 ++++ scripts/patches/rxjs-ts27.patch | 18 ++++ scripts/patches/rxjs-typings.patch | 10 ++ tsconfig.json | 3 +- 6 files changed, 128 insertions(+), 78 deletions(-) create mode 100644 scripts/patch-dependencies.ts create mode 100644 scripts/patches/rxjs-ts27.patch create mode 100644 scripts/patches/rxjs-typings.patch diff --git a/package-lock.json b/package-lock.json index 4a6e2d4cd0..0a7b955cdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -117,7 +117,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "6.0.96" + "@types/node": "8.9.3" } }, "@types/glob": { @@ -145,7 +145,7 @@ "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.1.tgz", "integrity": "sha512-HG9SyNEyGuJXuaEjhoFeaZE1dZscmPx9svXExM/SKsF3Rh9Bdy4sJB7IJFgfYHIy2eWKmAkxGIvrHL+Kk8MEvw==", "requires": { - "@types/node": "6.0.96", + "@types/node": "8.9.3", "@types/webpack": "3.8.2" } }, @@ -176,7 +176,7 @@ "requires": { "@types/caseless": "0.12.1", "@types/form-data": "2.2.1", - "@types/node": "6.0.96", + "@types/node": "8.9.3", "@types/tough-cookie": "2.3.2" } }, @@ -200,16 +200,6 @@ "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==" }, - "@types/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=" - }, - "@types/strip-json-comments": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", - "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==" - }, "@types/tapable": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-0.2.4.tgz", @@ -4838,14 +4828,6 @@ "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "requires": { - "parse-passwd": "1.0.0" - } - }, "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", @@ -7226,6 +7208,7 @@ "nopt": "4.0.1", "npmlog": "4.1.2", "rc": "1.2.3", + "request": "2.81.0", "rimraf": "2.6.2", "semver": "5.4.1", "tar": "2.2.1", @@ -7242,6 +7225,36 @@ "osenv": "0.1.4" } }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -7885,11 +7898,6 @@ "error-ex": "1.3.1" } }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" - }, "parseqs": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", @@ -9451,7 +9459,7 @@ "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.0.tgz", "integrity": "sha512-8z1TWtc/I9Kn4fkfg87DhkSAi0arul7DHBEeJ70sy66teQAeffjQED1s0Gduigme7hxHRYdYEKbhHYz28fpv5w==", "requires": { - "@types/node": "6.0.96", + "@types/node": "6.0.101", "@types/q": "0.0.32", "@types/selenium-webdriver": "2.53.43", "blocking-proxy": "1.0.1", @@ -9468,6 +9476,11 @@ "webdriver-manager": "12.0.6" }, "dependencies": { + "@types/node": { + "version": "6.0.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", + "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==" + }, "adm-zip": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", @@ -11263,7 +11276,8 @@ "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "optional": true }, "style-loader": { "version": "0.19.1", @@ -11653,73 +11667,55 @@ } }, "ts-node": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-4.1.0.tgz", - "integrity": "sha512-xcZH12oVg9PShKhy3UHyDmuDLV3y7iKwX25aMVPt1SIXSuAfWkFiGPEkg+th8R4YKW/QCxDoW7lJdb15lx6QWg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.0.tgz", + "integrity": "sha512-mlSim/sQS1s5iT3KZEKXRaqsGC7xM2QoxkrhfznZJyou18dl47PTnY7/KMmbGqiVoQrO9Hk53CYpcychF5TNrQ==", "requires": { "arrify": "1.0.1", - "chalk": "2.3.0", + "chalk": "2.3.1", "diff": "3.4.0", "make-error": "1.3.2", "minimist": "1.2.0", "mkdirp": "0.5.1", - "source-map-support": "0.5.0", - "tsconfig": "7.0.0", - "v8flags": "3.0.1", + "source-map-support": "0.5.3", "yn": "2.0.0" }, "dependencies": { "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", "requires": { "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "supports-color": "5.2.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - }, - "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "requires": { - "has-flag": "2.0.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, - "tsconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", - "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", + "source-map-support": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", + "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==", "requires": { - "@types/strip-bom": "3.0.0", - "@types/strip-json-comments": "0.0.30", - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1" + "source-map": "0.6.1" } }, - "v8flags": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.1.tgz", - "integrity": "sha1-3Oj8N5wX2fLJ6e142JzgAFKxt2s=", + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", "requires": { - "homedir-polyfill": "1.0.1" + "has-flag": "3.0.0" } - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" } } }, @@ -11857,9 +11853,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=" + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==" }, "uglify-js": { "version": "2.8.29", @@ -13227,6 +13223,11 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + }, "zone.js": { "version": "0.8.20", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.20.tgz", diff --git a/package.json b/package.json index fa5eaed6fc..5764f15eff 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "integration:build-optimizer": "npm run integration:build-optimizer:simple && npm run integration:build-optimizer:aio", "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark", "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark", + "postinstall": "npm run admin -- patch-dependencies", "prepush": "node ./bin/devkit-admin hooks/pre-push" }, "repository": { @@ -131,9 +132,9 @@ "tar": "^3.1.5", "temp": "^0.8.3", "tree-kill": "^1.2.0", - "ts-node": "^4.1.0", - "tslint": "^5.5.0", - "typescript": "~2.6.1", + "ts-node": "^5.0.0", + "tslint": "^5.9.1", + "typescript": "~2.7.2", "uglifyjs-webpack-plugin": "^1.1.6", "url-loader": "^0.6.2", "webpack": "^3.10.0", diff --git a/scripts/patch-dependencies.ts b/scripts/patch-dependencies.ts new file mode 100644 index 0000000000..b9a9b18c50 --- /dev/null +++ b/scripts/patch-dependencies.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { execSync } from 'child_process'; +import { existsSync, writeFileSync } from 'fs'; + +const PATCH_LOCK = 'node_modules/rxjs/.patched'; + +export default function () { + if (!existsSync(PATCH_LOCK)) { + execSync('patch -p0 -i scripts/patches/rxjs-ts27.patch'); + execSync('patch -p0 -i scripts/patches/rxjs-typings.patch'); + writeFileSync(PATCH_LOCK, ''); + } +} diff --git a/scripts/patches/rxjs-ts27.patch b/scripts/patches/rxjs-ts27.patch new file mode 100644 index 0000000000..99529ff3a5 --- /dev/null +++ b/scripts/patches/rxjs-ts27.patch @@ -0,0 +1,18 @@ +--- node_modules/rxjs/src/observable/dom/AjaxObservable.ts 2017-12-21 16:48:41.000000000 -0500 ++++ node_modules/rxjs/src/observable/dom/AjaxObservable.ts 2018-02-20 11:00:21.000000000 -0500 +@@ -462,13 +462,13 @@ + //IE does not support json as responseType, parse it internally + return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null'); + } else { +- return JSON.parse(xhr.responseText || 'null'); ++ return JSON.parse((xhr as any).responseText || 'null'); + } + case 'xml': + return xhr.responseXML; + case 'text': + default: +- return ('response' in xhr) ? xhr.response : xhr.responseText; ++ return ('response' in xhr) ? xhr.response : (xhr as any).responseText; + } + } + diff --git a/scripts/patches/rxjs-typings.patch b/scripts/patches/rxjs-typings.patch new file mode 100644 index 0000000000..19431748cf --- /dev/null +++ b/scripts/patches/rxjs-typings.patch @@ -0,0 +1,10 @@ +--- node_modules/rxjs/Observable.d.ts 2018-02-20 11:24:56.000000000 -0500 ++++ node_modules/rxjs/Observable.d.ts 2018-02-20 11:25:21.000000000 -0500 +@@ -69,6 +69,7 @@ + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction): Observable; ++ pipe(...operations: OperatorFunction[]): Observable; + toPromise(this: Observable): Promise; + toPromise(this: Observable, PromiseCtor: typeof Promise): Promise; + toPromise(this: Observable, PromiseCtor: PromiseConstructorLike): Promise; diff --git a/tsconfig.json b/tsconfig.json index c8fd27ac6b..ff6b600a05 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ // source in devtools. "inlineSources": true, "strictNullChecks": true, - "target": "es6", + "target": "es2016", "lib": [ "es2017" ], @@ -56,6 +56,7 @@ "node_modules/**/*", "packages/schematics/*/*/*files/**/*", "tmp/**/*", + "scripts/patches/**/*", "tests/**/*" ] } From 360c8a0d6dda7107db49c9f524638affa0b345cd Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Feb 2018 18:34:31 -0800 Subject: [PATCH 134/724] ci: add force argument to release script --- scripts/release.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/release.ts b/scripts/release.ts index 2cf881ffa5..6afc2179c8 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -37,11 +37,11 @@ function _showVersions(logger: logging.Logger) { } -function _upgrade(release: string, logger: logging.Logger) { +function _upgrade(release: string, force: boolean, logger: logging.Logger) { for (const pkg of Object.keys(packages)) { const hash = packages[pkg].hash; const version = packages[pkg].version; - const dirty = packages[pkg].dirty; + const dirty = packages[pkg].dirty || force; let newVersion: string | null = version; if (release == 'minor-beta') { @@ -108,7 +108,13 @@ function _upgrade(release: string, logger: logging.Logger) { } -export default function(args: { _: string[], 'dry-run'?: boolean }, logger: logging.Logger) { +export interface ReleaseOptions { + _: string[]; + 'force'?: boolean; + 'dry-run'?: boolean; +} + +export default function(args: ReleaseOptions, logger: logging.Logger) { const maybeRelease = args._.shift(); const dryRun = args['dry-run'] !== undefined; switch (maybeRelease) { @@ -124,7 +130,7 @@ export default function(args: { _: string[], 'dry-run'?: boolean }, logger: logg case 'major': case 'minor': case 'patch': - _upgrade(maybeRelease, logger); + _upgrade(maybeRelease, args.force || false, logger); if (!dryRun) { fs.writeFileSync(path.join(__dirname, '../.monorepo.json'), JSON.stringify(monorepo, null, 2) + '\n'); From 9b8eaee6e196172c21b235b165666a5a76298abb Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Feb 2018 18:36:44 -0800 Subject: [PATCH 135/724] release: v0.4.1 --- .monorepo.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 70d3a12fef..b293e413e4 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,7 +42,7 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.0", + "version": "0.4.1", "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/architect": { @@ -53,14 +53,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.1", - "hash": "", + "version": "0.0.2", + "hash": "57e25727cb63a879effb10fd30599987", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.1", - "hash": "", + "version": "0.0.2", + "hash": "c270aceb888087c61c0647771045fd47", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -71,8 +71,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.0", - "hash": "5ff2fd3bdd025fe62471a4f3f7b77771", + "version": "0.4.1", + "hash": "55d5c82b05ef9b515e143356a75b895e", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-webpack": { @@ -83,8 +83,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" } ], - "version": "0.0.1", - "hash": "", + "version": "0.0.2", + "hash": "8165f0fc4dce547561e62e4e7605ea6e", "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, "@angular-devkit/core": { @@ -95,8 +95,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.0", - "hash": "4fa1b5f920f6910893231be350fef6ad", + "version": "0.4.1", + "hash": "3dc30c470d7cc9f3c7f226b4259eec28", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -107,34 +107,34 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.0", - "hash": "6086c3641cd7aaa791969b4445ef8fa5", + "version": "0.4.1", + "hash": "0498d144e2924eebda563d037a5439c1", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.0", - "hash": "7700a923b8e2aa023ce966949c73d62a", + "version": "0.4.1", + "hash": "2ede8b7b8dd8aba1797a133cf97dfe56", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.0", - "hash": "131f18b9a0ca5897d13531c821a8e7ff", + "version": "0.4.1", + "hash": "f2f1253db8e7a01eb0e5a945dd08979c", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.0", + "version": "0.4.1", "section": "Schematics", "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.0", + "version": "0.4.1", "section": "Schematics", - "hash": "bc5049e5880e03620a43791d12e4db57", + "hash": "1abc8090ac37083ca02f92ab794c6d7f", "snapshotRepo": "angular/schematics-package-update-builds" } } From 8ff1c3342fc9f820ddd8af06141ec008b4bdb2ff Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Feb 2018 19:33:44 -0800 Subject: [PATCH 136/724] release: v0.4.2 --- .monorepo.json | 26 +++++++++---------- .../schematics/src/tree/interface.ts | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index b293e413e4..831fdf62b9 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,7 +42,7 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.1", + "version": "0.4.2", "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/architect": { @@ -53,13 +53,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.2", + "version": "0.0.3", "hash": "57e25727cb63a879effb10fd30599987", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.2", + "version": "0.0.3", "hash": "c270aceb888087c61c0647771045fd47", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -71,7 +71,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.1", + "version": "0.4.2", "hash": "55d5c82b05ef9b515e143356a75b895e", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -83,7 +83,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" } ], - "version": "0.0.2", + "version": "0.0.3", "hash": "8165f0fc4dce547561e62e4e7605ea6e", "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, @@ -95,7 +95,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.1", + "version": "0.4.2", "hash": "3dc30c470d7cc9f3c7f226b4259eec28", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -107,32 +107,32 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.1", - "hash": "0498d144e2924eebda563d037a5439c1", + "version": "0.4.2", + "hash": "9ac6f3bb734fa1e1751a005fb3c3124a", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.1", - "hash": "2ede8b7b8dd8aba1797a133cf97dfe56", + "version": "0.4.2", + "hash": "9df0b747019a04f8e01caddd642e7b52", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.1", + "version": "0.4.2", "hash": "f2f1253db8e7a01eb0e5a945dd08979c", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.1", + "version": "0.4.2", "section": "Schematics", "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.1", + "version": "0.4.2", "section": "Schematics", "hash": "1abc8090ac37083ca02f92ab794c6d7f", "snapshotRepo": "angular/schematics-package-update-builds" diff --git a/packages/angular_devkit/schematics/src/tree/interface.ts b/packages/angular_devkit/schematics/src/tree/interface.ts index a43d5f0005..f78f029e0c 100644 --- a/packages/angular_devkit/schematics/src/tree/interface.ts +++ b/packages/angular_devkit/schematics/src/tree/interface.ts @@ -31,7 +31,7 @@ export enum MergeStrategy { } -export const FileVisitorCancelToken = Symbol(); +export const FileVisitorCancelToken: symbol = Symbol(); export type FileVisitor = FilePredicate; export interface FileEntry { From 95323d5dc8c00c93f361d32a5765725e1ad01f7e Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 22 Feb 2018 21:45:38 -0800 Subject: [PATCH 137/724] ci: allow release scopes in commit messages outside of CI --- scripts/validate-commits.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate-commits.ts b/scripts/validate-commits.ts index aba664175f..2e3cd6bea0 100644 --- a/scripts/validate-commits.ts +++ b/scripts/validate-commits.ts @@ -125,7 +125,7 @@ export default function (argv: ValidateCommitsOptions, logger: logging.Logger) { _invalid(sha, message, 'should not have a scope'); continue; } - if (commits.length > 1) { + if (argv.ci && commits.length > 1) { _invalid(sha, message, 'release should always be alone in a PR'); continue; } From 383da18d70c1ef3466aae2ddbf0f4ceb8bd218dd Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 28 Feb 2018 15:36:57 -0800 Subject: [PATCH 138/724] release: 0.4.3 --- .monorepo.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 831fdf62b9..afd206ce53 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,7 +42,7 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.2", + "version": "0.4.3", "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" }, "@angular-devkit/architect": { @@ -53,13 +53,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.3", + "version": "0.0.4", "hash": "57e25727cb63a879effb10fd30599987", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.3", + "version": "0.0.4", "hash": "c270aceb888087c61c0647771045fd47", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -71,7 +71,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.2", + "version": "0.4.3", "hash": "55d5c82b05ef9b515e143356a75b895e", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -83,7 +83,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" } ], - "version": "0.0.3", + "version": "0.0.4", "hash": "8165f0fc4dce547561e62e4e7605ea6e", "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, @@ -95,7 +95,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.2", + "version": "0.4.3", "hash": "3dc30c470d7cc9f3c7f226b4259eec28", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -107,32 +107,32 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.2", + "version": "0.4.3", "hash": "9ac6f3bb734fa1e1751a005fb3c3124a", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.2", + "version": "0.4.3", "hash": "9df0b747019a04f8e01caddd642e7b52", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.2", + "version": "0.4.3", "hash": "f2f1253db8e7a01eb0e5a945dd08979c", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.2", + "version": "0.4.3", "section": "Schematics", "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.2", + "version": "0.4.3", "section": "Schematics", "hash": "1abc8090ac37083ca02f92ab794c6d7f", "snapshotRepo": "angular/schematics-package-update-builds" From b3dd3d3edc6eec31fdeb74375fad0c682fc9cc0f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 23 Feb 2018 17:00:41 -0800 Subject: [PATCH 139/724] feat(@angular-devkit/core): add a clean function It makes typing easier. --- packages/angular_devkit/core/src/utils/array.ts | 11 +++++++++++ packages/angular_devkit/core/src/utils/index.ts | 1 + 2 files changed, 12 insertions(+) create mode 100644 packages/angular_devkit/core/src/utils/array.ts diff --git a/packages/angular_devkit/core/src/utils/array.ts b/packages/angular_devkit/core/src/utils/array.ts new file mode 100644 index 0000000000..e1969c1757 --- /dev/null +++ b/packages/angular_devkit/core/src/utils/array.ts @@ -0,0 +1,11 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export function clean(array: Array): Array { + return array.filter(x => x !== undefined) as Array; +} diff --git a/packages/angular_devkit/core/src/utils/index.ts b/packages/angular_devkit/core/src/utils/index.ts index 4aa9bb9769..5af3460efb 100644 --- a/packages/angular_devkit/core/src/utils/index.ts +++ b/packages/angular_devkit/core/src/utils/index.ts @@ -8,6 +8,7 @@ import * as tags from './literals'; import * as strings from './strings'; +export * from './array'; export * from './object'; export * from './template'; export * from './partially-ordered-set'; From 1f9939791410bd3267d70b7a886566a46ec945a5 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sat, 24 Feb 2018 22:32:19 -0800 Subject: [PATCH 140/724] feat(@angular-devkit/schematics): add a workflow class that simplifies the whole thing Workflows are complete abstraction of the whole system. This makes it easier to have tools that dont diverge from the standard definition of schematics. In case tools have to diverge they can implement their own workflow as well. Please note that workflows are also recursive. This means that you can execute a schematic inside another schematic. This will happen in the next commit with the schematic task. For now, the workflow is relatively crude. It will be improved over then next few commits. --- packages/angular_devkit/schematics/BUILD | 1 + .../schematics/src/engine/engine.ts | 4 +- .../schematics/src/engine/interface.ts | 2 + .../schematics/src/exception/exception.ts | 6 + .../angular_devkit/schematics/src/index.ts | 4 + .../schematics/src/tree/filesystem.ts | 3 + .../schematics/src/workflow/index.ts | 8 + .../schematics/src/workflow/interface.ts | 29 +++ .../angular_devkit/schematics/tools/index.ts | 2 + .../tools/workflow/node-workflow.ts | 137 ++++++++++++++ .../schematics_cli/bin/schematics.ts | 173 ++++++------------ 11 files changed, 251 insertions(+), 118 deletions(-) create mode 100644 packages/angular_devkit/schematics/src/workflow/index.ts create mode 100644 packages/angular_devkit/schematics/src/workflow/interface.ts create mode 100644 packages/angular_devkit/schematics/tools/workflow/node-workflow.ts diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index 9330a9ef25..ca9130b579 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -59,6 +59,7 @@ ts_library( module_root = "tools", deps = [ ":schematics", + ":tasks", "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", # @deps: rxjs diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index 8981790dda..0909118b02 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -13,6 +13,7 @@ import { Url } from 'url'; import { MergeStrategy } from '../tree/interface'; import { NullTree } from '../tree/null'; import { empty } from '../tree/static'; +import { Workflow } from '../workflow'; import { CollectionImpl } from './collection'; import { Collection, @@ -78,9 +79,10 @@ export class SchematicEngine>>(); private _taskSchedulers = new Array(); - constructor(private _host: EngineHost) { + constructor(private _host: EngineHost, protected _workflow?: Workflow) { } + get workflow() { return this._workflow || null; } get defaultMergeStrategy() { return this._host.defaultMergeStrategy || MergeStrategy.Default; } createCollection(name: string): Collection { diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 9b41c0ca47..0945e629ef 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -9,6 +9,7 @@ import { logging } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { Url } from 'url'; import { FileEntry, MergeStrategy, Tree } from '../tree/interface'; +import { Workflow } from '../workflow'; import { TaskConfigurationGenerator, TaskExecutor, TaskId } from './task'; @@ -102,6 +103,7 @@ export interface Engine; readonly defaultMergeStrategy: MergeStrategy; + readonly workflow: Workflow | null; } diff --git a/packages/angular_devkit/schematics/src/exception/exception.ts b/packages/angular_devkit/schematics/src/exception/exception.ts index 6be8c85d7b..f7f419bfc1 100644 --- a/packages/angular_devkit/schematics/src/exception/exception.ts +++ b/packages/angular_devkit/schematics/src/exception/exception.ts @@ -33,6 +33,12 @@ export class MergeConflictException extends BaseException { } } +export class UnsuccessfulWorkflowExecution extends BaseException { + constructor() { + super('Workflow did not execute successfully.'); + } +} + export class UnimplementedException extends BaseException { constructor() { super('This function is unimplemented.'); } } diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index d639a3aaa0..7f057be253 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -40,9 +40,13 @@ export * from './engine/schematic'; export * from './sink/dryrun'; export * from './sink/filesystem'; export * from './sink/host'; +export * from './sink/sink'; + import * as formats from './formats'; export { formats }; +import * as workflow from './workflow'; +export { workflow }; export interface TreeConstructor { empty(): TreeInterface; diff --git a/packages/angular_devkit/schematics/src/tree/filesystem.ts b/packages/angular_devkit/schematics/src/tree/filesystem.ts index 5f647259d0..056e5454c6 100644 --- a/packages/angular_devkit/schematics/src/tree/filesystem.ts +++ b/packages/angular_devkit/schematics/src/tree/filesystem.ts @@ -173,6 +173,9 @@ export class FileSystemTree extends VirtualTree { } +export class HostTree extends FileSystemTree {} + + export class FileSystemCreateTree extends FileSystemTree { constructor(host: virtualFs.Host) { super(host); diff --git a/packages/angular_devkit/schematics/src/workflow/index.ts b/packages/angular_devkit/schematics/src/workflow/index.ts new file mode 100644 index 0000000000..7a1287cfc6 --- /dev/null +++ b/packages/angular_devkit/schematics/src/workflow/index.ts @@ -0,0 +1,8 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export * from './interface'; diff --git a/packages/angular_devkit/schematics/src/workflow/interface.ts b/packages/angular_devkit/schematics/src/workflow/interface.ts new file mode 100644 index 0000000000..991dfd5d38 --- /dev/null +++ b/packages/angular_devkit/schematics/src/workflow/interface.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { logging } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; + +export interface RequiredWorkflowExecutionContext { + collection: string; + schematic: string; + options: object; +} + +export interface WorkflowExecutionContext extends RequiredWorkflowExecutionContext { + debug: boolean; + logger: logging.Logger; + parentContext?: Readonly; +} + +export interface Workflow { + readonly context: Readonly; + + execute( + options: Partial & RequiredWorkflowExecutionContext, + ): Observable; +} diff --git a/packages/angular_devkit/schematics/tools/index.ts b/packages/angular_devkit/schematics/tools/index.ts index 71bb85ca75..02a352ac8c 100644 --- a/packages/angular_devkit/schematics/tools/index.ts +++ b/packages/angular_devkit/schematics/tools/index.ts @@ -9,6 +9,8 @@ export * from './description'; export * from './file-system-engine-host-base'; export * from './file-system-host'; +export * from './workflow/node-workflow'; + export { FileSystemEngineHost } from './file-system-engine-host'; export { NodeModulesEngineHost } from './node-module-engine-host'; export { NodeModulesTestEngineHost } from './node-modules-test-engine-host'; diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts new file mode 100644 index 0000000000..15f19fd54e --- /dev/null +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -0,0 +1,137 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { logging, schema, virtualFs } from '@angular-devkit/core'; +import { + DryRunSink, + HostSink, + HostTree, + SchematicEngine, + Sink, + Tree, + UnsuccessfulWorkflowExecution, + formats, + workflow, +} from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies +import { Observable } from 'rxjs/Observable'; +import { empty } from 'rxjs/observable/empty'; +import { of } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; +import { concat, concatMap, ignoreElements, map } from 'rxjs/operators'; +import { NodeModulesEngineHost, validateOptionsWithSchema } from '..'; +import { DryRunEvent } from '../../src/sink/dryrun'; +import { BuiltinTaskExecutor } from '../../tasks/node'; + +export class NodeWorkflow implements workflow.Workflow { + protected _engine: SchematicEngine<{}, {}>; + protected _engineHost: NodeModulesEngineHost; + + protected _dryRunSink: DryRunSink; + protected _fsSink: Sink; + + protected _context: workflow.WorkflowExecutionContext[]; + + constructor( + protected _host: virtualFs.Host, + protected _options: { + force?: boolean; + dryRun?: boolean; + }, + ) { + /** + * Create the SchematicEngine, which is used by the Schematic library as callbacks to load a + * Collection or a Schematic. + */ + this._engineHost = new NodeModulesEngineHost(); + this._engine = new SchematicEngine(this._engineHost); + + // Add support for schemaJson. + const registry = new schema.CoreSchemaRegistry(formats.standardFormats); + this._engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); + + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); + + // We need two sinks if we want to output what will happen, and actually do the work. + // Note that fsSink is technically not used if `--dry-run` is passed, but creating the Sink + // does not have any side effect. + this._dryRunSink = new DryRunSink(this._host, this._options.force); + this._fsSink = new HostSink(this._host, this._options.force); + + this._context = []; + } + + get context(): Readonly { + const maybeContext = this._context[this._context.length - 1]; + if (!maybeContext) { + throw new Error('Cannot get context when workflow is not executing...'); + } + + return maybeContext; + } + get reporter(): Observable { + return this._dryRunSink.reporter; + } + + execute( + options: Partial & workflow.RequiredWorkflowExecutionContext, + ): Observable { + /** Create the collection and the schematic. */ + const collection = this._engine.createCollection(options.collection); + const schematic = collection.createSchematic(options.schematic); + + let error = false; + const dryRunSubscriber = this._dryRunSink.reporter.subscribe(event => { + error = error || (event.kind == 'error'); + }); + + const parentContext = this._context[this._context.length - 1]; + const context = { + ...options, + debug: options.debug || false, + logger: options.logger || new logging.NullLogger(), + parentContext, + }; + this._context.push(context); + + return schematic.call(options.options, of(new HostTree(this._host)), { + logger: options.logger || new logging.NullLogger(), + }).pipe( + map(tree => Tree.optimize(tree)), + concatMap((tree: Tree) => { + return this._dryRunSink.commit(tree).pipe( + ignoreElements(), + concat(of(tree)), + ); + }), + concatMap((tree: Tree) => { + dryRunSubscriber.unsubscribe(); + if (error) { + return _throw(new UnsuccessfulWorkflowExecution()); + } + if (this._options.dryRun) { + return empty(); + } + + return this._fsSink.commit(tree); + }), + concat(new Observable(obs => { + if (!this._options.dryRun) { + this._engine.executePostTasks().subscribe(obs); + } else { + obs.complete(); + } + })), + ignoreElements(), + concat(new Observable(obs => { + this._context.pop(); + + obs.complete(); + })), + ); + } +} diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 12ade640fd..63b5a233c2 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -8,34 +8,15 @@ */ import { normalize, - schema, tags, terminal, virtualFs, } from '@angular-devkit/core'; import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; -import { - DryRunEvent, - DryRunSink, - FileSystemTree, - HostSink, - SchematicEngine, - Tree, - formats, -} from '@angular-devkit/schematics'; -import { BuiltinTaskExecutor } from '@angular-devkit/schematics/tasks/node'; -import { - NodeModulesEngineHost, - validateOptionsWithSchema, -} from '@angular-devkit/schematics/tools'; +import { DryRunEvent, UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics'; +import { NodeWorkflow } from '@angular-devkit/schematics/tools'; import * as minimist from 'minimist'; -import { of as observableOf } from 'rxjs/observable/of'; -import { - concat, - concatMap, - ignoreElements, - map, -} from 'rxjs/operators'; + /** * Show usage of the CLI tool, and exit the process. @@ -126,44 +107,14 @@ const { const isLocalCollection = collectionName.startsWith('.') || collectionName.startsWith('/'); -/** - * Create the SchematicEngine, which is used by the Schematic library as callbacks to load a - * Collection or a Schematic. - */ -const engineHost = new NodeModulesEngineHost(); -const engine = new SchematicEngine(engineHost); - - -// Add support for schemaJson. -const registry = new schema.CoreSchemaRegistry(formats.standardFormats); -engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); - -engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); -engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); - -/** - * The collection to be used. - * @type {Collection|any} - */ -const collection = engine.createCollection(collectionName); -if (collection === null) { - logger.fatal(`Invalid collection name: "${collectionName}".`); - process.exit(3); - throw 3; // TypeScript doesn't know that process.exit() never returns. -} - - /** If the user wants to list schematics, we simply show all the schematic names. */ if (argv['list-schematics']) { - logger.info(engine.listSchematicNames(collection).join('\n')); + // logger.info(engine.listSchematicNames(collection).join('\n')); process.exit(0); throw 0; // TypeScript doesn't know that process.exit() never returns. } -/** Create the schematic from the collection. */ -const schematic = collection.createSchematic(schematicName); - /** Gather the arguments for later use. */ const debug: boolean = argv.debug === null ? isLocalCollection : argv.debug; const dryRun: boolean = argv['dry-run'] === null ? debug : argv['dry-run']; @@ -172,35 +123,34 @@ const force = argv['force']; /** Create a Virtual FS Host scoped to where the process is being run. **/ const fsHost = new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(process.cwd())); -/** This host is the original Tree created from the current directory. */ -const host = observableOf(new FileSystemTree(fsHost)); - -// We need two sinks if we want to output what will happen, and actually do the work. -// Note that fsSink is technically not used if `--dry-run` is passed, but creating the Sink -// does not have any side effect. -const dryRunSink = new DryRunSink(fsHost, force); -const fsSink = new HostSink(fsHost, force); +/** Create the workflow that will be executed with this run. */ +const workflow = new NodeWorkflow(fsHost, { force, dryRun }); - -// We keep a boolean to tell us whether an error would occur if we were to commit to an -// actual filesystem. In this case we simply show the dry-run, but skip the fsSink commit. -let error = false; - -// Indicate to the user when nothing has been done. +// Indicate to the user when nothing has been done. This is automatically set to off when there's +// a new DryRunEvent. let nothingDone = true; - +// Logging queue that receives all the messages to show the users. This only get shown when no +// errors happened. const loggingQueue: string[] = []; -// Logs out dry run events. -dryRunSink.reporter.subscribe((event: DryRunEvent) => { +/** + * Logs out dry run events. + * + * All events will always be executed here, in order of discovery. That means that an error would + * be shown along other events when it happens. Since errors in workflows will stop the Observable + * from completing successfully, we record any events other than errors, then on completion we + * show them. + * + * This is a simple way to only show errors when an error occur. + */ +workflow.reporter.subscribe((event: DryRunEvent) => { nothingDone = false; switch (event.kind) { case 'error': const desc = event.description == 'alreadyExist' ? 'already exists' : 'does not exist.'; logger.warn(`ERROR! ${event.path} ${desc}.`); - error = true; break; case 'update': loggingQueue.push(tags.oneLine` @@ -242,51 +192,40 @@ delete args._; /** - * The main path. Call the schematic with the host. This creates a new Context for the schematic - * to run in, then call the schematic rule using the input Tree. This returns a new Tree as if - * the schematic was applied to it. + * Execute the workflow, which will report the dry run events, run the tasks, and complete + * after all is done. * - * We then optimize this tree. This removes any duplicated actions or actions that would result - * in a noop (for example, creating then deleting a file). This is not necessary but will greatly - * improve performance as hitting the file system is costly. - * - * Then we proceed to run the dryRun commit. We run this before we then commit to the filesystem - * (if --dry-run was not passed or an error was detected by dryRun). + * The Observable returned will properly cancel the workflow if unsubscribed, error out if ANY + * step of the workflow failed (sink or task), with details included, and will only complete + * when everything is done. */ -schematic.call(args, host, { debug, logger: logger.asApi() }) - .pipe( - map((tree: Tree) => Tree.optimize(tree)), - concatMap((tree: Tree) => { - return dryRunSink.commit(tree).pipe( - ignoreElements(), - concat(observableOf(tree))); - }), - concatMap((tree: Tree) => { - if (!error) { - // Output the logging queue. - loggingQueue.forEach(log => logger.info(log)); - } - - if (nothingDone) { - logger.info('Nothing to be done.'); - } - - if (dryRun || error) { - return observableOf(tree); - } - - return fsSink.commit(tree).pipe( - ignoreElements(), - concat(observableOf(tree))); - }), - concatMap(() => engine.executePostTasks())) - .subscribe({ - error(err: Error) { - if (debug) { - logger.fatal('An error occured:\n' + err.stack); - } else { - logger.fatal(err.message); - } - process.exit(1); - }, - }); +workflow.execute({ + collection: collectionName, + schematic: schematicName, + options: args, + debug: debug, + logger: logger, +}) +.subscribe({ + error(err: Error) { + // In case the workflow was not successful, show an appropriate error message. + if (err instanceof UnsuccessfulWorkflowExecution) { + // "See above" because we already printed the error. + logger.fatal('The Schematic workflow failed. See above.'); + } else if (debug) { + logger.fatal('An error occured:\n' + err.stack); + } else { + logger.fatal(err.message); + } + + process.exit(1); + }, + complete() { + // Output the logging queue, no error happened. + loggingQueue.forEach(log => logger.info(log)); + + if (nothingDone) { + logger.info('Nothing to be done.'); + } + }, +}); From ea15d855cc58cd6f0fd90664354c405e2a432fa2 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sat, 24 Feb 2018 22:32:43 -0800 Subject: [PATCH 141/724] feat(@angular-devkit/schematics): add a run schematic task --- .../schematics/tasks/node/index.ts | 5 ++++ .../tasks/run-schematic/executor.ts | 26 +++++++++++++++++ .../tasks/run-schematic/init-task.ts | 29 +++++++++++++++++++ .../schematics/tasks/run-schematic/options.ts | 14 +++++++++ 4 files changed, 74 insertions(+) create mode 100644 packages/angular_devkit/schematics/tasks/run-schematic/executor.ts create mode 100644 packages/angular_devkit/schematics/tasks/run-schematic/init-task.ts create mode 100644 packages/angular_devkit/schematics/tasks/run-schematic/options.ts diff --git a/packages/angular_devkit/schematics/tasks/node/index.ts b/packages/angular_devkit/schematics/tasks/node/index.ts index f0063d9fd3..018e2a32ad 100644 --- a/packages/angular_devkit/schematics/tasks/node/index.ts +++ b/packages/angular_devkit/schematics/tasks/node/index.ts @@ -11,6 +11,7 @@ import { RepositoryInitializerName, RepositoryInitializerTaskFactoryOptions, } from '../repo-init/options'; +import { RunSchematicName } from '../run-schematic/options'; export class BuiltinTaskExecutor { static readonly NodePackage: TaskExecutorFactory = { @@ -22,4 +23,8 @@ export class BuiltinTaskExecutor { name: RepositoryInitializerName, create: (options) => import('../repo-init/executor').then(mod => mod.default(options)), }; + static readonly RunSchematic: TaskExecutorFactory<{}> = { + name: RunSchematicName, + create: () => import('../run-schematic/executor').then(mod => mod.default()), + }; } diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts b/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts new file mode 100644 index 0000000000..7f530f3f40 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicContext, TaskExecutor } from '../../src'; +import { RunSchematicTaskOptions } from './options'; + + +export default function(): TaskExecutor { + return (options: RunSchematicTaskOptions, context: SchematicContext) => { + const maybeWorkflow = context.engine.workflow; + + if (!maybeWorkflow) { + throw new Error('Need Workflow to support executing schematics as post tasks.'); + } + + return maybeWorkflow.execute({ + collection: options.collection, + schematic: options.name, + options: options as object, + }); + }; +} diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/init-task.ts b/packages/angular_devkit/schematics/tasks/run-schematic/init-task.ts new file mode 100644 index 0000000000..401522526e --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/run-schematic/init-task.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; +import { RunSchematicName, RunSchematicTaskOptions } from './options'; + + +export class RunSchematicTask implements TaskConfigurationGenerator { + constructor( + protected _collection: string, + protected _schematic: string, + protected _options: object, + ) {} + + toConfiguration(): TaskConfiguration { + return { + name: RunSchematicName, + options: { + collection: this._collection, + name: this._schematic, + options: this._options, + }, + }; + } +} diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/options.ts b/packages/angular_devkit/schematics/tasks/run-schematic/options.ts new file mode 100644 index 0000000000..7c435fb67c --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/run-schematic/options.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export const RunSchematicName = 'run-schematic'; + +export interface RunSchematicTaskOptions { + collection: string; + name: string; + options: object; +} From 7da90bdf99f5ac2e5b413cb3626796d3b4e7dc32 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 27 Feb 2018 11:40:00 -0800 Subject: [PATCH 142/724] feat(@angular-devkit/core): add support for smart defaults in the Core Schema Registry --- .../core/src/json/schema/index.ts | 1 + .../core/src/json/schema/interface.ts | 22 ++- .../core/src/json/schema/pointer.ts | 31 ++++ .../core/src/json/schema/registry.ts | 136 +++++++++++++++++- .../core/src/json/schema/registry_spec.ts | 65 +++++++++ .../core/src/json/schema/transforms.ts | 2 +- .../core/src/json/schema/visitor.ts | 29 +--- 7 files changed, 253 insertions(+), 33 deletions(-) create mode 100644 packages/angular_devkit/core/src/json/schema/pointer.ts diff --git a/packages/angular_devkit/core/src/json/schema/index.ts b/packages/angular_devkit/core/src/json/schema/index.ts index 01c8e6e949..862c127a6b 100644 --- a/packages/angular_devkit/core/src/json/schema/index.ts +++ b/packages/angular_devkit/core/src/json/schema/index.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ export * from './interface'; +export * from './pointer'; export * from './registry'; export * from './visitor'; diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index 774552bef3..e642003784 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -6,8 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs/Observable'; -import { JsonValue } from '..'; +import { JsonArray, JsonObject, JsonValue } from '..'; +export type JsonPointer = string & { + __PRIVATE_DEVKIT_JSON_POINTER: void; +}; export interface SchemaValidatorResult { data: JsonValue; @@ -31,6 +34,23 @@ export interface SchemaFormat { formatter: SchemaFormatter; } +export interface SmartDefaultProvider { + (schema: JsonObject): T | Observable; +} + +export interface SchemaKeywordValidator { + ( + // tslint:disable-next-line:no-any + data: JsonValue, + schema: JsonValue, + parent: JsonObject | JsonArray | undefined, + parentProperty: string | number | undefined, + pointer: JsonPointer, + // tslint:disable-next-line:no-any + rootData: JsonValue, + ): boolean | Observable; +} + export interface SchemaRegistry { compile(schema: Object): Observable; addFormat(format: SchemaFormat): void; diff --git a/packages/angular_devkit/core/src/json/schema/pointer.ts b/packages/angular_devkit/core/src/json/schema/pointer.ts new file mode 100644 index 0000000000..39d0541698 --- /dev/null +++ b/packages/angular_devkit/core/src/json/schema/pointer.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonPointer } from './interface'; + + +export function buildJsonPointer(fragments: string[]): JsonPointer { + return ( + '/' + fragments.map(f => { + return f.replace(/~/g, '~0') + .replace(/\//g, '~1'); + }).join('/') + ) as JsonPointer; +} +export function joinJsonPointer(root: JsonPointer, ...others: string[]): JsonPointer { + if (root == '/') { + return buildJsonPointer(others); + } + + return (root + buildJsonPointer(others)) as JsonPointer; +} +export function parseJsonPointer(pointer: JsonPointer): string[] { + if (pointer === '') { return []; } + if (pointer.charAt(0) !== '/') { throw new Error('Relative pointer: ' + pointer); } + + return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); +} diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index cd9a56407c..07b353f53f 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -10,8 +10,8 @@ import * as http from 'http'; import { Observable } from 'rxjs/Observable'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { of as observableOf } from 'rxjs/observable/of'; -import { concatMap, switchMap } from 'rxjs/operators'; -import { map } from 'rxjs/operators/map'; +import { concat, concatMap, ignoreElements, map, switchMap } from 'rxjs/operators'; +import { observable } from 'rxjs/symbol/observable'; import { PartiallyOrderedSet } from '../../utils'; import { JsonObject, JsonValue } from '../interface'; import { @@ -20,6 +20,7 @@ import { SchemaRegistry, SchemaValidator, SchemaValidatorResult, + SmartDefaultProvider, } from './interface'; import { addUndefinedDefaults } from './transforms'; import { JsonVisitor, visitJson } from './visitor'; @@ -31,6 +32,10 @@ export class CoreSchemaRegistry implements SchemaRegistry { private _pre = new PartiallyOrderedSet(); private _post = new PartiallyOrderedSet(); + private _smartDefaultKeyword = false; + private _sourceMap = new Map>(); + private _smartDefaultRecord = new Map(); + constructor(formats: SchemaFormat[] = []) { /** * Build an AJV instance that will be used to validate schemas. @@ -136,7 +141,10 @@ export class CoreSchemaRegistry implements SchemaRegistry { // in synchronous (if available). let validator: Observable; try { - const maybeFnValidate = this._ajv.compile(schema); + const maybeFnValidate = this._ajv.compile({ + $async: this._smartDefaultKeyword ? true : undefined, + ...schema, + }); validator = observableOf(maybeFnValidate); } catch (e) { // Propagate the error. @@ -195,6 +203,8 @@ export class CoreSchemaRegistry implements SchemaRegistry { ); return dataObs.pipe( + // Apply smart defaults. + concatMap(data => this._applySmartDefaults(data)), map(data => [data, valid]), ); } else { @@ -232,7 +242,11 @@ export class CoreSchemaRegistry implements SchemaRegistry { const validate = (data: any) => { const result = format.formatter.validate(data); - return result instanceof Observable ? result.toPromise() : result; + if (typeof result == 'boolean') { + return result; + } else { + return result.toPromise(); + } }; this._ajv.addFormat(format.name, { @@ -242,4 +256,118 @@ export class CoreSchemaRegistry implements SchemaRegistry { // tslint:disable-next-line:no-any } as any); } + + addSmartDefaultProvider(source: string, provider: SmartDefaultProvider) { + if (this._sourceMap.has(source)) { + throw new Error(source); + } + + this._sourceMap.set(source, provider); + + if (!this._smartDefaultKeyword) { + this._smartDefaultKeyword = true; + + this._ajv.addKeyword('$default', { + modifying: true, + async: true, + compile: (schema, _parentSchema, it) => { + const source = this._sourceMap.get((schema as JsonObject).$source as string); + + if (!source) { + throw new Error(`Invalid source: ${JSON.stringify(source)}.`); + } + + // We cheat, heavily. + this._smartDefaultRecord.set( + // tslint:disable-next-line:no-any + JSON.stringify((it as any).dataPathArr.slice(1) as string[]), + schema, + ); + + return function() { + return true; + }; + }, + }); + } + } + + // tslint:disable-next-line:no-any + private _applySmartDefaults(data: any): Observable { + function _set( + // tslint:disable-next-line:no-any + data: any, + fragments: string[], + value: {}, + // tslint:disable-next-line:no-any + parent: any | null = null, + parentProperty?: string, + ): void { + for (let i = 0; i < fragments.length; i++) { + const f = fragments[i]; + + if (f[0] == 'i') { + if (!Array.isArray(data)) { + return; + } + + for (let j = 0; j < data.length; j++) { + _set(data[j], fragments.slice(i + 1), value, data, '' + j); + } + + return; + } else if (f.startsWith('key')) { + if (typeof data !== 'object') { + return; + } + + Object.getOwnPropertyNames(data).forEach(property => { + _set(data[property], fragments.slice(i + 1), value, data, property); + }); + + return; + } else if (f.startsWith('\'') && f[f.length - 1] == '\'') { + const property = f + .slice(1, -1) + .replace(/\\'/g, '\'') + .replace(/\\n/g, '\n') + .replace(/\\r/g, '\r') + .replace(/\\f/g, '\f') + .replace(/\\t/g, '\t'); + parent = data; + parentProperty = property; + data = data[property]; + } else { + return; + } + } + + if (parent && parentProperty) { + parent[parentProperty] = value; + } + } + + return [...this._smartDefaultRecord.entries()].reduce((acc, [pointer, schema]) => { + const fragments = JSON.parse(pointer); + const source = this._sourceMap.get((schema as JsonObject).$source as string); + + if (!source) { + throw new Error('Invalid source.'); + } + + let value = source(schema); + if (typeof value != 'object' || !(observable in value)) { + value = observableOf(value); + } + + return acc.pipe( + concatMap(() => (value as Observable<{}>).pipe( + map(x => _set(data, fragments, x)), + )), + ); + }, observableOf(undefined)).pipe( + ignoreElements(), + concat(observableOf(data)), + ); + } } diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index df3240e264..5ffb0585c0 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -251,4 +251,69 @@ describe('CoreSchemaRegistry', () => { ) .subscribe(done, done.fail); }); + + it('supports smart defaults', done => { + const registry = new CoreSchemaRegistry(); + const data: any = { + arr: [{}], + }; + + registry.addSmartDefaultProvider('test', (schema) => { + expect(schema).toEqual({ + $source: 'test', + }); + + return true; + }); + registry.addSmartDefaultProvider('test2', (schema) => { + expect(schema).toEqual({ + $source: 'test2', + blue: 'yep', + }); + + return schema['blue']; + }); + + registry + .compile({ + properties: { + bool: { + $ref: '#/definitions/example', + }, + arr: { + items: { + properties: { + 'test': { + $ref: '#/definitions/other', + }, + }, + }, + }, + }, + definitions: { + example: { + type: 'boolean', + $default: { + $source: 'test', + }, + }, + other: { + type: 'string', + $default: { + $source: 'test2', + blue: 'yep', + }, + }, + }, + }) + .pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(true); + expect(data.bool).toBe(true); + expect(data.arr[0].test).toBe('yep'); + }), + ) + .subscribe(done, done.fail); + }); }); diff --git a/packages/angular_devkit/core/src/json/schema/transforms.ts b/packages/angular_devkit/core/src/json/schema/transforms.ts index df0e656563..b481e7f0e8 100644 --- a/packages/angular_devkit/core/src/json/schema/transforms.ts +++ b/packages/angular_devkit/core/src/json/schema/transforms.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { JsonArray, JsonObject, JsonValue } from '..'; -import { JsonPointer } from './visitor'; +import { JsonPointer } from './interface'; export function addUndefinedDefaults( diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index 17299e9191..03e467628f 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -11,10 +11,8 @@ import { of as observableOf } from 'rxjs/observable/of'; import { concat, concatMap, ignoreElements, mergeMap, tap } from 'rxjs/operators'; import { observable } from 'rxjs/symbol/observable'; import { JsonArray, JsonObject, JsonValue } from '..'; - -export type JsonPointer = string & { - __PRIVATE_DEVKIT_JSON_POINTER: void; -}; +import { JsonPointer } from './interface'; +import { buildJsonPointer, joinJsonPointer } from './pointer'; export interface JsonSchemaVisitor { ( @@ -39,29 +37,6 @@ export interface ReferenceResolver { (ref: string, context?: ContextT): { context?: ContextT, schema?: JsonObject }; } - -export function buildJsonPointer(fragments: string[]): JsonPointer { - return ( - '/' + fragments.map(f => { - return f.replace(/~/g, '~0') - .replace(/\//g, '~1'); - }).join('/') - ) as JsonPointer; -} -export function joinJsonPointer(root: JsonPointer, ...others: string[]): JsonPointer { - if (root == '/') { - return buildJsonPointer(others); - } - - return (root + buildJsonPointer(others)) as JsonPointer; -} -export function parseJsonPointer(pointer: JsonPointer): string[] { - if (pointer === '') { return []; } - if (pointer.charAt(0) !== '/') { throw new Error('Relative pointer: ' + pointer); } - - return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~')); -} - function _getObjectSubSchema( schema: JsonObject | undefined, key: string, From d4e48b70f7f6d4870df4b13d1080b637ca45db0d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 23 Feb 2018 15:43:38 +0000 Subject: [PATCH 143/724] build: only set infinite stack trace with --long-stack-trace --- lib/bootstrap-local.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bootstrap-local.js b/lib/bootstrap-local.js index 3d7b231339..20e5c36fcf 100644 --- a/lib/bootstrap-local.js +++ b/lib/bootstrap-local.js @@ -45,8 +45,9 @@ if (process.env['DEVKIT_PROFILING']) { process.on('uncaughtException', exitHandler.bind(null, { exit: true })); } - -Error.stackTraceLimit = Infinity; +if (process.argv.indexOf('--long-stack-trace') !== -1){ + Error.stackTraceLimit = Infinity; +} global._DevKitIsLocal = true; global._DevKitRoot = path.resolve(__dirname, '..'); From 69c8641a873b5526a8066e3d45a54d8846dc34bf Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 23 Feb 2018 14:02:39 +0000 Subject: [PATCH 144/724] fix(@angular-devkit/core): allow big inputs for fileBufferToString --- .../core/src/virtual-fs/host/buffer.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts b/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts index c7b957571e..e71788b978 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts @@ -50,6 +50,21 @@ export function fileBufferToString(fileBuffer: FileBuffer): string { // Modern browsers implement TextEncode. return new TextDecoder('utf-8').decode(new Uint8Array(fileBuffer)); } else { - return String.fromCharCode.apply(null, new Uint8Array(fileBuffer)); + // Slowest method but sure to be compatible with every platform. + const bufView = new Uint8Array(fileBuffer); + const bufLength = bufView.length; + let result = ''; + let chunkLength = Math.pow(2, 16) - 1; + + // We have to chunk it because String.fromCharCode.apply will throw + // `Maximum call stack size exceeded` on big inputs. + for (let i = 0; i < bufLength; i += chunkLength) { + if (i + chunkLength > bufLength) { + chunkLength = bufLength - i; + } + result += String.fromCharCode.apply(null, bufView.subarray(i, i + chunkLength)); + } + + return result; } } From d2775122eb64fcc618c0696c8b0d4c0db93dac5f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Feb 2018 10:35:36 +0000 Subject: [PATCH 145/724] ci: remove v8-profiler dependency It was adding 30s-1m to all CircleCI jobs, which is around half the time each take. This way you must manually install the profiler before. --- lib/bootstrap-local.js | 8 +- package-lock.json | 176 ----------------------------------------- package.json | 3 - 3 files changed, 7 insertions(+), 180 deletions(-) diff --git a/lib/bootstrap-local.js b/lib/bootstrap-local.js index 20e5c36fcf..259d6fbfcf 100644 --- a/lib/bootstrap-local.js +++ b/lib/bootstrap-local.js @@ -22,7 +22,13 @@ if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !== // Check if we need to profile this CLI run. let profiler = null; if (process.env['DEVKIT_PROFILING']) { - profiler = require('v8-profiler'); + try { + profiler = require('v8-profiler'); + } catch (err) { + throw new Error(`Could not require 'v8-profiler'. You must install it separetely with` + + `'npm install v8-profiler --no-save.\n\nOriginal error:\n\n${err}`); + } + profiler.startProfiling(); function exitHandler(options, _err) { diff --git a/package-lock.json b/package-lock.json index 0a7b955cdb..7b28b4afbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2414,12 +2414,6 @@ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", - "optional": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -2556,12 +2550,6 @@ "repeating": "2.0.1" } }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "optional": true - }, "detect-node": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", @@ -4359,17 +4347,6 @@ "rimraf": "2.2.8" } }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, "ftp": { "version": "0.3.10", "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", @@ -7196,87 +7173,6 @@ } } }, - "node-pre-gyp": { - "version": "0.6.39", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", - "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", - "optional": true, - "requires": { - "detect-libc": "1.0.3", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.3", - "request": "2.81.0", - "rimraf": "2.6.2", - "semver": "5.4.1", - "tar": "2.2.1", - "tar-pack": "3.4.1" - }, - "dependencies": { - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "optional": true, - "requires": { - "abbrev": "1.0.9", - "osenv": "0.1.4" - } - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "optional": true, - "requires": { - "glob": "7.1.2" - } - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "optional": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - } - } - }, "node-sass": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", @@ -9743,18 +9639,6 @@ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" }, - "rc": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.3.tgz", - "integrity": "sha1-UVdakA+N1oOBxxC0cSwhVMPiA1s=", - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - } - }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -11273,12 +11157,6 @@ "get-stdin": "4.0.1" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "optional": true - }, "style-loader": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz", @@ -11424,44 +11302,6 @@ } } }, - "tar-pack": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", - "optional": true, - "requires": { - "debug": "2.6.9", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.3", - "rimraf": "2.6.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "optional": true, - "requires": { - "glob": "7.1.2" - } - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "optional": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - } - } - }, "temp": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", @@ -11942,12 +11782,6 @@ } } }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", - "optional": true - }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", @@ -12230,16 +12064,6 @@ "integrity": "sha1-Z6rzPEaypYel9mZtAPdpEyjxSdw=", "optional": true }, - "v8-profiler": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/v8-profiler/-/v8-profiler-5.7.0.tgz", - "integrity": "sha1-6DgcvrtbX9DKjSsJ9qAYGhWNs00=", - "optional": true, - "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" - } - }, "validate-npm-package-license": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", diff --git a/package.json b/package.json index 5764f15eff..ab2cb950bb 100644 --- a/package.json +++ b/package.json @@ -147,8 +147,5 @@ }, "devDependencies": { "license-checker": "^16.0.0" - }, - "optionalDependencies": { - "v8-profiler": "^5.7.0" } } From 951b5238f6e29fe536d4f0033a2cf5b90cbb8948 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Feb 2018 10:17:58 +0000 Subject: [PATCH 146/724] ci: remove travis config file We are not using travis in the DevKit anymore. --- .travis.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a6f40ca5e5..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -dist: trusty - -language: node_js - -env: - global: - - DBUS_SESSION_BUS_ADDRESS=/dev/null - -matrix: - fast_finish: true - include: - - node_js: "8" - os: linux - env: SCRIPT=lint - - node_js: "8" - os: linux - env: SCRIPT=test - -before_install: - # Install yarn. - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH="$HOME/.yarn/bin:$PATH" - - yarn config set spin false - - yarn config set progress false - -script: - - if [[ "$SCRIPT" ]]; then npm run $SCRIPT; fi From c3e0b6866f5ce954602171637bd45a5a0c8cbfe0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Feb 2018 10:17:36 +0000 Subject: [PATCH 147/724] test: separate big specs --- .appveyor.yml | 3 ++- .circleci/config.yml | 14 ++++++++++++++ lib/istanbul-local.js | 2 +- packages/angular_devkit/build_optimizer/BUILD | 1 + .../browser/{index_spec.ts => index_spec_big.ts} | 0 .../{index_spec.ts => index_spec_big.ts} | 2 +- .../{index_spec.ts => index_spec_big.ts} | 2 +- .../src/karma/{index_spec.ts => index_spec_big.ts} | 0 .../{index_spec.ts => index_spec_big.ts} | 2 +- .../tslint/{index_spec.ts => index_spec_big.ts} | 0 packages/angular_devkit/core/BUILD | 7 ++++++- packages/angular_devkit/schematics_cli/BUILD | 1 + rules/noGlobalTslintDisableRule.ts | 2 +- scripts/build.ts | 2 +- scripts/test.ts | 7 +++---- 15 files changed, 33 insertions(+), 12 deletions(-) rename packages/angular_devkit/build_webpack/src/browser/{index_spec.ts => index_spec_big.ts} (100%) rename packages/angular_devkit/build_webpack/src/dev-server/{index_spec.ts => index_spec_big.ts} (99%) rename packages/angular_devkit/build_webpack/src/extract-i18n/{index_spec.ts => index_spec_big.ts} (99%) rename packages/angular_devkit/build_webpack/src/karma/{index_spec.ts => index_spec_big.ts} (100%) rename packages/angular_devkit/build_webpack/src/protractor/{index_spec.ts => index_spec_big.ts} (98%) rename packages/angular_devkit/build_webpack/src/tslint/{index_spec.ts => index_spec_big.ts} (100%) diff --git a/.appveyor.yml b/.appveyor.yml index bc5a2ad092..c9c174cfda 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,7 +13,8 @@ install: test_script: - node --version - npm --version - - npm run test + - npm test + - npm test -- --big build: off diff --git a/.circleci/config.yml b/.circleci/config.yml index 921234b8c7..b4b39b9656 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,6 +41,17 @@ jobs: - run: npm install --no-save - run: npm run test -- --code-coverage --full + test-big: + <<: *defaults + steps: + - checkout: + <<: *post_checkout + - restore_cache: + key: angular_devkit-{{ checksum "package-lock.json" }} + + - run: npm install --no-save + - run: npm run test -- --code-coverage --full --big + integration: <<: *defaults steps: @@ -131,6 +142,9 @@ workflows: - test: requires: - build + - test-big: + requires: + - build - integration: requires: - build diff --git a/lib/istanbul-local.js b/lib/istanbul-local.js index ce062344de..ec9a57eab4 100644 --- a/lib/istanbul-local.js +++ b/lib/istanbul-local.js @@ -18,7 +18,7 @@ exports.codeMap = codeMap; exports.istanbulRequireHook = function(code, filename) { // Skip spec files. - if (filename.match(/_spec\.ts$/)) { + if (filename.match(/_spec(_big)?\.ts$/)) { return code; } const codeFile = codeMap.get(filename); diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD index c77a095030..8b6a390e28 100644 --- a/packages/angular_devkit/build_optimizer/BUILD +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -23,6 +23,7 @@ ts_library( "src/purify/**", "src/index.ts", "**/*_spec.ts", + "**/*_spec_big.ts", ], ), tsconfig = "//:tsconfig.json", diff --git a/packages/angular_devkit/build_webpack/src/browser/index_spec.ts b/packages/angular_devkit/build_webpack/src/browser/index_spec_big.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/browser/index_spec.ts rename to packages/angular_devkit/build_webpack/src/browser/index_spec_big.ts diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts b/packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts similarity index 99% rename from packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts rename to packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts index f285d0a2d1..586bbb6b20 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index_spec.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts @@ -14,7 +14,7 @@ import { relative, resolve } from 'path'; import * as _request from 'request'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; -import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec'; +import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec_big'; const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts similarity index 99% rename from packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts rename to packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts index 2f69d70cf8..d5808bcc38 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec.ts +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts @@ -12,7 +12,7 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { existsSync, readFileSync, unlinkSync } from 'fs'; import { relative, resolve } from 'path'; import { concatMap, tap, toArray } from 'rxjs/operators'; -import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec'; +import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec_big'; describe('Extract i18n Target', () => { diff --git a/packages/angular_devkit/build_webpack/src/karma/index_spec.ts b/packages/angular_devkit/build_webpack/src/karma/index_spec_big.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/karma/index_spec.ts rename to packages/angular_devkit/build_webpack/src/karma/index_spec_big.ts diff --git a/packages/angular_devkit/build_webpack/src/protractor/index_spec.ts b/packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts similarity index 98% rename from packages/angular_devkit/build_webpack/src/protractor/index_spec.ts rename to packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts index c5e4ce86c8..c4aeb13e4a 100644 --- a/packages/angular_devkit/build_webpack/src/protractor/index_spec.ts +++ b/packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts @@ -11,7 +11,7 @@ import { normalize } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { relative, resolve } from 'path'; import { concatMap, take } from 'rxjs/operators'; -import { getWorkspace as getDevServerWorkspace } from '../dev-server/index_spec'; +import { getWorkspace as getDevServerWorkspace } from '../dev-server/index_spec_big'; describe('Protractor Target', () => { diff --git a/packages/angular_devkit/build_webpack/src/tslint/index_spec.ts b/packages/angular_devkit/build_webpack/src/tslint/index_spec_big.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/tslint/index_spec.ts rename to packages/angular_devkit/build_webpack/src/tslint/index_spec_big.ts diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 54118427a7..10eb75bf37 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -14,6 +14,7 @@ ts_library( include = ["src/**/*.ts"], exclude = [ "src/**/*_spec.ts", + "src/**/*_spec_big.ts", "src/**/*_benchmark.ts", ], ), @@ -30,6 +31,7 @@ ts_library( include = ["node/**/*.ts"], exclude = [ "node/**/*_spec.ts", + "node/**/*_spec_big.ts", "tools/**/*_benchmark.ts", ], ), @@ -44,7 +46,10 @@ ts_library( ts_library( name = "spec", srcs = glob( - include = ["**/*_spec.ts"], + include = [ + "**/*_spec.ts", + "**/*_spec_big.ts", + ], ), deps = [ ":core", diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index 16fa1280cf..6e3c6a75cd 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -14,6 +14,7 @@ ts_library( include = ["bin/**/*.ts"], exclude = [ "bin/**/*_spec.ts", + "bin/**/*_spec_big.ts", "bin/**/*_benchmark.ts", ], ), diff --git a/rules/noGlobalTslintDisableRule.ts b/rules/noGlobalTslintDisableRule.ts index d5158a0fae..338dd1cf63 100644 --- a/rules/noGlobalTslintDisableRule.ts +++ b/rules/noGlobalTslintDisableRule.ts @@ -44,7 +44,7 @@ class Walker extends Lint.RuleWalker { super.walk(sourceFile); // Ignore spec files. - if (sourceFile.fileName.match(/_spec.ts$/)) { + if (sourceFile.fileName.match(/_spec(_big)?.ts$/)) { return; } // Ignore benchmark files. diff --git a/scripts/build.ts b/scripts/build.ts index fd9aa0694a..69c11eeaa9 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -243,7 +243,7 @@ export default function(argv: { local?: boolean, snapshot?: boolean }, logger: l for (const packageName of sortedPackages) { specLogger.info(packageName); const pkg = packages[packageName]; - const files = glob.sync(path.join(pkg.dist, '**/*_spec.@(js|d.ts)')); + const files = glob.sync(path.join(pkg.dist, '**/*_spec?(_big).@(js|d.ts)')); specLogger.info(` ${files.length} spec files found...`); files.forEach(fileName => _rm(fileName)); } diff --git a/scripts/test.ts b/scripts/test.ts index 4a1ce971ac..82b2162af0 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -152,10 +152,9 @@ glob.sync('packages/**/*.spec.ts') }); export default function (args: ParsedArgs, logger: logging.Logger) { - let regex = 'packages/**/*_spec.ts'; - if (args.glob) { - regex = `packages/**/${args.glob}/**/*_spec.ts`; - } + const packageGlob = args.glob ? `**/${args.glob}/**` : '**'; + const specGlob = args.big ? '*_spec_big.ts' : '*_spec.ts'; + const regex = `packages/${packageGlob}/${specGlob}`; if (args['code-coverage']) { runner.env.addReporter(new IstanbulReporter()); From 7b4f4addc8c49a7682b2d6e3adbea07327421d4a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Feb 2018 14:04:48 +0000 Subject: [PATCH 148/724] ci: fix node modules cache on circleci --- .circleci/config.yml | 92 +++++++++++++++++++++----------------------- package.json | 4 +- 2 files changed, 46 insertions(+), 50 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4b39b9656..e9fc3a48b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,48 +8,47 @@ _defaults: &defaults _post_checkout: &post_checkout post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge" +_root_package_lock_key: &_root_package_lock_key + key: angular_devkit-{{ checksum "package-lock.json" }} + jobs: - lint: + install: <<: *defaults steps: - - checkout: - <<: *post_checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: npm install --no-save + - save_cache: + <<: *_root_package_lock_key + paths: + - "node_modules" + + lint: + <<: *defaults + steps: + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: npm run lint validate: <<: *defaults steps: - - checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - - - run: npm install --no-save + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: npm run validate -- --ci test: <<: *defaults steps: - - checkout: - <<: *post_checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - - - run: npm install --no-save + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: npm run test -- --code-coverage --full test-big: <<: *defaults steps: - - checkout: - <<: *post_checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - - - run: npm install --no-save + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: npm run test -- --code-coverage --full --big integration: @@ -64,7 +63,6 @@ jobs: - restore_cache: key: angular_devkit-integration-aio-{{ checksum "tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json" }} - - run: npm install --no-save - run: xvfb-run -a npm run integration - save_cache: @@ -79,29 +77,22 @@ jobs: build: <<: *defaults steps: - - checkout: - <<: *post_checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key + - run: npm run admin -- build + build-bazel: + <<: *defaults + steps: + - checkout: *post_checkout - run: bazel run @nodejs//:npm install - run: bazel build //packages/... - - run: npm run admin -- build - - - save_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - paths: - - "node_modules" snapshot_publish: <<: *defaults steps: - - checkout: - <<: *post_checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - - - run: npm install --no-save + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: name: Decrypt Credentials command: | @@ -114,12 +105,8 @@ jobs: publish: <<: *defaults steps: - - checkout: - <<: *post_checkout - - restore_cache: - key: angular_devkit-{{ checksum "package-lock.json" }} - - - run: npm install --no-save + - checkout: *post_checkout + - restore_cache: *_root_package_lock_key - run: name: Decrypt Credentials command: | @@ -133,12 +120,21 @@ workflows: version: 2 default_workflow: jobs: - - lint - - validate + - install + - lint: + requires: + - install + - validate: + requires: + - install - build: requires: - lint - validate + - build-bazel: + requires: + - lint + - validate - test: requires: - build diff --git a/package.json b/package.json index ab2cb950bb..0cf7ac833b 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "validate-commits": "./bin/devkit-admin validate-commits", "integration": "npm run build && npm run integration:build-optimizer", "integration:build-optimizer": "npm run integration:build-optimizer:simple && npm run integration:build-optimizer:aio", - "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark", - "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q && npm run reinstall-bo && npm run e2e && npm run benchmark", + "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q --no-save && npm run e2e && npm run benchmark", + "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q --no-save && npm run e2e && npm run benchmark", "postinstall": "npm run admin -- patch-dependencies", "prepush": "node ./bin/devkit-admin hooks/pre-push" }, From 6f10ed034c1b35ce91c1fde76dad89f2e4084a76 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 27 Feb 2018 19:00:11 +0000 Subject: [PATCH 149/724] fix(@angular-devkit/architect): return copy of target props JSON validation changes objects and we don't want the original properties to be modified. --- packages/angular_devkit/architect/src/architect.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 55e4e48742..f97ee1dd78 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -162,7 +162,9 @@ export class Architect { } as OptionsT, }; - return target; + // Return a copy of the target object, JSON validation changes objects and we don't + // want the original properties to be modified. + return JSON.parse(JSON.stringify(target)); } // Will run the target using the target. From 8d967f88913cba261bf4184163eb95cdb02d3364 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Feb 2018 16:53:33 +0000 Subject: [PATCH 150/724] docs(@angular-devkit/architect): add comment for protobuff api --- packages/angular_devkit/architect/src/builder.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts index ff875af14f..916e92817b 100644 --- a/packages/angular_devkit/architect/src/builder.ts +++ b/packages/angular_devkit/architect/src/builder.ts @@ -20,6 +20,7 @@ export interface BuilderContext { // TODO: use Build Event Protocol // https://docs.bazel.build/versions/master/build-event-protocol.html // https://github.com/googleapis/googleapis/tree/master/google/devtools/build/v1 +// http://dcode.io/protobuf.js/Message.html#toJSON export interface BuildEvent { success: boolean; } From 29c26464623ff6c500bf1a34552fd46d4e9859c8 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Feb 2018 15:13:54 +0000 Subject: [PATCH 151/724] fix(@angular-devkit/build-webpack): fixes from adding Angular CLI tests --- package-lock.json | 158 +++++- package.json | 12 +- .../angular_devkit/build_webpack/package.json | 1 + .../angular-cli-files/models/build-options.ts | 13 +- .../models/webpack-configs/browser.ts | 28 +- .../models/webpack-configs/common.ts | 35 +- .../models/webpack-configs/production.ts | 2 +- .../models/webpack-configs/styles.ts | 12 +- .../models/webpack-configs/test.ts | 5 +- .../models/webpack-configs/typescript.ts | 59 +- ...w-error.ts => karma-webpack-failure-cb.ts} | 6 +- .../src/angular-cli-files/plugins/karma.ts | 55 +- .../build_webpack/src/browser/index.ts | 178 +++--- .../src/browser/index_spec_big.ts | 93 ---- .../build_webpack/src/browser/schema.json | 5 + .../build_webpack/src/dev-server/index.ts | 30 +- .../src/dev-server/index_spec_big.ts | 70 --- .../build_webpack/src/extract-i18n/index.ts | 15 +- .../src/extract-i18n/index_spec_big.ts | 57 -- .../src/extract-i18n/schema.json | 2 +- .../build_webpack/src/karma/index.ts | 15 +- .../build_webpack/src/karma/index_spec_big.ts | 65 --- .../build_webpack/src/karma/schema.json | 12 +- .../build_webpack/src/protractor/index.ts | 10 +- .../src/protractor/index_spec_big.ts | 45 -- .../build_webpack/src/tslint/index.ts | 26 +- .../src/tslint/index_spec_big.ts | 55 -- .../build_webpack/src/tslint/schema.json | 6 +- .../test/browser/allow-js_spec_big.ts | 47 ++ .../test/browser/aot_spec_big.ts | 36 ++ .../test/browser/assets_spec_big.ts | 103 ++++ .../test/browser/base-href_spec_big.ts | 41 ++ .../test/browser/build-optimizer_spec_big.ts | 35 ++ .../browser/circular-dependency_spec_big.ts | 41 ++ .../browser/custom-lazy-modules_spec_big.ts | 57 ++ .../test/browser/deploy-url_spec_big.ts | 60 ++ .../test/browser/errors_spec_big.ts | 70 +++ .../browser/file-replacements_spec_big.ts | 99 ++++ .../test/browser/i18n_spec_big.ts | 133 +++++ .../test/browser/lazy-module_spec_big.ts | 185 +++++++ .../browser/license-extraction_spec_big.ts | 36 ++ .../test/browser/no-entry-module_spec_big.ts | 34 ++ .../browser/optimization-level_spec_big.ts | 53 ++ .../test/browser/output-hashing_spec_big.ts | 174 ++++++ .../test/browser/output-path_spec_big.ts | 46 ++ .../test/browser/poll_spec_big.ts | 48 ++ .../test/browser/rebuild_spec_big.ts | 365 +++++++++++++ .../test/browser/scripts-array_spec_big.ts | 140 +++++ .../test/browser/source-map_spec_big.ts | 63 +++ .../test/browser/stats-json_spec_big.ts | 35 ++ .../test/browser/styles_spec_big.ts | 515 ++++++++++++++++++ .../browser/subresource-integrity_spec_big.ts | 41 ++ .../test/browser/tsconfig-paths_spec_big.ts | 87 +++ .../test/browser/vendor-chunk_spec_big.ts | 35 ++ .../test/browser/works_spec_big.ts | 39 ++ .../test/dev-server/proxy_spec_big.ts | 79 +++ .../test/dev-server/public-host_spec_big.ts | 76 +++ .../test/dev-server/serve-path_spec_big.ts | 48 ++ .../test/dev-server/ssl_spec_big.ts | 121 ++++ .../test/dev-server/works_spec_big.ts | 42 ++ .../test/extract-i18n/works_spec_big.ts | 142 +++++ .../test/karma/assets_spec_big.ts | 105 ++++ .../test/karma/code-coverage_spec_big.ts | 63 +++ .../test/karma/rebuilds_spec_big.ts | 73 +++ .../test/karma/works_spec_big.ts | 46 ++ .../test/protractor/works_spec_big.ts | 111 ++++ .../test/tslint/works_spec_big.ts | 164 ++++++ .../test/utils/default-workspaces.ts | 130 +++++ .../build_webpack/test/utils/index.ts | 12 + .../build_webpack/test/utils/request.ts | 29 + .../build_webpack/test/utils/test-logger.ts | 30 + .../test/utils/test-project-host.ts | 170 ++++++ .../angular_devkit/core/src/utils/literals.ts | 2 +- scripts/validate-licenses.ts | 3 + .../build_webpack/hello-world-app/.gitignore | 48 +- .../hello-world-app/karma.conf.js | 3 + .../hello-world-app/src/spectrum.png | Bin 0 -> 30822 bytes .../src/src/locale/messages.xlf | 18 + 78 files changed, 4528 insertions(+), 675 deletions(-) rename packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/{karma-webpack-throw-error.ts => karma-webpack-failure-cb.ts} (73%) delete mode 100644 packages/angular_devkit/build_webpack/src/browser/index_spec_big.ts delete mode 100644 packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts delete mode 100644 packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts delete mode 100644 packages/angular_devkit/build_webpack/src/karma/index_spec_big.ts delete mode 100644 packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts delete mode 100644 packages/angular_devkit/build_webpack/src/tslint/index_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/assets_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/base-href_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/errors_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/output-path_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/poll_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/stats-json_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/dev-server/works_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/protractor/works_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/tslint/works_spec_big.ts create mode 100644 packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts create mode 100644 packages/angular_devkit/build_webpack/test/utils/index.ts create mode 100644 packages/angular_devkit/build_webpack/test/utils/request.ts create mode 100644 packages/angular_devkit/build_webpack/test/utils/test-logger.ts create mode 100644 packages/angular_devkit/build_webpack/test/utils/test-project-host.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/spectrum.png create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/src/locale/messages.xlf diff --git a/package-lock.json b/package-lock.json index 7b28b4afbc..1a55993277 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,17 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@angular-devkit/build-optimizer": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.4.2.tgz", + "integrity": "sha512-9DHZ60Pd0Wr1ctD5DWhAQ3B8r+KlsNgfUo/oGjg6bArd19bwuOuxiMQjH4E+aNa14HPdJRMrhc+M7VU67mW5Mg==", + "requires": { + "loader-utils": "1.1.0", + "source-map": "0.5.7", + "typescript": "2.7.2", + "webpack-sources": "1.1.0" + } + }, "@angular/common": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.2.tgz", @@ -39,6 +50,22 @@ "tslib": "1.8.1" } }, + "@angular/http": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.6.tgz", + "integrity": "sha512-8ecA0HrDY88vO9YKl6aG82budd0+vwFoECmZ9xRCiNu+HqlgJ7siyLzwdjllmoi90pJbvhQITytfy2zEmDBNIA==", + "requires": { + "tslib": "1.8.1" + } + }, + "@angular/material": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-5.2.3.tgz", + "integrity": "sha512-v6IGxGWaeALgBH8+kt2Q9K32zmJQH193bWdCeWmtXk0vJlj3NTiWYy+vLoZQ8aPIAtOqCKCmhf5VrerkS6pgww==", + "requires": { + "tslib": "1.8.1" + } + }, "@angular/platform-browser": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.2.tgz", @@ -55,6 +82,14 @@ "tslib": "1.8.1" } }, + "@angular/router": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.6.tgz", + "integrity": "sha512-10Otnr5nmDWrlCpR5DTuDZmLj2hGf8WX1yFkfQ8H4EJWYe3YCTwGvz5D/smrWL6m6I2rOFgYOO3rFj9iYvMumA==", + "requires": { + "tslib": "1.8.1" + } + }, "@angular/service-worker": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.1.tgz", @@ -69,13 +104,9 @@ "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, "@ngtools/webpack": { - "version": "1.10.0-rc.0", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.10.0-rc.0.tgz", - "integrity": "sha512-GVPBEtg8ScBGwczBej5MgCuBMDA4HoiT3Q1m7J2mXW8+K8GeSsbmSsY0p5ckDHLuEyP8RkbF/NHEkSdhLd9OMQ==", + "version": "github:angular/ngtools-webpack-builds#d77ee7936501054873229fa82d498bd87b8426c2", "requires": { "chalk": "2.2.2", - "enhanced-resolve": "3.4.1", - "loader-utils": "1.1.0", "magic-string": "0.22.4", "semver": "5.4.1", "source-map": "0.5.7", @@ -83,6 +114,15 @@ "webpack-sources": "1.1.0" } }, + "@types/body-parser": { + "version": "1.16.8", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz", + "integrity": "sha512-BdN2PXxOFnTXFcyONPW6t0fHjz2fvRZHVMFpaS0wYr+Y8fWEaNOs4V8LEu/fpzQlMx+ahdndgTaGTwPC+J/EeA==", + "requires": { + "@types/express": "4.11.1", + "@types/node": "8.9.3" + } + }, "@types/caseless": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", @@ -112,6 +152,25 @@ "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==" }, + "@types/express": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz", + "integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==", + "requires": { + "@types/body-parser": "1.16.8", + "@types/express-serve-static-core": "4.11.1", + "@types/serve-static": "1.13.1" + } + }, + "@types/express-serve-static-core": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz", + "integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==", + "requires": { + "@types/events": "1.1.0", + "@types/node": "8.9.3" + } + }, "@types/form-data": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", @@ -149,6 +208,11 @@ "@types/webpack": "3.8.2" } }, + "@types/mime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -190,6 +254,15 @@ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.4.0.tgz", "integrity": "sha512-PBHCvO98hNec9A491vBbh0ZNDOVxccwKL1u2pm6fs9oDgm7SEnw0lEHqHfjsYryDxnE3zaf7LvERWEXjOp1hig==" }, + "@types/serve-static": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-jDMH+3BQPtvqZVIcsH700Dfi8Q3MIcEx16g/VdxjoqiGR/NntekB10xdBpirMKnPe9z2C5cBmL0vte0YttOr3Q==", + "requires": { + "@types/express-serve-static-core": "4.11.1", + "@types/mime": "2.0.0" + } + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -929,6 +1002,11 @@ "hoek": "2.16.3" } }, + "bootstrap": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0.tgz", + "integrity": "sha512-gulJE5dGFo6Q61V/whS6VM4WIyrlydXfCgkE+Gxe5hjrJ8rXLLZlALq7zq2RPhOc45PSwQpJkrTnc2KgD6cvmA==" + }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -3207,7 +3285,7 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", "requires": { - "accepts": "1.3.4", + "accepts": "1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.2", "content-disposition": "0.5.2", @@ -3226,7 +3304,7 @@ "on-finished": "2.3.0", "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.2", + "proxy-addr": "2.0.3", "qs": "6.5.1", "range-parser": "1.2.0", "safe-buffer": "5.1.1", @@ -3240,11 +3318,11 @@ }, "dependencies": { "accepts": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", - "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { - "mime-types": "2.1.17", + "mime-types": "2.1.18", "negotiator": "0.6.1" } }, @@ -3267,6 +3345,19 @@ "unpipe": "1.0.0" } }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, "qs": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", @@ -3463,6 +3554,11 @@ "debug": "2.6.9" } }, + "font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -5254,9 +5350,9 @@ "optional": true }, "ipaddr.js": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", - "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, "is-absolute-url": { "version": "2.1.0", @@ -5640,6 +5736,24 @@ } } }, + "istanbul-instrumenter-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.0.tgz", + "integrity": "sha512-alLSEFX06ApU75sm5oWcaVNaiss/bgMRiWTct3g0P0ZZTKjR+6QiCcuVOKDI1kWJgwHEnIXsv/dWm783kPpmtw==", + "requires": { + "convert-source-map": "1.5.1", + "istanbul-lib-instrument": "1.9.1", + "loader-utils": "1.1.0", + "schema-utils": "0.3.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" + } + } + }, "istanbul-lib-coverage": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", @@ -9446,12 +9560,12 @@ } }, "proxy-addr": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", - "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", "requires": { "forwarded": "0.1.2", - "ipaddr.js": "1.5.2" + "ipaddr.js": "1.6.0" } }, "proxy-agent": { @@ -11023,6 +11137,14 @@ } } }, + "stats-webpack-plugin": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", + "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", + "requires": { + "lodash": "4.17.4" + } + }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", diff --git a/package.json b/package.json index 0cf7ac833b..53cdb8a1fd 100644 --- a/package.json +++ b/package.json @@ -50,18 +50,23 @@ }, "homepage": "https://github.com/angular/devkit", "dependencies": { + "@angular-devkit/build-optimizer": "^0.4.2", "@angular/common": "^5.2.1", "@angular/compiler": "^5.2.1", "@angular/compiler-cli": "^5.2.1", "@angular/core": "^5.2.1", + "@angular/http": "^5.2.6", + "@angular/material": "^5.2.3", "@angular/platform-browser": "^5.2.1", "@angular/platform-browser-dynamic": "^5.2.1", + "@angular/router": "^5.2.6", "@angular/service-worker": "^5.2.1", "@ngtools/json-schema": "^1.0.9", - "@ngtools/webpack": "^1.10.0-rc.0", + "@ngtools/webpack": "angular/ngtools-webpack-builds#5474750", "@types/common-tags": "^1.4.0", "@types/copy-webpack-plugin": "^4.0.1", "@types/denodeify": "^1.2.31", + "@types/express": "^4.11.1", "@types/glob": "^5.0.29", "@types/istanbul": "^0.4.29", "@types/jasmine": "^2.5.47", @@ -75,6 +80,7 @@ "@types/webpack-sources": "^0.1.3", "ajv": "^5.5.1", "autoprefixer": "^7.2.3", + "bootstrap": "^4.0.0", "chalk": "~2.2.2", "chokidar": "^1.7.0", "circular-dependency-plugin": "^4.3.0", @@ -86,12 +92,15 @@ "css-loader": "^0.28.7", "denodeify": "^1.2.1", "exports-loader": "^0.6.4", + "express": "^4.16.2", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^1.1.5", + "font-awesome": "^4.7.0", "glob": "^7.0.3", "html-webpack-plugin": "^2.30.1", "husky": "^0.14.3", "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.0", "jasmine": "^2.6.0", "jasmine-spec-reporter": "^3.2.0", "karma": "~2.0.0", @@ -126,6 +135,7 @@ "source-map": "^0.5.6", "source-map-loader": "^0.2.3", "source-map-support": "^0.5.0", + "stats-webpack-plugin": "^0.6.2", "style-loader": "^0.19.1", "stylus": "^0.54.5", "stylus-loader": "^3.0.1", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 7da1fe91ab..969e7d2df2 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -46,6 +46,7 @@ "silent-error": "^1.1.0", "source-map-loader": "^0.2.3", "source-map-support": "^0.5.0", + "stats-webpack-plugin": "^0.6.2", "style-loader": "^0.19.1", "stylus": "^0.54.5", "stylus-loader": "^3.0.1", diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts index 210316cb82..f76a121a7a 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts @@ -2,12 +2,12 @@ // TODO: cleanup this file, it's copied as is from Angular CLI. export interface BuildOptions { - target?: string; + optimizationLevel: number; environment?: string; outputPath: string; aot?: boolean; - sourcemaps?: boolean; - evalSourcemaps?: boolean; + sourceMap?: boolean; + evalSourceMap?: boolean; vendorChunk?: boolean; commonChunk?: boolean; baseHref?: string; @@ -18,8 +18,8 @@ export interface BuildOptions { i18nFormat?: string; i18nOutFile?: string; i18nOutFormat?: string; - locale?: string; - missingTranslation?: string; + i18nLocale?: string; + i18nMissingTranslation?: string; extractCss?: boolean; bundleDependencies?: 'none' | 'all'; watch?: boolean; @@ -36,6 +36,8 @@ export interface BuildOptions { forceTsCommonjs?: boolean; serviceWorker?: boolean; skipAppShell?: boolean; + statsJson: boolean; + forkTypeChecker: boolean; } export interface WebpackConfigOptions { @@ -48,4 +50,5 @@ export interface WebpackConfigOptions { export interface WebpackTestOptions extends BuildOptions { codeCoverage?: boolean; + codeCoverageExclude: string[]; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts index 1c37fc8dd7..f8c6f899b7 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -1,14 +1,12 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import * as fs from 'fs'; import * as webpack from 'webpack'; import * as path from 'path'; const HtmlWebpackPlugin = require('html-webpack-plugin'); const SubresourceIntegrityPlugin = require('webpack-subresource-integrity'); import { packageChunkSort } from '../../utilities/package-chunk-sort'; -import { findUp } from '../../utilities/find-up'; import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; import { extraEntryParser, lazyChunksFilter } from './utils'; import { WebpackConfigOptions } from '../build-options'; @@ -28,32 +26,18 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { ]); if (buildOptions.vendorChunk) { - // Separate modules from node_modules into a vendor chunk. - // const nodeModules = path.resolve(projectRoot, 'node_modules'); - const nodeModules = findUp('node_modules', projectRoot); - if (!nodeModules) { - throw new Error('Cannot locale node_modules directory.') - } - // Resolves all symlink to get the actual node modules folder. - const realNodeModules = fs.realpathSync(nodeModules); - // --aot puts the generated *.ngfactory.ts in src/$$_gendir/node_modules. - const genDirNodeModules = path.resolve(appRoot, '$$_gendir', 'node_modules'); - extraPlugins.push(new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', chunks: ['main'], - minChunks: (module: any) => { - return module.resource - && ( module.resource.startsWith(nodeModules) - || module.resource.startsWith(genDirNodeModules) - || module.resource.startsWith(realNodeModules)); - } + minChunks: (module: any) => + module.resource && /[\\\/]node_modules[\\\/]/.test(module.resource) })); } - if (buildOptions.sourcemaps) { + if (buildOptions.sourceMap) { + // TODO: see if this is still needed with webpack 4 'mode'. // See https://webpack.js.org/configuration/devtool/ for sourcemap types. - if (buildOptions.evalSourcemaps && buildOptions.target === 'development') { + if (buildOptions.evalSourceMap && buildOptions.optimizationLevel === 0) { // Produce eval sourcemaps for development with serve, which are faster. extraPlugins.push(new webpack.EvalSourceMapDevToolPlugin({ moduleFilenameTemplate: '[resource-path]', @@ -102,7 +86,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { chunksSortMode: packageChunkSort(appConfig), excludeChunks: lazyChunks, xhtml: true, - minify: buildOptions.target === 'production' ? { + minify: buildOptions.optimizationLevel === 1? { caseSensitive: true, collapseWhitespace: true, keepClosingSlash: true diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts index 5e05ebbd7a..a37ef0f41e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -14,6 +14,7 @@ import { findUp } from '../../utilities/find-up'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); +const StatsPlugin = require('stats-webpack-plugin'); const SilentError = require('silent-error'); /** @@ -33,7 +34,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { const appRoot = path.resolve(projectRoot, appConfig.root); const nodeModules = findUp('node_modules', projectRoot); if (!nodeModules) { - throw new Error('Cannot locale node_modules directory.') + throw new Error('Cannot locate node_modules directory.') } let extraPlugins: any[] = []; @@ -76,7 +77,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { const hash = script.lazy ? '' : hashFormat.script; extraPlugins.push(new ScriptsWebpackPlugin({ name: script.entry, - sourceMap: buildOptions.sourcemaps, + sourceMap: buildOptions.sourceMap, filename: `${script.entry}${hash}.bundle.js`, scripts: script.paths, basePath: projectRoot, @@ -98,17 +99,18 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // Prevent asset configurations from writing outside of the output path, except if the user // specify a configuration flag. // Also prevent writing outside the project path. That is not overridable. - const absoluteOutputPath = path.resolve(buildOptions.outputPath as string); + const absoluteOutputPath = path.resolve(projectRoot, buildOptions.outputPath as string); const absoluteAssetOutput = path.resolve(absoluteOutputPath, asset.output); const outputRelativeOutput = path.relative(absoluteOutputPath, absoluteAssetOutput); if (outputRelativeOutput.startsWith('..') || path.isAbsolute(outputRelativeOutput)) { - const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); - if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) { - const message = 'An asset cannot be written to a location outside the project.'; - throw new SilentError(message); - } + // const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); + // TODO: This check doesn't make a lot of sense anymore with multiple project. Review it. + // if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) { + // const message = 'An asset cannot be written to a location outside the project.'; + // throw new SilentError(message); + // } if (!asset.allowOutsideOutDir) { const message = 'An asset cannot be written to a location outside of the output path. ' @@ -118,12 +120,13 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } } + // TODO: This check doesn't make a lot of sense anymore with multiple project. Review it. // Prevent asset configurations from reading files outside of the project. - const projectRelativeInput = path.relative(projectRoot, asset.input); - if (projectRelativeInput.startsWith('..') || path.isAbsolute(projectRelativeInput)) { - const message = 'An asset cannot be read from a location outside the project.'; - throw new SilentError(message); - } + // const projectRelativeInput = path.relative(projectRoot, asset.input); + // if (projectRelativeInput.startsWith('..') || path.isAbsolute(projectRelativeInput)) { + // const message = 'An asset cannot be read from a location outside the project.'; + // throw new SilentError(message); + // } // Ensure trailing slash. if (isDirectory(path.resolve(asset.input))) { @@ -170,12 +173,16 @@ export function getCommonConfig(wco: WebpackConfigOptions) { })); } + if (buildOptions.statsJson) { + extraPlugins.push(new StatsPlugin('stats.json', 'verbose')); + } + if (buildOptions.buildOptimizer) { extraRules.push({ test: /\.js$/, use: [{ loader: '@angular-devkit/build-optimizer/webpack-loader', - options: { sourceMap: buildOptions.sourcemaps } + options: { sourceMap: buildOptions.sourceMap } }] }); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts index 8faa0e903e..b62cbd168c 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts @@ -153,7 +153,7 @@ export function getProdConfig(wco: WebpackConfigOptions) { ...extraPlugins, // Uglify should be the last plugin as PurifyPlugin needs to be before it. new UglifyJSPlugin({ - sourceMap: buildOptions.sourcemaps, + sourceMap: buildOptions.sourceMap, parallel: true, uglifyOptions: { ecma: wco.supportES2015 ? 6 : 5, diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts index 7811292dda..d5afd1f073 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts @@ -10,6 +10,7 @@ import { extraEntryParser, getOutputHashFormat } from './utils'; import { WebpackConfigOptions } from '../build-options'; // import { pluginArgs, postcssArgs } from '../../tasks/eject'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; +import { findUp } from '../../utilities/find-up'; const postcssUrl = require('postcss-url'); const autoprefixer = require('autoprefixer'); @@ -45,12 +46,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) { const entryPoints: { [key: string]: string[] } = {}; const globalStylePaths: string[] = []; const extraPlugins: any[] = []; - const cssSourceMap = buildOptions.sourcemaps; + const cssSourceMap = buildOptions.sourceMap; // Maximum resource size to inline (KiB) const maximumInlineSize = 10; // Minify/optimize css in production. - const minimizeCss = buildOptions.target === 'production'; + const minimizeCss = buildOptions.optimizationLevel === 1; // Convert absolute resource URLs to account for base-href and deploy-url. const baseHref = wco.buildOptions.baseHref || ''; const deployUrl = wco.buildOptions.deployUrl || ''; @@ -90,7 +91,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) { postcssUrl({ filter: ({ url }: PostcssUrlAsset) => url.startsWith('~'), url: ({ url }: PostcssUrlAsset) => { - const fullPath = path.join(projectRoot, 'node_modules', url.substr(1)); + // Note: This will only find the first node_modules folder. + const nodeModules = findUp('node_modules', projectRoot); + if (!nodeModules) { + throw new Error('Cannot locate node_modules directory.') + } + const fullPath = path.join(nodeModules, url.substr(1)); return path.relative(loader.context, fullPath).replace(/\\/g, '/'); } }), diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts index f4449f08d9..98a179e723 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts @@ -27,8 +27,7 @@ export function getTestConfig(wco: WebpackConfigOptions) { // if (buildOptions.codeCoverage && CliConfig.fromProject()) { if (buildOptions.codeCoverage) { - // const codeCoverageExclude = CliConfig.fromProject().get('test.codeCoverage.exclude'); - const codeCoverageExclude: string[] = []; + const codeCoverageExclude = buildOptions.codeCoverageExclude; let exclude: (string | RegExp)[] = [ /\.(e2e|spec)\.ts$/, /node_modules/ @@ -58,7 +57,7 @@ export function getTestConfig(wco: WebpackConfigOptions) { 'browser', 'module', 'main' ] }, - devtool: buildOptions.sourcemaps ? 'inline-source-map' : 'eval', + devtool: buildOptions.sourceMap ? 'inline-source-map' : 'eval', entry: { main: path.resolve(projectRoot, appConfig.root, appConfig.main) }, diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index bf65ade398..a34b7df6ce 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -4,8 +4,6 @@ import * as path from 'path'; import { stripIndent } from 'common-tags'; import { - AotPlugin, - AotPluginOptions, AngularCompilerPlugin, AngularCompilerPluginOptions, PLATFORM @@ -23,6 +21,7 @@ const webpackLoader: string = g['angularCliIsLocal'] function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = true) { const { appConfig, projectRoot, buildOptions } = wco; + const appRoot = path.resolve(projectRoot, appConfig.root); options.compilerOptions = options.compilerOptions || {}; if (wco.buildOptions.preserveSymlinks) { @@ -74,7 +73,6 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru throw new SilentError(`Environment "${buildOptions.environment}" does not exist.`); } - const appRoot = path.resolve(projectRoot, appConfig.root); const sourcePath = appConfig.environmentSource; const envFile = appConfig.environments[buildOptions.environment as any]; @@ -83,35 +81,24 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru }; } - if (AngularCompilerPlugin.isSupported()) { - const pluginOptions: AngularCompilerPluginOptions = Object.assign({}, { - mainPath: useMain ? path.join(projectRoot, appConfig.root, appConfig.main) : undefined, - i18nInFile: buildOptions.i18nFile, - i18nInFormat: buildOptions.i18nFormat, - i18nOutFile: buildOptions.i18nOutFile, - i18nOutFormat: buildOptions.i18nOutFormat, - locale: buildOptions.locale, - platform: appConfig.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser, - missingTranslation: buildOptions.missingTranslation, - hostReplacementPaths, - sourceMap: buildOptions.sourcemaps, - }, options); - return new AngularCompilerPlugin(pluginOptions); - } else { - const pluginOptions: AotPluginOptions = Object.assign({}, { - mainPath: path.join(projectRoot, appConfig.root, appConfig.main), - i18nFile: buildOptions.i18nFile, - i18nFormat: buildOptions.i18nFormat, - locale: buildOptions.locale, - replaceExport: appConfig.platform === 'server', - missingTranslation: buildOptions.missingTranslation, - hostReplacementPaths, - sourceMap: buildOptions.sourcemaps, - // If we don't explicitely list excludes, it will default to `['**/*.spec.ts']`. - exclude: [] - }, options); - return new AotPlugin(pluginOptions); - } + let i18nInFile = buildOptions.i18nFile + ? path.resolve(appRoot, buildOptions.i18nFile) + : undefined; + + const pluginOptions: AngularCompilerPluginOptions = Object.assign({}, { + mainPath: useMain ? path.join(projectRoot, appConfig.root, appConfig.main) : undefined, + i18nInFile: i18nInFile, + i18nInFormat: buildOptions.i18nFormat, + i18nOutFile: buildOptions.i18nOutFile, + i18nOutFormat: buildOptions.i18nOutFormat, + locale: buildOptions.i18nLocale, + platform: appConfig.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser, + missingTranslation: buildOptions.i18nMissingTranslation, + hostReplacementPaths, + sourceMap: buildOptions.sourceMap, + forkTypeChecker: buildOptions.forkTypeChecker + }, options); + return new AngularCompilerPlugin(pluginOptions); } export function getNonAotConfig(wco: WebpackConfigOptions) { @@ -120,7 +107,7 @@ export function getNonAotConfig(wco: WebpackConfigOptions) { return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, - plugins: [ _createAotPlugin(wco, { tsConfigPath, skipCodeGeneration: true }) ] + plugins: [_createAotPlugin(wco, { tsConfigPath, skipCodeGeneration: true })] }; } @@ -134,7 +121,7 @@ export function getAotConfig(wco: WebpackConfigOptions) { if (buildOptions.buildOptimizer) { boLoader = [{ loader: '@angular-devkit/build-optimizer/webpack-loader', - options: { sourceMap: buildOptions.sourcemaps } + options: { sourceMap: buildOptions.sourceMap } }]; } @@ -144,7 +131,7 @@ export function getAotConfig(wco: WebpackConfigOptions) { return { module: { rules: [{ test, use: [...boLoader, webpackLoader] }] }, - plugins: [ _createAotPlugin(wco, pluginOptions) ] + plugins: [_createAotPlugin(wco, pluginOptions)] }; } @@ -163,6 +150,6 @@ export function getNonAotTestConfig(wco: WebpackConfigOptions) { return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, - plugins: [ _createAotPlugin(wco, pluginOptions, false) ] + plugins: [_createAotPlugin(wco, pluginOptions, false)] }; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts similarity index 73% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts rename to packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts index 2844ab6025..cefda6491a 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-throw-error.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts @@ -4,13 +4,13 @@ // Force Webpack to throw compilation errors. Useful with karma-webpack when in single-run mode. // Workaround for https://github.com/webpack-contrib/karma-webpack/issues/66 -export class KarmaWebpackThrowError { - constructor() { } +export class KarmaWebpackFailureCb { + constructor(private callback: () => void) { } apply(compiler: any): void { compiler.plugin('done', (stats: any) => { if (stats.compilation.errors.length > 0) { - throw new Error(stats.compilation.errors.map((err: any) => err.message || err)); + this.callback(); } }); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts index e5459978e4..e26534f29e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts @@ -9,7 +9,7 @@ const webpackDevMiddleware = require('webpack-dev-middleware'); import { AssetPattern } from '../models/webpack-configs/utils'; import { isDirectory } from '../utilities/is-directory'; -import { KarmaWebpackThrowError } from './karma-webpack-throw-error'; +import { KarmaWebpackFailureCb } from './karma-webpack-failure-cb'; /** * Enumerate needed (but not require/imported) dependencies from this file @@ -22,6 +22,8 @@ import { KarmaWebpackThrowError } from './karma-webpack-throw-error'; let blocked: any[] = []; let isBlocked = false; +let successCb: () => void; +let failureCb: () => void; // Add files to the Karma files array. function addKarmaFiles(files: any[], newFiles: any[], prepend = false) { @@ -49,10 +51,13 @@ function addKarmaFiles(files: any[], newFiles: any[], prepend = false) { const init: any = (config: any, emitter: any, customFileHandlers: any) => { const options: any = config.webpackBuildFacade.options; const appRoot = path.join(config.basePath, options.root); + successCb = config.webpackBuildFacade.successCb; + failureCb = config.webpackBuildFacade.failureCb; - if (options.sourcemaps) { - // Add a reporter that fixes sourcemap urls. - config.reporters.unshift('@angular-devkit/build-webpack'); + config.reporters.unshift('@angular-devkit/build-webpack--event-reporter'); + // Add a reporter that fixes sourcemap urls. + if (options.sourceMap) { + config.reporters.unshift('@angular-devkit/build-webpack--sourcemap-reporter'); // Code taken from https://github.com/tschaub/karma-source-map-support. // We can't use it directly because we need to add it conditionally in this file, and karma @@ -118,10 +123,9 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { } }; - // If Karma is being ran in single run mode, throw errors. - if (config.singleRun) { - webpackConfig.plugins.push(new KarmaWebpackThrowError()); - } + // Finish Karma run early in case of compilation error. + const compilationErrorCb = () => emitter.emit('run_complete', [], { exitCode: 1 }); + webpackConfig.plugins.push(new KarmaWebpackFailureCb(compilationErrorCb)); // Use existing config if any. config.webpack = Object.assign(webpackConfig, config.webpack); @@ -140,7 +144,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { // Add the request blocker. config.beforeMiddleware = config.beforeMiddleware || []; - config.beforeMiddleware.push('devkitBuildWebpackBlocker'); + config.beforeMiddleware.push('@angular-devkit/build-webpack--blocker'); // Delete global styles entry, we don't want to load them. delete webpackConfig.entry.styles; @@ -227,10 +231,6 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { init.$inject = ['config', 'emitter', 'customFileHandlers']; -// Dummy preprocessor, just to keep karma from showing a warning. -const preprocessor: any = () => (content: any, _file: string, done: any) => done(null, content); -preprocessor.$inject = []; - // Block requests until the Webpack compilation is done. function requestBlocker() { return function (_request: any, _response: any, next: () => void) { @@ -242,8 +242,23 @@ function requestBlocker() { }; } +// Emits builder events. +const eventReporter: any = function (this: any, baseReporterDecorator: any) { + baseReporterDecorator(this); + + this.onRunComplete = function (_browsers: any, results: any) { + if (results.exitCode === 0) { + successCb && successCb(); + } else { + failureCb && failureCb(); + } + } +}; + +eventReporter.$inject = ['baseReporterDecorator']; + // Strip the server address and webpack scheme (webpack://) from error log. -const initSourcemapReporter: any = function (this: any, baseReporterDecorator: any) { +const sourceMapReporter: any = function (this: any, baseReporterDecorator: any) { baseReporterDecorator(this); const urlRegexp = /\(http:\/\/localhost:\d+\/_karma_webpack_\/webpack:\//gi; @@ -256,11 +271,11 @@ const initSourcemapReporter: any = function (this: any, baseReporterDecorator: a }; }; -initSourcemapReporter.$inject = ['baseReporterDecorator']; +sourceMapReporter.$inject = ['baseReporterDecorator']; -module.exports = Object.assign({ +module.exports = { 'framework:@angular-devkit/build-webpack': ['factory', init], - 'preprocessor:@angular-devkit/build-webpack': ['factory', preprocessor], - 'reporter:@angular-devkit/build-webpack': ['type', initSourcemapReporter], - 'middleware:devkitBuildWebpackBlocker': ['factory', requestBlocker] -}); + 'reporter:@angular-devkit/build-webpack--sourcemap-reporter': ['type', sourceMapReporter], + 'reporter:@angular-devkit/build-webpack--event-reporter': ['type', eventReporter], + 'middleware:@angular-devkit/build-webpack--blocker': ['factory', requestBlocker] +}; diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index c3a5d2897f..bd13a9acd4 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -7,10 +7,10 @@ */ import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; -import { getSystemPath } from '@angular-devkit/core'; -import { writeFileSync } from 'fs'; -import { resolve } from 'path'; +import { Path, getSystemPath, normalize, resolve } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; +import { of } from 'rxjs/observable/of'; +import { concat, concatMap } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import * as webpack from 'webpack'; import { @@ -58,6 +58,7 @@ export interface BrowserBuilderOptions { subresourceIntegrity: boolean; serviceWorker: boolean; skipAppShell: boolean; + forkTypeChecker: boolean; // Options with no defaults. // TODO: reconsider this list. @@ -119,95 +120,99 @@ export class BrowserBuilder implements Builder { constructor(public context: BuilderContext) { } run(target: Target): Observable { - return new Observable(obs => { - const root = getSystemPath(target.root); - const options = target.options; - - // Ensure Build Optimizer is only used with AOT. - if (options.buildOptimizer && !options.aot) { - throw new Error('The `--build-optimizer` option cannot be used without `--aot`.'); - } - - if (options.deleteOutputPath) { - // TODO: do this in a webpack plugin https://github.com/johnagan/clean-webpack-plugin - // fs.removeSync(resolve(options.root, options.outputPath)); - } - - const webpackConfig = this.buildWebpackConfig(root, options); - const webpackCompiler = webpack(webpackConfig); - const statsConfig = getWebpackStatsConfig(options.verbose); - - const callback: webpack.compiler.CompilerCallback = (err, stats) => { - if (err) { - return obs.error(err); + const options = target.options; + + // TODO: verify using of(null) to kickstart things is a pattern. + return of(null).pipe( + concatMap(() => options.deleteOutputPath + ? this._deleteOutputDir(target.root, normalize(options.outputPath)) + : of(null)), + concatMap(() => new Observable(obs => { + // Ensure Build Optimizer is only used with AOT. + if (options.buildOptimizer && !options.aot) { + throw new Error('The `--build-optimizer` option cannot be used without `--aot`.'); } - const json = stats.toJson('verbose'); - if (options.verbose) { - this.context.logger.info(stats.toString(statsConfig)); - } else { - this.context.logger.info(statsToString(json, statsConfig)); - } - - if (stats.hasWarnings()) { - this.context.logger.warn(statsWarningsToString(json, statsConfig)); - } - if (stats.hasErrors()) { - this.context.logger.error(statsErrorsToString(json, statsConfig)); - } - - // TODO: what should these events look like and contain? - obs.next({ success: true }); + let webpackConfig; + try { + webpackConfig = this.buildWebpackConfig(target.root, options); + } catch (e) { + // TODO: why do I have to catch this error? I thought throwing inside an observable + // always got converted into an error. + obs.error(e); - if (options.watch) { return; - } else if (options.statsJson) { - writeFileSync( - resolve(root, options.outputPath, 'stats.json'), - JSON.stringify(stats.toJson(), null, 2), - ); } - - if (stats.hasErrors()) { - obs.error(); - } else { - // if (!!app.serviceWorker && runTaskOptions.target === 'production' && - // usesServiceWorker(this.project.root) && runTaskOptions.serviceWorker !== false) { - // const appRoot = path.resolve(this.project.root, app.root); - // augmentAppWithServiceWorker(this.project.root, appRoot, path.resolve(outputPath), - // runTaskOptions.baseHref || '/') - // .then(() => resolve(), (err: any) => reject(err)); - // } else { - obs.complete(); + const webpackCompiler = webpack(webpackConfig); + const statsConfig = getWebpackStatsConfig(options.verbose); + + const callback: webpack.compiler.CompilerCallback = (err, stats) => { + if (err) { + return obs.error(err); + } + + const json = stats.toJson('verbose'); + if (options.verbose) { + this.context.logger.info(stats.toString(statsConfig)); + } else { + this.context.logger.info(statsToString(json, statsConfig)); + } + + if (stats.hasWarnings()) { + this.context.logger.warn(statsWarningsToString(json, statsConfig)); + } + if (stats.hasErrors()) { + this.context.logger.error(statsErrorsToString(json, statsConfig)); + } + + obs.next({ success: !stats.hasErrors() }); + + if (options.watch) { + // Never complete on watch mode. + return; + } else { + // if (!!app.serviceWorker && runTaskOptions.target === 'production' && + // usesServiceWorker(this.project.root) && runTaskOptions.serviceWorker !== false) { + // const appRoot = path.resolve(this.project.root, app.root); + // augmentAppWithServiceWorker(this.project.root, appRoot, path.resolve(outputPath), + // runTaskOptions.baseHref || '/') + // .then(() => resolve(), (err: any) => reject(err)); + // } + obs.complete(); + } + }; + + try { + if (options.watch) { + const watching = webpackCompiler.watch({ poll: options.poll }, callback); + + // Teardown logic. Close the watcher when unsubscribed from. + return () => watching.close(() => { }); + } else { + webpackCompiler.run(callback); + } + } catch (err) { + if (err) { + this.context.logger.error( + '\nAn error occured during the build:\n' + ((err && err.stack) || err)); + } + throw err; } - }; - - try { - // if (options.watch) { - // webpackCompiler.watch({ poll: options.poll }, callback); - // } else { - webpackCompiler.run(callback); - // } - } catch (err) { - if (err) { - this.context.logger.error( - '\nAn error occured during the build:\n' + ((err && err.stack) || err)); - } - throw err; - } - }); + })), + ); } - buildWebpackConfig(projectRoot: string, options: BrowserBuilderOptions) { + buildWebpackConfig(root: Path, options: BrowserBuilderOptions) { + const systemRoot = getSystemPath(root); let wco: WebpackConfigOptions; // TODO: make target defaults into configurations instead // options = this.addTargetDefaults(options); - const tsconfigPath = resolve(projectRoot, options.tsConfig as string); - const tsConfig = readTsconfig(tsconfigPath); + const tsconfigPath = normalize(resolve(root, normalize(options.tsConfig as string))); + const tsConfig = readTsconfig(getSystemPath(tsconfigPath)); - const projectTs = requireProjectModule(projectRoot, 'typescript') as typeof ts; + const projectTs = requireProjectModule(systemRoot, 'typescript') as typeof ts; const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 && tsConfig.options.target !== projectTs.ScriptTarget.ES5; @@ -218,7 +223,7 @@ export class BrowserBuilder implements Builder { (options as any).root = ''; // tslint:disable-line:no-any wco = { - projectRoot, + projectRoot: systemRoot, // TODO: use only this.options, it contains all flags and configs items already. buildOptions: options, appConfig: options, @@ -253,6 +258,21 @@ export class BrowserBuilder implements Builder { return webpackMerge(webpackConfigs); } + + private _deleteOutputDir(root: Path, outputPath: Path) { + const resolvedOutputPath = resolve(root, outputPath); + if (resolvedOutputPath === root) { + throw new Error('Output path MUST not be project root directory!'); + } + + return this.context.host.exists(resolvedOutputPath).pipe( + concatMap(exists => exists + // TODO: remove this concat once host ops emit an event. + ? this.context.host.delete(resolvedOutputPath).pipe(concat(of(null))) + // ? of(null) + : of(null)), + ); + } } export default BrowserBuilder; diff --git a/packages/angular_devkit/build_webpack/src/browser/index_spec_big.ts b/packages/angular_devkit/build_webpack/src/browser/index_spec_big.ts deleted file mode 100644 index 617cc3279c..0000000000 --- a/packages/angular_devkit/build_webpack/src/browser/index_spec_big.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { existsSync, readFileSync } from 'fs'; -import { relative, resolve } from 'path'; -import { concatMap, tap, toArray } from 'rxjs/operators'; - -const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any -const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); -const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); -const relativeBuilderPath = relative(root, builderPath); -const outputPath = resolve(root, 'dist'); -const host = new NodeJsSyncHost(); - -export const getWorkspace = (): Workspace => ({ - name: 'spec', - version: 1, - root: '', - defaultProject: 'app', - projects: { - app: { - root: 'src', - projectType: 'application', - defaultTarget: 'browser', - targets: { - browser: { - builder: `${relativeBuilderPath}:browser`, - options: { - outputPath: '../dist', - index: 'index.html', - main: 'main.ts', - polyfills: 'polyfills.ts', - tsConfig: 'tsconfig.app.json', - progress: false, - aot: false, - styles: [{ input: 'styles.css', lazy: false }], - scripts: [], - assets: [ - { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, - { glob: '**/*', input: 'assets', output: './', allowOutsideOutDir: false }, - ], - }, - }, - }, - }, - }, -}); - -describe('Browser Builder', () => { - it('builds targets', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - toArray(), - tap(events => expect(events.length).toBe(1)), - tap(() => { - expect(existsSync(resolve(outputPath, 'inline.bundle.js'))).toBe(true); - expect(existsSync(resolve(outputPath, 'main.bundle.js'))).toBe(true); - expect(existsSync(resolve(outputPath, 'polyfills.bundle.js'))).toBe(true); - expect(existsSync(resolve(outputPath, 'styles.bundle.js'))).toBe(true); - expect(existsSync(resolve(outputPath, 'vendor.bundle.js'))).toBe(true); - expect(existsSync(resolve(outputPath, 'favicon.ico'))).toBe(true); - expect(existsSync(resolve(outputPath, 'index.html'))).toBe(true); - }), - ).subscribe(done, done.fail); - }, 30000); - - it('builds aot target', (done) => { - const workspace = getWorkspace(); - workspace.projects.app.targets.browser.options.aot = true; - - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(workspace).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - toArray(), - tap(events => expect(events.length).toBe(1)), - tap(() => { - const mainBundlePath = resolve(outputPath, 'main.bundle.js'); - expect(existsSync(mainBundlePath)).toBe(true); - expect(readFileSync(mainBundlePath, 'utf-8')).toMatch( - /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); - }), - ).subscribe(done, done.fail); - }, 30000); -}); diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 8e30ac5d78..3688c4a241 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -222,6 +222,11 @@ "type": "boolean", "description": "Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse.", "default": false + }, + "forkTypeChecker": { + "type": "boolean", + "description": "Run the TypeScript type checker in a forked process.", + "default": true } }, "additionalProperties": false, diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index 4fe0f9573f..ef4895ea0e 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -91,10 +91,18 @@ export class DevServerBuilder implements Builder { }), concatMap((browserOptions) => new Observable(obs => { const browserBuilder = new BrowserBuilder(this.context); - const webpackConfig = browserBuilder.buildWebpackConfig(root, browserOptions); + const webpackConfig = browserBuilder.buildWebpackConfig(target.root, browserOptions); const webpackCompiler = webpack(webpackConfig); const statsConfig = getWebpackStatsConfig(browserOptions.verbose); - const webpackDevServerConfig = this._buildServerConfig(root, options, browserOptions); + + let webpackDevServerConfig: WebpackDevServerConfigurationOptions; + try { + webpackDevServerConfig = this._buildServerConfig(root, options, browserOptions); + } catch (err) { + obs.error(err); + + return; + } // Resolve public host and client address. let clientAddress = `${options.ssl ? 'https' : 'http'}://0.0.0.0:0`; @@ -163,7 +171,7 @@ export class DevServerBuilder implements Builder { if (stats.hasErrors()) { this.context.logger.info(statsErrorsToString(json, statsConfig)); } - obs.next(); + obs.next({ success: true }); }); } @@ -294,13 +302,17 @@ export class DevServerBuilder implements Builder { ) { let sslKey: string | undefined = undefined; let sslCert: string | undefined = undefined; - const keyPath = path.resolve(root, options.sslKey as string); - if (existsSync(keyPath)) { - sslKey = readFileSync(keyPath, 'utf-8'); + if (options.sslKey) { + const keyPath = path.resolve(root, options.sslKey as string); + if (existsSync(keyPath)) { + sslKey = readFileSync(keyPath, 'utf-8'); + } } - const certPath = path.resolve(root, options.sslCert as string); - if (existsSync(certPath)) { - sslCert = readFileSync(certPath, 'utf-8'); + if (options.sslCert) { + const certPath = path.resolve(root, options.sslCert as string); + if (existsSync(certPath)) { + sslCert = readFileSync(certPath, 'utf-8'); + } } config.https = true; diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts b/packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts deleted file mode 100644 index 586bbb6b20..0000000000 --- a/packages/angular_devkit/build_webpack/src/dev-server/index_spec_big.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { IncomingMessage } from 'http'; -import { relative, resolve } from 'path'; -import * as _request from 'request'; -import { fromPromise } from 'rxjs/observable/fromPromise'; -import { concatMap, take, tap } from 'rxjs/operators'; -import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec_big'; - - -const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any -const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); -const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); -const relativeBuilderPath = relative(root, builderPath); -const host = new NodeJsSyncHost(); - -export const getWorkspace = (): Workspace => { - const workspace = getBrowserWorkspace(); - workspace.projects.app.defaultTarget = 'devServer'; - workspace.projects.app.targets['devServer'] = { - builder: `${relativeBuilderPath}:devServer`, - options: { - browserTarget: 'app:browser', - watch: false, - }, - }; - - return workspace; -}; - -describe('Dev Server Target', () => { - it('runs', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - concatMap(() => fromPromise(request('http://localhost:4200/index.html'))), - tap(response => expect(response).toContain('HelloWorldApp')), - take(1), - ).subscribe(undefined, done.fail, done); - }, 30000); -}); - -export function request(url: string): Promise { - return new Promise((resolve, reject) => { - const options = { - url: url, - headers: { 'Accept': 'text/html' }, - agentOptions: { rejectUnauthorized: false }, - }; - // tslint:disable-next-line:no-any - _request(options, (error: any, response: IncomingMessage, body: string) => { - if (error) { - reject(error); - } else if (response.statusCode && response.statusCode >= 400) { - reject(new Error(`Requesting "${url}" returned status code ${response.statusCode}.`)); - } else { - resolve(body); - } - }); - }); -} diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts index 59910249d4..4a3613f9f4 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts @@ -7,7 +7,6 @@ */ import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; -import { getSystemPath } from '@angular-devkit/core'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; import { concatMap } from 'rxjs/operators'; @@ -31,11 +30,7 @@ export class ExtractI18nBuilder implements Builder { constructor(public context: BuilderContext) { } run(target: Target): Observable { - - const root = getSystemPath(target.root); const options = target.options; - - const [project, targetName, configuration] = options.browserTarget.split(':'); // Override browser build watch setting. const overrides = { watch: false }; @@ -59,7 +54,7 @@ export class ExtractI18nBuilder implements Builder { } // Extracting i18n uses the browser target webpack config with some specific options. - const webpackConfig = browserBuilder.buildWebpackConfig(root, { + const webpackConfig = browserBuilder.buildWebpackConfig(target.root, { ...browserOptions, optimizationLevel: 0, i18nLocale: options.i18nLocale, @@ -83,10 +78,12 @@ export class ExtractI18nBuilder implements Builder { } if (stats.hasErrors()) { - obs.error(statsErrorsToString(json, statsConfig)); - } else { - obs.complete(); + this.context.logger.error(statsErrorsToString(json, statsConfig)); } + + obs.next({ success: !stats.hasErrors() }); + + obs.complete(); }; try { diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts deleted file mode 100644 index d5808bcc38..0000000000 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index_spec_big.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { existsSync, readFileSync, unlinkSync } from 'fs'; -import { relative, resolve } from 'path'; -import { concatMap, tap, toArray } from 'rxjs/operators'; -import { getWorkspace as getBrowserWorkspace } from '../browser/index_spec_big'; - - -describe('Extract i18n Target', () => { - const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any - const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); - const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); - const relativeBuilderPath = relative(root, builderPath); - const host = new NodeJsSyncHost(); - const extractionFile = resolve(root, 'src', 'messages.xlf'); - - const getWorkspace = (): Workspace => { - const workspace = getBrowserWorkspace(); - workspace.projects.app.defaultTarget = 'extractI18n'; - workspace.projects.app.targets['extractI18n'] = { - builder: `${relativeBuilderPath}:extractI18n`, - options: { - browserTarget: 'app:browser', - }, - }; - - return workspace; - }; - - beforeEach(() => { - if (existsSync(extractionFile)) { - unlinkSync(extractionFile); - } - }); - - it('builds targets', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - toArray(), - tap(events => expect(events.length).toBe(0)), - tap(() => { - expect(existsSync(extractionFile)).toBe(true); - expect(readFileSync(extractionFile)).toMatch(/i18n test/); - }), - ).subscribe(done, done.fail); - }, 30000); -}); diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json b/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json index 9db5c54059..00dae2cdcb 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json @@ -29,7 +29,7 @@ "description": "Path where output will be placed." }, "outFile": { - "type": "boolean", + "type": "string", "description": "Name of the file to output." } }, diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts index 5e04f7ebdd..0406dd4b11 100644 --- a/packages/angular_devkit/build_webpack/src/karma/index.ts +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -33,6 +33,7 @@ export interface KarmaBuilderOptions { karmaConfig: string; // previously 'config'. watch: boolean; codeCoverage: boolean; + codeCoverageExclude: string[]; progress: boolean; preserveSymlinks?: boolean; @@ -90,6 +91,9 @@ export class KarmaBuilder implements Builder { karmaOptions.webpackBuildFacade = { options: options, webpackConfig: this._buildWebpackConfig(root, options), + // Pass onto Karma to emit BuildEvents. + successCb: () => obs.next({ success: true }), + failureCb: () => obs.next({ success: false }), }; // TODO: inside the configs, always use the project root and not the workspace root. @@ -99,9 +103,18 @@ export class KarmaBuilder implements Builder { // Assign additional karmaConfig options to the local ngapp config karmaOptions.configFile = karmaConfig; - // :shipit: + // Complete the observable once the Karma server returns. const karmaServer = new karma.Server(karmaOptions, () => obs.complete()); karmaServer.start(); + + // Cleanup, signal Karma to exit. + return () => { + // Karma does not seem to have a way to exit the server gracefully. + // See https://github.com/karma-runner/karma/issues/2867#issuecomment-369912167 + // TODO: make a PR for karma to add `karmaServer.close(code)`, that + // calls `disconnectBrowsers(code);` + // karmaServer.close(); + }; }); } diff --git a/packages/angular_devkit/build_webpack/src/karma/index_spec_big.ts b/packages/angular_devkit/build_webpack/src/karma/index_spec_big.ts deleted file mode 100644 index d770259972..0000000000 --- a/packages/angular_devkit/build_webpack/src/karma/index_spec_big.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { relative, resolve } from 'path'; -import { concatMap, tap, toArray } from 'rxjs/operators'; - - -describe('Karma Target', () => { - const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any - const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); - const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); - const relativeBuilderPath = relative(root, builderPath); - const host = new NodeJsSyncHost(); - - const getWorkspace = (): Workspace => ({ - name: 'spec', - version: 1, - root: '', - defaultProject: 'app', - projects: { - app: { - root: 'src', - projectType: 'application', - defaultTarget: 'karma', - targets: { - karma: { - builder: `${relativeBuilderPath}:karma`, - options: { - main: 'test.ts', - polyfills: 'polyfills.ts', - // Use Chrome Headless for CI envs. - browsers: 'ChromeHeadless', - tsConfig: 'tsconfig.spec.json', - karmaConfig: '../karma.conf.js', - progress: false, - styles: [{ input: 'styles.css', lazy: false }], - scripts: [], - assets: [ - { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, - { glob: '**/*', input: 'assets', output: './', allowOutsideOutDir: false }, - ], - }, - }, - }, - }, - }, - }); - - it('runs', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - toArray(), - tap(events => expect(events.length).toBe(0)), - ).subscribe(done, done.fail); - }, 30000); -}); diff --git a/packages/angular_devkit/build_webpack/src/karma/schema.json b/packages/angular_devkit/build_webpack/src/karma/schema.json index 2297c4ed5d..931393b51e 100644 --- a/packages/angular_devkit/build_webpack/src/karma/schema.json +++ b/packages/angular_devkit/build_webpack/src/karma/schema.json @@ -94,8 +94,16 @@ }, "codeCoverage": { "type": "boolean", - "description": "Override which browsers tests are run against.", + "description": "Output a code coverage report.", "default": false + }, + "codeCoverageExclude": { + "type": "array", + "description": "Globs to exclude from code coverage.", + "items": { + "type": "string" + }, + "default": [] } }, "additionalProperties": false, @@ -153,4 +161,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/angular_devkit/build_webpack/src/protractor/index.ts b/packages/angular_devkit/build_webpack/src/protractor/index.ts index 0601264a92..d50d7eaf7d 100644 --- a/packages/angular_devkit/build_webpack/src/protractor/index.ts +++ b/packages/angular_devkit/build_webpack/src/protractor/index.ts @@ -16,10 +16,9 @@ import { import { getSystemPath, tags } from '@angular-devkit/core'; import { resolve } from 'path'; import { Observable } from 'rxjs/Observable'; -import { empty } from 'rxjs/observable/empty'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { of } from 'rxjs/observable/of'; -import { concatMap } from 'rxjs/operators'; +import { concatMap, take } from 'rxjs/operators'; import * as url from 'url'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; import { DevServerBuilderOptions } from '../dev-server'; @@ -47,9 +46,12 @@ export class ProtractorBuilder implements Builder { const root = getSystemPath(target.root); const options = target.options; - return (options.devServerTarget ? this._startDevServer(options) : empty()).pipe( - concatMap(() => options.webdriverUpdate ? this._updateWebdriver(root) : empty()), + // TODO: verify using of(null) to kickstart things is a pattern. + return of(null).pipe( + concatMap(() => options.devServerTarget ? this._startDevServer(options) : of(null)), + concatMap(() => options.webdriverUpdate ? this._updateWebdriver(root) : of(null)), concatMap(() => this._runProtractor(root, options)), + take(1), ); } diff --git a/packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts b/packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts deleted file mode 100644 index c4aeb13e4a..0000000000 --- a/packages/angular_devkit/build_webpack/src/protractor/index_spec_big.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { relative, resolve } from 'path'; -import { concatMap, take } from 'rxjs/operators'; -import { getWorkspace as getDevServerWorkspace } from '../dev-server/index_spec_big'; - - -describe('Protractor Target', () => { - const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any - const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); - const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); - const relativeBuilderPath = relative(root, builderPath); - const host = new NodeJsSyncHost(); - - const getWorkspace = (): Workspace => { - const workspace = getDevServerWorkspace(); - workspace.projects.app.defaultTarget = 'protractor'; - workspace.projects.app.targets['protractor'] = { - builder: `${relativeBuilderPath}:protractor`, - options: { - protractorConfig: '../protractor.conf.js', - devServerTarget: 'app:devServer', - }, - }; - - return workspace; - }; - - it('runs', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - take(1), - ).subscribe(done, done.fail); - }, 30000); -}); diff --git a/packages/angular_devkit/build_webpack/src/tslint/index.ts b/packages/angular_devkit/build_webpack/src/tslint/index.ts index a882035e59..bf267fb7ab 100644 --- a/packages/angular_devkit/build_webpack/src/tslint/index.ts +++ b/packages/angular_devkit/build_webpack/src/tslint/index.ts @@ -20,7 +20,7 @@ import { stripBom } from '../angular-cli-files/utilities/strip-bom'; export interface TslintBuilderOptions { - tslintConfig: string; + tslintConfig?: string; tsConfig?: string; fix: boolean; typeCheck: boolean; @@ -46,6 +46,9 @@ export class TslintBuilder implements Builder { return new Observable(obs => { const projectTslint = requireProjectModule(root, 'tslint') as typeof tslint; + const tslintConfigPath = options.tslintConfig + ? path.resolve(root, options.tslintConfig) + : null; const Linter = projectTslint.Linter; const Configuration = projectTslint.Configuration; @@ -54,7 +57,7 @@ export class TslintBuilder implements Builder { program = Linter.createProgram(path.resolve(root, options.tsConfig)); } - const files = getFilesToLint(options, Linter, program); + const files = getFilesToLint(root, options, Linter, program); const lintOptions = { fix: options.fix, formatter: options.format, @@ -67,11 +70,10 @@ export class TslintBuilder implements Builder { for (const file of files) { const contents = getFileContents(file, options, program); - // Only check for a new tslint config if path changes + // Only check for a new tslint config if the path changes. const currentDirectory = path.dirname(file); if (currentDirectory !== lastDirectory) { - configLoad = Configuration.findConfiguration( - path.resolve(root, options.tslintConfig), file); + configLoad = Configuration.findConfiguration(tslintConfigPath, file); lastDirectory = currentDirectory; } @@ -112,12 +114,16 @@ export class TslintBuilder implements Builder { this.context.logger.info('All files pass linting.'); } - return options.force || result.errorCount === 0 ? obs.complete() : obs.error(); + const success = options.force || result.errorCount === 0; + obs.next({ success }); + + return obs.complete(); }); } } function getFilesToLint( + root: string, options: TslintBuilderOptions, linter: typeof tslint.Linter, program?: ts.Program, @@ -126,8 +132,9 @@ function getFilesToLint( if (options.files.length > 0) { return options.files - .map(file => glob.sync(file, { ignore, nodir: true })) - .reduce((prev, curr) => prev.concat(curr), []); + .map(file => glob.sync(file, { cwd: root, ignore, nodir: true })) + .reduce((prev, curr) => prev.concat(curr), []) + .map(file => path.join(root, file)); } if (!program) { @@ -158,7 +165,8 @@ function getFileContents( throw new Error(message); } - return undefined; + // TODO: this return had to be commented out otherwise no file would be linted, figure out why. + // return undefined; } // NOTE: The tslint CLI checks for and excludes MPEG transport streams; this does not. diff --git a/packages/angular_devkit/build_webpack/src/tslint/index_spec_big.ts b/packages/angular_devkit/build_webpack/src/tslint/index_spec_big.ts deleted file mode 100644 index bcb7f0d9a8..0000000000 --- a/packages/angular_devkit/build_webpack/src/tslint/index_spec_big.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { relative, resolve } from 'path'; -import { concatMap, tap, toArray } from 'rxjs/operators'; - - -describe('Tslint Target', () => { - const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any - const root = resolve(devkitRoot, 'tests/@angular_devkit/build_webpack/hello-world-app/'); - const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_webpack'); - const relativeBuilderPath = relative(root, builderPath); - const host = new NodeJsSyncHost(); - - const getWorkspace = (): Workspace => ({ - name: 'spec', - version: 1, - root: '', - defaultProject: 'app', - projects: { - app: { - root: 'src', - projectType: 'application', - defaultTarget: 'tslint', - targets: { - tslint: { - builder: `${relativeBuilderPath}:tslint`, - options: { - tslintConfig: '../tslint.json', - tsConfig: 'tsconfig.app.json', - exclude: ['**/node_modules/**'], - }, - }, - }, - }, - }, - }); - - it('runs', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - toArray(), - tap(events => expect(events.length).toBe(0)), - ).subscribe(done, done.fail); - }, 30000); -}); diff --git a/packages/angular_devkit/build_webpack/src/tslint/schema.json b/packages/angular_devkit/build_webpack/src/tslint/schema.json index 6df6e96dc6..55a09a4d9a 100644 --- a/packages/angular_devkit/build_webpack/src/tslint/schema.json +++ b/packages/angular_devkit/build_webpack/src/tslint/schema.json @@ -65,7 +65,5 @@ } }, "additionalProperties": false, - "required": [ - "tslintConfig" - ] -} + "required": [] +} \ No newline at end of file diff --git a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts new file mode 100644 index 0000000000..26b3c0c523 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts @@ -0,0 +1,47 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder allow js', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + host.writeMultipleFiles({ + 'src/my-js-file.js': `console.log(1); export const a = 2;`, + 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, + }); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works with aot', (done) => { + host.writeMultipleFiles({ + 'src/my-js-file.js': `console.log(1); export const a = 2;`, + 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, + }); + + const overrides = { aot: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts new file mode 100644 index 0000000000..f60139ffa2 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts @@ -0,0 +1,36 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { aot: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/assets_spec_big.ts new file mode 100644 index 0000000000..0f8a94331b --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/assets_spec_big.ts @@ -0,0 +1,103 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder assets', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const assets: { [path: string]: string } = { + './src/folder/.gitkeep': '', + './src/folder/folder-asset.txt': 'folder-asset.txt', + './src/glob-asset.txt': 'glob-asset.txt', + './src/output-asset.txt': 'output-asset.txt', + }; + const matches: { [path: string]: string } = { + './dist/folder/folder-asset.txt': 'folder-asset.txt', + './dist/glob-asset.txt': 'glob-asset.txt', + './dist/output-folder/output-asset.txt': 'output-asset.txt', + }; + host.writeMultipleFiles(assets); + + const overrides = { + assets: [ + { glob: 'glob-asset.txt' }, + { glob: 'output-asset.txt', output: 'output-folder' }, + { glob: '**/*', input: 'folder', output: 'folder' }, + ], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + // Assets we expect should be there. + Object.keys(matches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(matches[fileName]); + }); + // .gitkeep should not be there. + expect(host.asSync().exists(normalize('./dist/folder/.gitkeep'))).toBe(false); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + // TODO: this test isn't working correctly, fix it. + // It throws a weird jasmine error: + // Error: Spies must be created in a before function or a spec + // it('allowOutsideOutDir false with outside throws error', (done) => { + // const assets: { [path: string]: string } = { + // './node_modules/some-package/node_modules-asset.txt': 'node_modules-asset.txt', + // }; + // host.writeMultipleFiles(assets); + + // const overrides = { + // assets: [ + // { glob: '**/*', input: '../node_modules/some-package/', output: '../temp' }, + // ], + // }; + + // architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + // concatMap(() => architect.run(architect.getTarget({ overrides }))), + // ).subscribe(undefined, (err) => { + // expect(err.message) + // .toContain('An asset cannot be written to a location outside of the output path'); + // expect(err.message).toContain('You can override this message by'); + // done(); + // }, done.fail); + // }, 30000); + + it('allowOutsideOutDir true with outside does not throw error', (done) => { + const assets: { [path: string]: string } = { + './node_modules/some-package/node_modules-asset.txt': 'node_modules-asset.txt', + }; + host.writeMultipleFiles(assets); + const overrides = { + assets: [ + { + glob: '**/*', input: '../node_modules/some-package/', output: '../temp', + allowOutsideOutDir: true, + }, + ], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_big.ts new file mode 100644 index 0000000000..2999b550c7 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_big.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder base href', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + host.writeMultipleFiles({ + 'src/my-js-file.js': `console.log(1); export const a = 2;`, + 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, + }); + + const overrides = { baseHref: '/myUrl' }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + expect(content).toMatch(//); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts new file mode 100644 index 0000000000..98d692ae80 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder build optimizer', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { aot: true, buildOptimizer: true }; + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).not.toMatch(/\.decorators =/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_big.ts new file mode 100644 index 0000000000..01fff0218b --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_big.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { + TestLogger, + TestProjectHost, + browserWorkspaceTarget, + makeWorkspace, + workspaceRoot, +} from '../utils'; + + +describe('Browser Builder circular dependency detection', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + host.appendToFile('src/app/app.component.ts', + `import { AppModule } from './app.module'; console.log(AppModule);`); + + const overrides = { baseHref: '/myUrl' }; + const logger = new TestLogger('circular-dependencies'); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(logger.includes('Circular dependency detected')).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts new file mode 100644 index 0000000000..04189b8390 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts @@ -0,0 +1,57 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// import { Architect } from '@angular-devkit/architect'; +// import { join, normalize } from '@angular-devkit/core'; +// import { concatMap, tap, toArray } from 'rxjs/operators'; +// import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +// import { lazyModuleFiles, lazyModuleImport } from './rebuild_spec_big'; + + +// TODO: re-enable this test when the custom lazy module changes have been ported over to +// webpack-builder from the CLI. +// describe('Browser Builder custom lazy modules', () => { +// const host = new TestProjectHost(workspaceRoot); +// const architect = new Architect(normalize(workspaceRoot), host); +// const outputPath = normalize('dist'); + +// beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); +// afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + +// it('works', (done) => { +// host.writeMultipleFiles(lazyModuleFiles); +// host.writeMultipleFiles(lazyModuleImport); +// host.writeMultipleFiles({ +// 'src/app/app.component.ts': ` +// import { Component, SystemJsNgModuleLoader } from '@angular/core'; + +// @Component({ +// selector: 'app-root', +// templateUrl: './app.component.html', +// styleUrls: ['./app.component.css'], +// }) +// export class AppComponent { +// title = 'app'; +// constructor(loader: SystemJsNgModuleLoader) { +// // Module will be split at build time and loaded when requested below +// loader.load('app/lazy/lazy.module#LazyModule') +// .then((factory) => { /* Use factory here */ }); +// } +// }`, +// }); + +// const overrides = { lazyModules: ['app/lazy/lazy.module'] }; + +// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// concatMap(() => architect.run(architect.getTarget({ overrides }))), +// tap((buildEvent) => expect(buildEvent.success).toBe(true)), +// tap(() => +// expect(host.asSync().exists(join(outputPath, 'lazy.module.bundle.js'))).toBe(true)), +// ).subscribe(undefined, done.fail, done); +// }, 30000); +// }); diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts new file mode 100644 index 0000000000..0f9504380e --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts @@ -0,0 +1,60 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder deploy url', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('uses deploy url for bundles urls', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ + overrides: { deployUrl: 'deployUrl/' }, + }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('deployUrl/main.bundle.js'); + }), + concatMap(() => architect.run(architect.getTarget({ + overrides: { deployUrl: 'http://example.com/some/path/' }, + }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('http://example.com/some/path/main.bundle.js'); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('uses deploy url for in webpack runtime', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ + overrides: { deployUrl: 'deployUrl/' }, + }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'inline.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('__webpack_require__.p = "deployUrl/";'); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/errors_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/errors_spec_big.ts new file mode 100644 index 0000000000..066e496305 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/errors_spec_big.ts @@ -0,0 +1,70 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { + TestLogger, + TestProjectHost, + browserWorkspaceTarget, + makeWorkspace, + workspaceRoot, +} from '../utils'; + + +describe('Browser Builder errors', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('shows error when files are not part of the compilation', (done) => { + host.replaceInFile('src/tsconfig.app.json', '"compilerOptions": {', ` + "files": ["main.ts"], + "compilerOptions": { + `); + const logger = new TestLogger('errors-compilation'); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget(), { logger })), + tap((buildEvent) => { + expect(buildEvent.success).toBe(false); + expect(logger.includes('polyfills.ts is missing from the TypeScript')).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('shows TS syntax errors', (done) => { + host.appendToFile('src/app/app.component.ts', ']]]'); + const logger = new TestLogger('errors-syntax'); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget(), { logger })), + tap((buildEvent) => { + expect(buildEvent.success).toBe(false); + expect(logger.includes('Declaration or statement expected.')).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('shows static analysis errors', (done) => { + host.replaceInFile('src/app/app.component.ts', `'app-root'`, `(() => 'app-root')()`); + const logger = new TestLogger('errors-static'); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides: { aot: true } }), { logger })), + tap((buildEvent) => { + expect(buildEvent.success).toBe(false); + expect(logger.includes('Function expressions are not supported in')).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts new file mode 100644 index 0000000000..58a9537849 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts @@ -0,0 +1,99 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// import { Architect } from '@angular-devkit/architect'; +// import { join, normalize, virtualFs } from '@angular-devkit/core'; +// import { concatMap, tap } from 'rxjs/operators'; +// import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +// TODO: re-enable this test when the functionality is implemented, wether by option or via VFS. +// describe('Browser Builder file replacements', () => { +// const host = new TestProjectHost(workspaceRoot); +// const architect = new Architect(normalize(workspaceRoot), host); +// const outputPath = normalize('dist'); + +// beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); +// afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + +// it('works', (done) => { +// const overrides = { +// fileReplacements: [ +// { from: 'src/environments/environment.ts', to: 'src/environments/environment.prod.ts' }, +// ], +// }; + +// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// concatMap(() => architect.run(architect.getTarget({ overrides }))), +// tap(() => { +// const fileName = join(outputPath, 'main.bundle.js'); +// const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); +// expect(content).toContain('production: true'); +// }), +// ).subscribe(undefined, done.fail, done); +// }, 30000); + +// it(`fails with missing 'from' file`, (done) => { +// const overrides = { +// fileReplacements: [ +// { +// from: 'src/environments/environment.potato.ts', +// to: 'src/environments/environment.prod.ts', +// }, +// ], +// }; + +// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// concatMap(() => architect.run(architect.getTarget({ overrides }))), +// tap((buildEvent) => expect(buildEvent.success).toBe(false)), +// ).subscribe(undefined, done.fail, done); +// }, 30000); + +// it(`fails with missing 'to' file`, (done) => { +// const overrides = { +// fileReplacements: [ +// { +// from: 'src/environments/environment.ts', +// to: 'src/environments/environment.potato.ts', +// }, +// ], +// }; + +// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// concatMap(() => architect.run(architect.getTarget({ overrides }))), +// tap((buildEvent) => expect(buildEvent.success).toBe(false)), +// ).subscribe(undefined, done.fail, done); +// }, 30000); +// }); + +// TODO: Also add a karma test like the one below. +// export default function () { +// // Tests run in 'dev' environment by default. +// return writeFile('src/app/environment.spec.ts', ` +// import { environment } from '../environments/environment'; + +// describe('Test environment', () => { +// it('should have production disabled', () => { +// expect(environment.production).toBe(false); +// }); +// }); +// `) +// .then(() => ng('test', '--single-run')) + +// // Tests can run in different environment. +// .then(() => writeFile('src/app/environment.spec.ts', ` +// import { environment } from '../environments/environment'; + +// describe('Test environment', () => { +// it('should have production enabled', () => { +// expect(environment.production).toBe(true); +// }); +// }); +// `)) +// .then(() => ng('test', '-e', 'prod', '--single-run')); +// } diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts new file mode 100644 index 0000000000..28f74290c2 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts @@ -0,0 +1,133 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder i18n', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + const emptyTranslationFile = ` + + + + + + + `; + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('uses translations', (done) => { + host.writeMultipleFiles({ + 'src/locale/messages.fr.xlf': ` + + + + + + Hello i18n! + Bonjour i18n! + An introduction header for this sample + + + + + `, + }); + + host.appendToFile('src/app/app.component.html', + '

Hello i18n!

'); + + const overrides = { + aot: true, + i18nFile: 'locale/messages.fr.xlf', + i18nFormat: 'true', + i18nLocale: 'fr', + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(/Bonjour i18n!/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('ignores missing translations', (done) => { + const overrides = { + aot: true, + i18nFile: 'locale/messages.fr.xlf', + i18nFormat: 'true', + i18nLocale: 'fr', + i18nMissingTranslation: 'ignore', + }; + + host.writeMultipleFiles({ 'src/locale/messages.fr.xlf': emptyTranslationFile }); + host.appendToFile('src/app/app.component.html', '

Other content

'); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(/Other content/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('reports errors for missing translations', (done) => { + const overrides = { + aot: true, + i18nFile: 'locale/messages.fr.xlf', + i18nFormat: 'true', + i18nLocale: 'fr', + i18nMissingTranslation: 'error', + }; + + host.writeMultipleFiles({ 'src/locale/messages.fr.xlf': emptyTranslationFile }); + host.appendToFile('src/app/app.component.html', '

Other content

'); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('register locales', (done) => { + const overrides = { aot: true, i18nLocale: 'fr_FR' }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(/registerLocaleData/); + expect(content).toMatch(/angular_common_locales_fr/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('fails while registering unknown locale', (done) => { + const overrides = { aot: true, i18nLocale: 'no-locale' }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + ).subscribe(undefined, done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts new file mode 100644 index 0000000000..782492dc25 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts @@ -0,0 +1,185 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { BrowserBuilderOptions } from '../../src'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +export const lazyModuleFiles: { [path: string]: string } = { + 'src/app/lazy/lazy-routing.module.ts': ` + import { NgModule } from '@angular/core'; + import { Routes, RouterModule } from '@angular/router'; + + const routes: Routes = []; + + @NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] + }) + export class LazyRoutingModule { } + `, + 'src/app/lazy/lazy.module.ts': ` + import { NgModule } from '@angular/core'; + import { CommonModule } from '@angular/common'; + + import { LazyRoutingModule } from './lazy-routing.module'; + + @NgModule({ + imports: [ + CommonModule, + LazyRoutingModule + ], + declarations: [] + }) + export class LazyModule { } + `, +}; + +export const lazyModuleImport: { [path: string]: string } = { + 'src/app/app.module.ts': ` + import { BrowserModule } from '@angular/platform-browser'; + import { NgModule } from '@angular/core'; + import { HttpModule } from '@angular/http'; + + import { AppComponent } from './app.component'; + import { RouterModule } from '@angular/router'; + + @NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + HttpModule, + RouterModule.forRoot([ + { path: 'lazy', loadChildren: './lazy/lazy.module#LazyModule' } + ]) + ], + providers: [], + bootstrap: [AppComponent] + }) + export class AppModule { } + `, +}; + +describe('Browser Builder lazy modules', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('supports lazy bundle for lazy routes', (done) => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy.module.chunk.js'))).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports lazy bundle for import() calls`, (done) => { + host.writeMultipleFiles({ + 'src/lazy-module.ts': 'export const value = 42;', + 'src/main.ts': `import('./lazy-module');`, + }); + // Using `import()` in TS require targetting `esnext` modules. + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.chunk.js'))).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports lazy bundle for dynamic import() calls`, (done) => { + host.writeMultipleFiles({ + 'src/lazy-module.ts': 'export const value = 42;', + 'src/main.ts': `const lazyFileName = 'module'; import('./lazy-' + lazyFileName);`, + }); + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.chunk.js'))).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports lazy bundle for System.import() calls`, (done) => { + host.writeMultipleFiles({ + 'src/lazy-module.ts': 'export const value = 42;', + 'src/main.ts': `declare var System: any; System.import('./lazy-module');`, + }); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.chunk.js'))).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports hiding lazy bundle module name`, (done) => { + host.writeMultipleFiles({ + 'src/lazy-module.ts': 'export const value = 42;', + 'src/main.ts': `const lazyFileName = 'module'; import('./lazy-' + lazyFileName);`, + }); + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + const overrides: Partial = { namedChunks: false }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '0.chunk.js'))).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports making a common bundle for shared lazy modules`, (done) => { + host.writeMultipleFiles({ + 'src/one.ts': `import * as http from '@angular/http'; console.log(http);`, + 'src/two.ts': `import * as http from '@angular/http'; console.log(http);`, + 'src/main.ts': `import('./one'); import('./two');`, + }); + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'one.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'two.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'common.chunk.js'))).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports disabling the common bundle`, (done) => { + host.writeMultipleFiles({ + 'src/one.ts': `import * as http from '@angular/http'; console.log(http);`, + 'src/two.ts': `import * as http from '@angular/http'; console.log(http);`, + 'src/main.ts': `import('./one'); import('./two');`, + }); + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + const overrides: Partial = { commonChunk: false }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'one.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'two.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'common.chunk.js'))).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_big.ts new file mode 100644 index 0000000000..c9307fa227 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_big.ts @@ -0,0 +1,36 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder license extraction', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + // TODO: make license extraction independent from optimization level. + const overrides = { extractLicenses: true, optimizationLevel: 1 }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, '3rdpartylicenses.txt'); + expect(host.asSync().exists(fileName)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_big.ts new file mode 100644 index 0000000000..d9f3767f49 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_big.ts @@ -0,0 +1,34 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder no entry module', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + // Remove the bootstrap but keep a reference to AppModule so the import is not elided. + host.replaceInFile('src/main.ts', /platformBrowserDynamic.*?bootstrapModule.*?;/, ''); + host.appendToFile('src/main.ts', 'console.log(AppModule);'); + + const overrides = { baseHref: '/myUrl' }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts new file mode 100644 index 0000000000..f43d194bdc --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder optimization level', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { optimizationLevel: 1 }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + // Bundle contents should be uglified, which includes variable mangling. + expect(content).not.toContain('AppComponent'); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); + + it('tsconfig target changes optimizations to use ES2015', (done) => { + host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); + + const overrides = { optimizationLevel: 1 }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'vendor.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + expect(content).toMatch(/class \w{constructor\(\){/); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts new file mode 100644 index 0000000000..6c2b904d61 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts @@ -0,0 +1,174 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_big'; + + +describe('Browser Builder output hashing', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('updates hash as content changes', (done) => { + const OUTPUT_RE = /(main|styles|lazy\.module)\.([a-z0-9]+)\.(chunk|bundle)\.(js|css)$/; + + function generateFileHashMap(): Map { + const hashes = new Map(); + + host.asSync().list(normalize('./dist')).forEach(name => { + const matches = name.match(OUTPUT_RE); + if (matches) { + const [, module, hash] = matches; + hashes.set(module, hash); + } + }); + + return hashes; + } + + function validateHashes( + oldHashes: Map, + newHashes: Map, + shouldChange: Array, + ): void { + newHashes.forEach((hash, module) => { + if (hash == oldHashes.get(module)) { + if (shouldChange.includes(module)) { + throw new Error( + `Module "${module}" did not change hash (${hash}), but was expected to.`); + } + } else if (!shouldChange.includes(module)) { + throw new Error(`Module "${module}" changed hash (${hash}), but was not expected to.`); + } + }); + } + + let oldHashes: Map; + let newHashes: Map; + + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + + const overrides = { outputHashing: 'all', extractCss: true }; + + // We must do several builds instead of a single one in watch mode, so that the output + // path is deleted on each run and only contains the most recent files. + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap(() => { + // Save the current hashes. + oldHashes = generateFileHashMap(); + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + }), + // Lazy chunk hash should have changed without modifying main bundle. + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap(() => { + newHashes = generateFileHashMap(); + validateHashes(oldHashes, newHashes, []); + oldHashes = newHashes; + host.writeMultipleFiles({ 'src/styles.css': 'body { background: blue; }' }); + }), + // Style hash should change. + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap(() => { + newHashes = generateFileHashMap(); + validateHashes(oldHashes, newHashes, ['styles']); + oldHashes = newHashes; + host.writeMultipleFiles({ 'src/app/app.component.css': 'h1 { margin: 10px; }' }); + }), + // Main hash should change, since inline styles go in the main bundle. + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap(() => { + newHashes = generateFileHashMap(); + validateHashes(oldHashes, newHashes, ['main']); + oldHashes = newHashes; + host.appendToFile('src/app/lazy/lazy.module.ts', `console.log(1);`); + }), + // Lazy loaded bundle should change, and so should inline. + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap(() => { + newHashes = generateFileHashMap(); + validateHashes(oldHashes, newHashes, ['lazy.module']); + oldHashes = newHashes; + host.appendToFile('src/main.ts', ''); + }), + // Nothing should have changed. + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap(() => { + newHashes = generateFileHashMap(); + validateHashes(oldHashes, newHashes, []); + }), + ).subscribe(undefined, done.fail, done); + }, 60000); + + it('supports options', (done) => { + host.writeMultipleFiles({ 'src/styles.css': `h1 { background: url('./spectrum.png')}` }); + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + + // We must do several builds instead of a single one in watch mode, so that the output + // path is deleted on each run and only contains the most recent files. + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + // 'all' should hash everything. + concatMap(() => architect.run(architect.getTarget( + { overrides: { outputHashing: 'all', extractCss: true } }, + ))), + tap(() => { + expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); + }), + // 'none' should hash nothing. + concatMap(() => architect.run(architect.getTarget( + { overrides: { outputHashing: 'none', extractCss: true } }, + ))), + tap(() => { + expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); + }), + // 'media' should hash css resources only. + concatMap(() => architect.run(architect.getTarget( + { overrides: { outputHashing: 'media', extractCss: true } }, + ))), + tap(() => { + expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); + }), + // 'bundles' should hash bundles only. + concatMap(() => architect.run(architect.getTarget( + { overrides: { outputHashing: 'bundles', extractCss: true } }, + ))), + tap(() => { + expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); + }), + ).subscribe(undefined, done.fail, done); + }, 60000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_big.ts new file mode 100644 index 0000000000..eab2e8d9e3 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_big.ts @@ -0,0 +1,46 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder output path', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('deletes output path', (done) => { + // Write a file to the output path to later verify it was deleted. + host.asSync().write(join(outputPath, 'file.txt'), virtualFs.stringToFileBuffer('file')); + // Delete an app file to force a failed compilation. + // Failed compilations still delete files, but don't output any. + host.asSync().delete(join(workspaceRoot, 'src', 'app', 'app.component.ts')); + + return architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => { + expect(buildEvent.success).toBe(false); + expect(host.asSync().exists(outputPath)).toBe(false); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('does not allow output path to be project root', (done) => { + const overrides = { outputPath: './' }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + ).subscribe(undefined, done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/poll_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/poll_spec_big.ts new file mode 100644 index 0000000000..b78310f759 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/poll_spec_big.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, debounceTime, take, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder poll', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { watch: true, poll: 1000 }; + let msAvg = 1000; + let lastTime: number; + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + // Debounce 1s, otherwise changes are too close together and polling doesn't work. + debounceTime(1000), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const currTime = Date.now(); + if (lastTime) { + const ms = Math.floor((currTime - lastTime)); + msAvg = (msAvg + ms) / 2; + } + lastTime = currTime; + host.appendToFile('src/main.ts', 'console.log(1);'); + }), + take(5), + ).subscribe(undefined, done.fail, () => { + // Check if the average is between 1750 and 2750, allowing for a 1000ms variance. + expect(msAvg).toBeGreaterThan(1750); + expect(msAvg).toBeLessThan(2750); + done(); + }); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts new file mode 100644 index 0000000000..90cf9b19d0 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts @@ -0,0 +1,365 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, debounceTime, take, tap } from 'rxjs/operators'; +import { + TestLogger, + TestProjectHost, + browserWorkspaceTarget, + makeWorkspace, + workspaceRoot, +} from '../utils'; +import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_big'; + + +describe('Browser Builder', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + + it('rebuilds on TS file changes', (done) => { + if (process.env['APPVEYOR']) { + // TODO: This test fails on Windows CI, figure out why. + done(); + + return; + } + const goldenValueFiles: { [path: string]: string } = { + 'src/app/app.module.ts': ` + import { BrowserModule } from '@angular/platform-browser'; + import { NgModule } from '@angular/core'; + + import { AppComponent } from './app.component'; + + @NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule + ], + providers: [], + bootstrap: [AppComponent] + }) + export class AppModule { } + + console.log('$$_E2E_GOLDEN_VALUE_1'); + export let X = '$$_E2E_GOLDEN_VALUE_2'; + `, + 'src/main.ts': ` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + + import * as m from './app/app.module'; + console.log(m.X); + console.log('$$_E2E_GOLDEN_VALUE_3'); + `, + }; + + const overrides = { watch: true }; + + let buildNumber = 0; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + // We must debounce on watch mode because file watchers are not very accurate. + // Changes from just before a process runs can be picked up and cause rebuilds. + // In this case, cleanup from the test right before this one causes a few rebuilds. + debounceTime(500), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + buildNumber += 1; + switch (buildNumber) { + case 1: + // No lazy chunk should exist. + expect(host.asSync().exists(join(outputPath, 'lazy.chunk.js'))).toBe(false); + // Write the lazy chunk files. Order matters when writing these, because of imports. + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + break; + + case 2: + // A lazy chunk should have been with the filename. + expect(host.asSync().exists(join(outputPath, 'lazy.module.chunk.js'))).toBe(true); + host.writeMultipleFiles(goldenValueFiles); + break; + + case 3: + // The golden values should be present and in the right order. + const re = new RegExp( + /\$\$_E2E_GOLDEN_VALUE_1(.|\n|\r)*/.source + + /\$\$_E2E_GOLDEN_VALUE_2(.|\n|\r)*/.source + + /\$\$_E2E_GOLDEN_VALUE_3/.source, + ); + const fileName = './dist/main.bundle.js'; + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(re); + break; + + default: + break; + } + }), + take(3), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('rebuilds on CSS changes', (done) => { + const overrides = { watch: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + debounceTime(500), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), + take(2), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('type checks on rebuilds', (done) => { + host.writeMultipleFiles({ + 'src/funky2.ts': `export const funky2 = (value: string) => value + 'hello';`, + 'src/funky.ts': `export * from './funky2';`, + }); + host.appendToFile('src/main.ts', ` + import { funky2 } from './funky'; + console.log(funky2('town')); + `); + + const overrides = { watch: true, forkTypeChecker: false }; + const logger = new TestLogger('rebuild-type-errors'); + const typeError = `is not assignable to parameter of type 'number'`; + let buildNumber = 0; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + debounceTime(500), + tap((buildEvent) => { + buildNumber += 1; + switch (buildNumber) { + case 1: + expect(buildEvent.success).toBe(true); + // Make an invalid version of the file. + // Should trigger a rebuild, this time an error is expected. + host.writeMultipleFiles({ + 'src/funky2.ts': `export const funky2 = (value: number) => value + 1;`, + }); + break; + + case 2: + // The second build should error out with a type error on the type of an argument. + expect(buildEvent.success).toBe(false); + expect(logger.includes(typeError)).toBe(true); + logger.clear(); + // Change an UNRELATED file and the error should still happen. + // Should trigger a rebuild, this time an error is also expected. + host.appendToFile('src/app/app.module.ts', `console.log(1);`); + break; + + case 3: + // The third build should have the same error as the first. + expect(buildEvent.success).toBe(false); + expect(logger.includes(typeError)).toBe(true); + logger.clear(); + // Fix the error. + host.writeMultipleFiles({ + 'src/funky2.ts': `export const funky2 = (value: string) => value + 'hello';`, + }); + break; + + default: + expect(buildEvent.success).toBe(true); + break; + } + }), + take(4), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('rebuilds on type changes', (done) => { + host.writeMultipleFiles({ 'src/type.ts': `export type MyType = number;` }); + host.appendToFile('src/main.ts', `import { MyType } from './type';`); + + const overrides = { watch: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + debounceTime(500), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })), + take(2), + ).subscribe(undefined, done.fail, done); + }, 30000); + + + // TODO: writing back the original content in build 4 doesn't seem to trigger a rebuild + // on windows. Figure it out when there is time. + xit('rebuilds after errors in AOT', (done) => { + // Save the original contents of `./src/app/app.component.ts`. + const origContent = virtualFs.fileBufferToString( + host.asSync().read(normalize('src/app/app.component.ts'))); + // Add a major static analysis error on a non-main file to the initial build. + host.replaceInFile('./src/app/app.component.ts', `'app-root'`, `(() => 'app-root')()`); + + const overrides = { watch: true, aot: true, forkTypeChecker: false }; + const logger = new TestLogger('rebuild-aot-errors'); + const staticAnalysisError = 'Function expressions are not supported in decorators'; + const syntaxError = 'Declaration or statement expected.'; + let buildNumber = 0; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + debounceTime(1000), + tap((buildEvent) => { + buildNumber += 1; + switch (buildNumber) { + case 1: + // The first build should error out with a static analysis error. + expect(buildEvent.success).toBe(false); + expect(logger.includes(staticAnalysisError)).toBe(true); + logger.clear(); + // Fix the static analysis error. + host.writeMultipleFiles({ 'src/app/app.component.ts': origContent }); + break; + + case 2: + expect(buildEvent.success).toBe(true); + // Add an syntax error to a non-main file. + host.appendToFile('src/app/app.component.ts', `]]]`); + break; + + case 3: + // The third build should have TS syntax error. + expect(buildEvent.success).toBe(false); + expect(logger.includes(syntaxError)).toBe(true); + logger.clear(); + // Fix the syntax error, but add the static analysis error again. + host.writeMultipleFiles({ + 'src/app/app.component.ts': origContent.replace(`'app-root'`, `(() => 'app-root')()`), + }); + break; + + case 4: + expect(buildEvent.success).toBe(false); + // Restore the file to a error-less state. + host.writeMultipleFiles({ 'src/app/app.component.ts': origContent }); + break; + + case 5: + // The fifth build should have everything fixed.. + expect(buildEvent.success).toBe(true); + expect(logger.includes(staticAnalysisError)).toBe(true); + break; + } + }), + take(5), + ).subscribe(undefined, done.fail, done); + }, 60000); + + + xit('rebuilds AOT factories', (done) => { + if (process.env['APPVEYOR']) { + // TODO: appending to main.ts doesn't seem to be triggering rebuilds on windows. + // Figure it out when there is time. + done(); + + return; + } + + host.writeMultipleFiles({ + 'src/app/app.component.css': ` + @import './imported-styles.css'; + body {background-color: #00f;} + `, + 'src/app/imported-styles.css': 'p {color: #f00;}', + }); + + const overrides = { watch: true, aot: true, forkTypeChecker: false }; + let buildNumber = 0; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + debounceTime(1000), + tap((buildEvent) => { + buildNumber += 1; + const fileName = './dist/main.bundle.js'; + let content; + switch (buildNumber) { + case 1: + // Trigger a few rebuilds first. + // The AOT compiler is still optimizing rebuilds on the first rebuilds. + expect(buildEvent.success).toBe(true); + host.appendToFile('src/main.ts', 'console.log(1);'); + break; + + case 2: + expect(buildEvent.success).toBe(true); + host.appendToFile('src/main.ts', 'console.log(1);'); + break; + + case 3: + // Change the component html. + expect(buildEvent.success).toBe(true); + host.appendToFile('src/app/app.component.html', '

HTML_REBUILD_STRING

'); + break; + + case 4: + // Check if html changes are added to factories. + expect(buildEvent.success).toBe(true); + content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('HTML_REBUILD_STRING'); + // Change the component css. + host.appendToFile('src/app/app.component.css', 'CSS_REBUILD_STRING {color: #f00;}'); + break; + + case 5: + // Check if css changes are added to factories. + expect(buildEvent.success).toBe(true); + content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('CSS_REBUILD_STRING'); + // Change the component css import. + host.appendToFile('src/app/app.component.css', 'CSS_DEP_REBUILD_STRING {color: #f00;}'); + break; + + case 6: + // Check if css import changes are added to factories. + expect(buildEvent.success).toBe(true); + content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('CSS_DEP_REBUILD_STRING'); + // Change the component itself. + host.replaceInFile('src/app/app.component.ts', 'app-root', + 'app-root-FACTORY_REBUILD_STRING'); + break; + + case 7: + // Check if component changes are added to factories. + expect(buildEvent.success).toBe(true); + content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain('FACTORY_REBUILD_STRING'); + break; + } + }), + take(7), + ).subscribe(undefined, done.fail, done); + }, 60000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts new file mode 100644 index 0000000000..5b1c1f4abb --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts @@ -0,0 +1,140 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { PathFragment, join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder scripts array', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + const scripts: { [path: string]: string } = { + 'src/input-script.js': 'console.log(\'input-script\'); var number = 1+1;', + 'src/zinput-script.js': 'console.log(\'zinput-script\');', + 'src/finput-script.js': 'console.log(\'finput-script\');', + 'src/uinput-script.js': 'console.log(\'uinput-script\');', + 'src/binput-script.js': 'console.log(\'binput-script\');', + 'src/ainput-script.js': 'console.log(\'ainput-script\');', + 'src/cinput-script.js': 'console.log(\'cinput-script\');', + 'src/lazy-script.js': 'console.log(\'lazy-script\');', + 'src/pre-rename-script.js': 'console.log(\'pre-rename-script\');', + 'src/pre-rename-lazy-script.js': 'console.log(\'pre-rename-lazy-script\');', + }; + const getScriptsOption = () => [ + { input: 'input-script.js' }, + { input: 'zinput-script.js' }, + { input: 'finput-script.js' }, + { input: 'uinput-script.js' }, + { input: 'binput-script.js' }, + { input: 'ainput-script.js' }, + { input: 'cinput-script.js' }, + { input: 'lazy-script.js', lazy: true }, + { input: 'pre-rename-script.js', output: 'renamed-script' }, + { input: 'pre-rename-lazy-script.js', output: 'renamed-lazy-script', lazy: true }, + ]; + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const matches: { [path: string]: string } = { + './dist/scripts.bundle.js': 'input-script', + './dist/lazy-script.bundle.js': 'lazy-script', + './dist/renamed-script.bundle.js': 'pre-rename-script', + './dist/renamed-lazy-script.bundle.js': 'pre-rename-lazy-script', + './dist/main.bundle.js': 'input-script', + './dist/index.html': '' + + '' + + '' + + '' + + '' + + '', + }; + + host.writeMultipleFiles(scripts); + host.appendToFile('src/main.ts', '\nimport \'./input-script.js\';'); + + // Remove styles so we don't have to account for them in the index.html order check. + const overrides = { + styles: [], + scripts: getScriptsOption(), + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => Object.keys(matches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(matches[fileName]); + })), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('uglifies, uses sourcemaps, and adds hashes', (done) => { + host.writeMultipleFiles(scripts); + + const overrides = { + optimizationLevel: 1, + sourceMap: true, + outputHashing: 'all', + scripts: getScriptsOption(), + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const scriptsBundle = host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.bundle\.js/); + expect(scriptsBundle).toBeTruthy(); + const fileName = join(outputPath, scriptsBundle as PathFragment); + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch('var number=2;'); + expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.bundle\.js\.map/)) + .toBeTruthy(); + expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.bundle\.js/)) + .toBeTruthy(); + expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.bundle\.js\.map/)) + .toBeTruthy(); + expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); + expect(host.asSync().exists(normalize('dist/lazy-script.bundle.js'))).toBe(true); + expect(host.asSync().exists(normalize('dist/lazy-script.bundle.js.map'))).toBe(true); + expect(host.asSync().exists(normalize('dist/renamed-lazy-script.bundle.js'))).toBe(true); + expect(host.asSync().exists(normalize('dist/renamed-lazy-script.bundle.js.map'))) + .toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); + + it('preserves script order', (done) => { + host.writeMultipleFiles(scripts); + + const overrides = { scripts: getScriptsOption() }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const re = new RegExp( + /.*['"]input-script['"](.|\n|\r)*/.source + + /['"]zinput-script['"](.|\n|\r)*/.source + + /['"]finput-script['"](.|\n|\r)*/.source + + /['"]uinput-script['"](.|\n|\r)*/.source + + /['"]binput-script['"](.|\n|\r)*/.source + + /['"]ainput-script['"](.|\n|\r)*/.source + + /['"]cinput-script['"]/.source, + ); + const fileName = './dist/scripts.bundle.js'; + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(re); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts new file mode 100644 index 0000000000..f5fa96e958 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts @@ -0,0 +1,63 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder source map', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { sourceMap: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js.map'); + expect(host.asSync().exists(fileName)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('does not output source map when disabled', (done) => { + const overrides = { sourceMap: false }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.bundle.js.map'); + expect(host.asSync().exists(fileName)).toBe(false); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports eval source map', (done) => { + const overrides = { sourceMap: true, evalSourceMap: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.asSync().exists(join(outputPath, 'main.bundle.js.map'))).toBe(false); + const fileName = join(outputPath, 'main.bundle.js'); + const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + expect(content).toContain('eval("/* harmony export (binding) */'); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_big.ts new file mode 100644 index 0000000000..e5184011db --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_big.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder stats json', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { statsJson: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'stats.json'); + expect(host.asSync().exists(fileName)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts new file mode 100644 index 0000000000..7f577c13f0 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts @@ -0,0 +1,515 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize, tags, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder styles', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const extensionsWithImportSupport = ['css', 'scss', 'less', 'styl']; + const extensionsWithVariableSupport = ['scss', 'less', 'styl']; + const imgSvg = ` + + + + `; + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('supports global styles', (done) => { + const styles: { [path: string]: string } = { + 'src/string-style.css': '.string-style { color: red }', + 'src/input-style.css': '.input-style { color: red }', + 'src/lazy-style.css': '.lazy-style { color: red }', + 'src/pre-rename-style.css': '.pre-rename-style { color: red }', + 'src/pre-rename-lazy-style.css': '.pre-rename-lazy-style { color: red }', + }; + const getStylesOption = () => [ + { input: 'input-style.css' }, + { input: 'lazy-style.css', lazy: true }, + { input: 'pre-rename-style.css', output: 'renamed-style' }, + { input: 'pre-rename-lazy-style.css', output: 'renamed-lazy-style', lazy: true }, + ]; + const cssMatches: { [path: string]: string } = { + './dist/styles.bundle.css': '.input-style', + './dist/lazy-style.bundle.css': '.lazy-style', + './dist/renamed-style.bundle.css': '.pre-rename-style', + './dist/renamed-lazy-style.bundle.css': '.pre-rename-lazy-style', + }; + const cssIndexMatches: { [path: string]: string } = { + './dist/index.html': '' + + '', + }; + const jsMatches: { [path: string]: string } = { + './dist/styles.bundle.js': '.input-style', + './dist/lazy-style.bundle.js': '.lazy-style', + './dist/renamed-style.bundle.js': '.pre-rename-style', + './dist/renamed-lazy-style.bundle.js': '.pre-rename-lazy-style', + }; + const jsIndexMatches: { [path: string]: string } = { + './dist/index.html': '' + + '' + + '' + + '' + + '' + + '', + }; + + host.writeMultipleFiles(styles); + + const overrides = { extractCss: true, styles: getStylesOption() }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + // Check css files were created. + tap(() => Object.keys(cssMatches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(cssMatches[fileName]); + })), + // Check no js files are created. + tap(() => Object.keys(jsMatches).forEach(key => + expect(host.asSync().exists(normalize(key))).toBe(false), + )), + // Check check index has styles in the right order. + tap(() => Object.keys(cssIndexMatches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(cssIndexMatches[fileName]); + })), + // Also test with extractCss false. + concatMap(() => architect.run(architect.getTarget( + { overrides: { extractCss: false, styles: getStylesOption() } }))), + // TODO: figure out why adding this tap breaks typings. + // This also happens in the output-hashing spec. + // tap((buildEvent) => expect(buildEvent.success).toBe(true)), + // Check js files were created. + tap(() => Object.keys(jsMatches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(jsMatches[fileName]); + })), + // Check no css files are created. + tap(() => Object.keys(cssMatches).forEach(key => + expect(host.asSync().exists(normalize(key))).toBe(false), + )), + // Check check index has styles in the right order. + tap(() => Object.keys(jsIndexMatches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(jsIndexMatches[fileName]); + })), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports empty styleUrls in components', (done) => { + host.writeMultipleFiles({ + './src/app/app.component.ts': ` + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: [] + }) + export class AppComponent { + title = 'app'; + } + `, + }); + + const overrides = { extractCss: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + extensionsWithImportSupport.forEach(ext => { + it(`supports imports in ${ext} files`, (done) => { + host.writeMultipleFiles({ + [`src/styles.${ext}`]: ` + @import './imported-styles.${ext}'; + body { background-color: #00f; } + `, + [`src/imported-styles.${ext}`]: 'p { background-color: #f00; }', + [`src/app/app.component.${ext}`]: ` + @import './imported-component-styles.${ext}'; + .outer { + .inner { + background: #fff; + } + } + `, + [`src/app/imported-component-styles.${ext}`]: 'h1 { background: #000; }', + }); + + const matches: { [path: string]: RegExp } = { + 'dist/styles.bundle.css': new RegExp( + // The global style should be there + /p\s*{\s*background-color: #f00;\s*}(.|\n|\r)*/.source + // The global style via import should be there + + /body\s*{\s*background-color: #00f;\s*}/.source, + ), + 'dist/styles.bundle.css.map': /"mappings":".+"/, + 'dist/main.bundle.js': new RegExp( + // The component style via import should be there + /.outer.*.inner.*background:\s*#[fF]+(.|\n|\r)*/.source + // The component style should be there + + /h1.*background:\s*#000+/.source, + ), + }; + + const overrides = { + extractCss: true, + sourceMap: true, + styles: [{ input: `styles.${ext}` }], + }; + + host.replaceInFile('src/app/app.component.ts', './app.component.css', + `./app.component.${ext}`); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => Object.keys(matches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(matches[fileName]); + })), + ).subscribe(undefined, done.fail, done); + }, 30000); + }); + + extensionsWithImportSupport.forEach(ext => { + it(`supports material imports in ${ext} files`, (done) => { + host.writeMultipleFiles({ + [`src/styles.${ext}`]: ` + @import "~@angular/material/prebuilt-themes/indigo-pink.css"; + @import "@angular/material/prebuilt-themes/indigo-pink.css"; + `, + [`src/app/app.component.${ext}`]: ` + @import "~@angular/material/prebuilt-themes/indigo-pink.css"; + @import "@angular/material/prebuilt-themes/indigo-pink.css"; + `, + }); + host.replaceInFile('src/app/app.component.ts', './app.component.css', + `./app.component.${ext}`); + + const overrides = { + extractCss: true, + styles: [{ input: `styles.${ext}` }], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + }); + + extensionsWithVariableSupport.forEach(ext => { + it(`supports ${ext} includePaths`, (done) => { + + let variableAssignment = ''; + let variablereference = ''; + if (ext === 'scss') { + variableAssignment = '$primary-color:'; + variablereference = '$primary-color'; + } else if (ext === 'styl') { + variableAssignment = '$primary-color ='; + variablereference = '$primary-color'; + } else if (ext === 'less') { + variableAssignment = '@primary-color:'; + variablereference = '@primary-color'; + } + + host.writeMultipleFiles({ + [`src/style-paths/variables.${ext}`]: `${variableAssignment} #f00;`, + [`src/styles.${ext}`]: ` + @import 'variables'; + h1 { color: ${variablereference}; } + `, + [`src/app/app.component.${ext}`]: ` + @import 'variables'; + h2 { color: ${variablereference}; } + `, + }); + + const matches: { [path: string]: RegExp } = { + 'dist/styles.bundle.css': /h1\s*{\s*color: #f00;\s*}/, + 'dist/main.bundle.js': /h2.*{.*color: #f00;.*}/, + }; + + host.replaceInFile('src/app/app.component.ts', './app.component.css', + `./app.component.${ext}`); + + const overrides = { + extractCss: true, + styles: [{ input: `styles.${ext}` }], + stylePreprocessorOptions: { + includePaths: ['style-paths'], + }, + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => Object.keys(matches).forEach(fileName => { + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toMatch(matches[fileName]); + })), + ).subscribe(undefined, done.fail, done); + }, 30000); + }); + + it('inlines resources', (done) => { + host.copyFile('src/spectrum.png', 'src/large.png'); + host.writeMultipleFiles({ + 'src/styles.scss': ` + h1 { background: url('./large.png'), + linear-gradient(to bottom, #0e40fa 25%, #0654f4 75%); } + h2 { background: url('./small.svg'); } + p { background: url(./small-id.svg#testID); } + `, + 'src/app/app.component.css': ` + h3 { background: url('../small.svg'); } + h4 { background: url("../large.png"); } + `, + 'src/small.svg': imgSvg, + 'src/small-id.svg': imgSvg, + }); + + const overrides = { + aot: true, + extractCss: true, + styles: [{ input: `styles.scss` }], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = 'dist/styles.bundle.css'; + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + // Large image should not be inlined, and gradient should be there. + expect(content).toMatch( + /url\(['"]?large\.png['"]?\),\s+linear-gradient\(to bottom, #0e40fa 25%, #0654f4 75%\);/); + // Small image should be inlined. + expect(content).toMatch(/url\(\\?['"]data:image\/svg\+xml/); + // Small image with param should not be inlined. + expect(content).toMatch(/url\(['"]?small-id\.svg#testID['"]?\)/); + }), + tap(() => { + const fileName = 'dist/main.bundle.js'; + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + // Large image should not be inlined. + expect(content).toMatch(/url\((?:['"]|\\')?large\.png(?:['"]|\\')?\)/); + // Small image should be inlined. + expect(content).toMatch(/url\(\\?['"]data:image\/svg\+xml/); + }), + tap(() => { + expect(host.asSync().exists(normalize('dist/small.svg'))).toBe(false); + expect(host.asSync().exists(normalize('dist/large.png'))).toBe(true); + expect(host.asSync().exists(normalize('dist/small-id.svg'))).toBe(true); + }), + // TODO: find a way to check logger/output for warnings. + // if (stdout.match(/postcss-url: \.+: Can't read file '\.+', ignoring/)) { + // throw new Error('Expected no postcss-url file read warnings.'); + // } + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports font-awesome imports`, (done) => { + host.writeMultipleFiles({ + 'src/styles.scss': ` + $fa-font-path: "~font-awesome/fonts"; + @import "~font-awesome/scss/font-awesome"; + `, + }); + + const overrides = { extractCss: true, styles: [{ input: `styles.scss` }] }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + // TODO: find a way to check logger/output for warnings. + // if (stdout.match(/postcss-url: \.+: Can't read file '\.+', ignoring/)) { + // throw new Error('Expected no postcss-url file read warnings.'); + // } + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`uses autoprefixer`, (done) => { + host.writeMultipleFiles({ + 'src/styles.css': tags.stripIndents` + /* normal-comment */ + /*! important-comment */ + div { flex: 1 }`, + }); + + const overrides = { extractCss: true, optimizationLevel: 0 }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = 'dist/styles.bundle.css'; + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain(tags.stripIndents` + /* normal-comment */ + /*! important-comment */ + div { -webkit-box-flex: 1; -ms-flex: 1; flex: 1 }`); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`minimizes css`, (done) => { + host.writeMultipleFiles({ + 'src/styles.css': tags.stripIndents` + /* normal-comment */ + /*! important-comment */ + div { flex: 1 }`, + }); + + const overrides = { extractCss: true, optimizationLevel: 1 }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = 'dist/styles.bundle.css'; + const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + expect(content).toContain( + '/*! important-comment */div{-webkit-box-flex:1;-ms-flex:1;flex:1}'); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); + + // TODO: consider making this a unit test in the url processing plugins. + it(`supports baseHref and deployUrl in resource urls`, (done) => { + // Use a large image for the relative ref so it cannot be inlined. + host.copyFile('src/spectrum.png', './src/assets/global-img-relative.png'); + host.copyFile('src/spectrum.png', './src/assets/component-img-relative.png'); + host.writeMultipleFiles({ + 'src/styles.css': ` + h1 { background: url('/assets/global-img-absolute.svg'); } + h2 { background: url('./assets/global-img-relative.png'); } + `, + 'src/app/app.component.css': ` + h3 { background: url('/assets/component-img-absolute.svg'); } + h4 { background: url('../assets/component-img-relative.png'); } + `, + // Use a small SVG for the absolute image to help validate that it is being referenced, + // because it is so small it would be inlined usually. + 'src/assets/global-img-absolute.svg': imgSvg, + 'src/assets/component-img-absolute.svg': imgSvg, + }); + + const stylesBundle = 'dist/styles.bundle.css'; + const mainBundle = 'dist/main.bundle.js'; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + // Check base paths are correctly generated. + concatMap(() => architect.run(architect.getTarget({ + overrides: { aot: true, extractCss: true }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('/assets/global-img-absolute.svg')`); + expect(styles).toContain(`url(global-img-relative.png)`); + expect(main).toContain(`url('/assets/component-img-absolute.svg')`); + expect(main).toContain(`url(component-img-relative.png)`); + expect(host.asSync().exists(normalize('dist/global-img-absolute.svg'))).toBe(false); + expect(host.asSync().exists(normalize('dist/global-img-relative.png'))).toBe(true); + expect(host.asSync().exists(normalize('dist/component-img-absolute.svg'))).toBe(false); + expect(host.asSync().exists(normalize('dist/component-img-relative.png'))).toBe(true); + }), + // Check urls with deploy-url scheme are used as is. + concatMap(() => architect.run(architect.getTarget({ + overrides: { extractCss: true, baseHref: '/base/', deployUrl: 'http://deploy.url/' }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('http://deploy.url/assets/global-img-absolute.svg')`); + expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); + }), + // Check urls with base-href scheme are used as is (with deploy-url). + concatMap(() => architect.run(architect.getTarget({ + overrides: { extractCss: true, baseHref: 'http://base.url/', deployUrl: 'deploy/' }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('http://base.url/deploy/assets/global-img-absolute.svg')`); + expect(main).toContain(`url('http://base.url/deploy/assets/component-img-absolute.svg')`); + }), + // Check urls with deploy-url and base-href scheme only use deploy-url. + concatMap(() => architect.run(architect.getTarget({ + overrides: { + extractCss: true, + baseHref: 'http://base.url/', + deployUrl: 'http://deploy.url/', + }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('http://deploy.url/assets/global-img-absolute.svg')`); + expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); + }), + // Check with schemeless base-href and deploy-url flags. + concatMap(() => architect.run(architect.getTarget({ + overrides: { extractCss: true, baseHref: '/base/', deployUrl: 'deploy/' }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('/base/deploy/assets/global-img-absolute.svg')`); + expect(main).toContain(`url('/base/deploy/assets/component-img-absolute.svg')`); + }), + // Check with identical base-href and deploy-url flags. + concatMap(() => architect.run(architect.getTarget({ + overrides: { extractCss: true, baseHref: '/base/', deployUrl: '/base/' }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('/base/assets/global-img-absolute.svg')`); + expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); + }), + // Check with only base-href flag. + concatMap(() => architect.run(architect.getTarget({ + overrides: { extractCss: true, baseHref: '/base/' }, + }))), + tap(() => { + const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); + const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + expect(styles).toContain(`url('/base/assets/global-img-absolute.svg')`); + expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); + }), + ).subscribe(undefined, done.fail, done); + }, 60000); + + it(`supports bootstrap@4`, (done) => { + const overrides = { + extractCss: true, + styles: [{ input: '../../../../../node_modules/bootstrap/dist/css/bootstrap.css' }], + scripts: [{ input: '../../../../../node_modules/bootstrap/dist/js/bootstrap.js' }], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts new file mode 100644 index 0000000000..4cb0089985 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder subresource integrity', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + host.writeMultipleFiles({ + 'src/my-js-file.js': `console.log(1); export const a = 2;`, + 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, + }); + + const overrides = { subresourceIntegrity: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + expect(content).toMatch(/integrity="\w+-[A-Za-z0-9\/\+=]+"/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_big.ts new file mode 100644 index 0000000000..54b985f281 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_big.ts @@ -0,0 +1,87 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder tsconfig paths', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + host.writeMultipleFiles({ + 'src/meaning-too.ts': 'export var meaning = 42;', + 'src/app/shared/meaning.ts': 'export var meaning = 42;', + 'src/app/shared/index.ts': `export * from './meaning'`, + }); + + host.replaceInFile('src/app/app.module.ts', './app.component', '@root/app/app.component'); + host.replaceInFile('src/tsconfig.app.json', /"baseUrl": "[^"]*",/, ` + "baseUrl": "./", + "paths": { + "@root/*": [ + "./*" + ] + }, + `); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works', (done) => { + host.writeMultipleFiles({ + 'src/meaning-too.ts': 'export var meaning = 42;', + 'src/app/shared/meaning.ts': 'export var meaning = 42;', + 'src/app/shared/index.ts': `export * from './meaning'`, + }); + host.replaceInFile('src/tsconfig.app.json', /"baseUrl": "[^"]*",/, ` + "baseUrl": "./", + "paths": { + "@shared": [ + "app/shared" + ], + "@shared/*": [ + "app/shared/*" + ], + "*": [ + "*", + "app/shared/*" + ] + }, + `); + host.appendToFile('src/app/app.component.ts', ` + import { meaning } from 'app/shared/meaning'; + import { meaning as meaning2 } from '@shared'; + import { meaning as meaning3 } from '@shared/meaning'; + import { meaning as meaning4 } from 'meaning'; + import { meaning as meaning5 } from 'meaning-too'; + + // need to use imports otherwise they are ignored and + // no error is outputted, even if baseUrl/paths don't work + console.log(meaning) + console.log(meaning2) + console.log(meaning3) + console.log(meaning4) + console.log(meaning5) + `); + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts new file mode 100644 index 0000000000..b11dbc80b3 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder vendor chunk', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { vendorChunk: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'vendor.bundle.js'); + expect(host.asSync().exists(fileName)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts new file mode 100644 index 0000000000..2ab3018611 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts @@ -0,0 +1,39 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Browser Builder', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + // Default files should be in outputPath. + expect(host.asSync().exists(join(outputPath, 'inline.bundle.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'main.bundle.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'polyfills.bundle.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'styles.bundle.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'vendor.bundle.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'favicon.ico'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'index.html'))).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_big.ts new file mode 100644 index 0000000000..8e0b17dd83 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_big.ts @@ -0,0 +1,79 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import * as express from 'express'; // tslint:disable-line:no-implicit-dependencies +import * as http from 'http'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { concatMap, take, tap } from 'rxjs/operators'; +import { DevServerBuilderOptions } from '../../src'; +import { + TestProjectHost, + browserWorkspaceTarget, + devServerWorkspaceTarget, + makeWorkspace, + request, + workspaceRoot, +} from '../utils'; + + +describe('Dev Server Builder proxy', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + // Create an express app that serves as a proxy. + const app = express(); + const server = http.createServer(app); + server.listen(0); + + app.set('port', server.address().port); + app.get('/api/test', function (_req, res) { + res.send('TEST_API_RETURN'); + }); + + const backendHost = 'localhost'; + const backendPort = server.address().port; + const proxyServerUrl = `http://${backendHost}:${backendPort}`; + + host.writeMultipleFiles({ + 'proxy.config.json': `{ "/api/*": { "target": "${proxyServerUrl}" } }`, + }); + + const overrides: Partial = { proxyConfig: '../proxy.config.json' }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('http://localhost:4200/api/test'))), + tap(response => { + expect(response).toContain('TEST_API_RETURN'); + server.close(); + }), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('errors out with a missing proxy file', (done) => { + const overrides: Partial = { proxyConfig: '../proxy.config.json' }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + ).subscribe(undefined, done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_big.ts new file mode 100644 index 0000000000..b02e8f20b2 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_big.ts @@ -0,0 +1,76 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { concatMap, take, tap } from 'rxjs/operators'; +import { DevServerBuilderOptions } from '../../src'; +import { + TestProjectHost, + browserWorkspaceTarget, + devServerWorkspaceTarget, + makeWorkspace, + request, + workspaceRoot, +} from '../utils'; + + +describe('Dev Server Builder public host', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + // We have to spoof the host to a non-numeric one because Webpack Dev Server does not + // check the hosts anymore when requests come from numeric IP addresses. + const headers = { host: 'http://spoofy.mcspoofface' }; + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('http://localhost:4200/', headers))), + tap(response => expect(response).toContain('Invalid Host header')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works', (done) => { + const overrides: Partial = { publicHost: headers.host }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('http://localhost:4200/', headers))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works', (done) => { + const overrides: Partial = { disableHostCheck: true }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('http://localhost:4200/', headers))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_big.ts new file mode 100644 index 0000000000..3946b3206d --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_big.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { concatMap, take, tap } from 'rxjs/operators'; +import { DevServerBuilderOptions } from '../../src'; +import { + TestProjectHost, + browserWorkspaceTarget, + devServerWorkspaceTarget, + makeWorkspace, + request, + workspaceRoot, +} from '../utils'; + + +describe('Dev Server Builder serve path', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + // TODO: review this test, it seems to pass with or without the servePath. + it('works', (done) => { + const overrides: Partial = { servePath: 'test/' }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('http://localhost:4200/test/'))), + tap(response => expect(response).toContain('HelloWorldApp')), + concatMap(() => fromPromise(request('http://localhost:4200/test/abc/'))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_big.ts new file mode 100644 index 0000000000..210241bee1 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_big.ts @@ -0,0 +1,121 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize, tags } from '@angular-devkit/core'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { concatMap, take, tap } from 'rxjs/operators'; +import { DevServerBuilderOptions } from '../../src'; +import { + TestProjectHost, + browserWorkspaceTarget, + devServerWorkspaceTarget, + makeWorkspace, + request, + workspaceRoot, +} from '../utils'; + + +describe('Dev Server Builder ssl', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides: Partial = { ssl: true }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports key and cert', (done) => { + host.writeMultipleFiles({ + 'ssl/server.key': tags.stripIndents` + -----BEGIN RSA PRIVATE KEY----- + MIIEpAIBAAKCAQEA0+kOHdfpsPNUguCtai27DJ+DuOfVw4gw1P3BgYhNG8qoukaW + gdDLowj59+cXXgn9ZnQ8PdvZXhCEQcP3wjd1cBPuGQzO7BekoKEgzfGE/zjrrIeL + Q7tHYx9ddCPotQX4OJu4FZFJyS1Ar7zDDpQ9fSw6qmsXWN6I18fIGSVvbDbVB9rw + iAsLGe2jWadjXAjSqVOy6aT+CKJgnRnxudNZGP1LRC1YDRl/s7icCIh/9gEGfn7G + gwQQ9AM2p3JNjP2quclSjBvMv0uVj+yzL2bPGRz0hu90CDaIEU2FtBCse50/O75q + x0bQnPbuHKD3ajs0DfQYoAmFZGK078ZDl/VQxwIDAQABAoIBAEl17kXcNo/4GqDw + QE2hoslCdwhfnhQVn1AG09ESriBnRcylccF4308aaoVM4CXicqzUuJl9IEJimWav + B7GVRinfTtfyP71KiPCCSvv5sPBFDDYYGugVAS9UjTIYzLAMbLs7CDq5zglmnZkO + Z9QjAZnl/kRbsZFGO8wJ3s0Q1Cp/ygZcvFU331K2jHXW7B4YXiFOH/lBQrjdz0Gy + WBjX4zIdNWnwarvxu46IS/0z1P1YOHM8+B1Uv54MG94A6szBdd/Vp0cQRs78t/Cu + BQ1Rnuk16Pi+ieC5K04yUgeuNusYW0PWLtPX1nKNp9z46bmD1NHKAxaoDFXr7qP3 + pZCaDMkCgYEA8mmTYrhXJTRIrOxoUwM1e3OZ0uOxVXJJ8HF6X8t+UO6dFxXB/JC9 + ZBc+94cZQapaKFOeMmd/j3L2CQIjChk5yKV/G3Io+raxIoAAKPCkMF4NQQVvvNkS + CAGl61Qa78DoF5Habumz0AC1R9P877kNTC0aPSt4lhPWgfotbZNNMlMCgYEA38nM + s4a0pZseXPkuOtPYX/3Ms3E+d70XKSFuIMCHCg79YGsQ8h/9apYcPyeYkpQ0a4gs + I3IUqMaXC2OyqWA5LU1BZv51mXb6zcb2pokZfpiSWk+7sy5XjkE9EmQxp3xHfV3c + EO/DxHfWNvtMjESMbhu0yVzM2O/Aa53Tl9lqAT0CgYEA1dXBuHyqCtyTG08zO78B + 55Ny5rAJ1zkI9jvz2hr0o0nJcvqzcyruliNXXRxkcCNoglg4nXfk81JSrGGhLSBR + c6hhdoF+mqKboLZO7c5Q14WvpWK5TVoiaMOja/J2DHYbhecYS2yGPH7TargaUBDq + JP9IPRtitOhs+Z0Jg7ZDi5cCgYAMb7B6gY/kbBxh2k8hYchyfS41AqQQD2gMFxmB + pHFcs7yM8SY97l0s4S6sq8ykyKupFiYtyhcv0elu7pltJDXJOLPbv2RVpPEHInlu + g8vw5xWrAydRK9Adza5RKVRBFHz8kIy8PDbK4kX7RDfay6xqKgv/7LJNk/VDhb/O + fnyPmQKBgQDg/o8Ubf/gxA9Husnuld4DBu3wwFhkMlWqyO9QH3cKgojQ2JGSrfDz + xHhetmhionEyzg0JCaMSpzgIHY+8o/NAwc++OjNHEoYp3XWM9GTp81ROMz6b83jV + biVR9N0MhONdwF6vtzDCcJxNIUe2p4lTvLf/Xd9jaQDNXe35Gxsdyg== + -----END RSA PRIVATE KEY----- + `, + 'ssl/server.crt': tags.stripIndents` + -----BEGIN CERTIFICATE----- + MIID5jCCAs6gAwIBAgIJAJOebwfGCm61MA0GCSqGSIb3DQEBBQUAMFUxCzAJBgNV + BAYTAlVTMRAwDgYDVQQIEwdHZW9yZ2lhMRAwDgYDVQQHEwdBdGxhbnRhMRAwDgYD + VQQKEwdBbmd1bGFyMRAwDgYDVQQLEwdBbmd1bGFyMB4XDTE2MTAwNDAxMDAyMVoX + DTI2MTAwMjAxMDAyMVowVTELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0dlb3JnaWEx + EDAOBgNVBAcTB0F0bGFudGExEDAOBgNVBAoTB0FuZ3VsYXIxEDAOBgNVBAsTB0Fu + Z3VsYXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDT6Q4d1+mw81SC + 4K1qLbsMn4O459XDiDDU/cGBiE0byqi6RpaB0MujCPn35xdeCf1mdDw929leEIRB + w/fCN3VwE+4ZDM7sF6SgoSDN8YT/OOush4tDu0djH110I+i1Bfg4m7gVkUnJLUCv + vMMOlD19LDqqaxdY3ojXx8gZJW9sNtUH2vCICwsZ7aNZp2NcCNKpU7LppP4IomCd + GfG501kY/UtELVgNGX+zuJwIiH/2AQZ+fsaDBBD0Azanck2M/aq5yVKMG8y/S5WP + 7LMvZs8ZHPSG73QINogRTYW0EKx7nT87vmrHRtCc9u4coPdqOzQN9BigCYVkYrTv + xkOX9VDHAgMBAAGjgbgwgbUwHQYDVR0OBBYEFG4VV6/aNLx/qFIS9MhAWuyeV5OX + MIGFBgNVHSMEfjB8gBRuFVev2jS8f6hSEvTIQFrsnleTl6FZpFcwVTELMAkGA1UE + BhMCVVMxEDAOBgNVBAgTB0dlb3JnaWExEDAOBgNVBAcTB0F0bGFudGExEDAOBgNV + BAoTB0FuZ3VsYXIxEDAOBgNVBAsTB0FuZ3VsYXKCCQCTnm8HxgputTAMBgNVHRME + BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQDO4jZT/oKVxaiWr+jV5TD+qwThl9zT + Uw/ZpFDkdbZdY/baCFaLCiJwkK9+puMOabLvm1VzcnHHWCoiUNbWpw8AOumLEnTv + ze/5OZXJ6XlA9kd9f3hDlN5zNB3S+Z2nKIrkPGfxQZ603QCbWaptip5dxgek6oDZ + YXVtnbOnPznRsG5jh07U49RO8CNebqZLzdRToLgObbqYlfRMcbUxCOHXjnB5wUlp + 377Iivm4ldnCTvFOjEiDh+FByWL5xic7PjyJPZFMidiYTmsGilP9XTFC83CRZwz7 + vW+RCSlU6x8Uejz98BPmASoqCuCTUeOo+2pFelFhX9NwR/Sb6b7ybdPv + -----END CERTIFICATE----- + `, + }); + + const overrides: Partial = { + ssl: true, + sslKey: '../ssl/server.key', + sslCert: '../ssl/server.crt', + }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_big.ts new file mode 100644 index 0000000000..2cfec54504 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_big.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { concatMap, take, tap } from 'rxjs/operators'; +import { + TestProjectHost, + browserWorkspaceTarget, + devServerWorkspaceTarget, + makeWorkspace, + request, + workspaceRoot, +} from '../utils'; + + +describe('Dev Server Builder', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + concatMap(() => fromPromise(request('http://localhost:4200/index.html'))), + tap(response => expect(response).toContain('HelloWorldApp')), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_big.ts new file mode 100644 index 0000000000..1b842b1a24 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_big.ts @@ -0,0 +1,142 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { + TestLogger, + TestProjectHost, + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + makeWorkspace, + workspaceRoot, +} from '../utils'; + + +describe('Extract i18n Target', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const extractionFile = join(normalize('src'), 'messages.xlf'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + host.appendToFile('src/app/app.component.html', '

i18n test

'); + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.asSync().exists((extractionFile))).toBe(true); + expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + .toMatch(/i18n test/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('shows errors', (done) => { + const logger = new TestLogger('i18n-errors'); + host.appendToFile('src/app/app.component.html', + '

Hello world inner

'); + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget(), { logger })), + tap((buildEvent) => { + expect(buildEvent.success).toBe(false); + const msg = 'Could not mark an element as translatable inside a translatable section'; + expect(logger.includes(msg)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports locale', (done) => { + host.appendToFile('src/app/app.component.html', '

i18n test

'); + const overrides = { i18nLocale: 'fr' }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.asSync().exists((extractionFile))).toBe(true); + expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + .toContain('source-language="fr"'); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports out file', (done) => { + host.appendToFile('src/app/app.component.html', '

i18n test

'); + const outFile = 'messages.fr.xlf'; + const extractionFile = join(normalize('src'), outFile); + const overrides = { outFile }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.asSync().exists(extractionFile)).toBe(true); + expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + .toMatch(/i18n test/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports output path', (done) => { + host.appendToFile('src/app/app.component.html', '

i18n test

'); + // Note: this folder will not be created automatically. It must exist beforehand. + const outputPath = 'app'; + const extractionFile = join(normalize('src'), outputPath, 'messages.xlf'); + const overrides = { outputPath }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.asSync().exists(extractionFile)).toBe(true); + expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + .toMatch(/i18n test/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports i18n format', (done) => { + host.appendToFile('src/app/app.component.html', '

i18n test

'); + const extractionFile = join(normalize('src'), 'messages.xmb'); + const overrides = { i18nFormat: 'xmb' }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + extractI18nWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.asSync().exists(extractionFile)).toBe(true); + expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + .toMatch(/i18n test/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts new file mode 100644 index 0000000000..c59668adc6 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts @@ -0,0 +1,105 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap } from 'rxjs/operators'; +import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Karma Builder assets', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const assets: { [path: string]: string } = { + './src/folder/folder-asset.txt': 'folder-asset.txt', + './src/glob-asset.txt': 'glob-asset.txt', + './src/output-asset.txt': 'output-asset.txt', + }; + host.writeMultipleFiles(assets); + host.writeMultipleFiles({ + 'src/app/app.module.ts': ` + import { BrowserModule } from '@angular/platform-browser'; + import { NgModule } from '@angular/core'; + import { HttpModule } from '@angular/http'; + import { AppComponent } from './app.component'; + + @NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + HttpModule + ], + providers: [], + bootstrap: [AppComponent] + }) + export class AppModule { } + `, + 'src/app/app.component.ts': ` + import { Component } from '@angular/core'; + import { Http, Response } from '@angular/http'; + + @Component({ + selector: 'app-root', + template: '

{{asset.content }}

' + }) + export class AppComponent { + public assets = [ + { path: './folder/folder-asset.txt', content: '' }, + { path: './glob-asset.txt', content: '' }, + { path: './output-folder/output-asset.txt', content: '' }, + ]; + constructor(private http: Http) { + this.assets.forEach(asset => http.get(asset.path) + .subscribe(res => asset.content = res['_body'])); + } + }`, + 'src/app/app.component.spec.ts': ` + import { TestBed, async } from '@angular/core/testing'; + import { HttpModule } from '@angular/http'; + import { AppComponent } from './app.component'; + + describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + HttpModule + ], + declarations: [ + AppComponent + ] + }).compileComponents(); + })); + + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + });`, + }); + + const overrides = { + assets: [ + { glob: 'glob-asset.txt' }, + { glob: 'output-asset.txt', output: 'output-folder' }, + { glob: '**/*', input: 'folder', output: 'folder' }, + ], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_big.ts new file mode 100644 index 0000000000..f749aa20d7 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_big.ts @@ -0,0 +1,63 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, debounceTime, tap } from 'rxjs/operators'; +import { KarmaBuilderOptions } from '../../src'; +import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Karma Builder code coverage', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const coverageFilePath = normalize('coverage/lcov.info'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides: Partial = { codeCoverage: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + // It seems like the coverage files take a while being written to disk, so we wait 500ms here. + debounceTime(500), + tap(buildEvent => { + expect(buildEvent.success).toBe(true); + expect(host.asSync().exists(coverageFilePath)).toBe(true); + const content = virtualFs.fileBufferToString(host.asSync().read(coverageFilePath)); + expect(content).toContain('polyfills.ts'); + expect(content).toContain('test.ts'); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports exclude', (done) => { + const overrides: Partial = { + codeCoverage: true, + codeCoverageExclude: [ + 'polyfills.ts', + '**/test.ts', + ], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + // It seems like the coverage files take a while being written to disk, so we wait 500ms here. + debounceTime(500), + tap(buildEvent => { + expect(buildEvent.success).toBe(true); + expect(host.asSync().exists(coverageFilePath)).toBe(true); + const content = virtualFs.fileBufferToString(host.asSync().read(coverageFilePath)); + expect(content).not.toContain('polyfills.ts'); + expect(content).not.toContain('test.ts'); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_big.ts new file mode 100644 index 0000000000..b8f78ebecb --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_big.ts @@ -0,0 +1,73 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, debounceTime, take, tap } from 'rxjs/operators'; +import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +// Karma watch mode is currently bugged: +// - errors print a huge stack trace +// - karma does not have a way to close the server gracefully. +// TODO: fix these before 6.0 final. +xdescribe('Karma Builder watch mode', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + const overrides = { watch: true }; + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + debounceTime(500), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + take(1), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('recovers from compilation failures in watch mode', (done) => { + const overrides = { watch: true }; + let buildNumber = 0; + + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + debounceTime(500), + tap((buildEvent) => { + buildNumber += 1; + switch (buildNumber) { + case 1: + // Karma run should succeed. + // Add a compilation error. + expect(buildEvent.success).toBe(true); + host.writeMultipleFiles({ + 'src/app/app.component.spec.ts': '

definitely not typescript

', + }); + break; + + case 2: + // Karma run should fail due to compilation error. Fix it. + expect(buildEvent.success).toBe(false); + host.writeMultipleFiles({ 'src/foo.spec.ts': '' }); + break; + + case 3: + // Karma run should succeed again. + expect(buildEvent.success).toBe(true); + break; + + default: + break; + } + }), + take(3), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts new file mode 100644 index 0000000000..31d817aad1 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts @@ -0,0 +1,46 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; + + +describe('Karma Builder', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('runs', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('fails with broken compilation', (done) => { + host.writeMultipleFiles({ + 'src/app/app.component.spec.ts': '

definitely not typescript

', + }); + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports ES2015 target', (done) => { + host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); + architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/protractor/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/protractor/works_spec_big.ts new file mode 100644 index 0000000000..8696b935f1 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/protractor/works_spec_big.ts @@ -0,0 +1,111 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { concatMap, retry } from 'rxjs/operators'; +import { + TestProjectHost, + browserWorkspaceTarget, + devServerWorkspaceTarget, + makeWorkspace, + protractorWorkspaceTarget, + workspaceRoot, +} from '../utils'; + + +describe('Protractor Builder', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + protractorWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget())), + retry(3), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works with no devServerTarget', (done) => { + const overrides = { devServerTarget: undefined }; + + architect.loadWorkspaceFromJson(makeWorkspace(protractorWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + // This should fail because no server is available for connection. + ).subscribe(undefined, done, done.fail); + }, 30000); + + it('picks up changed port in devServer', (done) => { + const modifiedDevServerTarget = devServerWorkspaceTarget; + modifiedDevServerTarget.options.port = 4400; + const workspace = makeWorkspace([ + browserWorkspaceTarget, + modifiedDevServerTarget, + protractorWorkspaceTarget, + ]); + + architect.loadWorkspaceFromJson(workspace).pipe( + concatMap(() => architect.run(architect.getTarget())), + retry(3), + ).subscribe(undefined, done.fail, done); + }, 60000); + + it('overrides protractor specs', (done) => { + host.asSync().rename(normalize('./e2e/app.e2e-spec.ts'), + normalize('./e2e/renamed-app.e2e-spec.ts')); + + const overrides = { specs: ['./e2e/renamed-app.e2e-spec.ts'] }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + protractorWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + retry(3), + ).subscribe(undefined, done.fail, done); + }, 60000); + + it('overrides protractor suites', (done) => { + host.asSync().rename(normalize('./e2e/app.e2e-spec.ts'), + normalize('./e2e/renamed-app.e2e-spec.ts')); + + // Suites block need to be added in the protractor.conf.js file to test suites + host.replaceInFile('protractor.conf.js', `allScriptsTimeout: 11000,`, ` + allScriptsTimeout: 11000, + suites: { + app: './e2e/app.e2e-spec.ts' + }, + `); + + const overrides = { suite: 'app' }; + + architect.loadWorkspaceFromJson(makeWorkspace([ + browserWorkspaceTarget, + devServerWorkspaceTarget, + protractorWorkspaceTarget, + ])).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + retry(3), + ).subscribe(undefined, done.fail, done); + }, 60000); + + // TODO: test `element-explorer` when the protractor builder emits build events with text. + // .then(() => execAndWaitForOutputToMatch('ng', ['e2e', '--element-explorer'], + // /Element Explorer/)) + // .then(() => killAllProcesses(), (err: any) => { + // killAllProcesses(); + // throw err; + // }) +}); diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_big.ts new file mode 100644 index 0000000000..749ee73a1a --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/tslint/works_spec_big.ts @@ -0,0 +1,164 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { normalize, virtualFs } from '@angular-devkit/core'; +import { concatMap, tap } from 'rxjs/operators'; +import { TslintBuilderOptions } from '../../src'; +import { + TestLogger, + TestProjectHost, + makeWorkspace, + tslintWorkspaceTarget, + workspaceRoot, +} from '../utils'; + + +describe('Tslint Target', () => { + const host = new TestProjectHost(workspaceRoot); + const architect = new Architect(normalize(workspaceRoot), host); + const filesWithErrors = { 'src/foo.ts': 'const foo = "";\n' }; + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works', (done) => { + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget())), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports exclude', (done) => { + host.writeMultipleFiles(filesWithErrors); + const overrides: Partial = { exclude: ['**/foo.ts'] }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports fix', (done) => { + host.writeMultipleFiles(filesWithErrors); + const overrides: Partial = { fix: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = normalize('src/foo.ts'); + const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + expect(content).toContain(`const foo = '';`); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports force', (done) => { + host.writeMultipleFiles(filesWithErrors); + const logger = new TestLogger('lint-force'); + const overrides: Partial = { force: true }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(logger.includes(`" should be '`)).toBe(true); + expect(logger.includes(`Lint errors found in the listed files`)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports format', (done) => { + host.writeMultipleFiles(filesWithErrors); + const logger = new TestLogger('lint-format'); + const overrides: Partial = { format: 'stylish' }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + tap((buildEvent) => expect(buildEvent.success).toBe(false)), + tap(() => { + expect(logger.includes(`quotemark`)).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports finding configs', (done) => { + host.writeMultipleFiles({ + 'src/app/foo/foo.ts': `const foo = '';\n`, + 'src/app/foo/tslint.json': ` + { + "rules": { + "quotemark": [ + true, + "double" + ] + } + } + `, + }); + const overrides: Partial = { tslintConfig: undefined }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports overriding configs', (done) => { + host.writeMultipleFiles({ + 'src/app/foo/foo.ts': `const foo = '';\n`, + 'src/app/foo/tslint.json': ` + { + "rules": { + "quotemark": [ + true, + "double" + ] + } + } + `, + }); + const overrides: Partial = { tslintConfig: '../tslint.json' }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports using files with no project', (done) => { + const overrides: Partial = { + tsConfig: undefined, + files: ['app/**/*.ts'], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('errors when type checking is used without a project', (done) => { + const overrides: Partial = { + tsConfig: undefined, + typeCheck: true, + }; + + architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + ).subscribe(undefined, done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts new file mode 100644 index 0000000000..eb87d6a844 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts @@ -0,0 +1,130 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Workspace, WorkspaceTarget } from '@angular-devkit/architect'; +import { getSystemPath, join, normalize, relative } from '@angular-devkit/core'; +import { + BrowserBuilderOptions, + DevServerBuilderOptions, + ExtractI18nBuilderOptions, + KarmaBuilderOptions, + ProtractorBuilderOptions, + TslintBuilderOptions, +} from '../../src'; + + +const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any +export const workspaceRoot = join(devkitRoot, + 'tests/@angular_devkit/build_webpack/hello-world-app/'); +const builderPath = join(devkitRoot, 'packages/angular_devkit/build_webpack'); +const relativeBuilderPath = relative(workspaceRoot, builderPath); + + +// Workspace and options need to be created from functions because JSON Schema validation +// will mutate change the objects. +export function makeWorkspace( + WorkspaceTargets: WorkspaceTarget<{}> | WorkspaceTarget<{}>[], +): Workspace { + if (!Array.isArray(WorkspaceTargets)) { + WorkspaceTargets = [WorkspaceTargets]; + } + + const workspace: Workspace = { + name: 'spec', + version: 1, + root: '', + defaultProject: 'app', + projects: { + app: { + root: 'src', + projectType: 'application', + targets: {}, + }, + }, + }; + + WorkspaceTargets.forEach(WorkspaceTarget => { + workspace.projects.app.targets[WorkspaceTarget.builder] = { + builder: `${getSystemPath(relativeBuilderPath)}:${WorkspaceTarget.builder}`, + options: WorkspaceTarget.options, + } as WorkspaceTarget; + // Last spec target is the default. + workspace.projects.app.defaultTarget = WorkspaceTarget.builder; + }); + + return workspace; +} + +export const browserWorkspaceTarget: WorkspaceTarget> = { + builder: 'browser', + options: { + outputPath: '../dist', + index: 'index.html', + main: 'main.ts', + polyfills: 'polyfills.ts', + tsConfig: 'tsconfig.app.json', + progress: false, + aot: false, + styles: [{ input: 'styles.css', lazy: false }], + scripts: [], + assets: [ + { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, + { glob: '**/*', input: 'assets', output: 'assets', allowOutsideOutDir: false }, + ], + }, +}; + +export const devServerWorkspaceTarget: WorkspaceTarget> = { + builder: 'devServer', + options: { + browserTarget: 'app:browser', + watch: false, + }, +}; + +export const extractI18nWorkspaceTarget: WorkspaceTarget> = { + builder: 'extractI18n', + options: { + browserTarget: 'app:browser', + }, +}; + +export const karmaWorkspaceTarget: WorkspaceTarget> = { + builder: 'karma', + options: { + main: 'test.ts', + polyfills: 'polyfills.ts', + // Use Chrome Headless for CI envs. + browsers: 'ChromeHeadless', + tsConfig: 'tsconfig.spec.json', + karmaConfig: '../karma.conf.js', + progress: false, + styles: [{ input: 'styles.css', lazy: false }], + scripts: [], + assets: [ + { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, + { glob: '**/*', input: 'assets', output: 'assets', allowOutsideOutDir: false }, + ], + }, +}; + +export const protractorWorkspaceTarget: WorkspaceTarget> = { + builder: 'protractor', + options: { + protractorConfig: '../protractor.conf.js', + devServerTarget: 'app:devServer', + }, +}; + +export const tslintWorkspaceTarget: WorkspaceTarget> = { + builder: 'tslint', + options: { + tsConfig: 'tsconfig.app.json', + exclude: ['**/node_modules/**'], + }, +}; diff --git a/packages/angular_devkit/build_webpack/test/utils/index.ts b/packages/angular_devkit/build_webpack/test/utils/index.ts new file mode 100644 index 0000000000..24373de34c --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/utils/index.ts @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './default-workspaces'; +export * from './request'; +export * from './test-project-host'; +export * from './test-logger'; diff --git a/packages/angular_devkit/build_webpack/test/utils/request.ts b/packages/angular_devkit/build_webpack/test/utils/request.ts new file mode 100644 index 0000000000..9d0d0be91c --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/utils/request.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { IncomingMessage } from 'http'; +import * as _request from 'request'; + +export function request(url: string, headers = {}): Promise { + return new Promise((resolve, reject) => { + const options = { + url: url, + headers: { 'Accept': 'text/html', ...headers }, + agentOptions: { rejectUnauthorized: false }, + }; + // tslint:disable-next-line:no-any + _request(options, (error: any, response: IncomingMessage, body: string) => { + if (error) { + reject(error); + } else if (response.statusCode && response.statusCode >= 400) { + reject(new Error(`Requesting "${url}" returned status code ${response.statusCode}.`)); + } else { + resolve(body); + } + }); + }); +} diff --git a/packages/angular_devkit/build_webpack/test/utils/test-logger.ts b/packages/angular_devkit/build_webpack/test/utils/test-logger.ts new file mode 100644 index 0000000000..cda17fad25 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/utils/test-logger.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { logging } from '@angular-devkit/core'; + + +export class TestLogger extends logging.Logger { + private _latestEntries: logging.LogEntry[] = []; + constructor(name: string, parent: logging.Logger | null = null) { + super(name, parent); + this.subscribe((entry) => this._latestEntries.push(entry)); + } + + clear() { + this._latestEntries = []; + } + + includes(message: string) { + return this._latestEntries.some((entry) => entry.message.includes(message)); + } + + test(re: RegExp) { + return this._latestEntries.some((entry) => re.test(entry.message)); + } +} diff --git a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts new file mode 100644 index 0000000000..2a1b1c1a9d --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts @@ -0,0 +1,170 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + Path, + PathFragment, + getSystemPath, + normalize, + resolve, + virtualFs, +} from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { SpawnOptions, spawn } from 'child_process'; +import { Stats } from 'fs'; +import { Observable } from 'rxjs/Observable'; +import { empty } from 'rxjs/observable/empty'; +import { concatMap, map } from 'rxjs/operators'; + + +interface ProcessOutput { + stdout: string; + stderr: string; +} + +export class TestProjectHost extends NodeJsSyncHost { + private _syncHost: virtualFs.SyncDelegateHost; + + constructor(protected _root: Path) { + super(); + this._syncHost = new virtualFs.SyncDelegateHost(this); + } + + // When a path is relative, resolve it relative to root, otherwise use it as absolute. + write(path: Path, content: virtualFs.FileBuffer): Observable { + return super.write(resolve(this._root, path), content); + } + read(path: Path): Observable { + return super.read(resolve(this._root, path)); + } + delete(path: Path): Observable { + return super.delete(resolve(this._root, path)); + } + rename(from: Path, to: Path): Observable { + return super.rename(resolve(this._root, from), resolve(this._root, to)); + } + + list(path: Path): Observable { + return super.list(resolve(this._root, path)); + } + + exists(path: Path): Observable { + return super.exists(resolve(this._root, path)); + } + isDirectory(path: Path): Observable { + return super.isDirectory(resolve(this._root, path)); + } + isFile(path: Path): Observable { + return super.isFile(resolve(this._root, path)); + } + + // Some hosts may not support stats. + stats(path: Path): Observable> | null { + return super.stats(resolve(this._root, path)); + } + + // Some hosts may not support watching. + watch( + path: Path, options?: virtualFs.HostWatchOptions, + ): Observable | null { + return super.watch(resolve(this._root, path), options); + } + + asSync() { + return this._syncHost; + } + + initialize(): Observable { + return this.exists(normalize('.git')).pipe( + concatMap(exists => !exists ? this._gitInit() : empty()), + ); + } + + restore(): Observable { + return this._gitClean(); + } + + private _gitClean(): Observable { + return this._exec('git', ['clean', '-fd']).pipe( + concatMap(() => this._exec('git', ['checkout', '.'])), + map(() => { }), + ); + } + + private _gitInit(): Observable { + return this._exec('git', ['init']).pipe( + concatMap(() => this._exec('git', ['config', 'user.email', 'angular-core+e2e@google.com'])), + concatMap(() => this._exec('git', ['config', 'user.name', 'Angular DevKit Tests'])), + concatMap(() => this._exec('git', ['add', '--all'])), + concatMap(() => this._exec('git', ['commit', '-am', '"Initial commit"'])), + map(() => { }), + ); + } + + private _exec(cmd: string, args: string[]): Observable { + return new Observable(obs => { + args = args.filter(x => x !== undefined); + let stdout = ''; + let stderr = ''; + + const spawnOptions: SpawnOptions = { cwd: getSystemPath(this._root) }; + + if (process.platform.startsWith('win')) { + args.unshift('/c', cmd); + cmd = 'cmd.exe'; + spawnOptions['stdio'] = 'pipe'; + } + + const childProcess = spawn(cmd, args, spawnOptions); + childProcess.stdout.on('data', (data: Buffer) => stdout += data.toString('utf-8')); + childProcess.stderr.on('data', (data: Buffer) => stderr += data.toString('utf-8')); + + // Create the error here so the stack shows who called this function. + const err = new Error(`Running "${cmd} ${args.join(' ')}" returned error code `); + + childProcess.on('exit', (code) => { + if (!code) { + obs.next({ stdout, stderr }); + } else { + err.message += `${code}.\n\nSTDOUT:\n${stdout}\n\nSTDERR:\n${stderr}\n`; + obs.error(err); + } + obs.complete(); + }); + }); + } + + writeMultipleFiles(files: { [path: string]: string }): void { + Object.keys(files).map(fileName => + this.asSync().write(normalize(fileName), virtualFs.stringToFileBuffer(files[fileName])), + ); + } + + replaceInFile(path: string, match: RegExp | string, replacement: string) { + const content = virtualFs.fileBufferToString(this.asSync().read(normalize(path))); + this.asSync().write(normalize(path), + virtualFs.stringToFileBuffer(content.replace(match, replacement))); + } + + appendToFile(path: string, str: string) { + const content = virtualFs.fileBufferToString(this.asSync().read(normalize(path))); + this.asSync().write(normalize(path), + virtualFs.stringToFileBuffer(content.concat(str))); + } + + fileMatchExists(dir: string, regex: RegExp) { + const [fileName] = this.asSync().list(normalize(dir)).filter(name => name.match(regex)); + + return fileName || undefined; + } + + copyFile(from: string, to: string) { + const content = this.asSync().read(normalize(from)); + this.asSync().write(normalize(to), content); + } +} diff --git a/packages/angular_devkit/core/src/utils/literals.ts b/packages/angular_devkit/core/src/utils/literals.ts index 13683c18a3..eff190829a 100644 --- a/packages/angular_devkit/core/src/utils/literals.ts +++ b/packages/angular_devkit/core/src/utils/literals.ts @@ -13,7 +13,7 @@ export type TemplateTag = (template: TemplateStringsArray, ...substitutions: any export function oneLine(strings: TemplateStringsArray, ...values: any[]) { const endResult = String.raw(strings, ...values); - return endResult.replace(/(?:\n(?:\s*))+/gm, ' ').trim(); + return endResult.replace(/(?:\r?\n(?:\s*))+/gm, ' ').trim(); } export function indentBy(indentations: number): TemplateTag { diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts index d47cdab9de..d8b1dfec43 100644 --- a/scripts/validate-licenses.ts +++ b/scripts/validate-licenses.ts @@ -70,6 +70,9 @@ const ignoredPackages = [ // so hard to manage. In talk with owner and users to switch over. 'uws@0.14.5', // TODO(filipesilva): remove this when karma is moved to e2e tests. + // TODO(filipesilva): remove this when spec_big is moved to e2e tests. + 'font-awesome@4.7.0', // (OFL-1.1 AND MIT) + ]; // Find all folders directly under a `node_modules` that have a package.json. diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore b/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore index d0448e8d4e..e3038ca2d3 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore @@ -1,45 +1,3 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/dist-server -/tmp -/out-tsc - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -testem.log -/typings - -# e2e -/e2e/*.js -/e2e/*.map - -# System Files -.DS_Store -Thumbs.db - -src/messages.xlf +# Don't ignore node_modules, this project is not meant to be installed. +# Also, ~ import path in styles does only looks in the first node_modules found. +# /node_modules diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js index aba937c321..4430fdc8d9 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js +++ b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js @@ -1,6 +1,8 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html +const path = require('path'); + module.exports = function (config) { config.set({ basePath: '', @@ -16,6 +18,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { + dir: path.join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ], fixWebpackSourcePaths: true }, diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/spectrum.png b/tests/@angular_devkit/build_webpack/hello-world-app/src/spectrum.png new file mode 100644 index 0000000000000000000000000000000000000000..2a5f123afc84832cfe8d551417376e7295bc1d15 GIT binary patch literal 30822 zcmY(KQ;;q^)TQ6H-KTBawt3pNZQHhO+qP|=wr#t6zJKOoW_CTbvoCj5DoJInBtl+R z91a=_8UO&mNlJ()0sz2P|JC`B!2ji~-0o`tz@1i7L{Qls=xSx`PY?s5z<`e6ugL*b zbxU6DEGL67SJ9JG6Ah3yT>i0cb2~0z9vC1m|9{B`1LWub$DL%x0uw+sBgiiqQ(R?) zJxi>ywdY{TlBX<`am-0~TeNdKd zdTRRrhJmRm6Z58#De`ujXVFr$8$uEc&+`)YRE?s`b6xI-&dTbNGCEcv1!L(Nr*Bh? zTllz(YO`it30qA7FyX zR6k-gr@R{G&jDEK;k&NQM?sI48{Ts0O3Q>Ks&nkrkK9&HDtYp4-o!r*$;BMmh0=ttJf8>-N24!>D48kzRNIS3S?q%~d_S#sVRt?MHU{ z;EKdAY3Q%D;MMAFwx9lI(`5oN2&lBb*a*zX+5q532AZ$+{{K5{Egq>Y)?FU5D{a@ z`RbFQ+|MFN+j@f^HYn)1zGK?}xC7cCxWLsC*n&sw)wMXnj*mo__mPHKNbj`_I}RU1 zLftKge{`1vc4V7$&pX0ts8`!LKEKNw9SEGhgSfa!1o>%X6zJ~QJSa7r%06z&Q5qQp zV9iDxfvwf*H_N4#t)&9Cl1&QwsSBPhyU&i_`w%q1nW!_xlIJIJ8k`1((Ih|Nb0I=J za$a&D+q0j7OS2eGvHYvb5>qA$qJe~V?~mb`)#5^JySi~G+pwPV0cLKHb!Xef>_!#+ z6S`G4hwABDI1KOL$2#k%cp+SgtRe~-B_@k-`+^itu+TVSh=2HJ+dp_{MzD*$1zrZ6 zVFOwwyyO|P%_fMLE8jsnA4?iJ=hRE>927Gk$xPU%wfqFGnt!|g>P@*XWL1}gq&OZz ze;`Oj#1LU=HkXJ%O2vx<&t7QzUyW(&i zCvSZ65%uF(ey;lywoyhry`p4&MVBKQnez#hwE8ggRSvI?i%eh_M*3n5jY$!0;uT`U zDXZa9qQR3hDxRgK3FbuU&&-MFEd=K9RU8fo0;+LDiR%PJbr$FiN(gzm452iPE*nDN zJQu0wglsJTsM%-{MHouwR@JvZEQVwWsYFjdEa`VfnoGFEmW^8jpIeqrPoAUigdbf< zz#$#RhZILnZ^$n!D1Zx}{Z?beG{!dMv377jF(+5QGZf#_h-?RUEv}BG(W!7pq(#6&xNQkyRv&6Ca_nicPjJ z_>qLHhFKfD6AF1OtFj6LLyZYQfC~SW?GI{6=LSms`je3;L|!L?jS?)IAK)e3+`N_L zMoOiU3Slm_Y!4$f8m&LdWVb^J1OsKrL`*a~z<|W4D^d+SEDCm4ia(4mf1GnA?t`o1zswg4+~qJ%4rV!6O1xFN(q)TrKT zTutK)bGb=$2WU?e$5a@bo^(FmVR-UVXvDoY)Dbcm8|JW>$R-js?ejq$AOIq(rb%tr zN96*)nmJe^k7X6MCT-YXK&BD9&miLuD{_}2kGtNkZ$T&>$}{%(V!n<>EgX7?xE8T`HRfVfaHBpvob)`9ie3SWWHR=bhf&-jDJZ~ zy8BRb*aU|3{`GewdWoZ_>wtOcwh9?CxjDI<(3F>d;dLq!lxVe%`moLSwtY`{X#_t@ zFB?bwWJXW`(-3j+s$uc7X(-Lxn(r25DJ4%M7xz|gZ_;tm)UTBFaoo;Uo}looP1H z-cHkwvtfVfJ%QaU)UujkGu7ix4I#SwjQFw0sC$Xl!aTGbCmiW-pT<^z(mo77lipVY zm?b{`Wr)o*IGhInkrPqk{zq?1&D+w)y85(Hj%H5gt{|*5peEaELBCF|6pZe3892%I zcjx{LBaTx$n4W-PEWzW99f3eJ`p3ZoC!Cjc=k+p@!y72PA1D1eX7``NPnhx_4u1*V z?5ke`N>F!z*XOJ3H2kcmZ=qiVcUiGKWDq5JjWq9F)n_ffPMhx~V9;(3wwIYYoLQ%w z^gKUNLGxKt9n4Ym56}yUFQ--r#BniZ6LuHZ`w<7dIW~4OI@$Z&?>K0=-OuX#Ok(Wc z2$jHSuYSIczbsrPXw#vqk;L2ruFkFUcQcd-LEp}-p0K@)Sp_+!mH*` zrv5N}nm9hTg$S(%OLsR{^G%077;XtLN@!|cox{MJ8LhBv3AeM*dXFX7g9tMApf98y z&>+e{On5-X>s0m^KKxzwlQ89sEcwEp4i-3;4KC_uv%GAhUcFCo{v%CH@&Jy1|Nd&H zb)HCbukM)SY4)jOT#m0fTZXG(D%)t87nRSh@qY|N@hnc7>;U&pqDHRxtK&$mAt7=) z=1WO}2?z#F@5P)K)S-=tVQSTJxc4J%KI3$e-7h8!Fer(d5}4(kNFec-3tsVAcj2w! zG3^!Wd=lV#m`K^Th`7se8G?qu#H8}gQ;JGOjtO*!lEj`723X6KzYQAyvPgT*6>QV- zxBr?zJoB5DmJDnUAl(>P3^vt1)>|`TZE?Cj?=Ko@PVXT3|$VETaz@tGD z?jwX^w6VP}MY?-cy+reVXuFL2H@z^0F0y{zLHG3s0z_>PKTu^poPALjFhlp7A8rmq zwd?Kpi-Yv5-(_J*45O4s(P;S|y39iQ>`!t>A>^=J2YkQf!39i}j5rd-6^Dt=g9yk> z8{Bn-qEA^<%{euU3I8V2zQL`8w3&tSX(8gSmK{e1ec<;P$$izny-)ZWSAjBWQiaE9 z6HALW0_;WS?6w_2paPA<&*I}~U~fYl+@^KO{L1Ks{~6U8>k@rcNQXeSfA z7pkMYYPo&wL7QFpncdRlZ%Q<>X1Ati{AChO_ejS~%lO~n7WO~GkiNw9%Rfcy=TGHV zk(=>*B>|7UC6{JStd6cdRh#c;y-M~PiCz~M==P86YpwTwqzaKz5Zx*7@28U)q`GV3 zF=gTsW;Bso50gEZv>HFl%Xk-dsii#Zyz}p`k~;fVftBBzmI{>^AopuIyNxZ*^nhQc zzEPDrsobq8zep8es;})!wu2t;zg}lY?+RfuM#V;lTo@5w8ZMAs@*{WuKq0_Nh!;vw znCLK0Ll9iPzfNes9$r{04$Z>w*ExnQ9(vV2{OrF+{rKlQx@TW!TPjwIFXP;7`tJ5^ zb<-?=^ZqoYyUHh-H*!KV{b>ij;5#hH6@FDdDNe2(@nnnrwH~v+2eoL&J#!rUrkhfc zd#Y#k+Y7gBFly-d`qrJ@UZ2ZN=X3Ez4KM7d4WNlOPOV+|aBvzlqlq41y2YOC^>MLu z*cj_gRm$S~ot&kEW`x$8#}rb@TW9;aX2zCH$2RCYacdv^6X)i4JsD$d{8-83o2GJx z5ai?g30Vh-9BU3a#|x&xb@_U~iJijRY^WbCBjRw;)K)&^E+qYzXm2FmOhGZ&{Tfrn zzSU=|uOi%k*ql7laC}ZXbjtg$rGE6YW$6;dm)l2#OuPlGK;x8uc_sH@4+50rVD@A9 zWIwOB_FRTK32{uLNyv;Y8i*e@GJ?C2)_EiFtc>2nMB46ThB^_Hn9?ZspBp(T+r-MU zF>k#=KH1UNmt>3dB`}^B7}tCJX6V{Yi`=vK69)U?G0Tu77(~g4#ci5gP2BrguCKB5 z8TOiW`|EK)Tdfpb^>bmen6{XjnrTu!W^=N@ty}G8dn@I5@g9$g0VOT}qE zb;2K43lP?agRgO&2`(t2s>fM#Grr0&KTepaGS+?;THR>~!x*@IXx1PZC*-u-%@hH~ zb<|KuFG%b-qr}Ugz;U)FTf<$+I~@i4LY-FEcMy>yz4TMGDg5`0rYRj~nZ}ecN@Lm( z?Z4WY3_aN;jlUJ7g(S>EvTM}B%f@N1Mfwn9=cSD;_QHIJ&sljT5}cn)%-cR6hI}qc z_vI`$hI`b$!r!UClf!NI$8a~oiAcOHknm>Is zOHJt}xs7kv?KJA!9aVUQfb(qq4TY-9Xmbdm7QgfI*mv2-j3&~=?KqfaFXmyvsH(t| z2Uev-jeI6X`)eHDUHG@EOJDP_gQr1V^HjVKq6iCbs=^-0Mxn+|AttSL4{gSl{pn`! zkc{55J*su5n<)XB>keFTCwJq^^1t?m{MxO!8@YU4gHaWZPzPI}6+^-aW}dc8+621K zKzim!JX(^6qeXdY7qIIrpiR@Or-R1~0$_AM%-J3N%R8=U09(e5Sze>MT_mznpoUHr z$@D6MW@7^Ey86Lme`_*&8E^4Iejj_`m6OZ8Y_8Kl`)SX*``E0Zp(49rMl@7nf-x`%c7>&LtWR)5rs7m3KW7vh~IvzadFWGJpJmuUamu#rGVwsF$sHztE)SN+TG|+ zj4HLQoF6~brgTV4G^nAmR3&?S6E`clj`vzz`D!lDzK?R4sw|GPM}+xsc;y%RGFtrd z`W}9m_EKWmyd_|^@vbiwiwSp8V70d}qTTnun|}V7b^54TQ>c3ZTMy(oG*H><%9kVg zEj9eiv1{e&70EI6gcsnR9@2wQUv$_UlWyLBjgKaQCCFLCL~;&2x)&(%!u|kG&}(q` zL_q3di`+yDB7ahEiC7rD4;+D&?Yr~6%qdX#xbHj;n|K}SdTJIATOFp;m0PD4$|MXu z&--PzOmuiO(yRTaMkgY$>g~HErAmVR+h3r^SopSG_=&$S#@+a!op@WcXx`o)>vW zH81cdh)L6fyJ%plDK8TBkt+}>HRPKscOvbJ??m}T@8T++$5-W7<8AKyX_8%#(xxm2 z`sdu1ufOmEp3fcr$fdBkL^UN3$m1_WCag6KBCqjuvEb8K60T8VY zs3TWaUW#HZx2NUn7Aw{MNdq@d0EHK1HIPmHT{HAmb3uB4=i?39&yk0~p!N|GFK*pTphkIC0wV;6sd%CWIqN<(miqQ6{TVIYrS{_Rd1x zzVLQ%J+F6_Rk>U536FX_4z^Ess{|(ob=!%&?LKW3(5oCY4virRNrQ$?dZlJ0TA0q3 zT)yh-F}y_p?`f;5{$oq5DctsuFU}aB4|ngP1HX?hY_FkQ$ypuN6;AnX57XT%gHbAd|zW z!$cqGINEe+wYtXNgMruIiu4f?`KG&HGsRN@|L9zigKWiCveGZ2C-~{4>dRxQV#UI< zk(h~aiq9~cCpft^{Ox)RCp%Ngjnl@73L!Xg>b$S_@)?vj5mGBu?p{&%9y%#6))LL5 zx?5c>$rlP>>G8LqygP>`VfX7+GG3GpVP*~e#M(BpZF9Z*1Hr(v)PdG9HaOmPgS(cg z1E)%!jxE11mV=pLqyT4VJ~ayx6ik|E=(a<2sKB9|R|Cwj;k;_gW_{jO(7F z2Es>Gk_jXzyQIhL&@e_nxEsonDTt}KSB|8{>yalBygq)m5X}EOb0965lyR?sWQWbk zwRC;^syG<3V$4;|kRXIexx<=*FN!LJ-&G+S*iWVptt3%Ud;D<~2@#U4A)AjJ&arIt zjYoV(86Y7I2=;b+-CUgHLcLi)^^lP`itW|SwoFu70#LS;1AQC4c*Hk|t6Q6uK=s3g z^HKNja*QA%l?rJuiDVbqwx6`=%{z-{$$F6YQ>d%ul`_2>4G<&lN0b(491!rtI8YMQ z!iOVSf`L6Yh#~XS+A5UD9O%Z#$sOdA$}l^2WBg!H#w0@o?`^FH;m(g>5`p?6p8DM? z*sijvNWo=W-eL>-N+N0rf#u1llSSf2|4>&jzvPrJYO&z_(>`alvj|OEeRI~pn=wRV z&K#j3bkijcEix7N1D_ojt3^gGkRGNz0Q@7*f-eZDfm-{%1drGmA`a!c2R?p9Z;eBo z(&Jc*+NBIeNJGobz)GS@4{$+=lSxcZYU{DGN0&HP_&#!DBGG=bXP3mzm&v$~_+~bw z1STQl`UsuPxUb!0Y>kC6IFsarF28cqj5CLdxn7iX8Rm;-At?wJk3m1C-HzYZ^YF45 z4^9d=+wqa5AkZU6c?Kd}?(jXuD1)xp-}92VZhrVzx_@m6L;?aoOX`p5<8&pXAytI! zIf|#w-ro>ZLgWPG5KNYsANFI&w3h~)tpHWK*N*cT4I9ZYd6~NtvHfwEsvmLzl5y7X z=?ZUp>)VmXhKXC_U!gqfw}|h+E6gFi_!B-BX~*{3+NlyU+!6RBXN!9j3~lPkZ^$Mh2NJ=fR$kgVkIsNULOf{APi1U8B9ny9C{ zb$l_|&&dk*0vifqU=ig3&O|hdyvWw_1^BN<)Zu|GEttU|O`p>>*#r4rcVC$ zJq*!|mj)PJq7Nlz0>8(*DOf?29{3zC%Oe+o%6V> zE8QiH9Y1ys@Q?Tj@2F&KMft=scp%Rar4KS-AJPS)u7`IpxCquj#3==;%U=k&{`%@c z#8@(AZx`*LziOutIc%l-r1i9O9lcFQv=py?o_^k2gk2>3cdHOg1j{kmR@ zk0D8y0`q#?tzg78&2I$w(^bpF8~VcsnFm%eEF3}$i0~7?-F;C(xKrtG%Cm@h+?3xV(rXFP zJ8#g)NmVeBs~7`gsl0xNq@&}Nh*oVHrj`xfA4++dl81~@wadkz*wvP>g_SesOH9fK zcMRP?86+3P{@*rLiNo7N*ZTZN{X@g*;dBJ6xo`aSW&P5_A&EWU7)9U_BK^@Jo-uCg z5D~6pOV9PGdzY!CJM~0Rd<6~3uJ^nJ+nM!Ff-MMsQ%0M@Z;9bkq}Zg+a5nYskI z0HDV4l7ivQ8gob-e)2(?>_;o_Wm9KfgJ05fT%@p7Ufuu;EbyhwyL`eU54MGqVr;DB zJI;7Ht^=YjN}6m~KPPHl7|VqVNvVGt_U3G7o#{=D0%}@`Hytav`BP~23z+0#82N$aszwqNssbXKC=Rsc4~b}p?Jo>Z zyk+(ArE098rz%my&J3Y~xI4&}v0ZQh_|c)WfYcx7bdpjTin-jR>kCIOO!jn$j7n28kZIjZA zQsWet?^~n}XzGKv`tpCNzs)?RK15t;gv^__Udh3>?H27$UrXDoD1tL<8(-8VnCXd@ zX%f9OF8}rVki|^W7_td7awN_eP*DA$P&80dvqIV*69bv+ZvZnwrXPfd;luS$n#bLq zhn5cp|69Ae_&QC#R}b}bUWi^&Nd%S|JU!I##_dzgX^^-F-8YZOY8eVW!bG0Z-^Q^9 z!_SPSA3BcO>KnmIgW9(=SQHYaP(py8%HOO|t7EkH1fdC@kx#FAUoMTBDR#m_iynv- zr42=nt`bQO|IGmY+{8T;L$VLZLE@(zNbiw?4I@r>9wlHjCN4^~eT))ovk+#NMKeR9 zrXMJD_f?uZ>-zZtj+ev2C4~U$^OkFuIc`d;wvz7fv$tJRwy7rx$!8|=+aLIg&x%eK z1>T_O7iMKVYfVtVQ_$d?o=1uq*sP*F{6#q_q|v~%vu)A@)>B{PpII8=R;lL>oT_&{Hu zgBb60MSL}||NAB{t{VUPV}nuE1Xf>yrmN) z+=3y~0C)Hpi1~;53TUV-omBFLrETL=?`pdRXiy%*e}HG*4_~#QbZmP&2YehiQQ4yJ zt*^W8v?NWZzmD?WMP7e>q1`KDj>-4afewF?k*1AjC)zZ~=!OIs02TuV*z0NkKYscD zWdA_m|ChTgMVkMtbzQvORlM1>UkVBU{WJpp+)0Y1-+Q07xFC?bl=@tA9c$^7ACQVX zKpWz}^na{)0YRYu7XTR8{|726;D1Q28Vu~I15_XU+u6-{zLX5lAJ~pkq9|zx3q#K5 zXl@p`Hv|)k7qFMJ4^zaEasUQ}L)1ow9RB{$$@$%pF;}AKd->kA`W&BH19m%|oz3~~ zbvn5kpA`xuAOQGDu5*T*Qg->@q1LC;t4{ zg;}!6u2?@%qo%NW^fUbiE=!l9F-Djo9dU5<2P8i5(5(Zjuf9M0t8cX_ z{eBBxY`W8#q`=K^aGLcm5QM;+0#9|HyQbcoq0jC6+Y*HV_@!*1z|HZsy7aI8X4jT3 zaaj%{LIZ9Wn~KDwx6|$@R)0>pY(vQ*krsMFhhT(cSjcq#{rOItKog0#gmyF?<@fp7 z7&N-ISVscps9Lcw2mXv(MM%V&#KGlq9)HqVNK_C$lI|Ofr@c0L+NN*=m3N@MupmSD z5rG7N3acN&%boEVPuX)l>wId(9+<+sC67#{(djfA&qj9?l;N8a4&)}LCtsru_@zscOfi{IXjfQ*>ERMeGY$Sg z_%Df3TIkKM2@Cs8l0Bn3mz~`w`|Q4AcO5C0RvWS4nN%s?zb=095dr`cDGABhw#Peb zupo&gy18$iziZgGCVNMI)x?!QjhvK(6IY4-VF$_pMbHF?+pvzMF}aL3%aMl?m=l?- zCd1DlRy^ZhUg0HK+=uvz>90tp4V)CLgiBL5BZ;mSQy=53EdGW)(%|s=k)f{Q` zT3+e2`(NX4<@@&OBkiV%G~s&Glg@5iuEvFMcgTwFqVZ_qMHMiR;U^;K%&mM-EjGXN3 z!H=j~(C-c;N}N@dPlxqd0X6!=%#DX00)akF{>8!t7z<#4_Lgdgu;pVway zGCocnU=mR!&d_iM0Vd55+!R6t_9~3Y1=)QS8Rm0VR1wIIK7W#`shLVMhw|bhumkIC zy&@!T1lx19sikAYQSjzqvl-oogIe#qqI>w;KFjt82}I@L1x-J7k9_ zOQthT>_p?|sP;s)P#vN2HGssCc7F&!AQ2eFjr(-H{3-fjyX|*$HvqzK4gEdMOiH#L zqEx+8ZicyfeJvFPSh*y}NKs0fL@X&auq-OLOBQC6KGNiI-mKs*qYUeB(=^76pp?we z9F2GUJ^D#{1r-ZA9WR9Z{dCmFuz4avW}8iKzB{t2sf&{oX67mqlop1qa50L(15XWZ z{2bqQ#dLO#EfNe|&2qdR&M(-WqyhwYl^AK%?38O0N+WSpq{9sxw}GAiwdGf-%CRHp zs_r%mfhX*W!{>f03bd&jTVa*t5j%I$3@v5>R}l`9g#+v0^%ct^ZVxDsShU%+>p&7a z=V`ttAB)X(BTRaxGd6@GIQ{D?H~q%$_|5R#0fs>_HSCfsR@>*Q!&sky#3lWBF}0#7?M4ofx0{9Gez3DQ zGJjGo7)QbZ>4xIN07!^}bJhl~9I0uDc!hB4 z3xvH3AXyj>l8cU5Ay`M8TD##%$!59v4+&Z{D2R=ZNl6o$Ap1V}?Y=bA=4it-x>TdCuA4yy<4tMVL&Sn3Ks6? zr==ZGW*)j?j?qs_M%rQDlcq3LCWa5WiF(h2T|^lvNclQf@|WUzeDah#N%-Ae}t^xLPwbJEq+HX$azJ&%yaJIUfwg@}0Y`a* zoBeSoUMe2a`$FY19MByS?*Z9NjoQWj`Yx5=PIY4?AfOn;a&s9w;Z=~tkuiWuz%GmV za($F})9BM(Im&`5jp2VnEs~6RL9Y?<2f|Yv0ly{}o`tX1vdn-ehqr+)EYuc#!+KXFRj0>I7 z`xB_~)1SJ3fOu--7KbbIWW79c$Tkz16MDh%oBm z_PV#gT#K^O<$Al_)H@e(tT)Gd2g!b>L}!!UegsgcIz->rbdPFV&2~3nkxE;Y%X8tn zJcRH0@Ke3m$!Qw9HMTf+1C7_l(dm5j&mGaj-*mWWh$?o7r-t~h#lfzH3{{NDVtsjK z`cu1AZxi-HYxQQz&(*-8{UgYZ?2)upvTpHBH_$bvoK)xpOeda zo?N9}X4}JWci>0qeHE?4&M_(BWT6&Ei@|O=3fCdjMTcAU$AAQi7!#LpI5_Uz^P1D@ zypxo*JNO|@OEQp|nwNDZ#yLs}6f`KqD6Tr^>DYfJ*3-tbxg6Qg{=%&ao?J3Fciz$U z&<({+M9p%6Kc9_@f&Z#9hnV1Nra#`FM{31#wY*W`R;fiYE0z{J<&l}A@D(1H^%+^U zM7nLK2OEvE$8-4#|K@=sXvpm{2sDh7SEfeJv{ic8KCqeZ+v6uVVM&d*7Uy4EN}ti| z);{$t8No(*@Z9^7`0w3hn{Zog2@U(IE$^??*iTha{&1f-etgK)zyFMOclyhmZzlx4 zstvyh@||Wx=?h+8?no<85)meFN#vpK$z~`V-p-V~er}XHJ3Swo+UMY)CC{{xqtM~Y zT&FdB%S}UL$-N^5U%g%6YBp>tt%`04NrGXcTfhNm+MgcZLxUOerZl0!nw9!p6;l3&0%*q#Qiok+7KvX-%N<*2s-(Y z_$$8@vE(QLPAmdRjb?50Re;j zp03foC^iq_N^j)su5BBm@lDbBA>8uVA&sJ^j9E;g6~g1VoPf+txA)yUZ@zcv6Ia*! z`s1)!Q>J+iPrMfq3l?vyrTy_HTjp~(uFNKVJ#3^NOT=?iqe~9KTsiBj|74zoP%H5{ zg(|HS>`0&wH+RS)Mq!oxmj9({r#F}YGGfy-YYGYA|w|Ao&ZLKs7! zJLS<5nW6kV6)LMO)|@+p=q?)*W#Q${hBNiLebq{54!&m6=7Y0C>=Ca=(?ef1E`62n z^@h(kXI*H{45oa6T&2HAi@u|@_niHP=ke|8Q!c7txrcj@Xqe0^XpHq`O`tky)zR%J zwqM$CsKs{7gEW5Qz0K&mHdM`{f9Sixic_1a^}1eo9XSfmYu z{pdEqtPGh;it4G;@dP(PA~2AM^FDid?)5lQsgy{PsaY6#z!ZZ6F^+ z7rlhk$mhduGm;q7^!zK4vU{t?qgCiUL*3rs~;1?u`{M{^Fn|rDWw>Ku+?0z9>RHYIWNU z#mzj%v`iM2JXPw}3{ebbrNy?8LZg!$Eh7(FXgB%43)Y*(epJKeXbPMoCLe_fmLL z6SvqbCrLM=rwPKInW>ra4|}ZU8oy0kiXy|$;yu{QQl40GDweD5s)S}+_nQbaJ0pp1 zp>^m;V7cUFr2KJ`N0tVALCluH@rEn^HsupZ11WwbA2YGmQ?LD_pC_KVCsO#Wltrks znwXJl>NKhdJ5D!N%xY)hI$7><*geeqmIJmglxtM_3i_@FE#1zJ82wb+2DXA{pDTTo z>l`t2-tTLO*YfO%1{n&~TSlL$GnJQ4aU4t}$g#dpz6L%Ac8IL^* zaj6ebNhFVORHIZlJCtkUE)mym`J-hhtfr%Bc`4?ZFGh>f>cC{4X3W3E^;qu0G}voJ zM^dWzmUn}*nwU%`)k{o?w?m8A4QFPgCxCC2K9fdEy!|<+0!6Y{HtlSGUU2kWZ|3-2 z>8zTyaNa4rsp2`qu5=2nuVMtB)w`4iAtOZ#DW-@5ODb0>D^jM>$j{YEo82jyH!WL@ zc_ja`w$iBy)t9U@mJW-rOd+Dah4#aZCkc57i%;m z4NJ*j{aG?tkIaz|y=cK=UQK;NWe$bZP9G41t8t#SGnT#c`9-v?2Hm; zn@U2EOET56t5oO?jhhueCdc`S-X5l+5}5G$ePtU@rahb3WMuRgnXgEdc;iJ8y}XLb zlRy!fR6nmY&InhUyDPXNggv?jv=`sWxj*6ENrK>W?myHxp&KR}I>?MD z&SZW3tcE32)3pFF5=k_^zrQBgWgDgRmMHY;`ZN7=2_0Yyx~T&QG#afrE$%Zb^cr3x zd)sja*ggvFn28A`6=$zQDJCSYC#apjp)wIeeTlX_bC^~+M z?VROz!Zh}S`O))zuM~hW*;fXMk=!_+bQa0t#vtG1^@Tj zJzkSRw5h$YVz_K%hu3evAj`QjS+5A~PeG@0+-m!Fc2IWo1SfyVst_uP2x32OM*OB9 zX~3yFX3#j?O4SNP;g1U9FI!OKxD!s;V<1TtI;3&N${A)1gnxWKg=Vr2TN5Vp;OXQprf$9N;tUsPv|&I@66_k9;V|%nK*G@ZCP4;{s(@* zAwe1`Y*CN27j`=Yy&khO91x+uHlsrvt7umW1HtSu#kS*MX~J z+^Dk4+rbEL?qL1O|M8U{%@QmB-0|x2q>>>IbVg z$s!%`T+wadSHtK$_`1Jb9%;H&20q1oF%Ck_HBrCJ3ky!BL5&jG*T^OMqX+n zWxG9}G&RRc@e*~00pMHy9^QI3XbHXQ6Na6<4h>9}f00Rw*T?AbIp9Jj-mE(Fy^WSLc8f!EgtK|E)58w=i3JM!wFZV4+!py|@~ragsI zDcZd^V=#T~@6tA7y{sZ4(-Ujg&d%MA>LC>?DI_8Hf`PT|9ozj@HcDs0=CnK2hu6zZ zCK5|52b3HT=tg&mGM_6f`biYDij(`!%hnjXNt9qCFl@B9K&Y*#)YM@dg)H&95<$C4 zg}NMkpnbM&edTkIVIX`#ZEC&WU@`lZ6BzG)#4$|-&S28+**Xm z+)&g;4Hc&?*1cL;`VjcN7WjybBKyVkGqD6MkwLk*~R2Hjyv4Un!)d2 zz?~{|ntodj-zS~wu~7rt+UeBaA6VT2!Wr^?FZqOdHR3UTGjXxexAD2mOd~3YsT(HR zW^p)^bzCO%#bC+D)qlVfIh1R^-;m6-YO~m;F}f>-F-asAuZN;?Q?Zuehqid2kT2Ex zd_cZmAyo0K8>=ml_J0;a_Sto=OW~`}yIH+7g7pqtfn1`v7pvp%DYSaS+tl7&XL!tL zaaD%wEMWXNKX)2N)XMjTH_}F}Gdh$M;}?|1Yp}}7OD6}Mx`X?(c!k_mvc1ptB$R7q z;t|1pWfbVx$iXDLH>tqNsnrTt{H|YU_sRqtoi8UN!grd)Tx^O#8i~SaCOOTjKp!p? z@Y-P<)MwT;G`L9aAQ!pn#Bj5`W>t>O&*{y?@U@U7V=y*)St3#_-z+9trr4`HGj-Ze zhaaky5Fz6}ay0+s^`2z4kghsYgmL5LL2^cg#+=uNP>5F}43(NllKE)C{oI`Hf0OyB zIqomlRbuG8JpIdyy*A{}S_>F=q76sSXsprnZFYIyh&koQ-1@iX>!frx3u6M(+Wg{z zv)xUosq|arZ%HsTx?iu{gJr^02W}Thv)Qdvl^H^diKcj})9I}MXEx)^L7L26B2w`U zowngTjtmjSf`@l^|5Fhb;b@XT)3Af@W_^PBm5M{$xx(b}>BVIyy6uapH>8IkQPz7? zmY2bH`@S!t++-J~RGinR_tAR|aigV0pQ{B)kW2oR)n8)&YOqs8JF*)0fNmAan}GT$!@T(p(!xjZaIKD7s_OMpd+)LDwbi zIFnk08mQMe4f;5y;0w+S)F!#$rCCK+ikJX0){l+F?2ogkjf?N z{{AXPXRqbIQ7t5@q2I1_>5-XQ4b8J*E3_~eyRIqNoJ+QD>$HICnM$?s8X_%z4wh=~ z;?l_QZ@Xs#m)J0$@1nl55>SXk#ns7l#P`v*9$LQhIkkkhi}z&o-k+_SAf4Lt(*qTS ztj8n$io)>yj7CA$q0@N|ApR7a+5Rxu+b=ZPc*^EzKVwBQln@fQRq8Gtic;lPM;_bf zdoHEZ3J9sjU_Oh+Ltl>sG7?iWRYsY9l|OP_6cwB1m3O=x)Ij;TnQxb*+&X%c)RAJA ziy4thz0(K8Wpu{rjnu(p@HUn~1ZAUjeka!qX}WVGZgwt?cogW}B2(;uPr1F@s`h2} zgK^7f5LV~)=}(^;(2!+XBH*!>r>Dl7P|n2>2_0$(QD%>*a7LyQ!~_SU>T?__E#osY zG6}s`-%=VBPqdjs)!>PDEI}X>{SEn!%1lN@ivJ+``SAr$bsOo4-j8Cvc~TjRz3wAGwZBZ)xc7n7oD_`R5O@YIGF5lFz)d+w`DbxdAXPmf%QyfZdr{xPK82hyi?i0wm znOoa_plR|Ao6~Ui3*{cdau$>mC)M*V=hcKW7-HpWMMohiO(1Q;!(HPKJ!vx6X9Y=` z$$YGKvuRnzgC<3mFL`_|;(yMZBPimgG3L>zG%MTLVd80|k@czFFgWyoYm~(BY3Ux+ z3u=|r2u8RcCIzF=DiwE;^tLj)Y^M90R6xpTE|k*Bx7v+bgt2YW>5q%jLA6R8h-U_1 zM4l~Mc(z|v0+)_=Z@Ol}F*^*6jWKAsaY(hm=-;{W5$zu^YFO-K>1l6Nr)(&8MxvC& z1_{qHeVE-$C+D}b+E(aaby$N&NKat;1|j8skvqe)9z$P>R|o{sBjKPnmIaNdF7%d@ zNEtLFMT&RE`Y48gb(hny8BH2Y2DTbNxUnlDum1qeiegYat&X=2GOCmg{S!n=VwZ*I z(W%;fy9IyF?ZKS>HQm2^tfE-Iq1bd-IM}!00i?aEir8#8lTxAfx>#JN<=G9a(B~h;CVMyT)bJ!rr50Yo|iBatY=W}FIw{q~a`v>Ta%s>e{t5qS$tGuW& zSc3^9{{6z*Cx#|YSvPci`T~kr#CYLA1rbR#NYM^Rpg_ykP1Vxk8^MdV#oDe3IDrD~gTncLNw)-;x2P-M60>*`2X&cEASq5weSdeu zgQfKOpDEXd=R2_ly+HtgP7vouv0DXQT(FSG&-f423}=JVY>U(|%l<$Y42Ht)VA#ao zc9?|u_d`WAQP%JRM-K=G-Dj73Kh|1+kSf$~;&j7ehMHhRjyIq%j>*EZC@-h^&CQ4g zs8uF)DFPuTJ2J(JklxZ)Qg}FK0f#3cI&IKKK5-PWn-}aMuW&q*zboI_iOKK%uxg|t zer(rmfmWhSU<9Xg_2fE%EApRCT!c=#z_0%r0p@2^a#QhoL{a3m=DT-K4b)|n^Gi== zvf1taR{-xf5XfHSEj;I=lI`s;@*Nb8fog+!@ABTT0NngT0=&97CwSI*p;5c49*}U} zITaxn>-1gdpo%Pkp&Uy_@8d}=1P35b$5-`>_sNlyt|p;(Eg?7ahpdTuDS3_deZ2j8 zTO%u9$>@DnoHtF)_s2=2I z%^wjoFQ0GB-Yp{LcBo&QF96@P|9P7&Hx(fFi}#nDQy_Yeo&34#ASF4^@8mstU!3}v zBWM8%Pyn3L5GmJJ?>w35kTDF9h3oh0*RnV%IJgh&^%?~zz+WFh3;0yCoc$`)1Gs{i4q3>+%Al2xgXra$0~W~k6#r>Q8@f-gQi;;bq6h+ zA)WCTrVbhq`co{SWAblfp^`8EA^Fg4S@>T|160hHB!K$^AzL3T`KJGOTW`u*3S$4G z$Z1vnjMtNYvDX8fpeYgp^%F?nH*3hS`G>P{0x#%`{uN}Cq>vu9X66Ltg~wVNst=a( zInh9cLl6NPT#(PeftIW2x$Ikv$kD6@9RDszccc+tfTQia1PX-I7Y`r3NE5+dAWZ=P zATjCXxt;6JXBfQ=ILV}(U)HT%%Ya^iYB*5-pLp<*g<|FC6U)Br)q6nye!V)i@45J- zSp*b>B!NFaG^$snvw~qQiS_&Y!vR^)XmYD5QJ|hg!3VjSkGFp>zWgZ?{ z8b>lBb%i{WmHkA={uqb*`grA#07%y4p%P%!(Kt|9M3_R0O1uh{e;mUIMsL(HG;2^Z zQxKDpdxxXkEP4$A5F#}`I@igCV+MzwlYM>HcJ0M6?3kndsAkN`nSXH-gM^-BI6cR+|>+(#;7ZaEO3 z3mJ%q+rIBTc~_=~Um-0{demKX;>Mnd&7jpKx(lWa9_|y=T2VkH->tPy$C9L?u4)E) zbrYj}Gtnrd#XVPA6$t=<6c#lGt$M9FCa?BQFxu!tr)-?~<@lWsX+MQGw_Y+(T)>pW zzm8VLasyCWQ(kS{UjbaB*K1iu>n6}cOF`vqsHm?pohudwbw-2Z(%K$_7v2ZHJ{}AP z3XcfCcz(^GLLx6B83UwFHGb8%SRBYm0l-l`_q`WS zF6>+pGS*|?pQ0W=xwvQHtl%X-J(NF?yLSMI9P-?sWY?p} z(`TM1C*3)|WcKX2OV(U?DH@Gb%Izbo)*pHn_we|JMYBS}&OWo~bp|&3{`#eJX9op` zY(5$1!1Xi$l$JqR7k7uunLRsr;gS_AmxZj{bUhh^X?G9pIr}&+YU{i?bJqRvI188z zhWJb2!9lZU&6&6MXq5YGKK{g}Rfn!Uin)3qbXIWavHSMyR~HT+ihPy{D3aD_VaAN!W*VovNndH2P=A6L&0S{#1$HD@q+nWOhFnWvCH zcggOvsiICtWJl~-yY?wkb^ z?RF;unCP@-Wt;811VEmh3k4PGw4f}BJi;~BryJ*g6SOzV;;`KMVc~>1TVoxp7E3*} zeopA&+dMB=@1F?Xb0N{faSj_VW0>GHXJuKOJaU%{KB$o^f3QTU>}{GjD}{KWgRaSArw)r?oStto$hx=~*%TXy~}$ zwWm`sG3MCH@#90z##s@e<)5FNIcms|kqb^g%d|P12-43_EnRisLW)I1$1xRMvFk3pVvIWJ>Cy2MCx)MY#qqr5-oYtTCLeg>+LA%ll3k4&;U6Yqu196WQ^RSVMPTIh$xKEz&}SvF|c@ZdFPlQH?#ne}5QPB{96 zhe)tm9kOb%*;(0ki8Q)mx6B_Myzh?HVZO0%!T8|qicRVX;qs>GGv@7kA)}Nl+b4~m zw*PLjKx$#ijpb8^3>`f6!0mXm-6<2gl*mmhckPc!6R^zKA6HD6y7^o-(nv0ggO?SB zmESPCMA7*A|HEk!HjR$M#l zr8q6G_AmN!{OZF=f}V!?Z(@wjzO#GG(4pT>-}juCv+o|AIbnGCr6d^xPMcLg7~&mn zujil<%lbKN(!@2#6RqOQi{TR{FOEzGMh)}q1UU88jwzN1RI!c&oxZ1d_v?on>>$DC79j ziIZ3TY^HS{&gUCL#!Lu1mtqyMv9_C1;N@%AEF?)XhTga*N#%e57(#FMxm6(}KoA6$XE#5PCqJ&n zVNv3Ji8UT|4W}{K?tWbf{PQ2wEi|Ibn&u~Z(5`u+jr?T&yWP8Gq5=H zs@!_i!~qoxmuxz4%94dM`_}b!aN_$aKx^RBQ|sqnkjKnhw`}q99m_^}Uf;9o#1p&t z`0)CZUI9TN3qzJ}oHwjdNv*bQw{Iu6uU@KT)BeFr7tQQi6Gzeq_aYGlaT=4QY@%xK zZ$svWEL$?h@7Cc1k;$b#?(^N4ZY6xnbr>~g*}O?zYHQAJ4_zNycKO<{1&hOX%??QV zVbkvDq^!hKTese+`PI60!3$QbpV_H=$p+1PepZg<5KXb^X3tN9R;^e(VL%m60W+2D z^3~$i%NNWITQ#bxxOMHW7_L~r*eTuWmMvDV_pD`$W`16mAqZA)&@mJ)ryX1$dd$^m z^`=z|7cN}3en$X%VOiMzWCg=+T?njadzd~!3-Yx|ErHDeS3KFIZd5XUpc z;;jY;1+O&VOasDI;rlNX219@f0b?W3y}L}23=tY5l##m=SQ z7$SGCKKaxx-rlqNh^gzc4fE!%+PZLH&9c=$?$NQDry$c>eRcv>V@&X>xI>4oI6Z0yP8{F7f`5fp!{#jwncBTt@~u6ycRy%3W@Y%Y1zXlH z{M39lWaBlvKH>O^u;gkJ)-MTJx?{z-wlyo&?9i=YX&jO|U1q$?r`tCnYnIIER^1># z_M?vD<}V8kUb1${m{u{nH|&iv*X{M~_`oKfMe7cmy>!W>z-m6UOlb{T4a;JWPOh7G zG<(3D6>FC*2wuB=R)Ft`u=!_SSP7QZNCIy+HX1f{;esWLXY`TJ?mzv^_6JjN1yFbE zkBfT>1VX2Uxzdw_a@)RobgxdGyL9c=ZPdCmnSvS^6<`=i;g)BokKVS{Y}ufwAc`0u zD8ia}W!~T}9Xoeb@=x7)(}gIAB+{oyX&*ZE#cP+l+Xnuz2#Qp^oBk$T2^?3nX3G{; z3rkju)4M`_Uz6i?ateVHIcqXxo^xee1xa*SvokWYY~1@V1}7OI;o{jyZIOolcyd(K zog~iaqs_i`=aGddU9Aj^SU!Bl){Bo5siyU+cx#c6ndRU`rQFO+dzPKYK1fKs%TS_P z%VzaGEa~a6NUe%xv~fwVWx=U**F{Nim@_l79a8q=)93G(s@PbYb^m(QJqP2bmtNg` z^xDdcIP2r%qf^uXMkDRac=bBPJ&lGWf-cjkZ#zF^PR%qsdD*{SKs_(p%_~=<9>hUU zKZdfqoOaA&wsV5W*|IX6HXDa>y6}*cQg5BSoYLsifGQ?FB{?}0_iNjve#X_GZzhX4 z6lGYsdGC)4%N85QmakO@$|)IU3l4GY!-FjFly9j|+q5p>Oigo{Dp#-U8=o8}@-D?< z-Iis`R>&8vuOiM})fH_}93(|W-A(3=K5S;x-6t6?5hFZ(3mc(~WSv1PTNC0EY@7^$ zBuRxo>(RNqkxNg@v^iZqHQF{Q$v(aodF$RoyT;c;$JuOF%x1PYc}3yu47<(Zl#u!o z7n~%l4}UuMsC?Z{4T_P*^^Xd#-%FkGW2g|xU=>bfwAb9&Wm*|mOoZFWjZw$-64-MCrJ zG8y+GZ$#aE&6x`O0E^XvIjv@!OBOjxR)#s-#^=1-1Ck6Mf8lH-E2Z&tkp|^FNvh&kt9MZgMju%{dh-~p&3CgV4*$%EgZwd* z4iwTPLB;?Q5h4*UNpEKmIZ=YK5nH~CJqVEqkj(j&tx=?qr*Ew?#&O%{&np32oA-x3 z^=~raV}C^n_1=zQaZFH62d9XPr$4QjIy=Iw)6*dP)gxPpYSjDLL!6x#VPTWOCCF-H z#v45Ra4FWxL3-2(M`snLr5o5&oBO#N%oE}`Ve)aDv;IfQCg80xMzCgd_ z4+4-&8io@j4irWiijbt5ou+U4z74~hdBAuWSR~ki){QETW!PlWsMq3> zE9L2l$7z05YH08N_=AK>Oj~Ym zB`Yb5=gWHO2q2=oqjh&O$Et=Ob;Vwx=Z%k4}o+BhHQ0+>mHK6p@ud*mc!;<*BUFzJkB!R;V zH)zt>erMC}h!|+_^CMFa@7%WcRtgt;dj6IO3&fd173$V1=~a}aWPm8fz`8PCB|0SK z1Brbw$RXzU4lwi!X+W>l@ky@|Y#NpT`f^P_uKN7cvZME{T2DV;;aPb2j?>R9tj5!$ z5Ti914a)!8j3et7oqq)shA}LUCICV#BjKeLdi$61@s#4O9slWivXdnN!YJCH5zPtl zR*u$bsoc6qf-=q7qQ2Mdlbf%lvV{tHi_cH2KN4BCb+3BfgeXaQ)z0&t%nyrv^t;v1 zWli~Cr!`_3@vkxol7vc+vq>Y{?M-_kVsWFdACYok`<7kTlPK29qY$gr8x0Ed+=VR* zk40OQ{2;HS3i;5I{4#^n7b{)Zo6LNE=IF_I3r$0W5v0}tTuHCeY`9LxK!Dubi@d0< z)clhQ36Yym$4Ex6!gNaH#$5-sjk-1~?SUjodXKN=3*;d#uQqv)WP})vk#?lMN)`}B zGG0~cf9jEbY|EjG4%W|4%iTP-ec6e}koNTO)aY~u74)MMYxbOdB9K}F|0s*C|WOyd>onhiiB_u&e$g5MN~8M)G)3!y{o1zghHrn_ zD`@}ht`#&SWLZ|79L3z(G013j`rPbVB^}_TD<$DYs_0j$I7>q$qkkxZBGJiH)qBqh z8(aU_!a)H60i8N^o_s88z`WH1>w9B7FJs_0on`ROAerP6d_Nx2v+BLDaoxKPUUDv8 z&l2z15K-c+pj_v%i@vP3f6f=3It6s@F>e1oN0A~%R%>!xTiLr?*MN>~y3W7fe$2S; zRdrUpc*kCy{9@M+?bdEk*kuvmAJC2=c^P|)K7auv@vu~@;T;SA6g;eRpHUkwI$C`_ zXGVKw?#OPP6!Z_io`(B+>qsr;N=vg!rZQzqmGLj`y1i%mthM*-6pjDp9*AeE4xKQ_ zbY*FefPik3ccf{H7A+)6g1}M5T6XVRK4aHcJ=*qPe%2-91a!Cmf~0LVboRJP3Bv-r zbn4u>d;jn4^{31l-drb%5_-?2d^iAqcqF=9-VF!$uJv@w#2#Jx&H3?l?Ou~YhF9J* ztA9tgO^!eK$W^4U9@h~lJ0;!0mMT@UbeVFR_%pMog+wIFBmsYwROX$iM6WR;Yos3> z)T2Y&;S28aMg0pSQIG^^tktGhbHk;{fgJ*7?TNPmhJYAAf(xtJed_!+?98uvbP5RQ z+-t-gpD*T2>{E=AB}rCGey7g)2D!w&Umb~aXe##T(}uYjI-pC35$kUFHW(N>vwO^r zv7Ho4?K)`j$%Mj1j6h2guJn{FtY~rn(&Z`^79Opb@%_H&3_y?&{MxeFMUPLv__}M+ zXOq8Z-=W8dL$AC``{N4962c4D?bf$e`r@y8boge;wFE)O5N>H4oZly3t{PhZz`Q{n zJ9X~VrRVO%I#Xs%s^bkfUiwRA$=|~a9wkc{Ic0@MD#W2e98Qvg<^Gz{y#th$LEXD| z>)sk;5>mKFduR3tXxFiG_ilry{%|kbz>*|QSd${>4er`eS$L%6|NM)c zQC6B^(-NO%k^c3o71a>`k6No%l%5EquYg1KON~`H75V}+$OF*et`9(kOG$^_OjfUZ zvdMa~9=Y+%d=uO27l&EFDbaD4@0_!mum7Qs`2^!X31JBF{%PvT8zr7w;5dFw?$Ys5 z3Lzl?{+=pJ&E6iSK!F6-peji{Gl;?K)kLW|2-qN+#O`2srO5N8U3D*};j3LU7V^>b_S#dgS6YH-FGP-1qvjQ0W>TAv04)_+U9koTdX}TeuZuDOdgkaxnRfKxiBol+6o-cN{{11?=`GHJyzjki_0lSS|9X zxUCp*x_=zGm9^rOlPhflpPuXsZ#{J3`~wJoJF`A4y>i`U7hf+2``E0DLThMa0)R0N z={Us$X+4h^op*X8T~X?q9nuNFL~m`CatLkKEt}~`sC5hsBu@7CgVAbJMH6puetP*cVtR& zw<=T>Eto?CS;j;r7MZFFOH6ltRqhym1Q5~48%Rq99xd$-EJtfqDviF6F~sBJ$PuSZ zKzu>!xEXtSA{YXvSC?vv9!`afUA-Y!6wUq5LPH6*z3{aKjir?Qt0$px5Y|kE5H`lgS873TS=UIDkwJ~y&2%KSaYkj%M&j<5- zzBVAIUxy3N-hcg_kFIFxK>~ljJ%4298lWuMfoLj8r~A#fZQHj0(YI~ewr$(CZ5zvj zwT(u&m1JgZqwlbTs_I)ePeFIgHQ;~ae6vlHEERFa(Hd1%m2m)A4osv1jI5-=3(9yZ zIMz!|M3!-)%F53W0P}}3P-3;LN@W2?H{M8vkpTU{6!@aaPj{%5wo>dEsq zXmFZvPoqXV5cTcV&nU45g-a?~OEp&>Q6tOp&1WgeYV` zj5Qn*2~#0nfZ60kg;5?c1jw?Ax(in(Of%yJiZEr=`B9IJDaT9B!oWb_AASFiMb3WahTWE*j{^fME7>eq{Ehk-ocXjW4U}1pl@{kZMf#k|P@#~OdHo+6+U`Ecw0L=tx z{oC+VhDZoYa_wVD(^^uD$1luN)B1um%$Lt0}yg=BQx{1&eQe{3|=39LWbK^SrFo zj3>W_mL*$t&xfAcpOEH(QRYQaC{kl)gfmj{`PV+`!i`KhG?x}&N)4)9&cDvyH*cEA zV(8#<7<+bL0RRXFVf4QwwEw!%00Btky(K>9R$_w!aBYL)2YmwoS^)qG3IGZU0165K zf9Z7?bF*UwDRLY^Fr&K1Mmkua7YOts|3#ni*;Y_)xb?LB(^GH~B4zD8LazR|~d_#km}6Xb4+PoBgy#eZqw;R{KoBb~Dez;arC z|Lu>{aY10k=W8LB#X?HTc6Oyk1XyfcW-wO(f_7S`iD177VcylQuoH=JHm4-IwIjmZ zHq*f88w?ZcIgU=K@{tGP98|k3q7*57E`=C zzv!f&vz_K>QN=p537jL$Hx4C;>>xH#rU3J06P@K7ub#bd*ujc)2(8Rk1MD8_OJHC7w zhr>>VX`0`?!-o&?eGc?%FlT;$o$`6ZKMYbmD8UMSxAQ!$M>z1j z{_CF~;t66kVU36uF|`#Uo31IeC<2tC)VxMU>$=eO#yCV^iMH~#*;aC(%n0-)>vV~k z8)=J*OJ9{)N~3y-LyhJ&yJ))TiSHs#I*e6W$r{Duq<9o5$`Ta7ZAnk@v_&k+c0ze% zplZMeBLp{o=m!u6w>YCew^E3nYC`7-rF!g73_Uv1RH*}^_nN!d>ob5v`l{4O=OpfX zn4ltvSqAii_RLI=rq`(VMJ*^E?zo+(3iiNH4^7!q62pqSgj4QoT?AHUMH>S2 zCBur_fwGy4h?fe9x7ylfPv>lN+5FU#6d#Mt6!&H#9jv~MEkfT$biNXE_NlRWif*XU ze)C{gN?BJ{chJTCG5a%4W~ObN{M&c5%?lH}mhRORi!N(X20FUCKykYDG5xDVDdQ81 zfWWxt;NkG+n>VKyFK~Msc>sL+^ru&^eti9!@m&p`|I^zf8#1q}C_>+SSMcoFv$t>Y z{COOY`~Qmz1hx>+w30f_!^(Lb9ST{j&T;X|uQqTN&YrVY<>F4`?Bz9qp$9Iz+oh|_ z@8DGjF7g-`-w(~cgfDicWB2=a)FU5>Nv?e1JM-A1w*KZvi&)NoJ|aNyKL3@>u~-Ll zcW*2_<+X39a1(FD8+iBt;u_=sfip+icB~DE>jArZRKOAYsWDmxqBX^=WP+*`(Xd!j zJ~^}=qbb6qR6&Xb-LDieg`Y%Z@0gm94uu=E858LOQq;Y(-v`tX>C;8?G*m}&FD628 z_?L}Prl@`tz!==;2p9xE3{l!OL0&k>7y5+nOlS_!y;l6iLBT6#VoxtO|Vj@BhiR`G$;#0N(=J>2(brb zZWMj6@L%@MK(}3=S)z0DyYK(TALmN_x0b<;MFIqx_^3*Qk`xMoWyiZ?{8tulJ4C_T zZT+in#hr^#bFS2TxE80VPYx(a%9s2)YH@3asM7C$^fh>50+YL8CD> zb#C?ZvL%--e+*`sfj81WtBu(JU*u&_rzmKG<_n$FSR&T)UK5hoPq&*XvOTs$LS26p z1nO<7KS*^zCQ}VwvX9nAS-f6hiN^28df+wesnfJKnQYv<15%xoylFSffB>msL)UWP37p z{o`cy7|BjKXmu$h)B>rC)4-U+F|G?vRg;+sk(h)Hx>#w$f_^34DP>S3a3=?qas)#72|i()8kq2QC_pd~_T=Mtt-OR5#Af+Rn` zEpM;NRGJH{{u-dO2Y#_eZc`6QMk@e#>RUlVT#hVa`Q9_HP-rl!b)hunLk*??v|q50 zuwrX%3NWTP#Sj5QY1wwaaZpZ{A6De=n;|9>VKIyfX4&%{b5RBk754*G+?WV~%7X&K zA_p>>$@07w;p!|6$m_Am?BHw_cd$XlEttX;Ra~Pvh%&sQ<#`4p2OX?ejy9>d)txfA zht$<9AryrwLYPav-HpXWJ)y{mMo{zgN}|CA71t&Qy_$*}%F@BRr#!nB14jg1FDo$@ z%2Y4k%~C~D*Y=uQAAFk2S+fqJ&3M{8W*cj*GOvMiDv9cUdy$db-9R7d1t9>Mq(08N z=T!hT+j-A!mZp-(<(an~pv2K*3J(TmIq2ocLEoWiY42{9oi3|dkBq&)s$~7Rs*-4$ z-}$H+bkM|JNh>F)xCM#MLVKHohF9#KXa*-kUGb-hy^inORcs?lfd%z#-aBJxT*aPM zaf|cuGr0WbxD=Q4*kt5N=gzv@RAW`~#D;qG3*mCZ{B_iD)0y6?xYua~?j@JxDAbS; zjf@faGqEwAfiPG4@T>^hwy%_*;`&Q@>0jQM6I5L9%emC=sT&vl`I|?25?Q>uTTh}F z1=`ZBVFEE?d*4a0=-jqvbWTj>`h%uEp&TmiM|u){Q5}D$>Jp~&LC_EKB(hX- zDV4?iZ_e_jCC{k1M)UXJ13igCSsHxc1fu%(5tl(o8^l~;}-4s3XndnCs7Ary;h9c z#4wg(gi_)Rk4NWw2b2CmINy_~e^5s^%b#rNd|Ws34@A&$T+K!mw|8}w;z@+W=ubk* zJQ84%&`OtA@FZdpM}a+6-0$V0;$9Ao>fi0QHhmSh=7Ut+YK23^y&&YtZWezlpsgWq zj(HhmtBPx{-;TNK0aS;NW`58@TWu;DC*w|iDP;=d7Tf=Ugx9IK$LIq-(dff&jr{zY z6T7U}C&5T2A~Cx-%csxfRNS)JTz_z4a6${+ZQImV^#u2C=}8oiT-`1?=&Ej(5<6Em ziF7=PN}mIF{}SPmZy??Ostz5VP)YQlvpl%ChFGxs$6l~*O9j9zu8{UzA4*E7TY*YQ_ zWKW{>Ii(i22ZwKsnxW$EO}Q-@&hqD05`_a-w_gq#V*f#;iXI^{OAD5_F?JnQ22p=h&XB;>OjvG6&pO!tO%-K>giz z&GMWPL0W+r<`$2bM;kj>4xK^^?jSP7f zF0bOY!c4PT@NN{XF``yoAdFg+770!&-CAoz^)DK!Vz1u@ijMiQJ3AIr= zk%U^ZfB=DTZw54va8%%n6LQcbmb8G@S-vb%EgUpI==QAU7U)_Ugc$y(Wt(W;L}E0O z1h7QH4MTkuSDzpBXIJXqbyOJesF$@d1Srm?-;0k#P!fI%do}Jh80gPhtk(6$7(AmZ zjCsKB9a9s-?-qdM9pP?XZmFlO3v(=IW6o#0K@iLTn*DuolW-wVBG0d8({h#}L&d!u zdcjJf0r8b8ZcQg$;$D8aplm#Esp6(&qfnkMx*G_M9zW7e>sDsEXiK9C!8eFh_f z4hDn4U@#)+W|$>%m`w4EaZnB$2koz)<=79mcKaaT$Yk0T8S9>nJ)Gr@CgfmB)iER* z5=o%6%HDI9zX2@9R9K}8!iqvIqsp@*Yg2Un4BLl7Z|~S-U+wcV$3aaJKgpA5K#28J z^_4WjH6rMMyl{r?_+UJlLo{y-)r|;ff+ikl$>hT|RYu>UZKfFqr8yaz=jY9^4dHkd zm->=0xYqojHOMb`sO#wfjLmc5aqf4)(PwiN^e(`u)R$bF+ACoG1P~$tmio#_ioKMeNMWuqnKJ+*#g78mLI``b+@ox-NQees0!O z%Dc<=KQP};ZUGaOpA&_I4Rf=Qkk~}Aq6M6(;%;~KJ72{elyM+8%nu6X%lpmB9F!L% z%hOPC_jUDyct55Q2?W}8&m*PF?+c`c_ibWHFh#{Zg!Uo~ux=xLZDJ;g`DaKpx939| zS66ZAs<>QT#T_(a992Sj{QRJUw^wl!N|DZ@ivX7A?#HGwm z7guoyZ9#}e_7V$5E$(pjBa#3KX}5%rboFa1iGuE)gAQgw*x&01C6K?tpxCYj6B6Dq zf(}f4VK)o>o~D{OA1HO<>X*=&XZZkEzg{;BS>OpdXn%Gy+I`!|a~|Cq#d=LppveNA zH+rew$~_<3UHyuR`$xK2_&ctC0|M2;W>>#yO1ww}9UK@9=o=U#tf*ZHHseFu&h&m- zjy7Ad@xaQ=jdQaQxWo+GCR9F>oLq}be}*xe?DTLIm*MI+I4}n_gIBovWt)m??1)W@ z<>cfRZd5ngiJc=4^UWiX6Jr5o891(zX#3nOCTV8aE^Fh}Dz&UTpV|NX_tLI@4p+ay z{t?tnn*6k|*Y7X|b7M+hj^SaC8lxxE>S9luYyUQ8JN<_7d>^D(>(k8lFUu z+b!NN#=Y&4fU?WC7sF?X^)K`!(nPCk0P~!Z@|3g#o_<&*k!V*zrX5pxQ|Q*OZvT_R zlW26aeDg=H5HNe`{}yjm|DXHn(3RwdVWcNLpB2=6RK7U9-L?@Arp0-)`ws2U4-gER zqU5%gcmDt5!@v0dTkQ0QBC!!0unl}QrhbfcEjWErPNsm(-7TMW1r#x4WnuVHPYt&j z6pVKalPWtkp_Z&#Pl3CWA2}=D8?cLVx_!zVDC`#84ccpaOw4J5%p8Fa2WIzP0I@@R zDoMQh$~(HnymRuNX~ebK0d3Hd0r(o)h#5|_k{Yv3cj8)rOSulGfi>r-fi>>qn(5IMq+b#^j%gwdu?PfvQr$Q2{w|F^-L)t1*i1_1I-074 z$1TA{0X0Fae8+6NQ2v=zu5JNpX5xpFST>b?OACS-mw>ym3cEp)b80GgK68H99PU6t zYK>AFl+hg+Z%>jf%P8H-%nA|o6f*7^x(u>*3eZ!nv0I~|_}QiZazWL(>PtZ+|Na|a z+86J+07)-DV@({Pk$VxA+jv7u#`*EqZ@)+X?gg#AzWVm7pMUx3^51R4c9cn`;4s~^ zxnHqUb&89GI{dg~Osk0FHIrM}dJc$QLz%fZ-{Rq@4%uOC7jIbxF^eap-p&&vVUg4# zVFnb}`{InwRymm715QB8KyahXWKGJp87v$D4UV&&uJIDG+C)*bMv$3^*udBn_GuX<&_#a1AH#-_vO;rNPW;w%$3r?fb@0z_;L!ke^SLTVvEwe%$Wqx|IQq zt%=}1Te-_3loy=rIxd2Xw-Ld|WMkH!EB{LfHBN#_^3c3(8&loleLuuu9O&ucbTSi@ zJi2Va+Q-JTP&|tsF&E>UYxteVD7n|=N9ti|Cbid>Z<^zWGGRfAm?{TmT%^4 z2@GBU$+Kr@8AR5Cip->C*3sn0_U`N^XgrX zd%7tKouA|5V`F_+czb&ujoxl<{^JVcyr)gRQj^}m#nQ;qKLDx8$I_UaP2#Ryv+YYb zKE~l8LYM^c@!?^u_~Xl?EL)n9FG#UF^|lDz9Yjp*i_9IN1iJm4U^FyRwHDvgM^n6R zk!XE`xchziOP`qBdfG^+ zOcs=aa8rk?%RHZ~Ib2+*EQfp*5OxTXG#*3B_+v5$H8ZmTsB*ps!Frp_K{J?{*)Vwa gnN|ifGc#-N8&t%*{U#4V+5i9m07*qoM6N<$f*wW>jsO4v literal 0 HcmV?d00001 diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/src/locale/messages.xlf b/tests/@angular_devkit/build_webpack/hello-world-app/src/src/locale/messages.xlf new file mode 100644 index 0000000000..5ba84a9b35 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/src/locale/messages.xlf @@ -0,0 +1,18 @@ + + + + + + i18n test + + app/app.component.ts + 21 + + + app/app.component.ts + 23 + + + + + From 8e7658aabc71829153e0dfccf60cc526142a16dd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 3 Mar 2018 18:40:53 +0000 Subject: [PATCH 152/724] feat(@angular-devkit/build-webpack): sync changes from Angular CLI Contains all changes from https://github.com/angular/angular-cli/compare/ca8e8344...master. --- package-lock.json | 7842 ++++++++--------- package.json | 59 +- .../angular_devkit/build_webpack/package.json | 41 +- .../base-href-webpack-plugin.ts | 2 +- .../angular-cli-files/models/build-options.ts | 1 - .../models/webpack-configs/browser.ts | 114 +- .../models/webpack-configs/common.ts | 129 +- .../models/webpack-configs/development.ts | 12 - .../models/webpack-configs/index.ts | 2 - .../models/webpack-configs/production.ts | 175 - .../models/webpack-configs/styles.ts | 112 +- .../models/webpack-configs/test.ts | 32 +- .../models/webpack-configs/typescript.ts | 42 +- .../models/webpack-configs/utils.ts | 17 +- .../plugins/bundle-budget.ts | 86 +- .../plugins/cleancss-webpack-plugin.ts | 188 +- .../plugins/glob-copy-webpack-plugin.ts | 96 - .../plugins/index-html-webpack-plugin.ts | 171 + .../plugins/karma-context.html | 10 +- .../plugins/karma-debug.html | 10 +- .../src/angular-cli-files/plugins/karma.ts | 27 +- .../named-lazy-chunks-webpack-plugin.ts | 54 - .../plugins/postcss-cli-resources.ts | 168 + .../plugins/scripts-webpack-plugin.ts | 165 +- .../angular-cli-files/plugins/static-asset.ts | 17 - .../suppress-entry-chunks-webpack-plugin.ts | 21 +- .../src/angular-cli-files/plugins/webpack.ts | 7 +- .../utilities/package-chunk-sort.ts | 24 +- .../utilities/require-project-module.ts | 9 +- .../utilities/service-worker/index.ts | 52 +- .../src/angular-cli-files/utilities/stats.ts | 8 +- .../build_webpack/src/browser/index.ts | 42 +- .../build_webpack/src/browser/schema.json | 10 +- .../build_webpack/src/dev-server/index.ts | 46 +- .../build_webpack/src/karma/index.ts | 3 - .../test/browser/allow-js_spec_big.ts | 3 + .../test/browser/aot_spec_big.ts | 2 +- .../test/browser/build-optimizer_spec_big.ts | 2 +- .../browser/custom-lazy-modules_spec_big.ts | 2 +- .../test/browser/deploy-url_spec_big.ts | 8 +- .../browser/file-replacements_spec_big.ts | 2 +- .../test/browser/i18n_spec_big.ts | 14 +- .../test/browser/lazy-module_spec_big.ts | 61 +- .../browser/optimization-level_spec_big.ts | 4 +- .../test/browser/output-hashing_spec_big.ts | 40 +- .../test/browser/rebuild_spec_big.ts | 8 +- .../test/browser/scripts-array_spec_big.ts | 42 +- .../test/browser/source-map_spec_big.ts | 10 +- .../test/browser/styles_spec_big.ts | 79 +- .../browser/subresource-integrity_spec_big.ts | 3 +- .../test/browser/vendor-chunk_spec_big.ts | 2 +- .../test/browser/works_spec_big.ts | 10 +- .../test/karma/assets_spec_big.ts | 2 +- .../test/karma/works_spec_big.ts | 4 +- 54 files changed, 4743 insertions(+), 5349 deletions(-) delete mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts delete mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts delete mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/index-html-webpack-plugin.ts delete mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/postcss-cli-resources.ts delete mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts diff --git a/package-lock.json b/package-lock.json index 1a55993277..788789c195 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,36 +16,36 @@ } }, "@angular/common": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.2.tgz", - "integrity": "sha512-heon7Bdu6SUw/6ma9wEDxrxBJY2V+NSUv7ZVY7HaXESWvxKUGaser5vQIsWghvBg1injSxyw/3BqGFflua/3sQ==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.7.tgz", + "integrity": "sha512-TqsDMmPX1JlEH2QIneuAVzEO4ubzxLBAdV4XbKWDQKC/UfbWIIpSrSp2cIi85NV1tKkg0WAaodCIZ02NucHIHg==", "requires": { "tslib": "1.8.1" } }, "@angular/compiler": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.2.tgz", - "integrity": "sha512-QkliIJJb9J2y4Y1yiSweP1eOStClOOOj46awVQ5wT+WzyvmIVAccx2u+r5TPRu676GlqrFfn6FD+zV6Zw7G+Tw==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.7.tgz", + "integrity": "sha512-26RG+Dy+M/95OyNNqM+OAruarIPOmbndiaglz2dMrNYzenfbSgG/AoPlL5uCdSqZDiXgnlKnS2K6/ePWXDSKNw==", "requires": { "tslib": "1.8.1" } }, "@angular/compiler-cli": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.2.tgz", - "integrity": "sha512-XSojPIMQNvEnYIufTIlrr3GLpr20AUQP0bMzUp4/U/ATWmMWmdNRRG/ys5ncmbgImoAg1nW0hp4bonUSYf9nGQ==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.7.tgz", + "integrity": "sha512-91gQolzsKyOlmBNW1J7lyu+dXHe/KHbAXU459hn6rycMHuTt60XvxA5O3xy3Pqt28VgbOOSrQfq5eVjZodKjWg==", "requires": { "chokidar": "1.7.0", "minimist": "1.2.0", - "reflect-metadata": "0.1.10", - "tsickle": "0.26.0" + "reflect-metadata": "0.1.12", + "tsickle": "0.27.2" } }, "@angular/core": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.2.tgz", - "integrity": "sha512-SycTFvlJUHzYvqRYM0DQQUewSo0IPL3Vfo9MOwSJvhS5mXCP1+QW0IIhI8CyWy+40L3dIWlYnn0754z5IJikdg==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.7.tgz", + "integrity": "sha512-DQuL6n7cjBfZmWX5RCV271g6PW9N8b93g2skWnM/zjm+BL9tfHPgvmsjMNB7QEHSxW8VBaaQ6gjj422O01A87g==", "requires": { "tslib": "1.8.1" } @@ -67,17 +67,17 @@ } }, "@angular/platform-browser": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.2.tgz", - "integrity": "sha512-jiiEEUiv4oOWtBP96hOnxHOY3ckukfSOaxtw+ENjSPAyv/eRbL1B2LFwIg+HYAFxvK8JOLAYZm3Hg9lpenlBMw==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.7.tgz", + "integrity": "sha512-SdLx4F6tOy4/s3y1KZ/Z3YA6fiIrydaO2bry2FJglDxJh24p6TZIob+zC16N2MTuFW819KY5OlacNhc8aj6Yag==", "requires": { "tslib": "1.8.1" } }, "@angular/platform-browser-dynamic": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.2.tgz", - "integrity": "sha512-PCg63japwHw6zGWGHZEpiDKeqPaCbOKnBl7bhRzE5imL+74toyvmE33sp7OzXKGi0mX5mUymfRsvfLdB6khGTQ==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.7.tgz", + "integrity": "sha512-95Rwf1JcGF/BI48k+VG2moLTVC863jPSjmHaGkz7cA9bi/QrRFGvFghl1qIm4Ezp3dj8CH8TE3TWB+1AmAg3AQ==", "requires": { "tslib": "1.8.1" } @@ -91,9 +91,9 @@ } }, "@angular/service-worker": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.1.tgz", - "integrity": "sha512-z4+7S5MQYbcp9d4xtZk6tGJY3TkliVTXj/2HdIOXm97wCyDUAdvNLa9sor3N8OtH8IiRgqeXnqq3ehyWvbMZ4g==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.7.tgz", + "integrity": "sha512-pHHaboqA+5SaIiKEGIh/NVZMjmhhGgoDy/rfXArEhSWKOfqXJBUg1P95aD/lqOYFrapxXgQ8zKAllez7AsmEzQ==", "requires": { "tslib": "1.8.1" } @@ -104,12 +104,12 @@ "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, "@ngtools/webpack": { - "version": "github:angular/ngtools-webpack-builds#d77ee7936501054873229fa82d498bd87b8426c2", + "version": "6.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.0.0-beta.4.tgz", + "integrity": "sha512-K3JKyeZdicNHM0fhiftlBeXijbf6vD8S8SdlZ6XSyofGX8Dv4M8K2PnMhsxayD2X6Zw/m3mgd47tYr4VRMFGhw==", "requires": { "chalk": "2.2.2", - "magic-string": "0.22.4", "semver": "5.4.1", - "source-map": "0.5.7", "tree-kill": "1.2.0", "webpack-sources": "1.1.0" } @@ -142,11 +142,6 @@ "@types/webpack": "3.8.2" } }, - "@types/denodeify": { - "version": "1.2.31", - "resolved": "https://registry.npmjs.org/@types/denodeify/-/denodeify-1.2.31.tgz", - "integrity": "sha512-Jgy3dvCyIxhNb5RstVJkubeHZifw8KJXca13ov8OO4IqhDLPRHiJJ6VArJbZZ4HuEMJEB83yCuABodNMlYylzQ==" - }, "@types/events": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", @@ -354,11 +349,18 @@ "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" }, "acorn-dynamic-import": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", - "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "requires": { - "acorn": "4.0.13" + "acorn": "5.5.0" + }, + "dependencies": { + "acorn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", + "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" + } } }, "addressparser": { @@ -405,9 +407,9 @@ } }, "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=" }, "align-text": { "version": "0.1.4", @@ -419,11 +421,6 @@ "repeat-string": "1.6.1" } }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" - }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -672,7 +669,7 @@ "caniuse-lite": "1.0.30000784", "normalize-range": "0.1.2", "num2fraction": "1.2.2", - "postcss": "6.0.16", + "postcss": "6.0.19", "postcss-value-parser": "3.3.0" } }, @@ -828,14 +825,22 @@ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { "cache-base": "1.0.1", - "class-utils": "0.3.5", + "class-utils": "0.3.6", "component-emitter": "1.2.1", "define-property": "1.0.0", "isobject": "3.0.1", - "mixin-deep": "1.3.0", + "mixin-deep": "1.3.1", "pascalcase": "0.1.1" }, "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -985,7 +990,7 @@ "deep-equal": "1.0.1", "dns-equal": "1.0.0", "dns-txt": "2.0.2", - "multicast-dns": "6.2.1", + "multicast-dns": "6.2.3", "multicast-dns-service-types": "1.1.0" } }, @@ -1260,23 +1265,23 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.1.tgz", - "integrity": "sha512-dRHYcs9LvG9cHgdPzjiI+/eS7e1xRhULrcyOx04RZQsszNJXU2SL9CyG60yLnge282Qq5nwTv+ieK2fH+WPZmA==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", "requires": { "bluebird": "3.5.1", "chownr": "1.0.1", "glob": "7.1.2", "graceful-fs": "4.1.11", "lru-cache": "4.1.1", - "mississippi": "1.3.0", + "mississippi": "2.0.0", "mkdirp": "0.5.1", "move-concurrently": "1.0.1", "promise-inflight": "1.0.1", "rimraf": "2.6.2", - "ssri": "5.0.0", + "ssri": "5.2.4", "unique-filename": "1.1.0", - "y18n": "3.2.1" + "y18n": "4.0.0" }, "dependencies": { "rimraf": { @@ -1286,6 +1291,11 @@ "requires": { "glob": "7.1.2" } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" } } }, @@ -1312,6 +1322,43 @@ } } }, + "cache-loader": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", + "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", + "requires": { + "loader-utils": "1.1.0", + "mkdirp": "0.5.1", + "neo-async": "2.5.0", + "schema-utils": "0.4.5" + }, + "dependencies": { + "ajv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", + "requires": { + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ajv-keywords": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=" + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "requires": { + "ajv": "6.2.0", + "ajv-keywords": "3.1.0" + } + } + } + }, "cached-path-relative": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", @@ -1345,33 +1392,6 @@ "map-obj": "1.0.1" } }, - "caniuse-api": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", - "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", - "requires": { - "browserslist": "1.7.7", - "caniuse-db": "1.0.30000780", - "lodash.memoize": "4.1.2", - "lodash.uniq": "4.5.0" - }, - "dependencies": { - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "requires": { - "caniuse-db": "1.0.30000780", - "electron-to-chromium": "1.3.28" - } - } - } - }, - "caniuse-db": { - "version": "1.0.30000780", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000780.tgz", - "integrity": "sha1-jRl3Vh0A/w8O0ra2YUAyirRQTAo=" - }, "caniuse-lite": { "version": "1.0.30000784", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz", @@ -1386,6 +1406,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "optional": true, "requires": { "align-text": "0.1.4", "lazy-cache": "1.0.4" @@ -1437,6 +1458,11 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, + "chrome-trace-event": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.2.tgz", + "integrity": "sha1-kPNohdU0WlBiEzLwcXtZWIPV2YI=" + }, "ci-info": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", @@ -1452,51 +1478,18 @@ } }, "circular-dependency-plugin": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.3.0.tgz", - "integrity": "sha512-L3W9L1S0wC64rq+QSaZzmWnJW7cVBgimxI2lNEFEX5biwlRG8EHRM68JFi+CX5ZkCGUWJHIpnhdVs181Zlq3wA==" - }, - "clap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", - "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", - "requires": { - "chalk": "1.1.3" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz", + "integrity": "sha512-yEFtUNUYT4jBykEX5ZOHw+5goA3glGZr9wAXIQqoyakjz5H5TeUmScnWRc52douAhb9eYzK3s7V6bXfNnjFdzg==" }, "class-utils": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.5.tgz", - "integrity": "sha1-F+eTEDdQ+WJ7IXbqNM/RtWWQPIA=", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { "arr-union": "3.1.0", "define-property": "0.2.5", "isobject": "3.0.1", - "lazy-cache": "2.0.2", "static-extend": "0.1.2" }, "dependencies": { @@ -1508,6 +1501,42 @@ "is-descriptor": "0.1.6" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -1527,14 +1556,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "requires": { - "set-getter": "0.1.0" - } } } }, @@ -1550,6 +1571,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "optional": true, "requires": { "center-align": "0.1.3", "right-align": "0.1.3", @@ -1559,15 +1581,11 @@ "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "optional": true } } }, - "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=" - }, "clone-deep": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.3.0.tgz", @@ -1594,14 +1612,6 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, - "coa": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", - "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", - "requires": { - "q": "1.5.1" - } - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1629,16 +1639,6 @@ "object-visit": "1.0.1" } }, - "color": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", - "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", - "requires": { - "clone": "1.0.3", - "color-convert": "1.9.1", - "color-string": "0.3.0" - } - }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -1652,24 +1652,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "color-string": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", - "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", - "requires": { - "color-name": "1.1.3" - } - }, - "colormin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", - "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", - "requires": { - "color": "0.11.4", - "css-color-names": "0.0.4", - "has": "1.0.1" - } - }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -1752,21 +1734,28 @@ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" }, "compressible": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.12.tgz", - "integrity": "sha1-xZpcmdt2dn6YdlAOJx72OzSTvWY=", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", + "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", "requires": { - "mime-db": "1.30.0" + "mime-db": "1.33.0" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + } } }, "compression": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.1.tgz", - "integrity": "sha1-7/JgPvwuIs+G810uuTWJ+YdTc9s=", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { - "accepts": "1.3.4", + "accepts": "1.3.5", "bytes": "3.0.0", - "compressible": "2.0.12", + "compressible": "2.0.13", "debug": "2.6.9", "on-headers": "1.0.1", "safe-buffer": "5.1.1", @@ -1774,13 +1763,26 @@ }, "dependencies": { "accepts": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", - "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { - "mime-types": "2.1.17", + "mime-types": "2.1.18", "negotiator": "0.6.1" } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } } } }, @@ -1790,9 +1792,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", "requires": { "inherits": "2.0.3", "readable-stream": "2.3.3", @@ -2038,17 +2040,17 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-webpack-plugin": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", - "integrity": "sha512-ojaz8MpS3zoLJT/JbYMusYM+dCEArhW24hGAUPYPydTCS+87NFh2TWr85sywG3So4Q4E68QoerqQ+Ns1g0fhDg==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.3.tgz", + "integrity": "sha512-v4THQ24Tks2NkyOvZuFDgZVfDD9YaA9rwYLZTrWg2GHIA8lrH5DboEyeoorh5Skki+PUbgSmnsCwhMWqYrQZrA==", "requires": { - "cacache": "10.0.1", + "cacache": "10.0.4", "find-cache-dir": "1.0.0", "globby": "7.1.1", "is-glob": "4.0.0", - "loader-utils": "0.2.17", + "loader-utils": "1.1.0", "minimatch": "3.0.4", - "p-limit": "1.1.0", + "p-limit": "1.2.0", "serialize-javascript": "1.4.0" }, "dependencies": { @@ -2064,17 +2066,6 @@ "requires": { "is-extglob": "2.1.1" } - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } } } }, @@ -2170,69 +2161,6 @@ "randomfill": "1.0.3" } }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=" - }, - "css-loader": { - "version": "0.28.7", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.7.tgz", - "integrity": "sha512-GxMpax8a/VgcfRrVy0gXD6yLd5ePYbXX/5zGgTVYp4wXtJklS8Z2VaUArJgc//f6/Dzil7BaJObdSv8eKKCPgg==", - "requires": { - "babel-code-frame": "6.26.0", - "css-selector-tokenizer": "0.7.0", - "cssnano": "3.10.0", - "icss-utils": "2.1.0", - "loader-utils": "1.1.0", - "lodash.camelcase": "4.3.0", - "object-assign": "4.1.1", - "postcss": "5.2.18", - "postcss-modules-extract-imports": "1.1.0", - "postcss-modules-local-by-default": "1.2.0", - "postcss-modules-scope": "1.1.0", - "postcss-modules-values": "1.3.0", - "postcss-value-parser": "3.3.0", - "source-list-map": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } - } - }, "css-parse": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", @@ -2277,122 +2205,15 @@ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=" }, - "cssnano": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", - "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", - "requires": { - "autoprefixer": "6.7.7", - "decamelize": "1.2.0", - "defined": "1.0.0", - "has": "1.0.1", - "object-assign": "4.1.1", - "postcss": "5.2.18", - "postcss-calc": "5.3.1", - "postcss-colormin": "2.2.2", - "postcss-convert-values": "2.6.1", - "postcss-discard-comments": "2.0.4", - "postcss-discard-duplicates": "2.1.0", - "postcss-discard-empty": "2.1.0", - "postcss-discard-overridden": "0.1.1", - "postcss-discard-unused": "2.2.3", - "postcss-filter-plugins": "2.0.2", - "postcss-merge-idents": "2.1.7", - "postcss-merge-longhand": "2.0.2", - "postcss-merge-rules": "2.1.2", - "postcss-minify-font-values": "1.0.5", - "postcss-minify-gradients": "1.0.5", - "postcss-minify-params": "1.2.2", - "postcss-minify-selectors": "2.1.1", - "postcss-normalize-charset": "1.1.1", - "postcss-normalize-url": "3.0.8", - "postcss-ordered-values": "2.2.3", - "postcss-reduce-idents": "2.4.0", - "postcss-reduce-initial": "1.0.1", - "postcss-reduce-transforms": "1.0.4", - "postcss-svgo": "2.1.6", - "postcss-unique-selectors": "2.0.2", - "postcss-value-parser": "3.3.0", - "postcss-zindex": "2.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "autoprefixer": { - "version": "6.7.7", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", - "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", - "requires": { - "browserslist": "1.7.7", - "caniuse-db": "1.0.30000780", - "normalize-range": "0.1.2", - "num2fraction": "1.2.2", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "requires": { - "caniuse-db": "1.0.30000780", - "electron-to-chromium": "1.3.28" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } - } - }, - "csso": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", - "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", - "requires": { - "clap": "1.2.3", - "source-map": "0.5.7" - } - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=" - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=" + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "requires": { "array-find-index": "1.0.2" } @@ -2407,14 +2228,6 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "requires": { - "es5-ext": "0.10.37" - } - }, "dargs": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", @@ -2515,11 +2328,19 @@ } }, "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "1.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } } }, "defined": { @@ -2585,11 +2406,6 @@ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, - "denodeify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", - "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=" - }, "depd": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", @@ -2709,9 +2525,9 @@ "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" }, "dns-packet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.2.2.tgz", - "integrity": "sha512-kN+DjfGF7dJGUL7nWRktL9Z18t1rWP3aQlyZdY8XlpvU3Nc6GeFTQApftcjtWKxAZfiggZSGrCEoszNgvnpwDg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", "requires": { "ip": "1.1.5", "safe-buffer": "5.1.1" @@ -2824,11 +2640,11 @@ } }, "duplexify": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", - "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "requires": { - "end-of-stream": "1.4.0", + "end-of-stream": "1.4.1", "inherits": "2.0.3", "readable-stream": "2.3.3", "stream-shift": "1.0.0" @@ -2883,9 +2699,9 @@ "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" }, "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { "once": "1.4.0" } @@ -2935,14 +2751,13 @@ } }, "enhanced-resolve": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", - "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", "requires": { "graceful-fs": "4.1.11", "memory-fs": "0.4.1", - "object-assign": "4.1.1", - "tapable": "0.2.8" + "tapable": "1.0.0" } }, "ent": { @@ -2993,75 +2808,11 @@ "is-symbol": "1.0.1" } }, - "es5-ext": { - "version": "0.10.37", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz", - "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", - "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-symbol": "3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, "es6-promise": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3095,14 +2846,12 @@ } } }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" }, "dependencies": { @@ -3119,12 +2868,11 @@ "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "4.2.0" }, "dependencies": { "estraverse": { @@ -3149,15 +2897,6 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37" - } - }, "eventemitter3": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", @@ -3271,15 +3010,6 @@ "fill-range": "2.2.3" } }, - "exports-loader": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-0.6.4.tgz", - "integrity": "sha1-1w/GEhl1s1/BKDDPUnVL4nQPyIY=", - "requires": { - "loader-utils": "1.1.0", - "source-map": "0.5.7" - } - }, "express": { "version": "4.16.2", "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", @@ -3381,11 +3111,22 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "is-extendable": "0.1.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } } }, "extglob": { @@ -3397,16 +3138,26 @@ } }, "extract-text-webpack-plugin": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz", - "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==", + "version": "4.0.0-beta.0", + "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-4.0.0-beta.0.tgz", + "integrity": "sha512-Hypkn9jUTnFr0DpekNam53X47tXn3ucY08BQumv7kdGgeVUBLq3DJHJTi6HNxv4jl9W+Skxjz9+RnK0sJyqqjA==", "requires": { "async": "2.6.0", "loader-utils": "1.1.0", - "schema-utils": "0.3.0", + "schema-utils": "0.4.5", "webpack-sources": "1.1.0" }, "dependencies": { + "ajv": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", + "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", + "requires": { + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", @@ -3414,6 +3165,15 @@ "requires": { "lodash": "4.17.4" } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "requires": { + "ajv": "6.2.1", + "ajv-keywords": "3.1.0" + } } } }, @@ -3451,12 +3211,33 @@ } }, "file-loader": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.5.tgz", - "integrity": "sha512-RzGHDatcVNpGISTvCpfUfOGpYuSR7HSsSg87ki+wF6rw1Hm0RALPTiAdsxAq1UwLf0RRhbe22/eHK6nhXspiOQ==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "requires": { "loader-utils": "1.1.0", - "schema-utils": "0.3.0" + "schema-utils": "0.4.5" + }, + "dependencies": { + "ajv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", + "requires": { + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "requires": { + "ajv": "6.2.0", + "ajv-keywords": "3.1.0" + } + } } }, "file-uri-to-path": { @@ -3518,7 +3299,7 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "requires": { "commondir": "1.0.1", - "make-dir": "1.1.0", + "make-dir": "1.2.0", "pkg-dir": "2.0.0" } }, @@ -3531,11 +3312,6 @@ "pinkie-promise": "2.0.1" } }, - "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" - }, "flush-write-stream": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", @@ -4917,54 +4693,52 @@ "wbuf": "1.7.2" } }, - "html-comment-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", - "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=" - }, "html-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" }, "html-minifier": { - "version": "3.5.7", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.7.tgz", - "integrity": "sha512-GISXn6oKDo7+gVpKOgZJTbHMCUI2TSGfpg/8jgencWhWJsvEmsvp3M8emX7QocsXsYznWloLib3OeSfeyb/ewg==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.9.tgz", + "integrity": "sha512-EZqO91XJwkj8BeLx9C12sKB/AHoTANaZax39vEOP9f/X/9jgJ3r1O2+neabuHqpz5kJO71TapP9JrtCY39su1A==", "requires": { "camel-case": "3.0.0", "clean-css": "4.1.9", - "commander": "2.12.2", + "commander": "2.14.1", "he": "1.1.1", "ncname": "1.0.0", "param-case": "2.1.1", "relateurl": "0.2.7", - "uglify-js": "3.2.1" + "uglify-js": "3.3.12" }, "dependencies": { + "commander": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "uglify-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.2.1.tgz", - "integrity": "sha512-BhZTJPmOKPSUcjnx2nlfaOQKHLyjjT4HFyzFWF1BUErx9knJNpdW94ql5o8qVxeNL+8IAWjEjnPvASH2yZnkMg==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.12.tgz", + "integrity": "sha512-4jxrTXlV0HaXTsNILfXW0eey7Qo8qHYM6ih5ZNh45erDWU2GHmKDmekwBTskDb12h+kdd2DBvdzqVb47YzNmTA==", "requires": { - "commander": "2.12.2", + "commander": "2.14.1", "source-map": "0.6.1" } } } }, "html-webpack-plugin": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz", - "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=", + "version": "github:webpack-contrib/html-webpack-plugin#a8a8c2b6ea496c257fd6f501db3a06a51fa03e1e", "requires": { "bluebird": "3.5.1", - "html-minifier": "3.5.7", + "html-minifier": "3.5.9", "loader-utils": "0.2.17", "lodash": "4.17.4", "pretty-error": "2.1.1", @@ -5048,9 +4822,9 @@ } }, "http-parser-js": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.9.tgz", - "integrity": "sha1-6hoE+2St/wJC6ZdPKX3Uw8rSceE=" + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=" }, "http-proxy": { "version": "1.16.2", @@ -5163,19 +4937,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=" - }, - "icss-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", - "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", - "requires": { - "postcss": "6.0.16" - } - }, "ieee754": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", @@ -5229,11 +4990,6 @@ "repeating": "2.0.1" } }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" - }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -5325,11 +5081,6 @@ "meow": "3.7.0" } }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" - }, "invariant": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", @@ -5354,17 +5105,19 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=" - }, "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } } }, "is-arrayish": { @@ -5407,11 +5160,18 @@ } }, "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } } }, "is-date-object": { @@ -5420,19 +5180,19 @@ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" }, "is-descriptor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.1.tgz", - "integrity": "sha512-G3fFVFTqfaqu7r4YuSBHKBAuOaLz8Sy7ekklUpFEliaLMP1Y2ZjoN9jS62YWCAPQrQpMUQSitRlrzibbuCZjdA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" }, "dependencies": { "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -5513,20 +5273,17 @@ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, "is-odd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-1.0.0.tgz", - "integrity": "sha1-O4qTLrAos3dcObsJ6RdnrM22kIg=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "is-number": "3.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" } } }, @@ -5551,11 +5308,6 @@ "path-is-inside": "1.0.2" } }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -5604,14 +5356,6 @@ "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" }, - "is-svg": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", - "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", - "requires": { - "html-comment-regex": "1.1.1" - } - }, "is-symbol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", @@ -5635,6 +5379,11 @@ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -5895,11 +5644,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" }, - "json-loader": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==" - }, "json-parse-better-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", @@ -6150,7 +5894,8 @@ "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true }, "lcid": { "version": "1.0.0", @@ -6385,9 +6130,9 @@ } }, "license-webpack-plugin": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.1.1.tgz", - "integrity": "sha512-TjKOyiC0exqd4Idy/4M8/DETR22dXBZks387DuS5LbslxHiMRXGx/Q2F/j9IUtvEoH5uFvt72vRgk/G6f8j3Dg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.1.2.tgz", + "integrity": "sha512-L40JKqFGSJ2z5bKOleYK3IgdOaTCoRx1p+zScf5yMCYQ1HsKrcCGFxVjZYvIWatcqGtdoEC0PZOBFgSaHMmvrw==", "requires": { "ejs": "2.5.7" } @@ -6458,21 +6203,11 @@ "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" - }, "lodash.mergewith": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz", @@ -6500,10 +6235,13 @@ "lodash._reinterpolate": "3.0.0" } }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "requires": { + "chalk": "2.2.2" + } }, "log4js": { "version": "2.3.12", @@ -6638,9 +6376,14 @@ } }, "loglevel": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.0.tgz", - "integrity": "sha1-rgyqVhERSYxboTcj1vtjHSQAOTQ=" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=" + }, + "loglevelnext": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.3.tgz", + "integrity": "sha512-OCxd/b78TijTB4b6zVqLbMrxhebyvdZKwqpL0VHUZ0pYhavXaPD4l6Xrr4n5xqTYWiqtb0i7ikSoJY/myQ/Org==" }, "longest": { "version": "1.0.1", @@ -6678,19 +6421,6 @@ "yallist": "2.1.2" } }, - "macaddress": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", - "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=" - }, - "magic-string": { - "version": "0.22.4", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", - "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", - "requires": { - "vlq": "0.2.3" - } - }, "mailcomposer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", @@ -6751,9 +6481,9 @@ } }, "make-dir": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", - "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", "requires": { "pify": "3.0.0" }, @@ -6788,10 +6518,10 @@ "object-visit": "1.0.1" } }, - "math-expression-evaluator": { - "version": "1.2.17", - "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", - "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=" + "material-design-icons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/material-design-icons/-/material-design-icons-3.0.1.tgz", + "integrity": "sha1-mnHEh0chjrylHlGmbaaCA4zct78=" }, "md5.js": { "version": "1.3.4", @@ -6823,7 +6553,7 @@ "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "1.2.0" } }, "memory-fs": { @@ -6910,9 +6640,9 @@ } }, "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, "minimalistic-assert": { "version": "1.0.0", @@ -6961,26 +6691,26 @@ } }, "mississippi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.0.tgz", - "integrity": "sha1-0gFYPrEjJ+PFwWQqQEqcrPlONPU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "requires": { - "concat-stream": "1.6.0", - "duplexify": "3.5.1", - "end-of-stream": "1.4.0", + "concat-stream": "1.6.1", + "duplexify": "3.5.4", + "end-of-stream": "1.4.1", "flush-write-stream": "1.0.2", "from2": "2.3.0", "parallel-transform": "1.1.0", - "pump": "1.0.3", - "pumpify": "1.3.5", + "pump": "2.0.1", + "pumpify": "1.4.0", "stream-each": "1.2.2", "through2": "2.0.3" } }, "mixin-deep": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.0.tgz", - "integrity": "sha512-dgaCvoh6i1nosAUBKb0l0pfJ78K8+S9fluyIR2YvAeUD/QuMahnFnF3xYty5eYXMjhGSsB0DsW6A0uAZyetoAg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { "for-in": "1.0.2", "is-extendable": "1.0.1" @@ -7115,12 +6845,12 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "multicast-dns": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.1.tgz", - "integrity": "sha512-uV3/ckdsffHx9IrGQrx613mturMdMqQ06WTq+C09NsStJ9iNG6RcUWgPKs1Rfjy+idZT6tfQoXEusGNnEZhT3w==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", "requires": { - "dns-packet": "1.2.2", - "thunky": "0.1.0" + "dns-packet": "1.3.1", + "thunky": "1.0.2" } }, "multicast-dns-service-types": { @@ -7134,21 +6864,22 @@ "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" }, "nanomatch": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.6.tgz", - "integrity": "sha512-WJ6XTCbvWXUFPbi/bDwKcYkCeOGUHzaJj72KbuPqGn78Ba/F5Vu26Zlo6SuMQbCIst1RGKL1zfWBCOGAlbRLAg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "define-property": "1.0.0", - "extend-shallow": "2.0.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", "fragment-cache": "0.2.1", - "is-odd": "1.0.0", - "kind-of": "5.1.0", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", "object.pick": "1.3.0", - "regex-not": "1.0.0", + "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" }, "dependencies": { "arr-diff": { @@ -7162,9 +6893,9 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -7181,6 +6912,11 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "neo-async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz", + "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==" + }, "netmask": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", @@ -7196,9 +6932,9 @@ } }, "node-forge": { - "version": "0.6.33", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.33.tgz", - "integrity": "sha1-RjgRh59XPUUVWtap9D3ClujoXrw=" + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", + "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" }, "node-gyp": { "version": "3.6.2", @@ -7260,7 +6996,7 @@ "stream-browserify": "2.0.1", "stream-http": "2.7.2", "string_decoder": "1.0.3", - "timers-browserify": "2.0.4", + "timers-browserify": "2.0.6", "tty-browserify": "0.0.0", "url": "0.11.0", "util": "0.10.3", @@ -7278,9 +7014,9 @@ } }, "timers-browserify": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", - "integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.6.tgz", + "integrity": "sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw==", "requires": { "setimmediate": "1.0.5" } @@ -7505,17 +7241,6 @@ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" }, - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "requires": { - "object-assign": "4.1.1", - "prepend-http": "1.0.4", - "query-string": "4.3.4", - "sort-keys": "1.1.2" - } - }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -7591,6 +7316,22 @@ "is-descriptor": "0.1.6" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -7786,16 +7527,19 @@ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "requires": { + "p-try": "1.0.0" + } }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { - "p-limit": "1.1.0" + "p-limit": "1.2.0" } }, "p-map": { @@ -7803,6 +7547,11 @@ "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, "pac-proxy-agent": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz", @@ -7908,6 +7657,11 @@ "error-ex": "1.3.1" } }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" + }, "parseqs": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", @@ -8079,39 +7833,37 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", "requires": { - "chalk": "2.3.0", + "chalk": "2.3.2", "source-map": "0.6.1", - "supports-color": "5.1.0" + "supports-color": "5.3.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "requires": { - "ansi-styles": "3.2.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "requires": { - "has-flag": "2.0.0" - } - } + "supports-color": "5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "source-map": { "version": "0.6.1", @@ -8119,72 +7871,179 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "requires": { - "has-flag": "2.0.0" + "has-flag": "3.0.0" } } } }, - "postcss-calc": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", - "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "postcss-import": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", + "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", + "requires": { + "postcss": "6.0.19", + "postcss-value-parser": "3.3.0", + "read-cache": "1.0.0", + "resolve": "1.1.7" + } + }, + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "requires": { + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1", + "postcss-load-options": "1.2.0", + "postcss-load-plugins": "2.3.0" + } + }, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "requires": { + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" + } + }, + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "requires": { + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" + } + }, + "postcss-loader": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.1.tgz", + "integrity": "sha512-f0J/DWE/hyO9/LH0WHpXkny/ZZ238sSaG3p1SRBtVZnFWUtD7GXIEgHoBg8cnAeRbmEvUxHQptY46zWfwNYj/w==", "requires": { - "postcss": "5.2.18", - "postcss-message-helpers": "2.0.0", - "reduce-css-calc": "1.3.0" + "loader-utils": "1.1.0", + "postcss": "6.0.19", + "postcss-load-config": "1.2.0", + "schema-utils": "0.4.5" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "ajv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "ajv": "6.2.0", + "ajv-keywords": "3.1.0" } } } }, - "postcss-colormin": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", - "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "postcss-url": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.0.tgz", + "integrity": "sha512-VBP6uf6iL3AZra23nkPkOEkS/5azj1xf/toRrjfkolfFEgg9Gyzg9UhJZeIsz12EGKZTNVeGbPa2XtaZm/iZvg==", "requires": { - "colormin": "1.1.2", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" + "mime": "1.6.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "postcss": "6.0.19", + "xxhashjs": "0.2.1" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "requires": { + "renderkid": "2.0.1", + "utila": "0.4.0" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "optional": true, + "requires": { + "asap": "2.0.6" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "protractor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.0.tgz", + "integrity": "sha512-8z1TWtc/I9Kn4fkfg87DhkSAi0arul7DHBEeJ70sy66teQAeffjQED1s0Gduigme7hxHRYdYEKbhHYz28fpv5w==", + "requires": { + "@types/node": "6.0.101", + "@types/q": "0.0.32", + "@types/selenium-webdriver": "2.53.43", + "blocking-proxy": "1.0.1", + "chalk": "1.1.3", + "glob": "7.1.2", + "jasmine": "2.8.0", + "jasminewd2": "2.2.0", + "optimist": "0.6.1", + "q": "1.4.1", + "saucelabs": "1.3.0", + "selenium-webdriver": "3.6.0", + "source-map-support": "0.4.18", + "webdriver-js-extender": "1.0.0", + "webdriver-manager": "12.0.6" }, "dependencies": { + "@types/node": { + "version": "6.0.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", + "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==" + }, + "adm-zip": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", + "integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E=" + }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", @@ -8200,2485 +8059,1593 @@ "has-ansi": "2.0.0", "strip-ansi": "3.0.1", "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "glob": "7.1.2" } - } - } - }, - "postcss-convert-values": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", - "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", - "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } + "source-map": "0.5.7" } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "webdriver-manager": { + "version": "12.0.6", + "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", + "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", "requires": { + "adm-zip": "0.4.7", "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "del": "2.2.2", + "glob": "7.1.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "q": "1.4.1", + "request": "2.83.0", + "rimraf": "2.6.2", + "semver": "5.4.1", + "xml2js": "0.4.19" } } } }, - "postcss-discard-comments": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", - "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "proxy-addr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", "requires": { - "postcss": "5.2.18" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "forwarded": "0.1.2", + "ipaddr.js": "1.6.0" } }, - "postcss-discard-duplicates": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", - "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "proxy-agent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz", + "integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=", + "optional": true, "requires": { - "postcss": "5.2.18" + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1", + "http-proxy-agent": "1.0.0", + "https-proxy-agent": "1.0.0", + "lru-cache": "2.6.5", + "pac-proxy-agent": "1.1.0", + "socks-proxy-agent": "2.1.1" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } + "lru-cache": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", + "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", + "optional": true } } }, - "postcss-discard-empty": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", - "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", "requires": { - "postcss": "5.2.18" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "parse-asn1": "5.1.0", + "randombytes": "2.0.5" } }, - "postcss-discard-overridden": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", - "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "postcss": "5.2.18" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, - "postcss-discard-unused": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", - "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "pumpify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", + "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "requires": { - "postcss": "5.2.18", - "uniqs": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "duplexify": "3.5.4", + "inherits": "2.0.3", + "pump": "2.0.1" } }, - "postcss-filter-plugins": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", - "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qjobs": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.5.tgz", + "integrity": "sha1-ZZ3p8s+NzCehSBJ28gU3cnI4LnM=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "optional": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "querystringify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", + "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "requires": { - "postcss": "5.2.18", - "uniqid": "4.1.1" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "kind-of": "3.2.2" }, "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } } } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "is-buffer": "1.1.6" } } } }, - "postcss-import": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.0.0.tgz", - "integrity": "sha1-qWLi34LTvFptpqOGhBdHIE9B71s=", + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", "requires": { - "postcss": "6.0.16", - "postcss-value-parser": "3.3.0", - "read-cache": "1.0.0", - "resolve": "1.1.7" + "safe-buffer": "5.1.1" } }, - "postcss-load-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", - "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "randomfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", + "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1", - "postcss-load-options": "1.2.0", - "postcss-load-plugins": "2.3.0" + "randombytes": "2.0.5", + "safe-buffer": "5.1.1" } }, - "postcss-load-options": { + "range-parser": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", - "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" } }, - "postcss-load-plugins": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", - "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "raw-loader": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", + "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" + "pify": "2.3.0" } }, - "postcss-loader": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.0.10.tgz", - "integrity": "sha512-xQaDcEgJ/2JqFY18zpFkik8vyYs7oS5ZRbrjvDqkP97k2wYWfPT4+qA0m4o3pTSCsz0u26PNqs8ZO9FRUWAqrA==", + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, "requires": { - "loader-utils": "1.1.0", - "postcss": "6.0.16", - "postcss-load-config": "1.2.0", - "schema-utils": "0.3.0" + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.12", + "readdir-scoped-modules": "1.0.2", + "semver": "5.4.1", + "slide": "1.1.6", + "util-extend": "1.0.3" } }, - "postcss-merge-idents": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", - "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", "requires": { - "has": "1.0.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "readable-stream": "2.3.3" } }, - "postcss-merge-longhand": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", - "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "read-package-json": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", + "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", + "dev": true, "requires": { - "postcss": "5.2.18" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "json-parse-better-errors": "1.0.1", + "normalize-package-data": "2.4.0", + "slash": "1.0.0" } }, - "postcss-merge-rules": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", - "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "requires": { - "browserslist": "1.7.7", - "caniuse-api": "1.6.1", - "postcss": "5.2.18", - "postcss-selector-parser": "2.2.3", - "vendors": "1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", - "requires": { - "caniuse-db": "1.0.30000780", - "electron-to-chromium": "1.3.28" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, - "postcss-message-helpers": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", - "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=" - }, - "postcss-minify-font-values": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", - "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "requires": { - "object-assign": "4.1.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, - "postcss-minify-gradients": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", - "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" } }, - "postcss-minify-params": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", - "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "dev": true, "requires": { - "alphanum-sort": "1.0.2", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0", - "uniqs": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" } }, - "postcss-minify-selectors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", - "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "requires": { - "alphanum-sort": "1.0.2", - "has": "1.0.1", - "postcss": "5.2.18", - "postcss-selector-parser": "2.2.3" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" } }, - "postcss-modules-extract-imports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz", - "integrity": "sha1-thTJcgvmgW6u41+zpfqh26agXds=", + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "postcss": "6.0.16" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" } }, - "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "redis": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "optional": true, "requires": { - "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.16" + "double-ended-queue": "2.1.0-0", + "redis-commands": "1.3.1", + "redis-parser": "2.6.0" } }, - "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "redis-commands": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz", + "integrity": "sha1-gdgm9F+pyLIBH0zXoP5ZfSQdRCs=", + "optional": true + }, + "redis-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", + "optional": true + }, + "reflect-metadata": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", + "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==" + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "requires": { - "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.16" + "is-equal-shallow": "0.1.3" } }, - "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "icss-replace-symbols": "1.1.0", - "postcss": "6.0.16" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, - "postcss-normalize-charset": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", - "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "requires": { - "postcss": "5.2.18" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, - "postcss-normalize-url": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", - "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { - "is-absolute-url": "2.1.0", - "normalize-url": "1.9.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "jsesc": "0.5.0" } }, - "postcss-ordered-values": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", - "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" + "css-select": "1.2.0", + "dom-converter": "0.1.4", + "htmlparser2": "3.3.0", + "strip-ansi": "3.0.1", + "utila": "0.3.3" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" } } }, - "postcss-reduce-idents": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", - "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", - "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "1.0.2" } }, - "postcss-reduce-initial": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", - "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", "requires": { - "postcss": "5.2.18" + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "hoek": "4.2.0" } - } - } - }, - "postcss-reduce-transforms": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", - "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", - "requires": { - "has": "1.0.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "boom": "5.2.0" }, "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } } } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" } - } - } - }, - "postcss-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", - "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", - "requires": { - "flatten": "1.0.2", - "indexes-of": "1.0.1", - "uniq": "1.0.1" - } - }, - "postcss-svgo": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", - "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", - "requires": { - "is-svg": "2.1.0", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0", - "svgo": "0.7.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" } - } - } - }, - "postcss-unique-selectors": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", - "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", - "requires": { - "alphanum-sort": "1.0.2", - "postcss": "5.2.18", - "uniqs": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" } }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" + "hoek": "4.2.0" } } } }, - "postcss-url": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.0.tgz", - "integrity": "sha512-VBP6uf6iL3AZra23nkPkOEkS/5azj1xf/toRrjfkolfFEgg9Gyzg9UhJZeIsz12EGKZTNVeGbPa2XtaZm/iZvg==", + "requestretry": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.12.2.tgz", + "integrity": "sha512-wDYnH4imurLs5upu31WoPaOFfEu31qhFlF7KgpYbBsmBagFmreZZo8E/XpoQ3erCP5za+72t8k8QI4wlrtwVXw==", + "optional": true, "requires": { - "mime": "1.6.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "postcss": "6.0.16", - "xxhashjs": "0.2.1" + "extend": "3.0.1", + "lodash": "4.17.4", + "request": "2.83.0", + "when": "3.7.8" } }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "postcss-zindex": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", - "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "requires": { - "has": "1.0.1", - "postcss": "5.2.18", - "uniqs": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "resolve-from": "3.0.0" } }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "optional": true, "requires": { - "renderkid": "2.0.1", - "utila": "0.4.0" + "align-text": "0.1.4" } }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "optional": true, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "requires": { - "asap": "2.0.6" + "aproba": "1.2.0" } }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "rxjs": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", + "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "requires": { + "symbol-observable": "1.0.1" + } }, - "protractor": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.0.tgz", - "integrity": "sha512-8z1TWtc/I9Kn4fkfg87DhkSAi0arul7DHBEeJ70sy66teQAeffjQED1s0Gduigme7hxHRYdYEKbhHYz28fpv5w==", + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "0.1.15" + } + }, + "sass-graph": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", + "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "requires": { - "@types/node": "6.0.101", - "@types/q": "0.0.32", - "@types/selenium-webdriver": "2.53.43", - "blocking-proxy": "1.0.1", - "chalk": "1.1.3", "glob": "7.1.2", - "jasmine": "2.8.0", - "jasminewd2": "2.2.0", - "optimist": "0.6.1", - "q": "1.4.1", - "saucelabs": "1.3.0", - "selenium-webdriver": "3.6.0", - "source-map-support": "0.4.18", - "webdriver-js-extender": "1.0.0", - "webdriver-manager": "12.0.6" + "lodash": "4.17.4", + "scss-tokenizer": "0.2.3", + "yargs": "7.1.0" }, "dependencies": { - "@types/node": { - "version": "6.0.101", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", - "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==" - }, - "adm-zip": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", - "integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", + "string-width": "1.0.2", "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "0.5.7" + "wrap-ansi": "2.1.0" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "webdriver-manager": { - "version": "12.0.6", - "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", - "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "requires": { - "adm-zip": "0.4.7", - "chalk": "1.1.3", - "del": "2.2.2", - "glob": "7.1.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "q": "1.4.1", - "request": "2.83.0", - "rimraf": "2.6.2", - "semver": "5.4.1", - "xml2js": "0.4.19" + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "5.0.0" } } } }, - "proxy-addr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", - "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", - "requires": { - "forwarded": "0.1.2", - "ipaddr.js": "1.6.0" - } - }, - "proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz", - "integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=", - "optional": true, + "sass-loader": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", + "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.6.5", - "pac-proxy-agent": "1.1.0", - "socks-proxy-agent": "2.1.1" + "async": "2.6.0", + "clone-deep": "0.3.0", + "loader-utils": "1.1.0", + "lodash.tail": "4.1.1", + "pify": "3.0.0" }, "dependencies": { - "lru-cache": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", - "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", - "optional": true + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.4" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" } } }, - "prr": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "saucelabs": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", + "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.5" + "https-proxy-agent": "1.0.0" } }, - "pump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "requires": { - "end-of-stream": "1.4.0", - "once": "1.4.0" - } + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, - "pumpify": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.3.5.tgz", - "integrity": "sha1-G2ccYZlAq8rqwK0OOjwWS+dgmTs=", + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "requires": { - "duplexify": "3.5.1", - "inherits": "2.0.3", - "pump": "1.0.3" + "ajv": "5.5.2" } }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" - }, - "qjobs": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.5.tgz", - "integrity": "sha1-ZZ3p8s+NzCehSBJ28gU3cnI4LnM=" - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "optional": true - }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "requires": { - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" + "js-base64": "2.4.0", + "source-map": "0.4.4" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } } }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, - "querystringify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", - "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=" + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "jszip": "3.1.5", + "rimraf": "2.6.2", + "tmp": "0.0.30", + "xml2js": "0.4.19" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "glob": "7.1.2" } }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", "requires": { - "is-buffer": "1.1.6" + "os-tmpdir": "1.0.2" } } } }, - "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "selfsigned": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.2.tgz", + "integrity": "sha1-tESVgNmZKbZbEKSDiTAaZZIIh1g=", "requires": { - "safe-buffer": "5.1.1" + "node-forge": "0.7.1" } }, - "randomfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", - "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", "requires": { - "randombytes": "2.0.5", - "safe-buffer": "5.1.1" + "semver": "5.4.1" } }, - "range-parser": { + "semver-intersect": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.2.0.tgz", + "integrity": "sha512-XwQtuo56XVJd4JDV90L9RWjBluxWcnKDlQivIlF+Jvdhqgvk7KAroAqs8aJ/hjQW0wNPSSWDxhJLzYX+dwb13A==", + "requires": { + "semver": "5.4.1" + } }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "send": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", + "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", "requires": { - "bytes": "3.0.0", + "debug": "2.6.9", + "depd": "1.1.1", + "destroy": "1.0.4", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.3.1" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + } } }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" + "serialize-javascript": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", + "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=" }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "requires": { - "pify": "2.3.0" + "accepts": "1.3.5", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "1.0.3", + "http-errors": "1.6.2", + "mime-types": "2.1.17", + "parseurl": "1.3.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + }, + "dependencies": { + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + } + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + } } }, - "read-installed": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", - "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", - "dev": true, + "serve-static": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.12", - "readdir-scoped-modules": "1.0.2", - "semver": "5.4.1", - "slide": "1.1.6", - "util-extend": "1.0.3" + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.1" } }, - "read-only-stream": { + "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "requires": { - "readable-stream": "2.3.3" - } - }, - "read-package-json": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", - "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", - "dev": true, - "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-better-errors": "1.0.1", - "normalize-package-data": "2.4.0", - "slash": "1.0.0" - } + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "to-object-path": "0.3.0" } }, - "read-pkg-up": { + "set-immediate-shim": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - } - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, - "readdir-scoped-modules": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", - "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", - "dev": true, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.4.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" - } + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" }, - "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", - "optional": true, + "sha.js": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", + "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", "requires": { - "double-ended-queue": "2.1.0-0", - "redis-commands": "1.3.1", - "redis-parser": "2.6.0" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, - "redis-commands": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz", - "integrity": "sha1-gdgm9F+pyLIBH0zXoP5ZfSQdRCs=", - "optional": true - }, - "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", - "optional": true - }, - "reduce-css-calc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", - "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", "requires": { - "balanced-match": "0.4.2", - "math-expression-evaluator": "1.2.17", - "reduce-function-call": "1.0.2" + "is-extendable": "0.1.1", + "kind-of": "2.0.1", + "lazy-cache": "0.2.7", + "mixin-object": "2.0.1" }, "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" } } }, - "reduce-function-call": { + "shasum": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", - "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "requires": { - "balanced-match": "0.4.2" + "json-stable-stringify": "0.0.1", + "sha.js": "2.4.9" }, "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "requires": { + "jsonify": "0.0.0" + } } } }, - "reflect-metadata": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", - "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=" - }, - "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" - }, - "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { - "is-equal-shallow": "0.1.3" + "shebang-regex": "1.0.0" } }, - "regex-not": { + "shebang-regex": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.0.tgz", - "integrity": "sha1-Qvg+OXcWIt+CawKvF2Ul1qXxV/k=", - "requires": { - "extend-shallow": "2.0.1" - } + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", "requires": { - "regenerate": "1.3.3", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" } }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "silent-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", + "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", "requires": { - "jsesc": "0.5.0" + "debug": "2.6.9" } }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "renderkid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", - "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "slack-node": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", + "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", + "optional": true, "requires": { - "css-select": "1.2.0", - "dom-converter": "0.1.4", - "htmlparser2": "3.3.0", - "strip-ansi": "3.0.1", - "utila": "0.3.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" - } + "requestretry": "1.12.2" } }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "smart-buffer": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", + "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" + }, + "smtp-connection": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", + "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", "requires": { - "is-finite": "1.0.2" + "httpntlm": "1.6.1", + "nodemailer-shared": "1.1.0" } }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "snapdragon": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", + "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "2.0.2" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "hoek": "4.2.0" + "is-extendable": "0.1.1" } }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "boom": "5.2.0" + "kind-of": "3.2.2" }, "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "hoek": "4.2.0" + "is-buffer": "1.1.6" } } } }, - "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" } }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.1.0" + "is-descriptor": "1.0.2" } }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.0" - } + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, - "requestretry": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.12.2.tgz", - "integrity": "sha512-wDYnH4imurLs5upu31WoPaOFfEu31qhFlF7KgpYbBsmBagFmreZZo8E/XpoQ3erCP5za+72t8k8QI4wlrtwVXw==", - "optional": true, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "extend": "3.0.1", - "lodash": "4.17.4", - "request": "2.83.0", - "when": "3.7.8" + "kind-of": "3.2.2" } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "requires": { - "resolve-from": "3.0.0" + "hoek": "2.16.3" } }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "socket.io": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", + "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", "requires": { - "align-text": "0.1.4" + "debug": "2.6.9", + "engine.io": "3.1.4", + "socket.io-adapter": "1.1.1", + "socket.io-client": "2.0.4", + "socket.io-parser": "3.1.2" } }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "socket.io-client": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", + "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.3" + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "2.6.9", + "engine.io-client": "3.1.4", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "3.1.2", + "to-array": "0.1.4" } }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "socket.io-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.2.tgz", + "integrity": "sha1-28IoIVH8T6675Aru3Ady66YZ9/I=", "requires": { - "aproba": "1.2.0" + "component-emitter": "1.2.1", + "debug": "2.6.9", + "has-binary2": "1.0.2", + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + } } }, - "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", "requires": { - "symbol-observable": "1.0.1" + "faye-websocket": "0.10.0", + "uuid": "3.1.0" } }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "sockjs-client": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", + "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "scss-tokenizer": "0.2.3", - "yargs": "7.1.0" + "debug": "2.6.9", + "eventsource": "0.1.6", + "faye-websocket": "0.11.1", + "inherits": "2.0.3", + "json3": "3.3.2", + "url-parse": "1.2.0" }, "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "5.0.0" + "websocket-driver": "0.7.0" } } } }, - "sass-loader": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", - "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", + "socks": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", + "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", "requires": { - "async": "2.6.0", - "clone-deep": "0.3.0", - "loader-utils": "1.1.0", - "lodash.tail": "4.1.1", - "pify": "3.0.0" + "ip": "1.1.5", + "smart-buffer": "1.1.15" }, "dependencies": { - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.4" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" } } }, - "saucelabs": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", - "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", + "socks-proxy-agent": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", + "integrity": "sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw==", "requires": { - "https-proxy-agent": "1.0.0" + "agent-base": "2.1.1", + "extend": "3.0.1", + "socks": "1.1.10" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "ajv": "5.5.2" + "atob": "2.0.3", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "source-map-support": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", + "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", "requires": { - "js-base64": "2.4.0", - "source-map": "0.4.4" + "source-map": "0.6.1" }, "dependencies": { "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, - "selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "spdx": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", + "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", + "dev": true, "requires": { - "jszip": "3.1.5", - "rimraf": "2.6.2", - "tmp": "0.0.30", - "xml2js": "0.4.19" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", - "requires": { - "os-tmpdir": "1.0.2" - } - } + "spdx-exceptions": "1.0.5", + "spdx-license-ids": "1.2.2" } }, - "selfsigned": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.1.tgz", - "integrity": "sha1-v4y3uDJWxFUeMTR8YxF3jbme7FI=", + "spdx-compare": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", + "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", + "dev": true, "requires": { - "node-forge": "0.6.33" + "spdx-expression-parse": "1.0.4", + "spdx-ranges": "1.0.1" } }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "requires": { - "semver": "5.4.1" + "spdx-license-ids": "1.2.2" } }, - "semver-intersect": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.2.0.tgz", - "integrity": "sha512-XwQtuo56XVJd4JDV90L9RWjBluxWcnKDlQivIlF+Jvdhqgvk7KAroAqs8aJ/hjQW0wNPSSWDxhJLzYX+dwb13A==", + "spdx-exceptions": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", + "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", + "dev": true + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "spdx-ranges": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", + "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", + "dev": true + }, + "spdx-satisfies": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", + "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", + "dev": true, "requires": { - "semver": "5.4.1" + "spdx-compare": "0.1.2", + "spdx-expression-parse": "1.0.4" } }, - "send": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", - "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", "requires": { "debug": "2.6.9", - "depd": "1.1.1", - "destroy": "1.0.4", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.1", - "fresh": "0.5.2", - "http-errors": "1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.3.1" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" - } + "handle-thing": "1.2.5", + "http-deceiver": "1.2.7", + "safe-buffer": "5.1.1", + "select-hose": "2.0.0", + "spdy-transport": "2.0.20" } }, - "serialize-javascript": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", - "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=" - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "spdy-transport": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", + "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", "requires": { - "accepts": "1.3.4", - "batch": "0.6.1", "debug": "2.6.9", - "escape-html": "1.0.3", - "http-errors": "1.6.2", - "mime-types": "2.1.17", - "parseurl": "1.3.2" - }, - "dependencies": { - "accepts": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", - "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", - "requires": { - "mime-types": "2.1.17", - "negotiator": "0.6.1" - } - } + "detect-node": "2.0.3", + "hpack.js": "2.1.6", + "obuf": "1.1.1", + "readable-stream": "2.3.3", + "safe-buffer": "5.1.1", + "wbuf": "1.7.2" } }, - "serve-static": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", - "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "requires": { - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "parseurl": "1.3.2", - "send": "0.16.1" + "through": "2.3.8" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "set-getter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", - "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "to-object-path": "0.3.0" + "extend-shallow": "3.0.2" } }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "through2": "2.0.3" } }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { + "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "sha.js": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", - "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - }, - "shallow-clone": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", - "requires": { - "is-extendable": "0.1.1", - "kind-of": "2.0.1", - "lazy-cache": "0.2.7", - "mixin-object": "2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" - } - } + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", "requires": { - "json-stable-stringify": "0.0.1", - "sha.js": "2.4.9" + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" }, "dependencies": { - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "requires": { - "jsonify": "0.0.0" - } + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "silent-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", - "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", - "requires": { - "debug": "2.6.9" - } - }, - "slack-node": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", - "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", - "optional": true, - "requires": { - "requestretry": "1.12.2" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "smtp-connection": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", - "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", + "ssri": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.2.4.tgz", + "integrity": "sha512-UnEAgMZa15973iH7cUi0AHjJn1ACDIkaMyZILoqwN6yzt+4P81I8tBc5Hl+qwi5auMplZtPQsHrPBR5vJLcQtQ==", "requires": { - "httpntlm": "1.6.1", - "nodemailer-shared": "1.1.0" + "safe-buffer": "5.1.1" } }, - "snapdragon": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", - "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "base": "0.11.2", - "debug": "2.6.9", "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.1", - "use": "2.0.2" + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -10689,6 +9656,42 @@ "is-descriptor": "0.1.6" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -10706,1265 +9709,777 @@ } } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "stats-webpack-plugin": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", + "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } + "lodash": "4.17.4" } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "stdout-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", + "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", "requires": { - "kind-of": "3.2.2" + "readable-stream": "2.3.3" } }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { - "hoek": "2.16.3" + "inherits": "2.0.3", + "readable-stream": "2.3.3" } }, - "socket.io": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", - "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", - "requires": { - "debug": "2.6.9", - "engine.io": "3.1.4", - "socket.io-adapter": "1.1.1", - "socket.io-client": "2.0.4", - "socket.io-parser": "3.1.2" - } - }, - "socket.io-adapter": { + "stream-combiner2": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "requires": { + "duplexer2": "0.1.4", + "readable-stream": "2.3.3" + } }, - "socket.io-client": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", - "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", + "stream-each": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "2.6.9", - "engine.io-client": "3.1.4", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "3.1.2", - "to-array": "0.1.4" + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" } }, - "socket.io-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.2.tgz", - "integrity": "sha1-28IoIVH8T6675Aru3Ady66YZ9/I=", + "stream-http": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", "requires": { - "component-emitter": "1.2.1", - "debug": "2.6.9", - "has-binary2": "1.0.2", - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" - } + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" } }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", "requires": { - "faye-websocket": "0.10.0", - "uuid": "3.1.0" + "inherits": "2.0.3", + "readable-stream": "2.3.3" } }, - "sockjs-client": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", - "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", + "streamroller": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.6.0.tgz", + "integrity": "sha1-CV17BsfMUlg1ytLlmPdrseDuaTo=", "requires": { + "date-format": "1.2.0", "debug": "2.6.9", - "eventsource": "0.1.6", - "faye-websocket": "0.11.1", - "inherits": "2.0.3", - "json3": "3.3.2", - "url-parse": "1.2.0" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "requires": { - "websocket-driver": "0.7.0" - } - } + "mkdirp": "0.5.1", + "readable-stream": "2.3.3" } }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - }, - "dependencies": { - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - } + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, - "socks-proxy-agent": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", - "integrity": "sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw==", + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "requires": { - "agent-base": "2.1.1", - "extend": "3.0.1", - "socks": "1.1.10" + "safe-buffer": "5.1.1" } }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "is-plain-obj": "1.1.0" + "ansi-regex": "2.1.1" } }, - "source-list-map": { + "strip-bom": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, - "source-map-loader": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.3.tgz", - "integrity": "sha512-MYbFX9DYxmTQFfy2v8FC1XZwpwHKYxg3SK8Wb7VPBKuhDjz8gi9re2819MsG4p49HDyiOSUKlmZ+nQBArW5CGw==", + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "async": "2.6.0", - "loader-utils": "0.2.17", - "source-map": "0.6.1" + "get-stdin": "4.0.1" + } + }, + "style-loader": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.20.2.tgz", + "integrity": "sha512-FrLMGaOLVhS5pvoez3eJyc0ktchT1inEZziBSjBq1hHQBK3GFkF57Qd825DcrUhjaAWQk70MKrIl5bfjadR/Dg==", + "requires": { + "loader-utils": "1.1.0", + "schema-utils": "0.4.5" }, "dependencies": { - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "ajv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "requires": { - "lodash": "4.17.4" + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" + "ajv": "6.2.0", + "ajv-keywords": "3.1.0" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, - "source-map-resolve": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", - "requires": { - "atob": "2.0.3", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" - } - }, - "source-map-support": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", - "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", "requires": { - "source-map": "0.6.1" + "css-parse": "1.7.0", + "debug": "2.6.9", + "glob": "7.0.6", + "mkdirp": "0.5.1", + "sax": "0.5.8", + "source-map": "0.1.43" }, "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "requires": { + "amdefine": "1.0.1" + } } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "spdx": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", - "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", - "dev": true, + "stylus-loader": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", "requires": { - "spdx-exceptions": "1.0.5", - "spdx-license-ids": "1.2.2" + "loader-utils": "1.1.0", + "lodash.clonedeep": "4.5.0", + "when": "3.6.4" + }, + "dependencies": { + "when": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", + "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=" + } } }, - "spdx-compare": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", - "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", - "dev": true, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "requires": { - "spdx-expression-parse": "1.0.4", - "spdx-ranges": "1.0.1" + "minimist": "1.2.0" } }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "spdx-license-ids": "1.2.2" + "has-flag": "1.0.0" } }, - "spdx-exceptions": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", - "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", - "dev": true - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" - }, - "spdx-ranges": { + "symbol-observable": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", - "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", - "dev": true + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, - "spdx-satisfies": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", - "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", - "dev": true, + "syntax-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", + "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", "requires": { - "spdx-compare": "0.1.2", - "spdx-expression-parse": "1.0.4" + "acorn": "4.0.13" } }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==" + }, + "tar": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", + "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", "requires": { - "debug": "2.6.9", - "handle-thing": "1.2.5", - "http-deceiver": "1.2.7", - "safe-buffer": "5.1.1", - "select-hose": "2.0.0", - "spdy-transport": "2.0.20" + "chownr": "1.0.1", + "minipass": "2.2.1", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "yallist": "3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + } } }, - "spdy-transport": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", - "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", "requires": { - "debug": "2.6.9", - "detect-node": "2.0.3", - "hpack.js": "2.1.6", - "obuf": "1.1.1", - "readable-stream": "2.3.3", - "safe-buffer": "5.1.1", - "wbuf": "1.7.2" + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" } }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "text-extensions": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", + "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "through": "2.3.8" + "readable-stream": "2.3.3", + "xtend": "4.0.1" } }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "thunkify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", + "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", + "optional": true + }, + "thunky": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", "requires": { - "extend-shallow": "3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "2.0.4" - } - } + "process": "0.11.10" } }, - "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "timespan": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", + "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", + "optional": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "requires": { - "through2": "2.0.3" + "os-tmpdir": "1.0.2" } }, - "sprintf-js": { + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } + "kind-of": "3.2.2" } }, - "ssri": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz", - "integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==", + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "safe-buffer": "5.1.1" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "is-number": "3.0.0", + "repeat-string": "1.6.1" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "kind-of": "3.2.2" } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, - "stats-webpack-plugin": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", - "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", - "requires": { - "lodash": "4.17.4" - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", - "requires": { - "readable-stream": "2.3.3" - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "requires": { - "duplexer2": "0.1.4", - "readable-stream": "2.3.3" - } - }, - "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", - "requires": { - "end-of-stream": "1.4.0", - "stream-shift": "1.0.0" - } - }, - "stream-http": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", - "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "streamroller": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.6.0.tgz", - "integrity": "sha1-CV17BsfMUlg1ytLlmPdrseDuaTo=", - "requires": { - "date-format": "1.2.0", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "readable-stream": "2.3.3" - } - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } + "toposort": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", + "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=" }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", "requires": { - "safe-buffer": "5.1.1" + "punycode": "1.4.1" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } + "tree-kill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==" }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "0.2.1" - } + "treeify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.0.1.tgz", + "integrity": "sha1-abPNAiAioWhCTnz6HO1EyTnT6y8=", + "dev": true }, - "strip-eof": { + "trim-newlines": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" }, - "strip-indent": { + "trim-off-newlines": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "4.0.1" - } + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" }, - "style-loader": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz", - "integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==", - "requires": { - "loader-utils": "1.1.0", - "schema-utils": "0.3.0" - } + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "true-case-path": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", + "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", "requires": { - "css-parse": "1.7.0", - "debug": "2.6.9", - "glob": "7.0.6", - "mkdirp": "0.5.1", - "sax": "0.5.8", - "source-map": "0.1.43" + "glob": "6.0.4" }, "dependencies": { "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "requires": { - "fs.realpath": "1.0.0", "inflight": "1.0.6", "inherits": "2.0.3", "minimatch": "3.0.4", "once": "1.4.0", "path-is-absolute": "1.0.1" } - }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "requires": { - "amdefine": "1.0.1" - } } } }, - "stylus-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.1.tgz", - "integrity": "sha1-d/SzT9Aw0lsmF7z1UT21sHMMQIk=", + "ts-node": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.0.tgz", + "integrity": "sha512-mlSim/sQS1s5iT3KZEKXRaqsGC7xM2QoxkrhfznZJyou18dl47PTnY7/KMmbGqiVoQrO9Hk53CYpcychF5TNrQ==", "requires": { - "loader-utils": "1.1.0", - "lodash.clonedeep": "4.5.0", - "when": "3.6.4" + "arrify": "1.0.1", + "chalk": "2.3.1", + "diff": "3.4.0", + "make-error": "1.3.2", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map-support": "0.5.3", + "yn": "2.0.0" }, "dependencies": { - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=" - } - } - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "requires": { - "minimist": "1.2.0" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "requires": { - "has-flag": "1.0.0" - } - }, - "svgo": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", - "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", - "requires": { - "coa": "1.0.4", - "colors": "1.1.2", - "csso": "2.3.2", - "js-yaml": "3.7.0", - "mkdirp": "0.5.1", - "sax": "1.2.4", - "whet.extend": "0.9.9" - }, - "dependencies": { - "js-yaml": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", - "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "5.2.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", + "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==", + "requires": { + "source-map": "0.6.1" + } + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" + "has-flag": "3.0.0" } } } }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "syntax-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", - "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", + "tsickle": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.2.tgz", + "integrity": "sha512-KW+ZgY0t2cq2Qib1sfdgMiRnk+cr3brUtzZoVWjv+Ot3jNxVorFBUH+6In6hl8Dg7BI2AAFf69NHkwvZNMSFwA==", "requires": { - "acorn": "4.0.13" + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map": "0.6.1", + "source-map-support": "0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, - "tapable": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", - "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" + "tslib": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", + "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" }, - "tar": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", - "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", + "tslint": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", "requires": { - "chownr": "1.0.1", - "minipass": "2.2.1", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "yallist": "3.0.2" + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.3.0", + "commander": "2.12.2", + "diff": "3.4.0", + "glob": "7.1.2", + "js-yaml": "3.10.0", + "minimatch": "3.0.4", + "resolve": "1.5.0", + "semver": "5.4.1", + "tslib": "1.8.1", + "tsutils": "2.16.0" }, "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "requires": { + "path-parse": "1.0.5" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "2.0.0" + } } } }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "tsscmp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", + "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", + "optional": true + }, + "tsutils": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", + "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", "requires": { - "os-tmpdir": "1.0.2", - "rimraf": "2.2.8" + "tslib": "1.8.1" } }, - "text-extensions": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", - "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" + "safe-buffer": "5.1.1" } }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, - "thunky": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", - "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=" - }, - "time-stamp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.0.0.tgz", - "integrity": "sha1-lcakRTDhW6jW9KPsuMOj+sRto1c=" - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "process": "0.11.10" + "prelude-ls": "1.1.2" } }, - "timespan": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", - "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", - "optional": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", "requires": { - "os-tmpdir": "1.0.2" + "media-typer": "0.3.0", + "mime-types": "2.1.17" } }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "3.2.2" - } + "typescript": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==" }, - "to-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.1.tgz", - "integrity": "sha1-FTWL7kosg712N3uh3ASdDxiDeq4=", + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "requires": { - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "regex-not": "1.0.0" + "commander": "2.13.0", + "source-map": "0.6.1" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, - "toposort": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", - "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=" - }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "optional": true, "requires": { - "punycode": "1.4.1" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" } }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==" - }, - "treeify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.0.1.tgz", - "integrity": "sha1-abPNAiAioWhCTnz6HO1EyTnT6y8=", - "dev": true - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, - "true-case-path": { + "uglify-to-browserify": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", - "requires": { - "glob": "6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } - } + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true }, - "ts-node": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.0.tgz", - "integrity": "sha512-mlSim/sQS1s5iT3KZEKXRaqsGC7xM2QoxkrhfznZJyou18dl47PTnY7/KMmbGqiVoQrO9Hk53CYpcychF5TNrQ==", + "uglifyjs-webpack-plugin": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz", + "integrity": "sha512-CG/NvzXfemUAm5Y4Guh5eEaJYHtkG7kKNpXEJHp9QpxsFVB5/qKvYWoMaq4sa99ccZ0hM3MK8vQV9XPZB4357A==", "requires": { - "arrify": "1.0.1", - "chalk": "2.3.1", - "diff": "3.4.0", - "make-error": "1.3.2", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map-support": "0.5.3", - "yn": "2.0.0" + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.4.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.5.4" }, "dependencies": { - "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "ajv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "requires": { + "ajv": "6.2.0", + "ajv-keywords": "3.1.0" + } }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", - "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==", - "requires": { - "source-map": "0.6.1" - } - }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", - "requires": { - "has-flag": "3.0.0" - } } } }, - "tsickle": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.26.0.tgz", - "integrity": "sha512-eWJ2CUfttGK0LqF9iJ/Avnxbj4M+fCyJ50Zag3wm73Fut1hsasPRHKxKdrMWVj4BMHnQNx7TO+DdNmLmJTSuNw==", - "requires": { - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map": "0.5.7", - "source-map-support": "0.4.18" - }, - "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "0.5.7" - } - } - } + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, - "tslib": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", - "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" + "umd": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=" }, - "tslint": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", - "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "babel-code-frame": "6.26.0", - "builtin-modules": "1.1.1", - "chalk": "2.3.0", - "commander": "2.12.2", - "diff": "3.4.0", - "glob": "7.1.2", - "js-yaml": "3.10.0", - "minimatch": "3.0.4", - "resolve": "1.5.0", - "semver": "5.4.1", - "tslib": "1.8.1", - "tsutils": "2.16.0" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "path-parse": "1.0.5" + "is-extendable": "0.1.1" } }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "has-flag": "2.0.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } }, - "tsscmp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", - "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", - "optional": true - }, - "tsutils": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", - "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", - "requires": { - "tslib": "1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "type-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", - "requires": { - "media-typer": "0.3.0", - "mime-types": "2.1.17" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.1.8.tgz", - "integrity": "sha512-XG8/QmR1pyPeE1kj2aigo5kos8umefB31zW+PMvAAytHSB0T/vQvN6sqt8+Sh+y0b0A7zlmxNi2dzRnj0wcqGA==", - "requires": { - "cacache": "10.0.1", - "find-cache-dir": "1.0.0", - "schema-utils": "0.4.2", - "serialize-javascript": "1.4.0", - "source-map": "0.6.1", - "uglify-es": "3.3.8", - "webpack-sources": "1.1.0", - "worker-farm": "1.5.2" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - }, - "schema-utils": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.2.tgz", - "integrity": "sha512-LCuuUj7L43TbSIqeERp+/Z2FH/NxSA48mqcWlGTSYUUKsevGafj2SpyaFVTxyWWFLkIAS3p7jDTLpNsrU7PXoA==", - "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.3.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "requires": { - "has-flag": "2.0.0" - } - }, - "uglify-es": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.8.tgz", - "integrity": "sha512-j8li0jWcAN6yBuAVYFZEFyYINZAm4WEdMwkA6qXFi4TLrze3Mp0Le7QjW6LR9HQjQJ2zRa9VgnFLs3PatijWOw==", - "requires": { - "commander": "2.13.0", - "source-map": "0.6.1" - } - } - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" - }, - "umd": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", - "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=" - }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" - }, - "dependencies": { - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" - } - } - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" - }, - "uniqid": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-4.1.1.tgz", - "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", - "requires": { - "macaddress": "0.2.8" - } - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=" - }, - "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", "requires": { "unique-slug": "2.0.0" } @@ -12023,6 +10538,11 @@ } } }, + "upath": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", + "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" + }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", @@ -12049,6 +10569,11 @@ } } }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=" + }, "url-loader": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.6.2.tgz", @@ -12090,17 +10615,452 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "0.1.0" + } + } + } + }, + "useragent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", + "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", + "requires": { + "lru-cache": "2.2.4", + "tmp": "0.0.33" + }, + "dependencies": { + "lru-cache": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=" + } + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", + "dev": true + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "uws": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz", + "integrity": "sha1-Z6rzPEaypYel9mZtAPdpEyjxSdw=", + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" + }, + "watchpack": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", + "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", + "requires": { + "chokidar": "2.0.2", + "graceful-fs": "4.1.11", + "neo-async": "2.5.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "3.1.9", + "normalize-path": "2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "kind-of": "6.0.2", + "repeat-element": "1.1.2", + "snapdragon": "0.8.1", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "chokidar": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", + "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.1", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.4" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } } }, - "is-descriptor": { + "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, "isobject": { @@ -12109,153 +11069,28 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "requires": { - "set-getter": "0.1.0" - } - } - } - }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", - "requires": { - "lru-cache": "2.2.4", - "tmp": "0.0.33" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=" - } - } - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", - "dev": true - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" - }, - "uws": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz", - "integrity": "sha1-Z6rzPEaypYel9mZtAPdpEyjxSdw=", - "optional": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "vendors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", - "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "requires": { - "indexof": "0.0.1" - } - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" - }, - "watchpack": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", - "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", - "requires": { - "async": "2.6.0", - "chokidar": "1.7.0", - "graceful-fs": "4.1.11" - }, - "dependencies": { - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "micromatch": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", "requires": { - "lodash": "4.17.4" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" } } } @@ -12325,218 +11160,285 @@ } }, "webpack": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz", - "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==", - "requires": { - "acorn": "5.4.1", - "acorn-dynamic-import": "2.0.2", - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "async": "2.6.0", - "enhanced-resolve": "3.4.1", - "escope": "3.6.0", - "interpret": "1.1.0", - "json-loader": "0.5.7", - "json5": "0.5.1", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.0.1.tgz", + "integrity": "sha512-jHQNMmKPElreOYLCxR7SHfPnbhcqRT9O7lYPOMDR6Gt5XueJ7tH7JReXm4uMFstBKf7rj2Y7AD3LiMKR2zexYA==", + "requires": { + "acorn": "5.5.0", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.2.0", + "ajv-keywords": "3.1.0", + "chrome-trace-event": "0.1.2", + "enhanced-resolve": "4.0.0", + "eslint-scope": "3.7.1", "loader-runner": "2.3.0", "loader-utils": "1.1.0", "memory-fs": "0.4.1", + "micromatch": "3.1.9", "mkdirp": "0.5.1", + "neo-async": "2.5.0", "node-libs-browser": "2.1.0", - "source-map": "0.5.7", - "supports-color": "4.5.0", - "tapable": "0.2.8", - "uglifyjs-webpack-plugin": "0.4.6", - "watchpack": "1.4.0", - "webpack-sources": "1.1.0", - "yargs": "8.0.2" + "schema-utils": "0.4.5", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.2.2", + "watchpack": "1.5.0", + "webpack-sources": "1.1.0" }, "dependencies": { "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", + "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "ajv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", "requires": { - "lodash": "4.17.4" + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "kind-of": "6.0.2", + "repeat-element": "1.1.2", + "snapdragon": "0.8.1", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" } } } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "pify": "2.3.0" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "kind-of": "3.2.2" }, "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "ansi-regex": "3.0.0" + "is-buffer": "1.1.6" } } } }, - "strip-bom": { + "is-number": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "has-flag": "2.0.0" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, - "uglifyjs-webpack-plugin": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", - "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", - "requires": { - "source-map": "0.5.7", - "uglify-js": "2.8.29", - "webpack-sources": "1.1.0" - } + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "micromatch": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" } }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "camelcase": "4.1.0" + "ajv": "6.2.0", + "ajv-keywords": "3.1.0" } } } @@ -12566,27 +11468,36 @@ } }, "webpack-dev-middleware": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz", - "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", + "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==", "requires": { + "loud-rejection": "1.6.0", "memory-fs": "0.4.1", - "mime": "1.6.0", + "mime": "2.2.0", "path-is-absolute": "1.0.1", "range-parser": "1.2.0", - "time-stamp": "2.0.0" + "url-join": "2.0.5", + "webpack-log": "1.1.2" + }, + "dependencies": { + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + } } }, "webpack-dev-server": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.0.tgz", - "integrity": "sha512-lXzc36DGjKUVinETNmDWhfZFRbHMhatuF+lKex+czqY+JVe0Qf2V+Ig6/svDdbt/DmXFXuLQmSqhncYCqYf3qA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.0.tgz", + "integrity": "sha512-ap7Fth7oh4sthC0nJkvRm2W3SaWryBeR19DWIcAwJlcooN0tB2fEKuZqckYR3uaJ6wXPCK1xMWAQWXhV5xVe8g==", "requires": { "ansi-html": "0.0.7", "array-includes": "3.0.3", "bonjour": "3.5.0", - "chokidar": "2.0.0", - "compression": "1.7.1", + "chokidar": "2.0.2", + "compression": "1.7.2", "connect-history-api-fallback": "1.5.0", "debug": "3.1.0", "del": "3.0.0", @@ -12597,18 +11508,19 @@ "internal-ip": "1.2.0", "ip": "1.1.5", "killable": "1.0.0", - "loglevel": "1.6.0", + "loglevel": "1.6.1", "opn": "5.1.0", "portfinder": "1.0.13", - "selfsigned": "1.10.1", + "selfsigned": "1.10.2", "serve-index": "1.9.1", "sockjs": "0.3.19", "sockjs-client": "1.1.4", "spdy": "3.4.7", - "strip-ansi": "4.0.0", - "supports-color": "5.1.0", - "webpack-dev-middleware": "1.12.2", - "yargs": "6.6.0" + "strip-ansi": "3.0.1", + "supports-color": "5.3.0", + "webpack-dev-middleware": "2.0.6", + "webpack-log": "1.1.2", + "yargs": "9.0.1" }, "dependencies": { "ansi-regex": { @@ -12621,7 +11533,7 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "micromatch": "3.1.4", + "micromatch": "3.1.9", "normalize-path": "2.1.1" } }, @@ -12636,9 +11548,9 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "braces": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.0.tgz", - "integrity": "sha512-P4O8UQRdGiMLWSizsApmXVQDBS6KCt7dSexgLKBmH5Hr1CZq7vsnscFh8oR1sP1ab1Zj0uCHCEzZeV6SfUf3rA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", "requires": { "arr-flatten": "1.1.0", "array-unique": "0.3.2", @@ -12646,26 +11558,45 @@ "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", + "kind-of": "6.0.2", "repeat-element": "1.1.2", "snapdragon": "0.8.1", "snapdragon-node": "2.1.1", "split-string": "3.1.0", - "to-regex": "3.0.1" + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, "chokidar": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.0.tgz", - "integrity": "sha512-OgXCNv2U6TnG04D3tth0gsvdbV4zdbxFG3sYUqcoQMoEFVd1j1pZR6TZ8iknC45o9IJ6PeQI/J6wT/+cHcniAw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", + "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", "requires": { "anymatch": "2.0.0", "async-each": "1.0.1", - "braces": "2.3.0", + "braces": "2.3.1", "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", @@ -12673,7 +11604,8 @@ "is-glob": "4.0.0", "normalize-path": "2.1.1", "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "readdirp": "2.1.0", + "upath": "1.0.4" } }, "cliui": { @@ -12686,17 +11618,14 @@ "wrap-ansi": "2.1.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "ansi-regex": "2.1.1" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -12731,9 +11660,9 @@ "define-property": "0.2.5", "extend-shallow": "2.0.1", "posix-character-classes": "0.1.1", - "regex-not": "1.0.0", + "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -12751,22 +11680,63 @@ "requires": { "is-descriptor": "0.1.6" } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, "extglob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.2.tgz", - "integrity": "sha512-I0+eZBH+jFGL8F5BnIz2ON2nKCjTS3AS3H/5PeSmCp7UVC70Ym8IhdRiQly2juKYQ//f7z1aj1BRpQniFJoU1w==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { "array-unique": "0.3.2", "define-property": "1.0.0", "expand-brackets": "2.1.4", "extend-shallow": "2.0.1", "fragment-cache": "0.2.1", - "regex-not": "1.0.0", + "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, "fill-range": { @@ -12778,6 +11748,24 @@ "is-number": "3.0.0", "repeat-string": "1.6.1", "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" } }, "glob-parent": { @@ -12819,29 +11807,48 @@ } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, - "is-descriptor": { + "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } } } }, @@ -12886,24 +11893,67 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, "micromatch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.4.tgz", - "integrity": "sha512-kFRtviKYoAJT+t7HggMl0tBFGNAKLw/S7N+CO9qfEQyisob1Oy4pao+geRbkyeEd+V9aOkvZ4mhuyPvI/q9Sfg==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "braces": "2.3.0", - "define-property": "1.0.0", - "extend-shallow": "2.0.1", - "extglob": "2.0.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", "fragment-cache": "0.2.1", "kind-of": "6.0.2", - "nanomatch": "1.2.6", + "nanomatch": "1.2.9", "object.pick": "1.3.0", - "regex-not": "1.0.0", + "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } } }, "pify": { @@ -12911,58 +11961,121 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "ansi-regex": "3.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "requires": { - "has-flag": "2.0.0" + "has-flag": "3.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", + "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", "requires": { - "camelcase": "3.0.0", + "camelcase": "4.1.0", "cliui": "3.2.0", "decamelize": "1.2.0", "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", "require-directory": "2.1.1", "require-main-filename": "1.0.1", "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", "y18n": "3.2.1", - "yargs-parser": "4.2.1" + "yargs-parser": "7.0.0" } }, "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "requires": { - "camelcase": "3.0.0" + "camelcase": "4.1.0" } } } }, + "webpack-log": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.1.2.tgz", + "integrity": "sha512-B53SD4N4BHpZdUwZcj4st2QT7gVfqZtqHDruC1N+K2sciq0Rt/3F1Dx6RlylVkcrToMLTaiaeT48k9Lq4iDVDA==", + "requires": { + "chalk": "2.2.2", + "log-symbols": "2.2.0", + "loglevelnext": "1.0.3", + "uuid": "3.1.0" + } + }, "webpack-merge": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.1.tgz", - "integrity": "sha512-geQsZ86YkXOVOjvPC5yv3JSNnL6/X3Kzh935AQ/gJNEYXEfJDQFu/sdFuktS9OW2JcH/SJec8TGfRdrpHshH7A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.2.tgz", + "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==", "requires": { - "lodash": "4.17.4" + "lodash": "4.17.5" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + } } }, "webpack-sources": { @@ -12994,7 +12107,7 @@ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", "requires": { - "http-parser-js": "0.4.9", + "http-parser-js": "0.4.10", "websocket-extensions": "0.1.3" } }, @@ -13009,11 +12122,6 @@ "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", "optional": true }, - "whet.extend": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", - "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=" - }, "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", @@ -13038,7 +12146,8 @@ "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "optional": true }, "wordwrap": { "version": "0.0.3", @@ -13046,12 +12155,27 @@ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, "worker-farm": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.2.tgz", - "integrity": "sha512-XxiQ9kZN5n6mmnW+mFJ+wXjNNI/Nx4DIdaAKLX1Bn6LYBWlN/zaBhu34DQYPZ1AJobQuu67S2OfDdNSVULvXkQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz", + "integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==", "requires": { - "errno": "0.1.4", + "errno": "0.1.7", "xtend": "4.0.1" + }, + "dependencies": { + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "requires": { + "prr": "1.0.1" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + } } }, "wrap-ansi": { @@ -13135,6 +12259,7 @@ "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "optional": true, "requires": { "camelcase": "1.2.1", "cliui": "2.1.0", @@ -13145,7 +12270,8 @@ "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "optional": true } } }, diff --git a/package.json b/package.json index 53cdb8a1fd..364c951a8a 100644 --- a/package.json +++ b/package.json @@ -51,21 +51,20 @@ "homepage": "https://github.com/angular/devkit", "dependencies": { "@angular-devkit/build-optimizer": "^0.4.2", - "@angular/common": "^5.2.1", - "@angular/compiler": "^5.2.1", - "@angular/compiler-cli": "^5.2.1", - "@angular/core": "^5.2.1", + "@angular/common": "^5.2.7", + "@angular/compiler": "^5.2.7", + "@angular/compiler-cli": "^5.2.7", + "@angular/core": "^5.2.7", "@angular/http": "^5.2.6", "@angular/material": "^5.2.3", - "@angular/platform-browser": "^5.2.1", - "@angular/platform-browser-dynamic": "^5.2.1", + "@angular/platform-browser": "^5.2.7", + "@angular/platform-browser-dynamic": "^5.2.7", "@angular/router": "^5.2.6", - "@angular/service-worker": "^5.2.1", + "@angular/service-worker": "^5.2.7", "@ngtools/json-schema": "^1.0.9", - "@ngtools/webpack": "angular/ngtools-webpack-builds#5474750", + "@ngtools/webpack": "6.0.0-beta.4", "@types/common-tags": "^1.4.0", "@types/copy-webpack-plugin": "^4.0.1", - "@types/denodeify": "^1.2.31", "@types/express": "^4.11.1", "@types/glob": "^5.0.29", "@types/istanbul": "^0.4.29", @@ -76,28 +75,26 @@ "@types/request": "^2.47.0", "@types/semver": "^5.3.30", "@types/source-map": "0.5.2", - "@types/webpack": "^3.0.2", + "@types/webpack": "^3.8.2", "@types/webpack-sources": "^0.1.3", "ajv": "^5.5.1", "autoprefixer": "^7.2.3", "bootstrap": "^4.0.0", + "cache-loader": "^1.2.2", "chalk": "~2.2.2", "chokidar": "^1.7.0", - "circular-dependency-plugin": "^4.3.0", + "circular-dependency-plugin": "^4.4.0", "clean-css": "^4.1.9", "codelyzer": "^4.0.2", "common-tags": "^1.5.1", "conventional-changelog": "^1.1.0", - "copy-webpack-plugin": "^4.2.3", - "css-loader": "^0.28.7", - "denodeify": "^1.2.1", - "exports-loader": "^0.6.4", + "copy-webpack-plugin": "~4.4.2", "express": "^4.16.2", - "extract-text-webpack-plugin": "^3.0.2", - "file-loader": "^1.1.5", + "extract-text-webpack-plugin": "~4.0.0-beta.0", + "file-loader": "^1.1.9", "font-awesome": "^4.7.0", "glob": "^7.0.3", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "github:webpack-contrib/html-webpack-plugin#a8a8c2b6ea496c257fd6f501db3a06a51fa03e1e", "husky": "^0.14.3", "istanbul": "^0.4.5", "istanbul-instrumenter-loader": "^3.0.0", @@ -112,17 +109,20 @@ "karma-source-map-support": "^1.2.0", "less": "^2.7.3", "less-loader": "^4.0.5", - "license-webpack-plugin": "^1.1.1", + "license-webpack-plugin": "^1.1.2", "loader-utils": "^1.1.0", "lodash": "^4.17.4", + "material-design-icons": "^3.0.1", "memory-fs": "^0.4.1", "minimatch": "^3.0.4", "minimist": "^1.2.0", "node-sass": "^4.7.2", "opn": "^5.1.0", + "parse5": "^4.0.0", "portfinder": "^1.0.13", - "postcss-import": "^11.0.0", - "postcss-loader": "^2.0.10", + "postcss": "^6.0.19", + "postcss-import": "^11.1.0", + "postcss-loader": "^2.1.1", "postcss-url": "^7.3.0", "protractor": "^5.1.2", "raw-loader": "^0.5.1", @@ -133,25 +133,24 @@ "semver-intersect": "^1.1.2", "silent-error": "^1.1.0", "source-map": "^0.5.6", - "source-map-loader": "^0.2.3", "source-map-support": "^0.5.0", "stats-webpack-plugin": "^0.6.2", - "style-loader": "^0.19.1", + "style-loader": "^0.20.2", "stylus": "^0.54.5", - "stylus-loader": "^3.0.1", + "stylus-loader": "^3.0.2", "tar": "^3.1.5", "temp": "^0.8.3", "tree-kill": "^1.2.0", "ts-node": "^5.0.0", "tslint": "^5.9.1", "typescript": "~2.7.2", - "uglifyjs-webpack-plugin": "^1.1.6", + "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^0.6.2", - "webpack": "^3.10.0", - "webpack-dev-middleware": "^1.12.2", - "webpack-dev-server": "^2.11.0", - "webpack-merge": "^4.1.1", - "webpack-sources": "^1.0.1", + "webpack": "~4.0.0", + "webpack-dev-middleware": "^2.0.6", + "webpack-dev-server": "^3.0.1-beta.0", + "webpack-merge": "^4.1.2", + "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.0.3", "zone.js": "^0.8.19" }, diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 969e7d2df2..e2ee35d090 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -12,52 +12,51 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", - "@ngtools/webpack": "^1.10.0-rc.0", + "@ngtools/webpack": "6.0.0-beta.4", "autoprefixer": "^7.2.3", + "cache-loader": "^1.2.0", "chalk": "~2.2.2", - "circular-dependency-plugin": "^4.3.0", + "circular-dependency-plugin": "^4.4.0", "clean-css": "^4.1.9", "common-tags": "^1.5.1", - "copy-webpack-plugin": "^4.2.3", - "css-loader": "^0.28.7", - "denodeify": "^1.2.1", - "exports-loader": "^0.6.4", - "extract-text-webpack-plugin": "^3.0.2", + "copy-webpack-plugin": "^4.4.2", + "extract-text-webpack-plugin": "~4.0.0-beta.0", "file-loader": "^1.1.5", "glob": "^7.0.3", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "github:webpack-contrib/html-webpack-plugin#a8a8c2b6ea496c257fd6f501db3a06a51fa03e1e", "karma-source-map-support": "^1.2.0", "less": "^2.7.3", "less-loader": "^4.0.5", - "license-webpack-plugin": "^1.1.1", + "license-webpack-plugin": "^1.1.2", "lodash": "^4.17.4", "memory-fs": "^0.4.1", "minimatch": "^3.0.4", "node-sass": "^4.7.2", + "parse5": "^4.0.0", "opn": "^5.1.0", "portfinder": "^1.0.13", - "postcss-import": "^11.0.0", - "postcss-loader": "^2.0.10", - "postcss-url": "^7.3.0", + "postcss": "^6.0.19", + "postcss-import": "^11.1.0", + "postcss-loader": "^2.1.1", + "postcss-url": "^7.3.1", "raw-loader": "^0.5.1", "request": "^2.83.0", "rxjs": "^5.5.6", "sass-loader": "^6.0.6", "silent-error": "^1.1.0", - "source-map-loader": "^0.2.3", "source-map-support": "^0.5.0", "stats-webpack-plugin": "^0.6.2", - "style-loader": "^0.19.1", + "style-loader": "^0.20.2", "stylus": "^0.54.5", - "stylus-loader": "^3.0.1", + "stylus-loader": "^3.0.2", "tree-kill": "^1.2.0", - "uglifyjs-webpack-plugin": "^1.1.6", + "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^0.6.2", - "webpack": "^3.10.0", - "webpack-dev-middleware": "^1.12.2", - "webpack-dev-server": "^2.11.0", - "webpack-merge": "^4.1.1", - "webpack-sources": "^1.0.1", + "webpack": "~4.0.0", + "webpack-dev-middleware": "^2.0.6", + "webpack-dev-server": "^3.0.1-beta.0", + "webpack-merge": "^4.1.2", + "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.0.3" } } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts index 3887d4727a..024aa9110e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts @@ -29,7 +29,7 @@ export class BaseHrefWebpackPlugin { } else { // Replace only href attribute if exists const modifiedBaseTag = baseTagMatches[0].replace( - /href="\S+"/i, `href="${this.options.baseHref}"` + /href="\S*?"/i, `href="${this.options.baseHref}"` ); htmlPluginData.html = htmlPluginData.html.replace(baseTagRegex, modifiedBaseTag); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts index f76a121a7a..6c2d35995e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts @@ -33,7 +33,6 @@ export interface BuildOptions { buildOptimizer?: boolean; namedChunks?: boolean; subresourceIntegrity?: boolean; - forceTsCommonjs?: boolean; serviceWorker?: boolean; skipAppShell?: boolean; statsJson: boolean; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts index f8c6f899b7..2bcd466e58 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -5,12 +5,19 @@ import * as webpack from 'webpack'; import * as path from 'path'; const HtmlWebpackPlugin = require('html-webpack-plugin'); const SubresourceIntegrityPlugin = require('webpack-subresource-integrity'); - -import { packageChunkSort } from '../../utilities/package-chunk-sort'; +import { LicenseWebpackPlugin } from 'license-webpack-plugin'; +import { generateEntryPoints, packageChunkSort } from '../../utilities/package-chunk-sort'; import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; +import { IndexHtmlWebpackPlugin } from '../../plugins/index-html-webpack-plugin'; import { extraEntryParser, lazyChunksFilter } from './utils'; import { WebpackConfigOptions } from '../build-options'; +/** ++ * license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to ++ * let the dependency validator know it is used. ++ * ++ * require('webpack-sources') ++ */ export function getBrowserConfig(wco: WebpackConfigOptions) { const { projectRoot, buildOptions, appConfig } = wco; @@ -25,12 +32,23 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { ...extraEntryParser(appConfig.styles, appRoot, 'styles') ]); - if (buildOptions.vendorChunk) { - extraPlugins.push(new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - chunks: ['main'], - minChunks: (module: any) => - module.resource && /[\\\/]node_modules[\\\/]/.test(module.resource) + // TODO: Enable this once HtmlWebpackPlugin supports Webpack 4 + const generateIndexHtml = false; + if (generateIndexHtml) { + extraPlugins.push(new HtmlWebpackPlugin({ + template: path.resolve(appRoot, appConfig.index), + filename: path.resolve(buildOptions.outputPath, appConfig.index), + chunksSortMode: packageChunkSort(appConfig), + excludeChunks: lazyChunks, + xhtml: true, + minify: buildOptions.optimizationLevel === 1 ? { + caseSensitive: true, + collapseWhitespace: true, + keepClosingSlash: true + } : false + })); + extraPlugins.push(new BaseHrefWebpackPlugin({ + baseHref: buildOptions.baseHref as string })); } @@ -54,21 +72,24 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { } } - if (buildOptions.commonChunk) { - extraPlugins.push(new webpack.optimize.CommonsChunkPlugin({ - name: 'main', - async: 'common', - children: true, - minChunks: 2 - })); - } - if (buildOptions.subresourceIntegrity) { extraPlugins.push(new SubresourceIntegrityPlugin({ hashFuncNames: ['sha384'] })); } + if (buildOptions.extractLicenses) { + extraPlugins.push(new LicenseWebpackPlugin({ + pattern: /.*/, + suppressErrors: true, + perChunkOutput: false, + outputFilename: `3rdpartylicenses.txt` + })); + } + + const globalStylesEntries = extraEntryParser(appConfig.styles, appRoot, 'styles') + .map(style => style.entry); + return { resolve: { mainFields: [ @@ -79,37 +100,34 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { output: { crossOriginLoading: buildOptions.subresourceIntegrity ? 'anonymous' : false }, - plugins: [ - new HtmlWebpackPlugin({ - template: path.resolve(appRoot, appConfig.index), - filename: path.resolve(projectRoot, buildOptions.outputPath as any, appConfig.index), - chunksSortMode: packageChunkSort(appConfig), - excludeChunks: lazyChunks, - xhtml: true, - minify: buildOptions.optimizationLevel === 1? { - caseSensitive: true, - collapseWhitespace: true, - keepClosingSlash: true - } : false - }), - new BaseHrefWebpackPlugin({ - baseHref: buildOptions.baseHref as any + optimization: { + runtimeChunk: 'single', + splitChunks: { + chunks: buildOptions.commonChunk ? 'all' : 'initial', + cacheGroups: { + vendors: false, + vendor: buildOptions.vendorChunk && { + name: 'vendor', + chunks: 'initial', + test: (module: any, chunks: Array<{ name: string }>) => { + const moduleName = module.nameForCondition ? module.nameForCondition() : ''; + return /[\\/]node_modules[\\/]/.test(moduleName) + && !chunks.some(({ name }) => name === 'polyfills' + || globalStylesEntries.includes(name)); + }, + }, + } + } + }, + plugins: extraPlugins.concat([ + new IndexHtmlWebpackPlugin({ + input: path.resolve(appRoot, appConfig.index), + output: appConfig.index, + baseHref: buildOptions.baseHref, + entrypoints: generateEntryPoints(appConfig), + deployUrl: buildOptions.deployUrl, }), - new webpack.optimize.CommonsChunkPlugin({ - minChunks: Infinity, - name: 'inline' - }) - ].concat(extraPlugins), - node: { - fs: 'empty', - global: true, - crypto: 'empty', - tls: 'empty', - net: 'empty', - process: true, - module: false, - clearImmediate: false, - setImmediate: false - } + ]), + node: false, }; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts index a37ef0f41e..ea02bd4561 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -1,21 +1,24 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import * as webpack from 'webpack'; import * as path from 'path'; +import { HashedModuleIdsPlugin } from 'webpack'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; -import { NamedLazyChunksWebpackPlugin } from '../../plugins/named-lazy-chunks-webpack-plugin'; import { extraEntryParser, getOutputHashFormat, AssetPattern } from './utils'; import { isDirectory } from '../../utilities/is-directory'; import { requireProjectModule } from '../../utilities/require-project-module'; import { WebpackConfigOptions } from '../build-options'; +import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; +import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; import { findUp } from '../../utilities/find-up'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const StatsPlugin = require('stats-webpack-plugin'); const SilentError = require('silent-error'); +const resolve = require('resolve'); /** * Enumerate loaders and their dependencies from this file to let the dependency validator @@ -25,6 +28,7 @@ const SilentError = require('silent-error'); * require('raw-loader') * require('url-loader') * require('file-loader') + * require('cache-loader') * require('@angular-devkit/build-optimizer') */ @@ -38,7 +42,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } let extraPlugins: any[] = []; - let extraRules: any[] = []; let entryPoints: { [key: string]: string[] } = {}; if (appConfig.main) { @@ -64,8 +67,10 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // All entries have to be lazy for the bundle to be lazy. (existingEntry as any).lazy = existingEntry.lazy && curr.lazy; } else { - prev.push({ entry: curr.entry as string, paths: [curr.path as string], - lazy: curr.lazy as boolean }); + prev.push({ + entry: curr.entry as string, paths: [curr.path as string], + lazy: curr.lazy as boolean + }); } return prev; }, []); @@ -78,7 +83,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { extraPlugins.push(new ScriptsWebpackPlugin({ name: script.entry, sourceMap: buildOptions.sourceMap, - filename: `${script.entry}${hash}.bundle.js`, + filename: `${script.entry}${hash}.js`, scripts: script.paths, basePath: projectRoot, })); @@ -105,8 +110,8 @@ export function getCommonConfig(wco: WebpackConfigOptions) { if (outputRelativeOutput.startsWith('..') || path.isAbsolute(outputRelativeOutput)) { - // const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); // TODO: This check doesn't make a lot of sense anymore with multiple project. Review it. + // const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); // if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) { // const message = 'An asset cannot be written to a location outside the project.'; // throw new SilentError(message); @@ -114,8 +119,8 @@ export function getCommonConfig(wco: WebpackConfigOptions) { if (!asset.allowOutsideOutDir) { const message = 'An asset cannot be written to a location outside of the output path. ' - + 'You can override this message by setting the `allowOutsideOutDir` ' - + 'property on the asset to true in the CLI configuration.'; + + 'You can override this message by setting the `allowOutsideOutDir` ' + + 'property on the asset to true in the CLI configuration.'; throw new SilentError(message); } } @@ -138,15 +143,11 @@ export function getCommonConfig(wco: WebpackConfigOptions) { asset.glob = asset.glob + '/**/*'; } - // Escape the input in case it has special charaters and use to make glob absolute - const escapedInput = asset.input - .replace(/[\\|\*|\?|\!|\(|\)|\[|\]|\{|\}]/g, (substring) => `\\${substring}`); - return { context: asset.input, to: asset.output, from: { - glob: path.resolve(escapedInput, asset.glob), + glob: asset.glob, dot: true } }; @@ -169,7 +170,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { if (buildOptions.showCircularDependencies) { extraPlugins.push(new CircularDependencyPlugin({ - exclude: /(\\|\/)node_modules(\\|\/)/ + exclude: /[\\\/]node_modules[\\\/]/ })); } @@ -177,18 +178,32 @@ export function getCommonConfig(wco: WebpackConfigOptions) { extraPlugins.push(new StatsPlugin('stats.json', 'verbose')); } + let buildOptimizerUseRule; if (buildOptions.buildOptimizer) { - extraRules.push({ - test: /\.js$/, - use: [{ - loader: '@angular-devkit/build-optimizer/webpack-loader', - options: { sourceMap: buildOptions.sourceMap } - }] - }); + // Set the cache directory to the Build Optimizer dir, so that package updates will delete it. + const buildOptimizerDir = path.dirname( + resolve.sync('@angular-devkit/build-optimizer', { basedir: projectRoot })); + const cacheDirectory = path.resolve(buildOptimizerDir, './.cache/'); + + buildOptimizerUseRule = { + use: [ + { + loader: 'cache-loader', + options: { cacheDirectory } + }, + { + loader: '@angular-devkit/build-optimizer/webpack-loader', + options: { sourceMap: buildOptions.sourceMap } + }, + ], + }; } - if (buildOptions.namedChunks) { - extraPlugins.push(new NamedLazyChunksWebpackPlugin()); + // Allow loaders to be in a node_modules nested inside the CLI package + const loaderNodeModules = ['node_modules']; + const potentialNodeModules = path.join(__dirname, '..', '..', 'node_modules'); + if (isDirectory(potentialNodeModules)) { + loaderNodeModules.push(potentialNodeModules); } // Load rxjs path aliases. @@ -203,22 +218,26 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } catch (e) { } return { + mode: buildOptions.optimizationLevel === 0 ? 'development' : 'production', + devtool: false, resolve: { extensions: ['.ts', '.js'], - modules: ['node_modules', nodeModules], symlinks: !buildOptions.preserveSymlinks, + modules: [appRoot, 'node_modules'], alias }, resolveLoader: { - modules: [nodeModules, 'node_modules'] + modules: loaderNodeModules }, - context: __dirname, + context: projectRoot, entry: entryPoints, output: { path: path.resolve(projectRoot, buildOptions.outputPath as string), publicPath: buildOptions.deployUrl, - filename: `[name]${hashFormat.chunk}.bundle.js`, - chunkFilename: `[id]${hashFormat.chunk}.chunk.js` + filename: `[name]${hashFormat.chunk}.js`, + }, + performance: { + hints: false, }, module: { rules: [ @@ -238,11 +257,53 @@ export function getCommonConfig(wco: WebpackConfigOptions) { name: `[name]${hashFormat.file}.[ext]`, limit: 10000 } - } - ].concat(extraRules) + }, + { + test: /[\/\\]@angular[\/\\].+\.js$/, + sideEffects: false, + parser: { system: true }, + ...buildOptimizerUseRule, + }, + { + test: /\.js$/, + ...buildOptimizerUseRule, + }, + ] + }, + optimization: { + noEmitOnErrors: true, + minimizer: [ + new HashedModuleIdsPlugin(), + // TODO: check with Mike what this feature needs. + new BundleBudgetPlugin({ budgets: appConfig.budgets }), + new CleanCssWebpackPlugin({ + sourceMap: buildOptions.sourceMap, + // component styles retain their original file name + test: (file) => /\.(?:css|scss|sass|less|styl)$/.test(file), + }), + new UglifyJSPlugin({ + sourceMap: buildOptions.sourceMap, + parallel: true, + cache: true, + uglifyOptions: { + ecma: wco.supportES2015 ? 6 : 5, + warnings: buildOptions.verbose, + safari10: true, + compress: { + pure_getters: buildOptions.buildOptimizer, + // PURE comments work best with 3 passes. + // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. + passes: buildOptions.buildOptimizer ? 3 : 1, + }, + output: { + ascii_only: true, + comments: false, + webkit: true, + }, + } + }), + ], }, - plugins: [ - new webpack.NoEmitOnErrorsPlugin() - ].concat(extraPlugins) + plugins: extraPlugins, }; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts deleted file mode 100644 index dd90b2dad8..0000000000 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/development.ts +++ /dev/null @@ -1,12 +0,0 @@ -// tslint:disable -// TODO: cleanup this file, it's copied as is from Angular CLI. - -import { NamedModulesPlugin } from 'webpack'; - -import { WebpackConfigOptions } from '../build-options'; - -export function getDevConfig(_wco: WebpackConfigOptions) { - return { - plugins: [new NamedModulesPlugin()] - }; -} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts index 4e42632183..ec39638e21 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts @@ -3,8 +3,6 @@ export * from './browser'; export * from './common'; -export * from './development'; -export * from './production'; export * from './server'; export * from './styles'; export * from './test'; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts deleted file mode 100644 index b62cbd168c..0000000000 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/production.ts +++ /dev/null @@ -1,175 +0,0 @@ -// tslint:disable -// TODO: cleanup this file, it's copied as is from Angular CLI. - -import * as path from 'path'; -import * as webpack from 'webpack'; -import * as fs from 'fs'; -import * as semver from 'semver'; -import { stripIndent } from 'common-tags'; -import { LicenseWebpackPlugin } from 'license-webpack-plugin'; -import { PurifyPlugin } from '@angular-devkit/build-optimizer'; -import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; -import { StaticAssetPlugin } from '../../plugins/static-asset'; -import { GlobCopyWebpackPlugin } from '../../plugins/glob-copy-webpack-plugin'; -import { WebpackConfigOptions } from '../build-options'; -import { NEW_SW_VERSION } from '../../utilities/service-worker'; - -const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); - -const OLD_SW_VERSION = '>= 1.0.0-beta.5 < 2.0.0'; - -/** - * license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to - * let the dependency validator know it is used. - * - * require('webpack-sources') - */ - - -export function getProdConfig(wco: WebpackConfigOptions) { - const { projectRoot, buildOptions, appConfig } = wco; - - let extraPlugins: any[] = []; - let entryPoints: { [key: string]: string[] } = {}; - - if (appConfig.serviceWorker) { - const nodeModules = path.resolve(projectRoot, 'node_modules'); - const swModule = path.resolve(nodeModules, '@angular/service-worker'); - - // @angular/service-worker is required to be installed when serviceWorker is true. - if (!fs.existsSync(swModule)) { - throw new Error(stripIndent` - Your project is configured with serviceWorker = true, but @angular/service-worker - is not installed. Run \`npm install --save-dev @angular/service-worker\` - and try again, or run \`ng set apps.0.serviceWorker=false\` in your .angular-cli.json. - `); - } - - // Read the version of @angular/service-worker and throw if it doesn't match the - // expected version. - const swPackageJson = fs.readFileSync(`${swModule}/package.json`).toString(); - const swVersion = JSON.parse(swPackageJson)['version']; - - const isLegacySw = semver.satisfies(swVersion, OLD_SW_VERSION); - const isModernSw = semver.gte(swVersion, NEW_SW_VERSION); - - if (!isLegacySw && !isModernSw) { - throw new Error(stripIndent` - The installed version of @angular/service-worker is ${swVersion}. This version of the CLI - requires the @angular/service-worker version to satisfy ${OLD_SW_VERSION}. Please upgrade - your service worker version. - `); - } - - if (isLegacySw) { - // Path to the worker script itself. - const workerPath = path.resolve(swModule, 'bundles/worker-basic.min.js'); - - // Path to a small script to register a service worker. - const registerPath = path.resolve(swModule, 'build/assets/register-basic.min.js'); - - // Sanity check - both of these files should be present in @angular/service-worker. - if (!fs.existsSync(workerPath) || !fs.existsSync(registerPath)) { - throw new Error(stripIndent` - The installed version of @angular/service-worker isn't supported by the CLI. - Please install a supported version. The following files should exist: - - ${registerPath} - - ${workerPath} - `); - } - - // CopyWebpackPlugin replaces GlobCopyWebpackPlugin, but AngularServiceWorkerPlugin depends - // on specific behaviour from latter. - // AngularServiceWorkerPlugin expects the ngsw-manifest.json to be present in the 'emit' phase - // but with CopyWebpackPlugin it's only there on 'after-emit'. - // So for now we keep it here, but if AngularServiceWorkerPlugin changes we remove it. - extraPlugins.push(new GlobCopyWebpackPlugin({ - patterns: [ - 'ngsw-manifest.json', - { glob: 'ngsw-manifest.json', - input: path.resolve(projectRoot, appConfig.root), output: '' } - ], - globOptions: { - cwd: projectRoot, - optional: true, - }, - })); - - // Load the Webpack plugin for manifest generation and install it. - const AngularServiceWorkerPlugin = require('@angular/service-worker/build/webpack') - .AngularServiceWorkerPlugin; - extraPlugins.push(new AngularServiceWorkerPlugin({ - baseHref: buildOptions.baseHref || '/', - })); - - // Copy the worker script into assets. - const workerContents = fs.readFileSync(workerPath).toString(); - extraPlugins.push(new StaticAssetPlugin('worker-basic.min.js', workerContents)); - - // Add a script to index.html that registers the service worker. - // TODO(alxhub): inline this script somehow. - entryPoints['sw-register'] = [registerPath]; - } - } - - extraPlugins.push(new BundleBudgetPlugin({ - budgets: appConfig.budgets - })); - - if (buildOptions.extractLicenses) { - extraPlugins.push(new LicenseWebpackPlugin({ - pattern: /^(MIT|ISC|BSD.*)$/, - suppressErrors: true, - perChunkOutput: false, - outputFilename: `3rdpartylicenses.txt` - })); - } - - const uglifyCompressOptions: any = { - // Disabled because of an issue with Mapbox GL when using the Webpack node global and UglifyJS: - // https://github.com/mapbox/mapbox-gl-js/issues/4359#issuecomment-303880888 - // https://github.com/angular/angular-cli/issues/5804 - // https://github.com/angular/angular-cli/pull/7931 - typeofs : false - }; - - if (buildOptions.buildOptimizer) { - // This plugin must be before webpack.optimize.UglifyJsPlugin. - extraPlugins.push(new PurifyPlugin()); - uglifyCompressOptions.pure_getters = true; - // PURE comments work best with 3 passes. - // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. - uglifyCompressOptions.passes = 3; - } - - return { - entry: entryPoints, - plugins: [ - new webpack.EnvironmentPlugin({ - 'NODE_ENV': 'production' - }), - new webpack.HashedModuleIdsPlugin(), - new webpack.optimize.ModuleConcatenationPlugin(), - ...extraPlugins, - // Uglify should be the last plugin as PurifyPlugin needs to be before it. - new UglifyJSPlugin({ - sourceMap: buildOptions.sourceMap, - parallel: true, - uglifyOptions: { - ecma: wco.supportES2015 ? 6 : 5, - warnings: buildOptions.verbose, - ie8: false, - mangle: { - safari10: true, - }, - compress: uglifyCompressOptions, - output: { - ascii_only: true, - comments: false, - webkit: true, - }, - } - }), - ] - }; -} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts index d5afd1f073..e76e61f8a7 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts @@ -3,19 +3,16 @@ import * as webpack from 'webpack'; import * as path from 'path'; -import { - SuppressExtractedTextChunksWebpackPlugin -} from '../../plugins/suppress-entry-chunks-webpack-plugin'; +import { SuppressExtractedTextChunksWebpackPlugin } from '../../plugins/webpack'; import { extraEntryParser, getOutputHashFormat } from './utils'; import { WebpackConfigOptions } from '../build-options'; -// import { pluginArgs, postcssArgs } from '../../tasks/eject'; -import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { findUp } from '../../utilities/find-up'; const postcssUrl = require('postcss-url'); const autoprefixer = require('autoprefixer'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const postcssImports = require('postcss-import'); +const PostcssCliResources = require('../../plugins/webpack').PostcssCliResources; /** * Enumerate loaders and their dependencies from this file to let the dependency validator @@ -50,27 +47,38 @@ export function getStylesConfig(wco: WebpackConfigOptions) { // Maximum resource size to inline (KiB) const maximumInlineSize = 10; - // Minify/optimize css in production. - const minimizeCss = buildOptions.optimizationLevel === 1; + // Determine hashing format. + const hashFormat = getOutputHashFormat(buildOptions.outputHashing as string); // Convert absolute resource URLs to account for base-href and deploy-url. const baseHref = wco.buildOptions.baseHref || ''; const deployUrl = wco.buildOptions.deployUrl || ''; - const postcssPluginCreator = function(loader: webpack.loader.LoaderContext) { + const postcssPluginCreator = function (loader: webpack.loader.LoaderContext) { return [ postcssImports({ resolve: (url: string, context: string) => { return new Promise((resolve, reject) => { + let hadTilde = false; if (url && url.startsWith('~')) { url = url.substr(1); + hadTilde = true; } - loader.resolve(context, url, (err: Error, result: string) => { + loader.resolve(context, (hadTilde ? '' : './') + url, (err: Error, result: string) => { if (err) { - reject(err); - return; + if (hadTilde) { + reject(err); + return; + } + loader.resolve(context, url, (err: Error, result: string) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + resolve(result); } - - resolve(result); }); }); }, @@ -111,7 +119,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { } else if (baseHref.match(/:\/\//)) { // If baseHref contains a scheme, include it as is. return baseHref.replace(/\/$/, '') + - `/${deployUrl}/${url}`.replace(/\/\/+/g, '/'); + `/${deployUrl}/${url}`.replace(/\/\/+/g, '/'); } else { // Join together base-href, deploy-url and the original URL. // Also dedupe multiple slashes into single ones. @@ -131,24 +139,18 @@ export function getStylesConfig(wco: WebpackConfigOptions) { }, { url: 'rebase' }, ]), - autoprefixer(), + PostcssCliResources({ + deployUrl: loader.loaders[loader.loaderIndex].options.ident == 'extracted' ? '' : deployUrl, + loader, + filename: `[name]${hashFormat.file}.[ext]`, + }), + autoprefixer({ grid: true }), ]; }; - // (postcssPluginCreator as any)[postcssArgs] = { - // variableImports: { - // 'autoprefixer': 'autoprefixer', - // 'postcss-url': 'postcssUrl', - // 'postcss-import': 'postcssImports', - // }, - // variables: { minimizeCss, baseHref, deployUrl, projectRoot, maximumInlineSize } - // }; - - // determine hashing format - const hashFormat = getOutputHashFormat(buildOptions.outputHashing as string); // use includePaths from appConfig const includePaths: string[] = []; - let lessPathOptions: { paths: string[] } = {paths: []}; + let lessPathOptions: { paths: string[] } = { paths: [] }; if (appConfig.stylePreprocessorOptions && appConfig.stylePreprocessorOptions.includePaths @@ -177,7 +179,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) { // set base rules to derive final rules from const baseRules: webpack.NewUseRule[] = [ { test: /\.css$/, use: [] }, - { test: /\.scss$|\.sass$/, use: [{ + { + test: /\.scss$|\.sass$/, use: [{ loader: 'sass-loader', options: { sourceMap: cssSourceMap, @@ -187,7 +190,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) { } }] }, - { test: /\.less$/, use: [{ + { + test: /\.less$/, use: [{ loader: 'less-loader', options: { sourceMap: cssSourceMap, @@ -207,39 +211,39 @@ export function getStylesConfig(wco: WebpackConfigOptions) { ]; const commonLoaders: webpack.Loader[] = [ - { - loader: 'css-loader', - options: { - sourceMap: cssSourceMap, - import: false, - } - }, - { - loader: 'postcss-loader', - options: { - // A non-function property is required to workaround a webpack option handling bug - ident: 'postcss', - plugins: postcssPluginCreator, - sourceMap: cssSourceMap - } - } + { loader: 'raw-loader' }, ]; // load component css as raw strings - const rules: webpack.Rule[] = baseRules.map(({test, use}) => ({ + const rules: webpack.Rule[] = baseRules.map(({ test, use }) => ({ exclude: globalStylePaths, test, use: [ - 'exports-loader?module.exports.toString()', ...commonLoaders, + { + loader: 'postcss-loader', + options: { + ident: 'embedded', + plugins: postcssPluginCreator, + sourceMap: cssSourceMap + } + }, ...(use as webpack.Loader[]) ] })); // load global css as css files if (globalStylePaths.length > 0) { - rules.push(...baseRules.map(({test, use}) => { + rules.push(...baseRules.map(({ test, use }) => { const extractTextPlugin = { use: [ ...commonLoaders, + { + loader: 'postcss-loader', + options: { + ident: buildOptions.extractCss ? 'extracted' : 'embedded', + plugins: postcssPluginCreator, + sourceMap: cssSourceMap + } + }, ...(use as webpack.Loader[]) ], // publicPath needed as a workaround https://github.com/angular/angular-cli/issues/4035 @@ -248,8 +252,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) { const ret: any = { include: globalStylePaths, test, -        use: buildOptions.extractCss ? ExtractTextPlugin.extract(extractTextPlugin) - : ['style-loader', ...extractTextPlugin.use] + use: buildOptions.extractCss ? ExtractTextPlugin.extract(extractTextPlugin) + : ['style-loader', ...extractTextPlugin.use] }; // Save the original options as arguments for eject. // if (buildOptions.extractCss) { @@ -262,16 +266,14 @@ export function getStylesConfig(wco: WebpackConfigOptions) { if (buildOptions.extractCss) { // extract global css from js files into own css file extraPlugins.push( - new ExtractTextPlugin({ filename: `[name]${hashFormat.extract}.bundle.css` })); + new ExtractTextPlugin({ filename: `[name]${hashFormat.extract}.css` })); // suppress empty .js files in css only entry points extraPlugins.push(new SuppressExtractedTextChunksWebpackPlugin()); } - if (minimizeCss) { - extraPlugins.push(new CleanCssWebpackPlugin({ sourceMap: cssSourceMap })); - } - return { + // Workaround stylus-loader defect: https://github.com/shama/stylus-loader/issues/189 + loader: { stylus: {} }, entry: entryPoints, module: { rules }, plugins: [].concat(extraPlugins as any) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts index 98a179e723..3193766cde 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts @@ -3,7 +3,6 @@ import * as path from 'path'; import * as glob from 'glob'; -import * as webpack from 'webpack'; // import { CliConfig } from '../config'; import { WebpackConfigOptions, WebpackTestOptions } from '../build-options'; @@ -21,7 +20,6 @@ import { WebpackConfigOptions, WebpackTestOptions } from '../build-options'; export function getTestConfig(wco: WebpackConfigOptions) { const { projectRoot, buildOptions, appConfig } = wco; - const nodeModules = path.resolve(projectRoot, 'node_modules'); const extraRules: any[] = []; const extraPlugins: any[] = []; @@ -64,16 +62,24 @@ export function getTestConfig(wco: WebpackConfigOptions) { module: { rules: [].concat(extraRules as any) }, - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ - minChunks: Infinity, - name: 'inline' - }), - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - chunks: ['main'], - minChunks: (module: any) => module.resource && module.resource.startsWith(nodeModules) - }) - ].concat(extraPlugins) + plugins: extraPlugins, + optimization: { + // runtimeChunk: 'single', + splitChunks: { + chunks: buildOptions.commonChunk ? 'all' : 'initial', + cacheGroups: { + vendors: false, + vendor: { + name: 'vendor', + chunks: 'initial', + test: (module: any, chunks: Array<{ name: string }>) => { + const moduleName = module.nameForCondition ? module.nameForCondition() : ''; + return /[\\/]node_modules[\\/]/.test(moduleName) + && !chunks.some(({ name }) => name === 'polyfills'); + }, + }, + } + } + }, }; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index a34b7df6ce..7a0da5594f 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -28,12 +28,6 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru options.compilerOptions.preserveSymlinks = true; } - // Forcing commonjs seems to drastically improve rebuild speeds on webpack. - // Dev builds on watch mode will set this option to true. - if (wco.buildOptions.forceTsCommonjs) { - options.compilerOptions.module = 'commonjs'; - } - // Read the environment, and set it in the compiler host. let hostReplacementPaths: any = {}; // process environment file replacement @@ -85,7 +79,18 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru ? path.resolve(appRoot, buildOptions.i18nFile) : undefined; - const pluginOptions: AngularCompilerPluginOptions = Object.assign({}, { + const additionalLazyModules: { [module: string]: string } = {}; + if (appConfig.lazyModules) { + for (const lazyModule of appConfig.lazyModules) { + additionalLazyModules[lazyModule] = path.resolve( + projectRoot, + appConfig.root, + lazyModule, + ); + } + } + + const pluginOptions: AngularCompilerPluginOptions = { mainPath: useMain ? path.join(projectRoot, appConfig.root, appConfig.main) : undefined, i18nInFile: i18nInFile, i18nInFormat: buildOptions.i18nFormat, @@ -96,8 +101,11 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru missingTranslation: buildOptions.i18nMissingTranslation, hostReplacementPaths, sourceMap: buildOptions.sourceMap, - forkTypeChecker: buildOptions.forkTypeChecker - }, options); + additionalLazyModules, + nameLazyFiles: buildOptions.namedChunks, + forkTypeChecker: buildOptions.forkTypeChecker, + ...options + }; return new AngularCompilerPlugin(pluginOptions); } @@ -115,23 +123,19 @@ export function getAotConfig(wco: WebpackConfigOptions) { const { projectRoot, buildOptions, appConfig } = wco; const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); - let pluginOptions: any = { tsConfigPath }; - - let boLoader: any = []; + const loaders: any[] = [webpackLoader]; if (buildOptions.buildOptimizer) { - boLoader = [{ + loaders.unshift({ loader: '@angular-devkit/build-optimizer/webpack-loader', options: { sourceMap: buildOptions.sourceMap } - }]; + }); } - const test = AngularCompilerPlugin.isSupported() - ? /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/ - : /\.ts$/; + const test = /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/; return { - module: { rules: [{ test, use: [...boLoader, webpackLoader] }] }, - plugins: [_createAotPlugin(wco, pluginOptions)] + module: { rules: [{ test, use: loaders }] }, + plugins: [_createAotPlugin(wco, { tsConfigPath })] }; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts index 1fa119ad93..1a420a754d 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts @@ -9,16 +9,19 @@ export const ngAppResolve = (resolvePath: string): string => { const webpackOutputOptions = { colors: true, - hash: true, - timings: true, - chunks: true, + hash: true, // required by custom stat output + timings: true, // required by custom stat output + chunks: true, // required by custom stat output chunkModules: false, children: false, // listing all children is very noisy in AOT and hides warnings/errors modules: false, reasons: false, warnings: true, - assets: false, // listing all assets is very noisy when using assets directories - version: false + errors: true, + assets: true, // required by custom stat output + version: false, + errorDetails: false, + moduleTrace: false, }; const verboseWebpackOutputOptions = { @@ -26,7 +29,9 @@ const verboseWebpackOutputOptions = { assets: true, version: true, reasons: true, - chunkModules: false // TODO: set to true when console to file output is fixed + chunkModules: false, // TODO: set to true when console to file output is fixed + errorDetails: true, + moduleTrace: true, }; export function getWebpackStatsConfig(verbose = false) { diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts index 3ec03181da..b3c1f74a4a 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts @@ -8,7 +8,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Budget, calculateBytes, calculateSizes } from '../utilities/bundle-calculator'; + +import { Budget, Size, calculateBytes, calculateSizes } from '../utilities/bundle-calculator'; +import { formatSize } from '../utilities/stats'; interface Thresholds { maximumWarning?: number; @@ -26,7 +28,7 @@ export interface BundleBudgetPluginOptions { } export class BundleBudgetPlugin { - constructor(private options: BundleBudgetPluginOptions) {} + constructor(private options: BundleBudgetPluginOptions) { } apply(compiler: any): void { const { budgets } = this.options; @@ -37,63 +39,51 @@ export class BundleBudgetPlugin { } budgets.map(budget => { - const thresholds = this.calcualte(budget); + const thresholds = this.calculate(budget); return { budget, thresholds, sizes: calculateSizes(budget, compilation) }; }) - .forEach(budgetCheck => { - budgetCheck.sizes.forEach(size => { - if (budgetCheck.thresholds.maximumWarning) { - if (budgetCheck.thresholds.maximumWarning < size.size) { - compilation.warnings.push(`budgets, maximum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.maximumError) { - if (budgetCheck.thresholds.maximumError < size.size) { - compilation.errors.push(`budgets, maximum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.minimumWarning) { - if (budgetCheck.thresholds.minimumWarning > size.size) { - compilation.warnings.push(`budgets, minimum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.minimumError) { - if (budgetCheck.thresholds.minimumError > size.size) { - compilation.errors.push(`budgets, minimum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.warningLow) { - if (budgetCheck.thresholds.warningLow > size.size) { - compilation.warnings.push(`budgets, minimum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.warningHigh) { - if (budgetCheck.thresholds.warningHigh < size.size) { - compilation.warnings.push(`budgets, maximum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.errorLow) { - if (budgetCheck.thresholds.errorLow > size.size) { - compilation.errors.push(`budgets, minimum exceeded for ${size.label}.`); - } - } - if (budgetCheck.thresholds.errorHigh) { - if (budgetCheck.thresholds.errorHigh < size.size) { - compilation.errors.push(`budgets, maximum exceeded for ${size.label}.`); - } - } - }); + .forEach(budgetCheck => { + budgetCheck.sizes.forEach(size => { + this.checkMaximum(budgetCheck.thresholds.maximumWarning, size, compilation.warnings); + this.checkMaximum(budgetCheck.thresholds.maximumError, size, compilation.errors); + this.checkMinimum(budgetCheck.thresholds.minimumWarning, size, compilation.warnings); + this.checkMinimum(budgetCheck.thresholds.minimumError, size, compilation.errors); + this.checkMinimum(budgetCheck.thresholds.warningLow, size, compilation.warnings); + this.checkMaximum(budgetCheck.thresholds.warningHigh, size, compilation.warnings); + this.checkMinimum(budgetCheck.thresholds.errorLow, size, compilation.errors); + this.checkMaximum(budgetCheck.thresholds.errorHigh, size, compilation.errors); + }); - }); + }); cb(); }); } - private calcualte(budget: Budget): Thresholds { + private checkMinimum(threshold: number | undefined, size: Size, messages: any) { + if (threshold) { + if (threshold > size.size) { + const sizeDifference = formatSize(threshold - size.size); + messages.push(`budgets, minimum exceeded for ${size.label}. ` + + `Budget ${formatSize(threshold)} was not reached by ${sizeDifference}.`); + } + } + } + + private checkMaximum(threshold: number | undefined, size: Size, messages: any) { + if (threshold) { + if (threshold < size.size) { + const sizeDifference = formatSize(size.size - threshold); + messages.push(`budgets, maximum exceeded for ${size.label}. ` + + `Budget ${formatSize(threshold)} was exceeded by ${sizeDifference}.`); + } + } + } + + private calculate(budget: Budget): Thresholds { let thresholds: Thresholds = {}; if (budget.maximumWarning) { thresholds.maximumWarning = calculateBytes(budget.maximumWarning, budget.baseline, 'pos'); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts index bf5a34257c..9574fab5dc 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts @@ -8,6 +8,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ + import { Compiler } from 'webpack'; import { RawSource, SourceMapSource } from 'webpack-sources'; @@ -19,96 +20,123 @@ interface Chunk { export interface CleanCssWebpackPluginOptions { sourceMap: boolean; + test: (file: string) => boolean; } -export class CleanCssWebpackPlugin { +function hook( + compiler: any, + action: (compilation: any, chunks: Array) => Promise, +) { + if (compiler.hooks) { + // Webpack 4 + compiler.hooks.compilation.tap('cleancss-webpack-plugin', (compilation: any) => { + compilation.hooks.optimizeChunkAssets.tapPromise( + 'cleancss-webpack-plugin', + (chunks: Array) => action(compilation, chunks), + ); + }); + } else { + // Webpack 3 + compiler.plugin('compilation', (compilation: any) => { + compilation.plugin( + 'optimize-chunk-assets', + (chunks: Array, callback: (err?: Error) => void) => action(compilation, chunks) + .then(() => callback()) + .catch((err) => callback(err)), + ); + }); + } +} - constructor(private options: Partial = {}) {} +export class CleanCssWebpackPlugin { + private readonly _options: CleanCssWebpackPluginOptions; + + constructor(options: Partial) { + this._options = { + sourceMap: false, + test: (file) => file.endsWith('.css'), + ...options, + }; + } apply(compiler: Compiler): void { - compiler.plugin('compilation', (compilation: any) => { - compilation.plugin('optimize-chunk-assets', - (chunks: Array, callback: (err?: Error) => void) => { - - const cleancss = new CleanCSS({ - compatibility: 'ie9', - level: 2, - inline: false, - returnPromise: true, - sourceMap: this.options.sourceMap, - }); + hook(compiler, (compilation: any, chunks: Array) => { + const cleancss = new CleanCSS({ + compatibility: 'ie9', + level: 2, + inline: false, + returnPromise: true, + sourceMap: this._options.sourceMap, + }); + + const files: string[] = [...compilation.additionalChunkAssets]; - const files: string[] = [...compilation.additionalChunkAssets]; + chunks.forEach(chunk => { + if (chunk.files && chunk.files.length > 0) { + files.push(...chunk.files); + } + }); + + const actions = files + .filter(file => this._options.test(file)) + .map(file => { + const asset = compilation.assets[file]; + if (!asset) { + return Promise.resolve(); + } - chunks.forEach(chunk => { - if (chunk.files && chunk.files.length > 0) { - files.push(...chunk.files); + let content: string; + let map: any; + if (asset.sourceAndMap) { + const sourceAndMap = asset.sourceAndMap(); + content = sourceAndMap.source; + map = sourceAndMap.map; + } else { + content = asset.source(); } + + if (content.length === 0) { + return Promise.resolve(); + } + + return Promise.resolve() + .then(() => cleancss.minify(content, map)) + .then((output: any) => { + let hasWarnings = false; + if (output.warnings && output.warnings.length > 0) { + compilation.warnings.push(...output.warnings); + hasWarnings = true; + } + + if (output.errors && output.errors.length > 0) { + output.errors + .forEach((error: string) => compilation.errors.push(new Error(error))); + return; + } + + // generally means invalid syntax so bail + if (hasWarnings && output.stats.minifiedSize === 0) { + return; + } + + let newSource; + if (output.sourceMap) { + newSource = new SourceMapSource( + output.styles, + file, + output.sourceMap.toString(), + content, + map, + ); + } else { + newSource = new RawSource(output.styles); + } + + compilation.assets[file] = newSource; + }); }); - const actions = files - .filter(file => file.endsWith('.css')) - .map(file => { - const asset = compilation.assets[file]; - if (!asset) { - return Promise.resolve(); - } - - let content: string; - let map: any; - if (asset.sourceAndMap) { - const sourceAndMap = asset.sourceAndMap(); - content = sourceAndMap.source; - map = sourceAndMap.map; - } else { - content = asset.source(); - } - - if (content.length === 0) { - return Promise.resolve(); - } - - return Promise.resolve() - .then(() => cleancss.minify(content, map)) - .then((output: any) => { - let hasWarnings = false; - if (output.warnings && output.warnings.length > 0) { - compilation.warnings.push(...output.warnings); - hasWarnings = true; - } - - if (output.errors && output.errors.length > 0) { - output.errors - .forEach((error: string) => compilation.errors.push(new Error(error))); - return; - } - - // generally means invalid syntax so bail - if (hasWarnings && output.stats.minifiedSize === 0) { - return; - } - - let newSource; - if (output.sourceMap) { - newSource = new SourceMapSource( - output.styles, - file, - output.sourceMap.toString(), - content, - map, - ); - } else { - newSource = new RawSource(output.styles); - } - - compilation.assets[file] = newSource; - }); - }); - - Promise.all(actions) - .then(() => callback()) - .catch(err => callback(err)); - }); + return Promise.all(actions); }); } } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts deleted file mode 100644 index a1fa11460f..0000000000 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/glob-copy-webpack-plugin.ts +++ /dev/null @@ -1,96 +0,0 @@ -// tslint:disable -// TODO: cleanup this file, it's copied as is from Angular CLI. - -import * as fs from 'fs'; -import * as path from 'path'; -import * as glob from 'glob'; -import * as denodeify from 'denodeify'; -import { AssetPattern } from '../models/webpack-configs/utils'; -import { isDirectory } from '../utilities/is-directory'; - -const flattenDeep = require('lodash/flattenDeep'); -const globPromise = denodeify(glob); -const statPromise = denodeify(fs.stat); - -interface Asset { - originPath: string; - destinationPath: string; - relativePath: string; -} - -export interface GlobCopyWebpackPluginOptions { - patterns: (string | AssetPattern)[]; - globOptions: any; -} - -// Adds an asset to the compilation assets; -function addAsset(compilation: any, asset: Asset) { - const realPath = path.resolve(asset.originPath, asset.relativePath); - // Make sure that asset keys use forward slashes, otherwise webpack dev server - const servedPath = path.join(asset.destinationPath, asset.relativePath).replace(/\\/g, '/'); - - // Don't re-add existing assets. - if (compilation.assets[servedPath]) { - return Promise.resolve(); - } - - // Read file and add it to assets; - return statPromise(realPath) - .then((stat: any) => compilation.assets[servedPath] = { - size: () => stat.size, - source: () => fs.readFileSync(realPath) - }); -} - -export class GlobCopyWebpackPlugin { - constructor(private options: GlobCopyWebpackPluginOptions) { } - - apply(compiler: any): void { - let { patterns, globOptions } = this.options; - const defaultCwd = globOptions.cwd || compiler.options.context; - - // Force nodir option, since we can't add dirs to assets. - globOptions.nodir = true; - - // Process patterns. - patterns = patterns.map(pattern => { - // Convert all string patterns to Pattern type. - pattern = typeof pattern === 'string' ? { glob: pattern } : pattern; - // Add defaults - // Input is always resolved relative to the defaultCwd (appRoot) - pattern.input = path.resolve(defaultCwd, pattern.input || ''); - pattern.output = pattern.output || ''; - pattern.glob = pattern.glob || ''; - // Convert dir patterns to globs. - if (isDirectory(path.resolve(pattern.input, pattern.glob))) { - pattern.glob = pattern.glob + '/**/*'; - } - return pattern; - }); - - compiler.plugin('emit', (compilation: any, cb: any) => { - // Create an array of promises for each pattern glob - const globs = patterns.map((pattern: AssetPattern) => new Promise((resolve, reject) => - // Individual patterns can override cwd - globPromise(pattern.glob, Object.assign({}, globOptions, { cwd: pattern.input })) - // Map the results onto an Asset - .then((globResults: string[]) => globResults.map(res => ({ - originPath: pattern.input, - destinationPath: pattern.output, - relativePath: res - }))) - .then((asset: Asset) => resolve(asset)) - .catch(reject) - )); - - // Wait for all globs. - Promise.all(globs) - // Flatten results. - .then(assets => flattenDeep(assets)) - // Add each asset to the compilation. - .then(assets => - Promise.all(assets.map((asset: Asset) => addAsset(compilation, asset)))) - .then(() => cb()); - }); - } -} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/index-html-webpack-plugin.ts new file mode 100644 index 0000000000..d4d9ba9623 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/index-html-webpack-plugin.ts @@ -0,0 +1,171 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { RawSource } from 'webpack-sources'; + +const parse5 = require('parse5'); + +export interface IndexHtmlWebpackPluginOptions { + input: string; + output: string; + baseHref?: string; + entrypoints: string[]; + deployUrl?: string; +} + +function readFile(filename: string, compilation: any): Promise { + return new Promise((resolve, reject) => { + compilation.inputFileSystem.readFile(filename, (err: Error, data: Buffer) => { + if (err) { + reject(err); + return; + } + + const content = data.toString(); + resolve(content); + }); + }); +} + +export class IndexHtmlWebpackPlugin { + private _options: IndexHtmlWebpackPluginOptions; + + constructor(options?: Partial) { + this._options = { + input: 'index.html', + output: 'index.html', + entrypoints: ['polyfills', 'main'], + ...options + }; + } + + apply(compiler: any) { + compiler.hooks.emit.tapPromise('index-html-webpack-plugin', async (compilation: any) => { + // Get input html file + const inputContent = await readFile(this._options.input, compilation); + compilation.fileDependencies.add(this._options.input); + + + // Get all files for selected entrypoints + const unfilteredSortedFiles: string[] = []; + for (const entryName of this._options.entrypoints) { + const entrypoint = compilation.entrypoints.get(entryName); + if (entrypoint) { + unfilteredSortedFiles.push(...entrypoint.getFiles()); + } + } + + // Filter files + const existingFiles = new Set(); + const stylesheets: string[] = []; + const scripts: string[] = []; + for (const file of unfilteredSortedFiles) { + if (existingFiles.has(file)) { + continue; + } + existingFiles.add(file); + + if (file.endsWith('.js')) { + scripts.push(file); + } else if (file.endsWith('.css')) { + stylesheets.push(file); + } + + } + + // Find the head and body elements + const treeAdapter = parse5.treeAdapters.default; + const document = parse5.parse(inputContent, { treeAdapter }); + let headElement; + let bodyElement; + for (const topNode of document.childNodes) { + if (topNode.tagName === 'html') { + for (const htmlNode of topNode.childNodes) { + if (htmlNode.tagName === 'head') { + headElement = htmlNode; + } + if (htmlNode.tagName === 'body') { + bodyElement = htmlNode; + } + } + } + } + + // Inject into the html + + if (!headElement || !bodyElement) { + throw new Error('Missing head and/or body elements'); + } + + for (const script of scripts) { + const element = treeAdapter.createElement( + 'script', + undefined, + [ + { name: 'type', value: 'text/javascript' }, + { name: 'src', value: (this._options.deployUrl || '') + script }, + ] + ); + treeAdapter.appendChild(bodyElement, element); + } + + // Adjust base href if specified + if (this._options.baseHref != undefined) { + let baseElement; + for (const node of headElement.childNodes) { + if (node.tagName === 'base') { + baseElement = node; + break; + } + } + + if (!baseElement) { + const element = treeAdapter.createElement( + 'base', + undefined, + [ + { name: 'href', value: this._options.baseHref }, + ] + ); + treeAdapter.appendChild(headElement, element); + } else { + let hrefAttribute; + for (const attribute of baseElement.attrs) { + if (attribute.name === 'href') { + hrefAttribute = attribute; + } + } + if (hrefAttribute) { + hrefAttribute.value = this._options.baseHref; + } else { + baseElement.attrs.push({ name: 'href', value: this._options.baseHref }); + } + } + } + + for (const stylesheet of stylesheets) { + const element = treeAdapter.createElement( + 'link', + undefined, + [ + { name: 'rel', value: 'stylesheet' }, + { name: 'href', value: (this._options.deployUrl || '') + stylesheet }, + ] + ); + treeAdapter.appendChild(headElement, element); + } + + // Add to compilation assets + const outputContent = parse5.serialize(document, { treeAdapter }); + compilation.assets[this._options.output] = new RawSource(outputContent); + }); + } +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html index 1c8f49c653..ec185d8d3e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html @@ -26,13 +26,13 @@ // All served files with the latest timestamps %MAPPINGS% - - + + %SCRIPTS% - - - + + + diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html index 649d59817e..4f49e825a3 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html @@ -28,13 +28,13 @@ // All served files with the latest timestamps %MAPPINGS% - - + + %SCRIPTS% - - - + + + diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts index e26534f29e..a6fbd5975c 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts @@ -207,10 +207,10 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { // Ensure script and style bundles are served. // They are mentioned in the custom karma context page and we don't want them to 404. const alwaysServe = [ - '/_karma_webpack_/inline.bundle.js', - '/_karma_webpack_/polyfills.bundle.js', - '/_karma_webpack_/scripts.bundle.js', - '/_karma_webpack_/vendor.bundle.js', + '/_karma_webpack_/runtime.js', + '/_karma_webpack_/polyfills.js', + '/_karma_webpack_/scripts.js', + '/_karma_webpack_/vendor.js', ]; if (alwaysServe.indexOf(req.url) != -1) { res.statusCode = 200; @@ -258,8 +258,23 @@ const eventReporter: any = function (this: any, baseReporterDecorator: any) { eventReporter.$inject = ['baseReporterDecorator']; // Strip the server address and webpack scheme (webpack://) from error log. -const sourceMapReporter: any = function (this: any, baseReporterDecorator: any) { +const sourceMapReporter: any = function (this: any, baseReporterDecorator: any, config: any) { baseReporterDecorator(this); + + const reporterName = '@angular/cli'; + const hasTrailingReporters = config.reporters.slice(-1).pop() !== reporterName; + + // Copied from "karma-jasmine-diff-reporter" source code: + // In case, when multiple reporters are used in conjunction + // with initSourcemapReporter, they both will show repetitive log + // messages when displaying everything that supposed to write to terminal. + // So just suppress any logs from initSourcemapReporter by doing nothing on + // browser log, because it is an utility reporter, + // unless it's alone in the "reporters" option and base reporter is used. + if (hasTrailingReporters) { + this.writeCommonMsg = function () { }; + } + const urlRegexp = /\(http:\/\/localhost:\d+\/_karma_webpack_\/webpack:\//gi; this.onSpecComplete = function (_browser: any, result: any) { @@ -271,7 +286,7 @@ const sourceMapReporter: any = function (this: any, baseReporterDecorator: any) }; }; -sourceMapReporter.$inject = ['baseReporterDecorator']; +sourceMapReporter.$inject = ['baseReporterDecorator', 'config']; module.exports = { 'framework:@angular-devkit/build-webpack': ['factory', init], diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts deleted file mode 100644 index ffb118de50..0000000000 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/named-lazy-chunks-webpack-plugin.ts +++ /dev/null @@ -1,54 +0,0 @@ -// tslint:disable -// TODO: cleanup this file, it's copied as is from Angular CLI. - -import * as webpack from 'webpack'; -import { basename } from 'path'; -const AsyncDependenciesBlock = require('webpack/lib/AsyncDependenciesBlock'); -const ContextElementDependency = require('webpack/lib/dependencies/ContextElementDependency'); -const ImportDependency = require('webpack/lib/dependencies/ImportDependency'); - -// This just extends webpack.NamedChunksPlugin to prevent name collisions. -export class NamedLazyChunksWebpackPlugin extends webpack.NamedChunksPlugin { - constructor() { - // Append a dot and number if the name already exists. - const nameMap = new Map(); - function getUniqueName(baseName: string, request: string) { - let name = baseName; - let num = 0; - while (nameMap.has(name) && nameMap.get(name) !== request) { - name = `${baseName}.${num++}`; - } - nameMap.set(name, request); - return name; - } - - const nameResolver = (chunk: any) => { - // Entry chunks have a name already, use it. - if (chunk.name) { - return chunk.name; - } - - // Try to figure out if it's a lazy loaded route or import(). - if (chunk.blocks - && chunk.blocks.length > 0 - && chunk.blocks[0] instanceof AsyncDependenciesBlock - && chunk.blocks[0].dependencies.length === 1 - && (chunk.blocks[0].dependencies[0] instanceof ContextElementDependency - || chunk.blocks[0].dependencies[0] instanceof ImportDependency) - ) { - // Create chunkname from file request, stripping ngfactory and extension. - const request = chunk.blocks[0].dependencies[0].request; - const chunkName = basename(request).replace(/(\.ngfactory)?\.(js|ts)$/, ''); - if (!chunkName || chunkName === '') { - // Bail out if something went wrong with the name. - return null; - } - return getUniqueName(chunkName, request); - } - - return null; - }; - - super(nameResolver); - } -} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/postcss-cli-resources.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/postcss-cli-resources.ts new file mode 100644 index 0000000000..7bf139cd66 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/postcss-cli-resources.ts @@ -0,0 +1,168 @@ +// tslint:disable +// TODO: cleanup this file, it's copied as is from Angular CLI. + + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { interpolateName } from 'loader-utils'; +import * as postcss from 'postcss'; +import * as url from 'url'; +import * as webpack from 'webpack'; + +function wrapUrl(url: string): string { + let wrappedUrl; + const hasSingleQuotes = url.indexOf('\'') >= 0; + + if (hasSingleQuotes) { + wrappedUrl = `"${url}"`; + } else { + wrappedUrl = `'${url}'`; + } + + return `url(${wrappedUrl})`; +} + +export interface PostcssCliResourcesOptions { + deployUrl?: string; + filename: string; + loader: webpack.loader.LoaderContext; +} + +async function resolve( + file: string, + base: string, + resolver: (file: string, base: string) => Promise +): Promise { + try { + return await resolver('./' + file, base); + } catch (err) { + return resolver(file, base); + } +} + +export default postcss.plugin('postcss-cli-resources', (options: PostcssCliResourcesOptions) => { + const { deployUrl, filename, loader } = options; + + const process = async (inputUrl: string, resourceCache: Map) => { + // If root-relative or absolute, leave as is + if (inputUrl.match(/^(?:\w+:\/\/|data:|chrome:|#|\/)/)) { + return inputUrl; + } + // If starts with a caret, remove and return remainder + // this supports bypassing asset processing + if (inputUrl.startsWith('^')) { + return inputUrl.substr(1); + } + + const cachedUrl = resourceCache.get(inputUrl); + if (cachedUrl) { + return cachedUrl; + } + + const { pathname, hash, search } = url.parse(inputUrl.replace(/\\/g, '/')); + const resolver = (file: string, base: string) => new Promise((resolve, reject) => { + loader.resolve(base, file, (err, result) => { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + + const result = await resolve(pathname as string, loader.context, resolver); + + return new Promise((resolve, reject) => { + loader.fs.readFile(result, (err: Error, content: Buffer) => { + if (err) { + reject(err); + return; + } + + const outputPath = interpolateName( + { resourcePath: result } as webpack.loader.LoaderContext, + filename, + { content }, + ); + + loader.addDependency(result); + loader.emitFile(outputPath, content, undefined); + + let outputUrl = outputPath.replace(/\\/g, '/'); + if (hash || search) { + outputUrl = url.format({ pathname: outputUrl, hash, search }); + } + + if (deployUrl) { + outputUrl = url.resolve(deployUrl, outputUrl); + } + + resourceCache.set(inputUrl, outputUrl); + + resolve(outputUrl); + }); + }); + }; + + return (root) => { + const urlDeclarations: Array = []; + root.walkDecls(decl => { + if (decl.value && decl.value.includes('url')) { + urlDeclarations.push(decl); + } + }); + + if (urlDeclarations.length === 0) { + return; + } + + const resourceCache = new Map(); + + return Promise.all(urlDeclarations.map(async decl => { + const value = decl.value; + const urlRegex = /url\(\s*(?:"([^"]+)"|'([^']+)'|(.+?))\s*\)/g; + const segments: string[] = []; + + let match; + let lastIndex = 0; + let modified = false; + // tslint:disable-next-line:no-conditional-assignment + while (match = urlRegex.exec(value)) { + const originalUrl = match[1] || match[2] || match[3]; + let processedUrl; + try { + processedUrl = await process(originalUrl, resourceCache); + } catch (err) { + loader.emitError(decl.error(err.message, { word: originalUrl }).toString()); + continue; + } + + if (lastIndex < match.index) { + segments.push(value.slice(lastIndex, match.index)); + } + + if (!processedUrl || originalUrl === processedUrl) { + segments.push(match[0]); + } else { + segments.push(wrapUrl(processedUrl)); + modified = true; + } + + lastIndex = match.index + match[0].length; + } + + if (lastIndex < value.length) { + segments.push(value.slice(lastIndex)); + } + + if (modified) { + decl.value = segments.join(''); + } + })); + }; +}); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts index 21be453fc0..d832a124ad 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts @@ -1,6 +1,13 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /** * @license * Copyright Google Inc. All Rights Reserved. @@ -14,6 +21,7 @@ import { interpolateName } from 'loader-utils'; import * as path from 'path'; const Chunk = require('webpack/lib/Chunk'); +const EntryPoint = require('webpack/lib/Entrypoint'); export interface ScriptsWebpackPluginOptions { name: string; @@ -28,11 +36,43 @@ interface ScriptOutput { source: CachedSource; } +function addDependencies(compilation: any, scripts: string[]): void { + if (compilation.fileDependencies.add) { + // Webpack 4+ uses a Set + for (const script of scripts) { + compilation.fileDependencies.add(script); + } + } else { + // Webpack 3 + compilation.fileDependencies.push(...scripts); + } +} + +function hook(compiler: any, action: (compilation: any, callback: (err?: Error) => void) => void) { + if (compiler.hooks) { + // Webpack 4 + compiler.hooks.thisCompilation.tap('scripts-webpack-plugin', (compilation: any) => { + compilation.hooks.additionalAssets.tapAsync( + 'scripts-webpack-plugin', + (callback: (err?: Error) => void) => action(compilation, callback), + ); + }); + } else { + // Webpack 3 + compiler.plugin('this-compilation', (compilation: any) => { + compilation.plugin( + 'additional-assets', + (callback: (err?: Error) => void) => action(compilation, callback), + ); + }); + } +} + export class ScriptsWebpackPlugin { private _lastBuildTime?: number; private _cachedOutput?: ScriptOutput; - constructor(private options: Partial = {}) {} + constructor(private options: Partial = {}) { } shouldSkip(compilation: any, scripts: string[]): boolean { if (this._lastBuildTime == undefined) { @@ -41,7 +81,14 @@ export class ScriptsWebpackPlugin { } for (let i = 0; i < scripts.length; i++) { - const scriptTime = compilation.fileTimestamps[scripts[i]]; + let scriptTime; + if (compilation.fileTimestamps.get) { + // Webpack 4+ uses a Map + scriptTime = compilation.fileTimestamps.get(scripts[i]); + } else { + // Webpack 3 + scriptTime = compilation.fileTimestamps[scripts[i]]; + } if (!scriptTime || scriptTime > this._lastBuildTime) { this._lastBuildTime = Date.now(); return false; @@ -52,14 +99,16 @@ export class ScriptsWebpackPlugin { } private _insertOutput(compilation: any, { filename, source }: ScriptOutput, cached = false) { - const chunk = new Chunk(); + const chunk = new Chunk(this.options.name); chunk.rendered = !cached; chunk.id = this.options.name; chunk.ids = [chunk.id]; - chunk.name = this.options.name; - chunk.isInitial = () => true; chunk.files.push(filename); + const entrypoint = new EntryPoint(this.options.name); + entrypoint.pushChunk(chunk); + + compilation.entrypoints.set(this.options.name, entrypoint); compilation.chunks.push(chunk); compilation.assets[filename] = source; } @@ -73,71 +122,69 @@ export class ScriptsWebpackPlugin { .filter(script => !!script) .map(script => path.resolve(this.options.basePath || '', script)); - compiler.plugin('this-compilation', (compilation: any) => { - compilation.plugin('additional-assets', (callback: (err?: Error) => void) => { - if (this.shouldSkip(compilation, scripts)) { - if (this._cachedOutput) { - this._insertOutput(compilation, this._cachedOutput, true); - } - compilation.fileDependencies.push(...scripts); + hook(compiler, (compilation, callback) => { + if (this.shouldSkip(compilation, scripts)) { + if (this._cachedOutput) { + this._insertOutput(compilation, this._cachedOutput, true); + } - callback(); + addDependencies(compilation, scripts); + callback(); - return; - } + return; + } - const sourceGetters = scripts.map(fullPath => { - return new Promise((resolve, reject) => { - compilation.inputFileSystem.readFile(fullPath, (err: Error, data: Buffer) => { - if (err) { - reject(err); - return; - } + const sourceGetters = scripts.map(fullPath => { + return new Promise((resolve, reject) => { + compilation.inputFileSystem.readFile(fullPath, (err: Error, data: Buffer) => { + if (err) { + reject(err); + return; + } - const content = data.toString(); + const content = data.toString(); - let source; - if (this.options.sourceMap) { - // TODO: Look for source map file (for '.min' scripts, etc.) + let source; + if (this.options.sourceMap) { + // TODO: Look for source map file (for '.min' scripts, etc.) - let adjustedPath = fullPath; - if (this.options.basePath) { - adjustedPath = path.relative(this.options.basePath, fullPath); - } - source = new OriginalSource(content, adjustedPath); - } else { - source = new RawSource(content); + let adjustedPath = fullPath; + if (this.options.basePath) { + adjustedPath = path.relative(this.options.basePath, fullPath); } + source = new OriginalSource(content, adjustedPath); + } else { + source = new RawSource(content); + } - resolve(source); - }); + resolve(source); }); }); - - Promise.all(sourceGetters) - .then(sources => { - const concatSource = new ConcatSource(); - sources.forEach(source => { - concatSource.add(source); - concatSource.add('\n;'); - }); - - const combinedSource = new CachedSource(concatSource); - const filename = interpolateName( - { resourcePath: 'scripts.js' } as loader.LoaderContext, - this.options.filename as any, - { content: combinedSource.source() }, - ); - - const output = { filename, source: combinedSource }; - this._insertOutput(compilation, output); - this._cachedOutput = output; - compilation.fileDependencies.push(...scripts); - - callback(); - }) - .catch((err: Error) => callback(err)); }); + + Promise.all(sourceGetters) + .then(sources => { + const concatSource = new ConcatSource(); + sources.forEach(source => { + concatSource.add(source); + concatSource.add('\n;'); + }); + + const combinedSource = new CachedSource(concatSource); + const filename = interpolateName( + { resourcePath: 'scripts.js' } as loader.LoaderContext, + this.options.filename as string, + { content: combinedSource.source() }, + ); + + const output = { filename, source: combinedSource }; + this._insertOutput(compilation, output); + this._cachedOutput = output; + addDependencies(compilation, scripts); + + callback(); + }) + .catch((err: Error) => callback(err)); }); } } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts deleted file mode 100644 index 76670e16ed..0000000000 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/static-asset.ts +++ /dev/null @@ -1,17 +0,0 @@ -// tslint:disable -// TODO: cleanup this file, it's copied as is from Angular CLI. - -export class StaticAssetPlugin { - - constructor(private name: string, private contents: string) {} - - apply(compiler: any): void { - compiler.plugin('emit', (compilation: any, cb: Function) => { - compilation.assets[this.name] = { - size: () => this.contents.length, - source: () => this.contents, - }; - cb(); - }); - } -} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts index 8b3c84d695..273386f019 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts @@ -14,12 +14,12 @@ export class SuppressExtractedTextChunksWebpackPlugin { const entryPoints = compilation.options.entry; // determine which entry points are composed entirely of css files for (let entryPoint of Object.keys(entryPoints)) { - let entryFiles: string[]|string = entryPoints[entryPoint]; + let entryFiles: string[] | string = entryPoints[entryPoint]; // when type of entryFiles is not array, make it as an array entryFiles = entryFiles instanceof Array ? entryFiles : [entryFiles]; if (entryFiles.every((el: string) => el.match(/\.(css|scss|sass|less|styl)$/) !== null)) { - cssOnlyChunks.push(entryPoint); + cssOnlyChunks.push(entryPoint); } } // Remove the js file for supressed chunks @@ -42,14 +42,15 @@ export class SuppressExtractedTextChunksWebpackPlugin { }); // Remove scripts tags with a css file as source, because HtmlWebpackPlugin will use // a css file as a script for chunks without js files. - compilation.plugin('html-webpack-plugin-alter-asset-tags', - (htmlPluginData: any, callback: any) => { - const filterFn = (tag: any) => - !(tag.tagName === 'script' && tag.attributes.src.match(/\.css$/)); - htmlPluginData.head = htmlPluginData.head.filter(filterFn); - htmlPluginData.body = htmlPluginData.body.filter(filterFn); - callback(null, htmlPluginData); - }); + // TODO: Enable this once HtmlWebpackPlugin supports Webpack 4 + // compilation.plugin('html-webpack-plugin-alter-asset-tags', + // (htmlPluginData: any, callback: any) => { + // const filterFn = (tag: any) => + // !(tag.tagName === 'script' && tag.attributes.src.match(/\.css$/)); + // htmlPluginData.head = htmlPluginData.head.filter(filterFn); + // htmlPluginData.body = htmlPluginData.body.filter(filterFn); + // callback(null, htmlPluginData); + // }); }); } } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts index 972e2782b4..dcf2293430 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts @@ -4,8 +4,11 @@ // Exports the webpack plugins we use internally. export { BaseHrefWebpackPlugin } from '../lib/base-href-webpack/base-href-webpack-plugin'; export { CleanCssWebpackPlugin, CleanCssWebpackPluginOptions } from './cleancss-webpack-plugin'; -export { GlobCopyWebpackPlugin, GlobCopyWebpackPluginOptions } from './glob-copy-webpack-plugin'; export { BundleBudgetPlugin, BundleBudgetPluginOptions } from './bundle-budget'; -export { NamedLazyChunksWebpackPlugin } from './named-lazy-chunks-webpack-plugin'; export { ScriptsWebpackPlugin, ScriptsWebpackPluginOptions } from './scripts-webpack-plugin'; export { SuppressExtractedTextChunksWebpackPlugin } from './suppress-entry-chunks-webpack-plugin'; +export { + default as PostcssCliResources, + PostcssCliResourcesOptions, +} from './postcss-cli-resources'; + diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts index 3f53669bc8..0ec1fd0c37 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -3,10 +3,8 @@ import { ExtraEntry, extraEntryParser } from '../models/webpack-configs/utils'; -// Sort chunks according to a predefined order: -// inline, polyfills, all styles, vendor, main -export function packageChunkSort(appConfig: any) { - let entryPoints = ['inline', 'polyfills', 'sw-register']; +export function generateEntryPoints(appConfig: any) { + let entryPoints = ['polyfills', 'sw-register']; const pushExtraEntries = (extraEntry: ExtraEntry) => { if (entryPoints.indexOf(extraEntry.entry as string) === -1) { @@ -15,14 +13,26 @@ export function packageChunkSort(appConfig: any) { }; if (appConfig.styles) { - extraEntryParser(appConfig.styles, './', 'styles').forEach(pushExtraEntries); + extraEntryParser(appConfig.styles, './', 'styles') + .filter(entry => !entry.lazy) + .forEach(pushExtraEntries); } if (appConfig.scripts) { - extraEntryParser(appConfig.scripts, './', 'scripts').forEach(pushExtraEntries); + extraEntryParser(appConfig.scripts, './', 'scripts') + .filter(entry => !entry.lazy) + .forEach(pushExtraEntries); } - entryPoints.push(...['vendor', 'main']); + entryPoints.push('main'); + + return entryPoints; +} + +// Sort chunks according to a predefined order: +// inline, polyfills, all styles, vendor, main +export function packageChunkSort(appConfig: any) { + const entryPoints = generateEntryPoints(appConfig); function sort(left: any, right: any) { let leftIndex = entryPoints.indexOf(left.names[0]); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts index a6b068a294..79b17d1c49 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts @@ -3,7 +3,12 @@ const resolve = require('resolve'); -// require dependencies within the target project +// Resolve dependencies within the target project. +export function resolveProjectModule(root: string, moduleName: string) { + return resolve.sync(moduleName, { basedir: root }); +} + +// Require dependencies within the target project. export function requireProjectModule(root: string, moduleName: string) { - return require(resolve.sync(moduleName, { basedir: root })); + return require(resolveProjectModule(root, moduleName)); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts index 95b375674b..0991c1dc8d 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts @@ -2,16 +2,18 @@ // TODO: cleanup this file, it's copied as is from Angular CLI. import { Filesystem } from '@angular/service-worker/config'; -import { oneLine } from 'common-tags'; +import { oneLine, stripIndent } from 'common-tags'; import * as crypto from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; import * as semver from 'semver'; +import { resolveProjectModule } from '../require-project-module'; + export const NEW_SW_VERSION = '5.0.0-rc.0'; class CliFilesystem implements Filesystem { - constructor(private base: string) {} + constructor(private base: string) { } list(_path: string): Promise { return Promise.resolve(this.syncList(_path)); @@ -20,9 +22,9 @@ class CliFilesystem implements Filesystem { private syncList(_path: string): string[] { const dir = this.canonical(_path); const entries = fs.readdirSync(dir).map( - (entry: string) => ({entry, stats: fs.statSync(path.posix.join(dir, entry))})); + (entry: string) => ({ entry, stats: fs.statSync(path.posix.join(dir, entry)) })); const files = entries.filter((entry: any) => !entry.stats.isDirectory()) - .map((entry: any) => path.posix.join(_path, entry.entry)); + .map((entry: any) => path.posix.join(_path, entry.entry)); return entries.filter((entry: any) => entry.stats.isDirectory()) .map((entry: any) => path.posix.join(_path, entry.entry)) @@ -52,25 +54,38 @@ class CliFilesystem implements Filesystem { } export function usesServiceWorker(projectRoot: string): boolean { - const nodeModules = path.resolve(projectRoot, 'node_modules'); - const swModule = path.resolve(nodeModules, '@angular/service-worker'); - if (!fs.existsSync(swModule)) { - return false; + let swPackageJsonPath; + + try { + swPackageJsonPath = resolveProjectModule(projectRoot, '@angular/service-worker/package.json'); + } catch (_) { + // @angular/service-worker is not installed + throw new Error(stripIndent` + Your project is configured with serviceWorker = true, but @angular/service-worker + is not installed. Run \`npm install --save-dev @angular/service-worker\` + and try again, or run \`ng set apps.0.serviceWorker=false\` in your .angular-cli.json. + `); } - const swPackageJson = fs.readFileSync(`${swModule}/package.json`).toString(); + const swPackageJson = fs.readFileSync(swPackageJsonPath).toString(); const swVersion = JSON.parse(swPackageJson)['version']; - return semver.gte(swVersion, NEW_SW_VERSION); + if (!semver.gte(swVersion, NEW_SW_VERSION)) { + throw new Error(stripIndent` + The installed version of @angular/service-worker is ${swVersion}. This version of the CLI + requires the @angular/service-worker version to satisfy ${NEW_SW_VERSION}. Please upgrade + your service worker version. + `); + } + + return true; } export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string, - outputPath: string, baseHref: string): Promise { - const nodeModules = path.resolve(projectRoot, 'node_modules'); - const swModule = path.resolve(nodeModules, '@angular/service-worker'); - + outputPath: string, baseHref: string): Promise { // Path to the worker script itself. - const workerPath = path.resolve(swModule, 'ngsw-worker.js'); + const workerPath = resolveProjectModule(projectRoot, '@angular/service-worker/ngsw-worker.js'); + const safetyPath = path.join(path.dirname(workerPath), 'safety-worker.js'); const configPath = path.resolve(appRoot, 'ngsw-config.json'); if (!fs.existsSync(configPath)) { @@ -90,5 +105,12 @@ export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string // Copy worker script to dist directory. const workerCode = fs.readFileSync(workerPath); fs.writeFileSync(path.resolve(outputPath, 'ngsw-worker.js'), workerCode); + + // If @angular/service-worker has the safety script, copy it into two locations. + if (fs.existsSync(safetyPath)) { + const safetyCode = fs.readFileSync(safetyPath); + fs.writeFileSync(path.resolve(outputPath, 'worker-basic.min.js'), safetyCode); + fs.writeFileSync(path.resolve(outputPath, 'safety-worker.js'), safetyCode); + } }); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts index 7017906443..02f6a9dd60 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts @@ -10,7 +10,7 @@ import { stripIndents } from 'common-tags'; const chalkCtx = new (chalk.constructor as any)(chalk.supportsColor ? {} : { level: 1 }); const { bold, green, red, reset, white, yellow } = chalkCtx; -function _formatSize(size: number): string { +export function formatSize(size: number): string { if (size <= 0) { return '0 bytes'; } @@ -32,8 +32,8 @@ export function statsToString(json: any, statsConfig: any) { const changedChunksStats = json.chunks .filter((chunk: any) => chunk.rendered) .map((chunk: any) => { - const asset = (json.assets || []).filter((x: any) => x.name == chunk.files[0])[0]; - const size = asset ? ` ${_formatSize(asset.size)}` : ''; + const asset = json.assets.filter((x: any) => x.name == chunk.files[0])[0]; + const size = asset ? ` ${formatSize(asset.size)}` : ''; const files = chunk.files.join(', '); const names = chunk.names ? ` (${chunk.names.join(', ')})` : ''; const initial = y(chunk.entry ? '[entry]' : chunk.initial ? '[initial]' : ''); @@ -48,7 +48,7 @@ export function statsToString(json: any, statsConfig: any) { if (unchangedChunkNumber > 0) { return rs(stripIndents` - Date: ${w(new Date().toISOString())} • Hash: ${w(json.hash)} • Time: ${w('' + json.time)}ms + Date: ${w(new Date().toISOString())} - Hash: ${w(json.hash)} - Time: ${w('' + json.time)}ms ${unchangedChunkNumber} unchanged chunks ${changedChunksStats.join('\n')} `); diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index bd13a9acd4..4b9dd9a698 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -17,9 +17,7 @@ import { getAotConfig, getBrowserConfig, getCommonConfig, - getDevConfig, getNonAotConfig, - getProdConfig, getStylesConfig, } from '../angular-cli-files/models/webpack-configs'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; @@ -59,6 +57,8 @@ export interface BrowserBuilderOptions { serviceWorker: boolean; skipAppShell: boolean; forkTypeChecker: boolean; + statsJson: boolean; + lazyModules: string[]; // Options with no defaults. // TODO: reconsider this list. @@ -90,8 +90,6 @@ export interface BrowserBuilderOptions { // TODO: figure out what to do about these. environment?: string; // Maybe replace with 'fileReplacement' object? - forceTsCommonjs?: boolean; // Remove with webpack 4. - statsJson: boolean; } export interface AssetPattern { @@ -151,7 +149,7 @@ export class BrowserBuilder implements Builder { return obs.error(err); } - const json = stats.toJson('verbose'); + const json = stats.toJson(statsConfig); if (options.verbose) { this.context.logger.info(stats.toString(statsConfig)); } else { @@ -231,22 +229,34 @@ export class BrowserBuilder implements Builder { supportES2015, }; - let targetConfig = {}; - switch (options.optimizationLevel) { - case 0: - targetConfig = getDevConfig(wco); - break; - case 1: - targetConfig = getProdConfig(wco); - break; - } + + // TODO: add the old dev options as the default, and the prod one as a configuration: + // development: { + // environment: 'dev', + // outputHashing: 'media', + // sourcemaps: true, + // extractCss: false, + // namedChunks: true, + // aot: false, + // vendorChunk: true, + // buildOptimizer: false, + // }, + // production: { + // environment: 'prod', + // outputHashing: 'all', + // sourcemaps: false, + // extractCss: true, + // namedChunks: false, + // aot: true, + // extractLicenses: true, + // vendorChunk: false, + // buildOptimizer: buildOptions.aot !== false, + // } const webpackConfigs: {}[] = [ getCommonConfig(wco), getBrowserConfig(wco), getStylesConfig(wco), - // TODO: use project configurations for the --prod meta options. - targetConfig, ]; if (wco.appConfig.main || wco.appConfig.polyfills) { diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 3688c4a241..9b3b4ac955 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -227,6 +227,14 @@ "type": "boolean", "description": "Run the TypeScript type checker in a forked process.", "default": true + }, + "lazyModules": { + "description": "List of additional NgModule files that will be lazy loaded. Lazy router modules with be discovered automatically.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] } }, "additionalProperties": false, @@ -285,4 +293,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index ef4895ea0e..58145a5ee1 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -65,8 +65,7 @@ interface WebpackDevServerConfigurationOptions { }; publicPath?: string; headers?: { [key: string]: string }; - stats?: { [key: string]: boolean } | string; - inline: boolean; + stats?: { [key: string]: boolean } | string | boolean; https?: boolean; key?: string; cert?: string; @@ -134,8 +133,9 @@ export class DevServerBuilder implements Builder { // There's no option to turn off file watching in webpack-dev-server, but // we can override the file watcher instead. webpackConfig.plugins.unshift({ - apply: (compiler: any) => { // tslint:disable-line:no-any - compiler.plugin('after-environment', () => { + // tslint:disable-next-line:no-any + apply: (compiler: any) => { + compiler.hooks.afterEnvironment.tap('angular-cli', () => { compiler.watchFileSystem = { watch: () => { } }; }); }, @@ -161,8 +161,10 @@ export class DevServerBuilder implements Builder { `); const server = new WebpackDevServer(webpackCompiler, webpackDevServerConfig); - if (!browserOptions.verbose) { - webpackCompiler.plugin('done', (stats: any) => { // tslint:disable-line:no-any + + // tslint:disable-next-line:no-any + (webpackCompiler as any).hooks.done.tap('angular-cli', (stats: webpack.Stats) => { + if (!browserOptions.verbose) { const json = stats.toJson(statsConfig); this.context.logger.info(statsToString(json, statsConfig)); if (stats.hasWarnings()) { @@ -171,22 +173,23 @@ export class DevServerBuilder implements Builder { if (stats.hasErrors()) { this.context.logger.info(statsErrorsToString(json, statsConfig)); } - obs.next({ success: true }); - }); - } + } + obs.next({ success: true }); + + if (options.open) { + opn(serverAddress + webpackDevServerConfig.publicPath); + } + }); const httpServer = server.listen( options.port, options.host, - (err: any, _stats: any) => { // tslint:disable-line:no-any + (err: any) => { // tslint:disable-line:no-any if (err) { obs.error(err); - - return; - } else if (options.open) { - opn(serverAddress + webpackDevServerConfig.publicPath); } - }); + }, + ); // Node 8 has a keepAliveTimeout bug which doesn't respect active connections. // Connections will end after ~5 seconds (arbitrary), often not letting the full download @@ -226,8 +229,7 @@ export class DevServerBuilder implements Builder { disableDotRule: true, htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], }, - stats: 'none', // We have our own stats function. - inline: true, + stats: browserOptions.verbose ? getWebpackStatsConfig(browserOptions.verbose) : false, compress: browserOptions.optimizationLevel > 0, watchOptions: { poll: browserOptions.poll, @@ -263,9 +265,13 @@ export class DevServerBuilder implements Builder { ) { // This allows for live reload of page when changes are made to repo. // https://webpack.js.org/configuration/dev-server/#devserver-inline - const entryPoints = [ - `webpack-dev-server/client?${clientAddress}`, - ]; + let webpackDevServerPath; + try { + webpackDevServerPath = require.resolve('webpack-dev-server/client'); + } catch { + throw new Error('The "webpack-dev-server" package could not be found.'); + } + const entryPoints = [`${webpackDevServerPath}?${clientAddress}`]; if (options.hmr) { const webpackHmrLink = 'https://webpack.js.org/guides/hot-module-replacement'; diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts index 0406dd4b11..51f19b7d95 100644 --- a/packages/angular_devkit/build_webpack/src/karma/index.ts +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -13,7 +13,6 @@ import { Observable } from 'rxjs/Observable'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { getCommonConfig, - getDevConfig, getNonAotTestConfig, getStylesConfig, getTestConfig, @@ -61,7 +60,6 @@ export interface KarmaBuilderOptions { // TODO: figure out what to do about these. environment?: string; // Maybe replace with 'fileReplacement' object? - forceTsCommonjs?: boolean; // Remove with webpack 4. } export class KarmaBuilder implements Builder { @@ -151,7 +149,6 @@ export class KarmaBuilder implements Builder { const webpackConfigs: {}[] = [ getCommonConfig(wco), getStylesConfig(wco), - getDevConfig(wco), getNonAotTestConfig(wco), getTestConfig(wco), ]; diff --git a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts index 26b3c0c523..3b37c7b008 100644 --- a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts @@ -25,6 +25,9 @@ describe('Browser Builder allow js', () => { 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, }); + // TODO: this test originally edited tsconfig to have `"allowJs": true` but works without it. + // Investigate. + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts index f60139ffa2..bd1a3a118c 100644 --- a/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts @@ -27,7 +27,7 @@ describe('Browser Builder', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js'); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); }), diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts index 98d692ae80..a84fe20c36 100644 --- a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts @@ -26,7 +26,7 @@ describe('Browser Builder build optimizer', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js'); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).not.toMatch(/\.decorators =/); }), diff --git a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts index 04189b8390..e3ac6cc323 100644 --- a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts @@ -51,7 +51,7 @@ // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap((buildEvent) => expect(buildEvent.success).toBe(true)), // tap(() => -// expect(host.asSync().exists(join(outputPath, 'lazy.module.bundle.js'))).toBe(true)), +// expect(host.asSync().exists(join(outputPath, 'lazy.module.js'))).toBe(true)), // ).subscribe(undefined, done.fail, done); // }, 30000); // }); diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts index 0f9504380e..70e02a9957 100644 --- a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts @@ -29,7 +29,7 @@ describe('Browser Builder deploy url', () => { tap(() => { const fileName = join(outputPath, 'index.html'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); - expect(content).toContain('deployUrl/main.bundle.js'); + expect(content).toContain('deployUrl/main.js'); }), concatMap(() => architect.run(architect.getTarget({ overrides: { deployUrl: 'http://example.com/some/path/' }, @@ -38,7 +38,7 @@ describe('Browser Builder deploy url', () => { tap(() => { const fileName = join(outputPath, 'index.html'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); - expect(content).toContain('http://example.com/some/path/main.bundle.js'); + expect(content).toContain('http://example.com/some/path/main.js'); }), ).subscribe(undefined, done.fail, done); }, 30000); @@ -50,9 +50,9 @@ describe('Browser Builder deploy url', () => { }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'inline.bundle.js'); + const fileName = join(outputPath, 'runtime.js'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); - expect(content).toContain('__webpack_require__.p = "deployUrl/";'); + expect(content).toContain('deployUrl/'); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts index 58a9537849..10a852e83a 100644 --- a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts @@ -31,7 +31,7 @@ // architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap(() => { -// const fileName = join(outputPath, 'main.bundle.js'); +// const fileName = join(outputPath, 'main.js'); // const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); // expect(content).toContain('production: true'); // }), diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts index 28f74290c2..affd2a2e5a 100644 --- a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts @@ -60,7 +60,7 @@ describe('Browser Builder i18n', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js'); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch(/Bonjour i18n!/); }), @@ -83,7 +83,7 @@ describe('Browser Builder i18n', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js'); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch(/Other content/); }), @@ -115,19 +115,11 @@ describe('Browser Builder i18n', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js'); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch(/registerLocaleData/); expect(content).toMatch(/angular_common_locales_fr/); }), ).subscribe(undefined, done.fail, done); }, 30000); - - it('fails while registering unknown locale', (done) => { - const overrides = { aot: true, i18nLocale: 'no-locale' }; - - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), - ).subscribe(undefined, done, done.fail); - }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts index 782492dc25..df638c85cd 100644 --- a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts @@ -85,7 +85,7 @@ describe('Browser Builder lazy modules', () => { architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy.module.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -100,21 +100,24 @@ describe('Browser Builder lazy modules', () => { architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); it(`supports lazy bundle for dynamic import() calls`, (done) => { host.writeMultipleFiles({ 'src/lazy-module.ts': 'export const value = 42;', - 'src/main.ts': `const lazyFileName = 'module'; import('./lazy-' + lazyFileName);`, + 'src/main.ts': ` + const lazyFileName = 'module'; + import(/*webpackChunkName: '[request]'*/'./lazy-' + lazyFileName); + `, }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -127,7 +130,7 @@ describe('Browser Builder lazy modules', () => { architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -143,7 +146,7 @@ describe('Browser Builder lazy modules', () => { architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '0.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -158,9 +161,10 @@ describe('Browser Builder lazy modules', () => { architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'one.chunk.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'two.chunk.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'common.chunk.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), + // TODO: the chunk with common modules used to be called `common`, see why that changed. + tap(() => expect(host.asSync().exists(join(outputPath, '2.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -177,9 +181,42 @@ describe('Browser Builder lazy modules', () => { architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'one.chunk.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'two.chunk.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'common.chunk.js'))).toBe(false)), + tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, '2.js'))).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it(`supports extra lazy modules array`, (done) => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + host.writeMultipleFiles({ + 'src/app/app.component.ts': ` + import { Component, SystemJsNgModuleLoader } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'], + }) + export class AppComponent { + title = 'app'; + constructor(loader: SystemJsNgModuleLoader) { + // Module will be split at build time and loaded when requested below + loader.load('app/lazy/lazy.module#LazyModule') + .then((factory) => { /* Use factory here */ }); + } + }`, + }); + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + const overrides: Partial = { lazyModules: ['app/lazy/lazy.module'] }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))) + .toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts index f43d194bdc..07876dcd95 100644 --- a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts @@ -27,7 +27,7 @@ describe('Browser Builder optimization level', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js'); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); // Bundle contents should be uglified, which includes variable mangling. expect(content).not.toContain('AppComponent'); @@ -44,7 +44,7 @@ describe('Browser Builder optimization level', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'vendor.bundle.js'); + const fileName = join(outputPath, 'vendor.js'); const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); expect(content).toMatch(/class \w{constructor\(\){/); }), diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts index 6c2b904d61..a1b6ed23a8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts @@ -126,11 +126,11 @@ describe('Browser Builder output hashing', () => { { overrides: { outputHashing: 'all', extractCss: true } }, ))), tap(() => { - expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.css/)).toBeTruthy(); expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); }), // 'none' should hash nothing. @@ -138,11 +138,11 @@ describe('Browser Builder output hashing', () => { { overrides: { outputHashing: 'none', extractCss: true } }, ))), tap(() => { - expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.css/)).toBeFalsy(); expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); }), // 'media' should hash css resources only. @@ -150,11 +150,11 @@ describe('Browser Builder output hashing', () => { { overrides: { outputHashing: 'media', extractCss: true } }, ))), tap(() => { - expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeFalsy(); - expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.js/)).toBeFalsy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.css/)).toBeFalsy(); expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); }), // 'bundles' should hash bundles only. @@ -162,11 +162,11 @@ describe('Browser Builder output hashing', () => { { overrides: { outputHashing: 'bundles', extractCss: true } }, ))), tap(() => { - expect(host.fileMatchExists('dist', /inline\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.bundle\.css/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /vendor\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.fileMatchExists('dist', /styles\.[0-9a-f]{20}\.css/)).toBeTruthy(); expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts index 90cf9b19d0..f079856a6f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts @@ -92,7 +92,7 @@ describe('Browser Builder', () => { switch (buildNumber) { case 1: // No lazy chunk should exist. - expect(host.asSync().exists(join(outputPath, 'lazy.chunk.js'))).toBe(false); + expect(host.asSync().exists(join(outputPath, 'lazy-module.js'))).toBe(false); // Write the lazy chunk files. Order matters when writing these, because of imports. host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles(lazyModuleImport); @@ -100,7 +100,7 @@ describe('Browser Builder', () => { case 2: // A lazy chunk should have been with the filename. - expect(host.asSync().exists(join(outputPath, 'lazy.module.chunk.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true); host.writeMultipleFiles(goldenValueFiles); break; @@ -111,7 +111,7 @@ describe('Browser Builder', () => { + /\$\$_E2E_GOLDEN_VALUE_2(.|\n|\r)*/.source + /\$\$_E2E_GOLDEN_VALUE_3/.source, ); - const fileName = './dist/main.bundle.js'; + const fileName = './dist/main.js'; const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch(re); break; @@ -302,7 +302,7 @@ describe('Browser Builder', () => { debounceTime(1000), tap((buildEvent) => { buildNumber += 1; - const fileName = './dist/main.bundle.js'; + const fileName = './dist/main.js'; let content; switch (buildNumber) { case 1: diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts index 5b1c1f4abb..8edbe089a9 100644 --- a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts @@ -46,17 +46,17 @@ describe('Browser Builder scripts array', () => { it('works', (done) => { const matches: { [path: string]: string } = { - './dist/scripts.bundle.js': 'input-script', - './dist/lazy-script.bundle.js': 'lazy-script', - './dist/renamed-script.bundle.js': 'pre-rename-script', - './dist/renamed-lazy-script.bundle.js': 'pre-rename-lazy-script', - './dist/main.bundle.js': 'input-script', - './dist/index.html': '' - + '' - + '' - + '' - + '' - + '', + './dist/scripts.js': 'input-script', + './dist/lazy-script.js': 'lazy-script', + './dist/renamed-script.js': 'pre-rename-script', + './dist/renamed-lazy-script.js': 'pre-rename-lazy-script', + './dist/main.js': 'input-script', + './dist/index.html': '' + + '' + + '' + + '' + + '' + + '', }; host.writeMultipleFiles(scripts); @@ -92,22 +92,22 @@ describe('Browser Builder scripts array', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const scriptsBundle = host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.bundle\.js/); + const scriptsBundle = host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js/); expect(scriptsBundle).toBeTruthy(); const fileName = join(outputPath, scriptsBundle as PathFragment); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch('var number=2;'); - expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.bundle\.js\.map/)) + expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js\.map/)) .toBeTruthy(); - expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.bundle\.js/)) + expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.js/)) .toBeTruthy(); - expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.bundle\.js\.map/)) + expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.js\.map/)) .toBeTruthy(); - expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.bundle\.js/)).toBeTruthy(); - expect(host.asSync().exists(normalize('dist/lazy-script.bundle.js'))).toBe(true); - expect(host.asSync().exists(normalize('dist/lazy-script.bundle.js.map'))).toBe(true); - expect(host.asSync().exists(normalize('dist/renamed-lazy-script.bundle.js'))).toBe(true); - expect(host.asSync().exists(normalize('dist/renamed-lazy-script.bundle.js.map'))) + expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js/)).toBeTruthy(); + expect(host.asSync().exists(normalize('dist/lazy-script.js'))).toBe(true); + expect(host.asSync().exists(normalize('dist/lazy-script.js.map'))).toBe(true); + expect(host.asSync().exists(normalize('dist/renamed-lazy-script.js'))).toBe(true); + expect(host.asSync().exists(normalize('dist/renamed-lazy-script.js.map'))) .toBe(true); }), ).subscribe(undefined, done.fail, done); @@ -131,7 +131,7 @@ describe('Browser Builder scripts array', () => { + /['"]ainput-script['"](.|\n|\r)*/.source + /['"]cinput-script['"]/.source, ); - const fileName = './dist/scripts.bundle.js'; + const fileName = './dist/scripts.js'; const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toMatch(re); }), diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts index f5fa96e958..489ad3bd8c 100644 --- a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts @@ -27,7 +27,7 @@ describe('Browser Builder source map', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js.map'); + const fileName = join(outputPath, 'main.js.map'); expect(host.asSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); @@ -40,7 +40,7 @@ describe('Browser Builder source map', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'main.bundle.js.map'); + const fileName = join(outputPath, 'main.js.map'); expect(host.asSync().exists(fileName)).toBe(false); }), ).subscribe(undefined, done.fail, done); @@ -53,10 +53,10 @@ describe('Browser Builder source map', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists(join(outputPath, 'main.bundle.js.map'))).toBe(false); - const fileName = join(outputPath, 'main.bundle.js'); + expect(host.asSync().exists(join(outputPath, 'main.js.map'))).toBe(false); + const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); - expect(content).toContain('eval("/* harmony export (binding) */'); + expect(content).toContain('eval("function webpackEmptyAsyncContext'); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts index 7f577c13f0..8ea0973e28 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts @@ -41,28 +41,28 @@ describe('Browser Builder styles', () => { { input: 'pre-rename-lazy-style.css', output: 'renamed-lazy-style', lazy: true }, ]; const cssMatches: { [path: string]: string } = { - './dist/styles.bundle.css': '.input-style', - './dist/lazy-style.bundle.css': '.lazy-style', - './dist/renamed-style.bundle.css': '.pre-rename-style', - './dist/renamed-lazy-style.bundle.css': '.pre-rename-lazy-style', + './dist/styles.css': '.input-style', + './dist/lazy-style.css': '.lazy-style', + './dist/renamed-style.css': '.pre-rename-style', + './dist/renamed-lazy-style.css': '.pre-rename-lazy-style', }; const cssIndexMatches: { [path: string]: string } = { - './dist/index.html': '' - + '', + './dist/index.html': '' + + '', }; const jsMatches: { [path: string]: string } = { - './dist/styles.bundle.js': '.input-style', - './dist/lazy-style.bundle.js': '.lazy-style', - './dist/renamed-style.bundle.js': '.pre-rename-style', - './dist/renamed-lazy-style.bundle.js': '.pre-rename-lazy-style', + './dist/styles.js': '.input-style', + './dist/lazy-style.js': '.lazy-style', + './dist/renamed-style.js': '.pre-rename-style', + './dist/renamed-lazy-style.js': '.pre-rename-lazy-style', }; const jsIndexMatches: { [path: string]: string } = { - './dist/index.html': '' - + '' - + '' - + '' - + '' - + '', + './dist/index.html': '' + + '' + + '' + + '' + + '' + + '', }; host.writeMultipleFiles(styles); @@ -153,18 +153,18 @@ describe('Browser Builder styles', () => { }); const matches: { [path: string]: RegExp } = { - 'dist/styles.bundle.css': new RegExp( + 'dist/styles.css': new RegExp( // The global style should be there /p\s*{\s*background-color: #f00;\s*}(.|\n|\r)*/.source // The global style via import should be there + /body\s*{\s*background-color: #00f;\s*}/.source, ), - 'dist/styles.bundle.css.map': /"mappings":".+"/, - 'dist/main.bundle.js': new RegExp( - // The component style via import should be there - /.outer.*.inner.*background:\s*#[fF]+(.|\n|\r)*/.source + 'dist/styles.css.map': /"mappings":".+"/, + 'dist/main.js': new RegExp( // The component style should be there - + /h1.*background:\s*#000+/.source, + /h1(.|\n|\r)*background:\s*#000(.|\n|\r)*/.source + // The component style via import should be there + + /.outer(.|\n|\r)*.inner(.|\n|\r)*background:\s*#[fF]+/.source, ), }; @@ -215,6 +215,21 @@ describe('Browser Builder styles', () => { }, 30000); }); + it(`supports material icons`, (done) => { + const overrides = { + extractCss: true, + optimizationLevel: 1, + styles: [ + { input: '../../../../../node_modules/material-design-icons/iconfont/material-icons.css' }, + ], + }; + + architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + concatMap(() => architect.run(architect.getTarget({ overrides }))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + extensionsWithVariableSupport.forEach(ext => { it(`supports ${ext} includePaths`, (done) => { @@ -244,8 +259,8 @@ describe('Browser Builder styles', () => { }); const matches: { [path: string]: RegExp } = { - 'dist/styles.bundle.css': /h1\s*{\s*color: #f00;\s*}/, - 'dist/main.bundle.js': /h2.*{.*color: #f00;.*}/, + 'dist/styles.css': /h1\s*{\s*color: #f00;\s*}/, + 'dist/main.js': /h2.*{.*color: #f00;.*}/, }; host.replaceInFile('src/app/app.component.ts', './app.component.css', @@ -297,7 +312,7 @@ describe('Browser Builder styles', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = 'dist/styles.bundle.css'; + const fileName = 'dist/styles.css'; const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); // Large image should not be inlined, and gradient should be there. expect(content).toMatch( @@ -308,7 +323,7 @@ describe('Browser Builder styles', () => { expect(content).toMatch(/url\(['"]?small-id\.svg#testID['"]?\)/); }), tap(() => { - const fileName = 'dist/main.bundle.js'; + const fileName = 'dist/main.js'; const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); // Large image should not be inlined. expect(content).toMatch(/url\((?:['"]|\\')?large\.png(?:['"]|\\')?\)/); @@ -361,7 +376,7 @@ describe('Browser Builder styles', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = 'dist/styles.bundle.css'; + const fileName = 'dist/styles.css'; const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toContain(tags.stripIndents` /* normal-comment */ @@ -385,7 +400,7 @@ describe('Browser Builder styles', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = 'dist/styles.bundle.css'; + const fileName = 'dist/styles.css'; const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toContain( '/*! important-comment */div{-webkit-box-flex:1;-ms-flex:1;flex:1}'); @@ -413,8 +428,8 @@ describe('Browser Builder styles', () => { 'src/assets/component-img-absolute.svg': imgSvg, }); - const stylesBundle = 'dist/styles.bundle.css'; - const mainBundle = 'dist/main.bundle.js'; + const stylesBundle = 'dist/styles.css'; + const mainBundle = 'dist/main.js'; architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( // Check base paths are correctly generated. @@ -425,9 +440,9 @@ describe('Browser Builder styles', () => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); expect(styles).toContain(`url('/assets/global-img-absolute.svg')`); - expect(styles).toContain(`url(global-img-relative.png)`); + expect(styles).toContain(`url('global-img-relative.png')`); expect(main).toContain(`url('/assets/component-img-absolute.svg')`); - expect(main).toContain(`url(component-img-relative.png)`); + expect(main).toContain(`url('component-img-relative.png')`); expect(host.asSync().exists(normalize('dist/global-img-absolute.svg'))).toBe(false); expect(host.asSync().exists(normalize('dist/global-img-relative.png'))).toBe(true); expect(host.asSync().exists(normalize('dist/component-img-absolute.svg'))).toBe(false); diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts index 4cb0089985..0a3c8503a5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts @@ -20,7 +20,8 @@ describe('Browser Builder subresource integrity', () => { beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - it('works', (done) => { + // TODO: WEBPACK4_DISABLED - disabled pending a webpack 4 version + xit('works', (done) => { host.writeMultipleFiles({ 'src/my-js-file.js': `console.log(1); export const a = 2;`, 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts index b11dbc80b3..e6f28a5932 100644 --- a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts @@ -27,7 +27,7 @@ describe('Browser Builder vendor chunk', () => { concatMap(() => architect.run(architect.getTarget({ overrides }))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - const fileName = join(outputPath, 'vendor.bundle.js'); + const fileName = join(outputPath, 'vendor.js'); expect(host.asSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts index 2ab3018611..cfa5147c00 100644 --- a/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts @@ -26,11 +26,11 @@ describe('Browser Builder', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { // Default files should be in outputPath. - expect(host.asSync().exists(join(outputPath, 'inline.bundle.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'main.bundle.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'polyfills.bundle.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'styles.bundle.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'vendor.bundle.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'runtime.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'main.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'polyfills.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'styles.js'))).toBe(true); + expect(host.asSync().exists(join(outputPath, 'vendor.js'))).toBe(true); expect(host.asSync().exists(join(outputPath, 'favicon.ico'))).toBe(true); expect(host.asSync().exists(join(outputPath, 'index.html'))).toBe(true); }), diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts index c59668adc6..7acf9d1789 100644 --- a/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts @@ -101,5 +101,5 @@ describe('Karma Builder assets', () => { architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget({ overrides }))), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 45000); }); diff --git a/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts index 31d817aad1..d050cca48c 100644 --- a/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts @@ -36,7 +36,9 @@ describe('Karma Builder', () => { ).subscribe(undefined, done.fail, done); }, 30000); - it('supports ES2015 target', (done) => { + // TODO: this test is failing with `TypeError: Assignment to constant variable.` errors. + // Need to investigate why. Might be TS 2.7. + xit('supports ES2015 target', (done) => { host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( concatMap(() => architect.run(architect.getTarget())), From 3b44aae4477735ac219f0f3356d50cb6e766a0fe Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 6 Mar 2018 10:58:13 +0000 Subject: [PATCH 153/724] refactor: use _spec_large instead of _spec_big --- .appveyor.yml | 2 +- .circleci/config.yml | 6 +++--- lib/istanbul-local.js | 2 +- package.json | 1 + packages/angular_devkit/build_optimizer/BUILD | 2 +- .../{allow-js_spec_big.ts => allow-js_spec_large.ts} | 0 .../test/browser/{aot_spec_big.ts => aot_spec_large.ts} | 0 .../browser/{assets_spec_big.ts => assets_spec_large.ts} | 0 .../{base-href_spec_big.ts => base-href_spec_large.ts} | 0 ...-optimizer_spec_big.ts => build-optimizer_spec_large.ts} | 0 ...ndency_spec_big.ts => circular-dependency_spec_large.ts} | 0 ...odules_spec_big.ts => custom-lazy-modules_spec_large.ts} | 2 +- .../{deploy-url_spec_big.ts => deploy-url_spec_large.ts} | 0 .../browser/{errors_spec_big.ts => errors_spec_large.ts} | 0 ...acements_spec_big.ts => file-replacements_spec_large.ts} | 0 .../test/browser/{i18n_spec_big.ts => i18n_spec_large.ts} | 0 .../{lazy-module_spec_big.ts => lazy-module_spec_large.ts} | 0 ...raction_spec_big.ts => license-extraction_spec_large.ts} | 0 ...try-module_spec_big.ts => no-entry-module_spec_large.ts} | 0 ...n-level_spec_big.ts => optimization-level_spec_large.ts} | 0 ...put-hashing_spec_big.ts => output-hashing_spec_large.ts} | 2 +- .../{output-path_spec_big.ts => output-path_spec_large.ts} | 0 .../test/browser/{poll_spec_big.ts => poll_spec_large.ts} | 0 .../browser/{rebuild_spec_big.ts => rebuild_spec_large.ts} | 2 +- ...cripts-array_spec_big.ts => scripts-array_spec_large.ts} | 0 .../{source-map_spec_big.ts => source-map_spec_large.ts} | 0 .../{stats-json_spec_big.ts => stats-json_spec_large.ts} | 0 .../browser/{styles_spec_big.ts => styles_spec_large.ts} | 0 ...rity_spec_big.ts => subresource-integrity_spec_large.ts} | 0 ...onfig-paths_spec_big.ts => tsconfig-paths_spec_large.ts} | 0 ...{vendor-chunk_spec_big.ts => vendor-chunk_spec_large.ts} | 0 .../test/browser/{works_spec_big.ts => works_spec_large.ts} | 0 .../dev-server/{proxy_spec_big.ts => proxy_spec_large.ts} | 0 .../{public-host_spec_big.ts => public-host_spec_large.ts} | 0 .../{serve-path_spec_big.ts => serve-path_spec_large.ts} | 0 .../test/dev-server/{ssl_spec_big.ts => ssl_spec_large.ts} | 0 .../dev-server/{works_spec_big.ts => works_spec_large.ts} | 0 .../extract-i18n/{works_spec_big.ts => works_spec_large.ts} | 0 .../test/karma/{assets_spec_big.ts => assets_spec_large.ts} | 0 ...ode-coverage_spec_big.ts => code-coverage_spec_large.ts} | 0 .../karma/{rebuilds_spec_big.ts => rebuilds_spec_large.ts} | 0 .../test/karma/{works_spec_big.ts => works_spec_large.ts} | 0 .../protractor/{works_spec_big.ts => works_spec_large.ts} | 0 .../test/tslint/{works_spec_big.ts => works_spec_large.ts} | 0 packages/angular_devkit/core/BUILD | 6 +++--- packages/angular_devkit/schematics_cli/BUILD | 2 +- rules/noGlobalTslintDisableRule.ts | 2 +- scripts/build.ts | 2 +- scripts/test.ts | 2 +- scripts/validate-licenses.ts | 2 +- 50 files changed, 18 insertions(+), 17 deletions(-) rename packages/angular_devkit/build_webpack/test/browser/{allow-js_spec_big.ts => allow-js_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{aot_spec_big.ts => aot_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{assets_spec_big.ts => assets_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{base-href_spec_big.ts => base-href_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{build-optimizer_spec_big.ts => build-optimizer_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{circular-dependency_spec_big.ts => circular-dependency_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{custom-lazy-modules_spec_big.ts => custom-lazy-modules_spec_large.ts} (99%) rename packages/angular_devkit/build_webpack/test/browser/{deploy-url_spec_big.ts => deploy-url_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{errors_spec_big.ts => errors_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{file-replacements_spec_big.ts => file-replacements_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{i18n_spec_big.ts => i18n_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{lazy-module_spec_big.ts => lazy-module_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{license-extraction_spec_big.ts => license-extraction_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{no-entry-module_spec_big.ts => no-entry-module_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{optimization-level_spec_big.ts => optimization-level_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{output-hashing_spec_big.ts => output-hashing_spec_large.ts} (99%) rename packages/angular_devkit/build_webpack/test/browser/{output-path_spec_big.ts => output-path_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{poll_spec_big.ts => poll_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{rebuild_spec_big.ts => rebuild_spec_large.ts} (99%) rename packages/angular_devkit/build_webpack/test/browser/{scripts-array_spec_big.ts => scripts-array_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{source-map_spec_big.ts => source-map_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{stats-json_spec_big.ts => stats-json_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{styles_spec_big.ts => styles_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{subresource-integrity_spec_big.ts => subresource-integrity_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{tsconfig-paths_spec_big.ts => tsconfig-paths_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{vendor-chunk_spec_big.ts => vendor-chunk_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/browser/{works_spec_big.ts => works_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/dev-server/{proxy_spec_big.ts => proxy_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/dev-server/{public-host_spec_big.ts => public-host_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/dev-server/{serve-path_spec_big.ts => serve-path_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/dev-server/{ssl_spec_big.ts => ssl_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/dev-server/{works_spec_big.ts => works_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/extract-i18n/{works_spec_big.ts => works_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/karma/{assets_spec_big.ts => assets_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/karma/{code-coverage_spec_big.ts => code-coverage_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/karma/{rebuilds_spec_big.ts => rebuilds_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/karma/{works_spec_big.ts => works_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/protractor/{works_spec_big.ts => works_spec_large.ts} (100%) rename packages/angular_devkit/build_webpack/test/tslint/{works_spec_big.ts => works_spec_large.ts} (100%) diff --git a/.appveyor.yml b/.appveyor.yml index c9c174cfda..fe11617011 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,7 +14,7 @@ test_script: - node --version - npm --version - npm test - - npm test -- --big + - npm run test-large build: off diff --git a/.circleci/config.yml b/.circleci/config.yml index e9fc3a48b8..5b01cead96 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,12 +44,12 @@ jobs: - restore_cache: *_root_package_lock_key - run: npm run test -- --code-coverage --full - test-big: + test-large: <<: *defaults steps: - checkout: *post_checkout - restore_cache: *_root_package_lock_key - - run: npm run test -- --code-coverage --full --big + - run: npm run test-large -- --code-coverage --full integration: <<: *defaults @@ -138,7 +138,7 @@ workflows: - test: requires: - build - - test-big: + - test-large: requires: - build - integration: diff --git a/lib/istanbul-local.js b/lib/istanbul-local.js index ec9a57eab4..ef5782661a 100644 --- a/lib/istanbul-local.js +++ b/lib/istanbul-local.js @@ -18,7 +18,7 @@ exports.codeMap = codeMap; exports.istanbulRequireHook = function(code, filename) { // Skip spec files. - if (filename.match(/_spec(_big)?\.ts$/)) { + if (filename.match(/_spec(_large)?\.ts$/)) { return code; } const codeFile = codeMap.get(filename); diff --git a/package.json b/package.json index 364c951a8a..3caea9d9c7 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier", "templates": "node ./bin/devkit-admin templates", "test": "node ./bin/devkit-admin test", + "test-large": "node ./bin/devkit-admin test --large", "test:watch": "nodemon --watch packages -e ts ./bin/devkit-admin test", "validate": "node ./bin/devkit-admin validate", "validate-commits": "./bin/devkit-admin validate-commits", diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD index 8b6a390e28..054aef5ded 100644 --- a/packages/angular_devkit/build_optimizer/BUILD +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -23,7 +23,7 @@ ts_library( "src/purify/**", "src/index.ts", "**/*_spec.ts", - "**/*_spec_big.ts", + "**/*_spec_large.ts", ], ), tsconfig = "//:tsconfig.json", diff --git a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/allow-js_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/aot_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/assets_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/base-href_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts similarity index 99% rename from packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts index e3ac6cc323..f7b2267e2b 100644 --- a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts @@ -10,7 +10,7 @@ // import { join, normalize } from '@angular-devkit/core'; // import { concatMap, tap, toArray } from 'rxjs/operators'; // import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; -// import { lazyModuleFiles, lazyModuleImport } from './rebuild_spec_big'; +// import { lazyModuleFiles, lazyModuleImport } from './rebuild_spec_large'; // TODO: re-enable this test when the custom lazy module changes have been ported over to diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/errors_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/errors_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/i18n_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts similarity index 99% rename from packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts index a1b6ed23a8..1bc3774ac0 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts @@ -10,7 +10,7 @@ import { Architect } from '@angular-devkit/architect'; import { normalize } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; -import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_big'; +import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; describe('Browser Builder output hashing', () => { diff --git a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/output-path_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/poll_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/poll_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts similarity index 99% rename from packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index f079856a6f..5fa60281a8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_big.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -16,7 +16,7 @@ import { makeWorkspace, workspaceRoot, } from '../utils'; -import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_big'; +import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; describe('Browser Builder', () => { diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/source-map_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/stats-json_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/styles_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/works_spec_big.ts rename to packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_big.ts rename to packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_big.ts rename to packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_big.ts rename to packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_big.ts rename to packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/works_spec_big.ts rename to packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_big.ts rename to packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/assets_spec_big.ts rename to packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_big.ts rename to packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_big.ts rename to packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/works_spec_big.ts rename to packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/protractor/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/protractor/works_spec_big.ts rename to packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_big.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/tslint/works_spec_big.ts rename to packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 10eb75bf37..ab34a37643 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -14,7 +14,7 @@ ts_library( include = ["src/**/*.ts"], exclude = [ "src/**/*_spec.ts", - "src/**/*_spec_big.ts", + "src/**/*_spec_large.ts", "src/**/*_benchmark.ts", ], ), @@ -31,7 +31,7 @@ ts_library( include = ["node/**/*.ts"], exclude = [ "node/**/*_spec.ts", - "node/**/*_spec_big.ts", + "node/**/*_spec_large.ts", "tools/**/*_benchmark.ts", ], ), @@ -48,7 +48,7 @@ ts_library( srcs = glob( include = [ "**/*_spec.ts", - "**/*_spec_big.ts", + "**/*_spec_large.ts", ], ), deps = [ diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index 6e3c6a75cd..31d6b8049b 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -14,7 +14,7 @@ ts_library( include = ["bin/**/*.ts"], exclude = [ "bin/**/*_spec.ts", - "bin/**/*_spec_big.ts", + "bin/**/*_spec_large.ts", "bin/**/*_benchmark.ts", ], ), diff --git a/rules/noGlobalTslintDisableRule.ts b/rules/noGlobalTslintDisableRule.ts index 338dd1cf63..fea185ec79 100644 --- a/rules/noGlobalTslintDisableRule.ts +++ b/rules/noGlobalTslintDisableRule.ts @@ -44,7 +44,7 @@ class Walker extends Lint.RuleWalker { super.walk(sourceFile); // Ignore spec files. - if (sourceFile.fileName.match(/_spec(_big)?.ts$/)) { + if (sourceFile.fileName.match(/_spec(_large)?.ts$/)) { return; } // Ignore benchmark files. diff --git a/scripts/build.ts b/scripts/build.ts index 69c11eeaa9..126f637c4a 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -243,7 +243,7 @@ export default function(argv: { local?: boolean, snapshot?: boolean }, logger: l for (const packageName of sortedPackages) { specLogger.info(packageName); const pkg = packages[packageName]; - const files = glob.sync(path.join(pkg.dist, '**/*_spec?(_big).@(js|d.ts)')); + const files = glob.sync(path.join(pkg.dist, '**/*_spec?(_large).@(js|d.ts)')); specLogger.info(` ${files.length} spec files found...`); files.forEach(fileName => _rm(fileName)); } diff --git a/scripts/test.ts b/scripts/test.ts index 82b2162af0..60cea47b06 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -153,7 +153,7 @@ glob.sync('packages/**/*.spec.ts') export default function (args: ParsedArgs, logger: logging.Logger) { const packageGlob = args.glob ? `**/${args.glob}/**` : '**'; - const specGlob = args.big ? '*_spec_big.ts' : '*_spec.ts'; + const specGlob = args.large ? '*_spec_large.ts' : '*_spec.ts'; const regex = `packages/${packageGlob}/${specGlob}`; if (args['code-coverage']) { diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts index d8b1dfec43..2e6e1815ab 100644 --- a/scripts/validate-licenses.ts +++ b/scripts/validate-licenses.ts @@ -70,7 +70,7 @@ const ignoredPackages = [ // so hard to manage. In talk with owner and users to switch over. 'uws@0.14.5', // TODO(filipesilva): remove this when karma is moved to e2e tests. - // TODO(filipesilva): remove this when spec_big is moved to e2e tests. + // TODO(filipesilva): remove this when spec_large is moved to e2e tests. 'font-awesome@4.7.0', // (OFL-1.1 AND MIT) ]; From cb3e6ad3decece524fa227ca9b1d9c4035730984 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 6 Mar 2018 11:03:07 +0000 Subject: [PATCH 154/724] fix(@angular-devkit/architect): use devkit core as a peerdep --- packages/angular_devkit/architect/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json index 4d797be5c2..c67ae236b3 100644 --- a/packages/angular_devkit/architect/package.json +++ b/packages/angular_devkit/architect/package.json @@ -8,7 +8,9 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "dependencies": { - "@angular-devkit/core": "0.0.0", "rxjs": "^5.5.6" + }, + "peerDependencies": { + "@angular-devkit/core": "0.0.0" } -} +} \ No newline at end of file From 7b1aa38793ed092acaba050fa066c3938a68e535 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 6 Mar 2018 11:03:23 +0000 Subject: [PATCH 155/724] fix(@angular-devkit/build-webpack): use devkit core and architect as peerdeps --- packages/angular_devkit/build_webpack/package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index e2ee35d090..74eac49d08 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -10,8 +10,6 @@ }, "dependencies": { "@angular-devkit/build-optimizer": "0.0.0", - "@angular-devkit/architect": "0.0.0", - "@angular-devkit/core": "0.0.0", "@ngtools/webpack": "6.0.0-beta.4", "autoprefixer": "^7.2.3", "cache-loader": "^1.2.0", @@ -58,5 +56,9 @@ "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.0.3" + }, + "peerDependencies": { + "@angular-devkit/architect": "0.0.0", + "@angular-devkit/core": "0.0.0" } -} +} \ No newline at end of file From ebbf7123bf65353e1dd0bde2760605f4fac47da2 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 6 Mar 2018 16:03:15 -0500 Subject: [PATCH 156/724] refactor(@angular-devkit/build-webpack): update deps for webpack 4 --- package-lock.json | 230 ++++++++++-------- package.json | 18 +- .../angular_devkit/build_webpack/package.json | 18 +- 3 files changed, 152 insertions(+), 114 deletions(-) diff --git a/package-lock.json b/package-lock.json index 788789c195..7e1ec493ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1586,26 +1586,10 @@ } } }, - "clone-deep": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.3.0.tgz", - "integrity": "sha1-NIxhrpzb4O3+BT2R/0zFIdeQ7eg=", - "requires": { - "for-own": "1.0.0", - "is-plain-object": "2.0.4", - "kind-of": "3.2.2", - "shallow-clone": "0.1.2" - }, - "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "requires": { - "for-in": "1.0.2" - } - } - } + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" }, "co": { "version": "4.6.0", @@ -2040,9 +2024,9 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-webpack-plugin": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.3.tgz", - "integrity": "sha512-v4THQ24Tks2NkyOvZuFDgZVfDD9YaA9rwYLZTrWg2GHIA8lrH5DboEyeoorh5Skki+PUbgSmnsCwhMWqYrQZrA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.0.tgz", + "integrity": "sha512-ROQ85fWKuhJfUkBTdHvfV+Zv6Ltm3G/vPVFdLPFwzWzd9RUY1yLw3rt6FmKK2PaeNQCNvmwgFhuarkjuV4PVDQ==", "requires": { "cacache": "10.0.4", "find-cache-dir": "1.0.0", @@ -4735,14 +4719,17 @@ } }, "html-webpack-plugin": { - "version": "github:webpack-contrib/html-webpack-plugin#a8a8c2b6ea496c257fd6f501db3a06a51fa03e1e", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.0.6.tgz", + "integrity": "sha1-01sEUqrhKaip8/rEShaaYl2M8/o=", "requires": { - "bluebird": "3.5.1", "html-minifier": "3.5.9", "loader-utils": "0.2.17", "lodash": "4.17.4", "pretty-error": "2.1.1", - "toposort": "1.0.6" + "tapable": "1.0.0", + "toposort": "1.0.6", + "util.promisify": "1.0.0" }, "dependencies": { "loader-utils": { @@ -5953,19 +5940,19 @@ } }, "less-loader": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.5.tgz", - "integrity": "sha1-rhVadAbKxqzSk9eFWH/P8PR4xN0=", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.6.tgz", + "integrity": "sha512-WPFY3NMJGJna8kIxtgSu6AVG7K6uRPdfE2J7vpQqFWMN/RkOosV09rOVUt3wghNClWH2Pg7YumD1dHiv1Thfug==", "requires": { "clone": "2.1.1", "loader-utils": "1.1.0", - "pify": "2.3.0" + "pify": "3.0.0" }, "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" } } }, @@ -6130,9 +6117,9 @@ } }, "license-webpack-plugin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.1.2.tgz", - "integrity": "sha512-L40JKqFGSJ2z5bKOleYK3IgdOaTCoRx1p+zScf5yMCYQ1HsKrcCGFxVjZYvIWatcqGtdoEC0PZOBFgSaHMmvrw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.2.3.tgz", + "integrity": "sha512-+sie46vNe5L48N94LEzEvreJqAdi+N3x3mXUx+iujuAmftWdJUh68RSDPgWK3DRJuu50dwiyH7MdVAx95zfKQA==", "requires": { "ejs": "2.5.7" } @@ -7371,6 +7358,15 @@ } } }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.10.0" + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -7953,9 +7949,9 @@ } }, "postcss-url": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.0.tgz", - "integrity": "sha512-VBP6uf6iL3AZra23nkPkOEkS/5azj1xf/toRrjfkolfFEgg9Gyzg9UhJZeIsz12EGKZTNVeGbPa2XtaZm/iZvg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.1.tgz", + "integrity": "sha512-Ya5KIjGptgz0OtrVYfi2UbLxVAZ6Emc4Of+Grx4Sf1deWlRpFwLr8FrtkUxfqh+XiZIVkXbjQrddE10ESpNmdA==", "requires": { "mime": "1.6.0", "minimatch": "3.0.4", @@ -8822,29 +8818,62 @@ } }, "sass-loader": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", - "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz", + "integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==", "requires": { - "async": "2.6.0", - "clone-deep": "0.3.0", + "clone-deep": "2.0.2", "loader-utils": "1.1.0", "lodash.tail": "4.1.1", + "neo-async": "2.5.0", "pify": "3.0.0" }, "dependencies": { - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "requires": { - "lodash": "4.17.4" + "for-own": "1.0.0", + "is-plain-object": "2.0.4", + "kind-of": "6.0.2", + "shallow-clone": "1.0.0" + } + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "1.0.2" } }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "requires": { + "is-extendable": "0.1.1", + "kind-of": "5.1.0", + "mixin-object": "2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } } } }, @@ -9097,32 +9126,6 @@ "safe-buffer": "5.1.1" } }, - "shallow-clone": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", - "requires": { - "is-extendable": "0.1.1", - "kind-of": "2.0.1", - "lazy-cache": "0.2.7", - "mixin-object": "2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" - } - } - }, "shasum": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", @@ -10575,13 +10578,39 @@ "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=" }, "url-loader": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.6.2.tgz", - "integrity": "sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz", + "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==", "requires": { "loader-utils": "1.1.0", - "mime": "1.6.0", - "schema-utils": "0.3.0" + "mime": "2.2.0", + "schema-utils": "0.4.5" + }, + "dependencies": { + "ajv": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", + "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", + "requires": { + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "requires": { + "ajv": "6.2.1", + "ajv-keywords": "3.1.0" + } + } } }, "url-parse": { @@ -10726,6 +10755,15 @@ "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", "dev": true }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "1.1.2", + "object.getownpropertydescriptors": "2.0.3" + } + }, "utila": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", @@ -11160,13 +11198,13 @@ } }, "webpack": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.0.1.tgz", - "integrity": "sha512-jHQNMmKPElreOYLCxR7SHfPnbhcqRT9O7lYPOMDR6Gt5XueJ7tH7JReXm4uMFstBKf7rj2Y7AD3LiMKR2zexYA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.1.0.tgz", + "integrity": "sha512-ZFYcAZ44kOT+xsS5MS2H1fQr0PJkwQdYem/d17wacDkkupzsAkBJ3hDShWHdPVvWluFs6pfhHWw/dVso1m0rsA==", "requires": { - "acorn": "5.5.0", + "acorn": "5.5.1", "acorn-dynamic-import": "3.0.0", - "ajv": "6.2.0", + "ajv": "6.2.1", "ajv-keywords": "3.1.0", "chrome-trace-event": "0.1.2", "enhanced-resolve": "4.0.0", @@ -11186,14 +11224,14 @@ }, "dependencies": { "acorn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", - "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.1.tgz", + "integrity": "sha512-D/KGiCpM/VOtTMDS+wfjywEth926WUrArrzYov4N4SI7t+3y8747dPpCmmAvrm/Z3ygqMHnyPxvYYO0yTdn/nQ==" }, "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", + "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", "requires": { "fast-deep-equal": "1.0.0", "fast-json-stable-stringify": "2.0.0", @@ -11437,7 +11475,7 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "6.2.0", + "ajv": "6.2.1", "ajv-keywords": "3.1.0" } } @@ -12095,9 +12133,9 @@ } }, "webpack-subresource-integrity": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.3.tgz", - "integrity": "sha1-wGBtQAkLBwzeQovsjfNgMhbkcus=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz", + "integrity": "sha1-j6yKfo61n8ahZ2ioXJ2U7n+dDts=", "requires": { "webpack-core": "0.6.9" } diff --git a/package.json b/package.json index 3caea9d9c7..f377265f9a 100644 --- a/package.json +++ b/package.json @@ -89,13 +89,13 @@ "codelyzer": "^4.0.2", "common-tags": "^1.5.1", "conventional-changelog": "^1.1.0", - "copy-webpack-plugin": "~4.4.2", + "copy-webpack-plugin": "^4.5.0", "express": "^4.16.2", "extract-text-webpack-plugin": "~4.0.0-beta.0", - "file-loader": "^1.1.9", + "file-loader": "^1.1.11", "font-awesome": "^4.7.0", "glob": "^7.0.3", - "html-webpack-plugin": "github:webpack-contrib/html-webpack-plugin#a8a8c2b6ea496c257fd6f501db3a06a51fa03e1e", + "html-webpack-plugin": "^3.0.6", "husky": "^0.14.3", "istanbul": "^0.4.5", "istanbul-instrumenter-loader": "^3.0.0", @@ -109,8 +109,8 @@ "karma-jasmine-html-reporter": "^0.2.2", "karma-source-map-support": "^1.2.0", "less": "^2.7.3", - "less-loader": "^4.0.5", - "license-webpack-plugin": "^1.1.2", + "less-loader": "^4.0.6", + "license-webpack-plugin": "^1.2.3", "loader-utils": "^1.1.0", "lodash": "^4.17.4", "material-design-icons": "^3.0.1", @@ -124,12 +124,12 @@ "postcss": "^6.0.19", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.1", - "postcss-url": "^7.3.0", + "postcss-url": "^7.3.1", "protractor": "^5.1.2", "raw-loader": "^0.5.1", "request": "^2.83.0", "rxjs": "^5.5.6", - "sass-loader": "^6.0.6", + "sass-loader": "^6.0.7", "semver": "^5.3.0", "semver-intersect": "^1.1.2", "silent-error": "^1.1.0", @@ -146,8 +146,8 @@ "tslint": "^5.9.1", "typescript": "~2.7.2", "uglifyjs-webpack-plugin": "^1.2.2", - "url-loader": "^0.6.2", - "webpack": "~4.0.0", + "url-loader": "^1.0.1", + "webpack": "~4.1.0", "webpack-dev-middleware": "^2.0.6", "webpack-dev-server": "^3.0.1-beta.0", "webpack-merge": "^4.1.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 74eac49d08..a04855c7ca 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -12,20 +12,20 @@ "@angular-devkit/build-optimizer": "0.0.0", "@ngtools/webpack": "6.0.0-beta.4", "autoprefixer": "^7.2.3", - "cache-loader": "^1.2.0", + "cache-loader": "^1.2.2", "chalk": "~2.2.2", "circular-dependency-plugin": "^4.4.0", "clean-css": "^4.1.9", "common-tags": "^1.5.1", - "copy-webpack-plugin": "^4.4.2", + "copy-webpack-plugin": "^4.5.0", "extract-text-webpack-plugin": "~4.0.0-beta.0", - "file-loader": "^1.1.5", + "file-loader": "^1.1.11", "glob": "^7.0.3", - "html-webpack-plugin": "github:webpack-contrib/html-webpack-plugin#a8a8c2b6ea496c257fd6f501db3a06a51fa03e1e", + "html-webpack-plugin": "^3.0.6", "karma-source-map-support": "^1.2.0", "less": "^2.7.3", - "less-loader": "^4.0.5", - "license-webpack-plugin": "^1.1.2", + "less-loader": "^4.0.6", + "license-webpack-plugin": "^1.2.3", "lodash": "^4.17.4", "memory-fs": "^0.4.1", "minimatch": "^3.0.4", @@ -40,7 +40,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "rxjs": "^5.5.6", - "sass-loader": "^6.0.6", + "sass-loader": "^6.0.7", "silent-error": "^1.1.0", "source-map-support": "^0.5.0", "stats-webpack-plugin": "^0.6.2", @@ -49,8 +49,8 @@ "stylus-loader": "^3.0.2", "tree-kill": "^1.2.0", "uglifyjs-webpack-plugin": "^1.2.2", - "url-loader": "^0.6.2", - "webpack": "~4.0.0", + "url-loader": "^1.0.1", + "webpack": "~4.1.0", "webpack-dev-middleware": "^2.0.6", "webpack-dev-server": "^3.0.1-beta.0", "webpack-merge": "^4.1.2", From fe4269386ad6d291eb84483d91502dc19635a0a0 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 7 Mar 2018 15:52:43 -0500 Subject: [PATCH 157/724] test: Add ability to run external schematics --- .../testing/schematic-test-runner.ts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 3c45024d29..b4d14174bf 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -99,6 +99,42 @@ export class SchematicTestRunner { return result; } + runExternalSchematicAsync( + collectionName: string, + schematicName: string, + opts?: SchematicSchemaT, + tree?: Tree, + ): Observable { + const externalCollection = this._engine.createCollection(collectionName); + const schematic = externalCollection.createSchematic(schematicName); + const host = observableOf(tree || new VirtualTree); + + return schematic.call(opts || {}, host, { logger: this._logger }) + .pipe(map(tree => new UnitTestTree(tree))); + } + + runExternalSchematic( + collectionName: string, + schematicName: string, + opts?: SchematicSchemaT, + tree?: Tree, + ): UnitTestTree { + const externalCollection = this._engine.createCollection(collectionName); + const schematic = externalCollection.createSchematic(schematicName); + + let result: UnitTestTree | null = null; + const host = observableOf(tree || new VirtualTree); + + schematic.call(opts || {}, host, { logger: this._logger }) + .subscribe(t => result = new UnitTestTree(t)); + + if (result === null) { + throw new Error('Schematic is async, please use runSchematicAsync'); + } + + return result; + } + callRule(rule: Rule, tree: Tree, parentContext?: Partial): Observable { const context = this._engine.createContext({} as Schematic<{}, {}>, parentContext); From 54da72f8ff441ccb295f0735846d36c808551da9 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Mar 2018 17:20:08 -0800 Subject: [PATCH 158/724] fix(@angular-devkit/core): remove functions that have no files from caller array --- packages/angular_devkit/core/node/resolve.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/node/resolve.ts b/packages/angular_devkit/core/node/resolve.ts index 2846863bd1..26618a0dda 100644 --- a/packages/angular_devkit/core/node/resolve.ts +++ b/packages/angular_devkit/core/node/resolve.ts @@ -35,7 +35,7 @@ function _caller(): string[] { const stack = (new Error()).stack as {}[] | undefined as { getFileName(): string }[] | undefined; error.prepareStackTrace = origPrepareStackTrace; - return stack ? stack.map(x => x.getFileName()) : []; + return stack ? stack.map(x => x.getFileName()).filter(x => !!x) : []; } From fab734b1e910bfeeb9faad0d054031aaaebcffee Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 8 Mar 2018 07:11:20 -0800 Subject: [PATCH 159/724] build: add CI-specific Bazel settings --- .circleci/bazel.rc | 20 ++++++++++++++++++++ .circleci/config.yml | 1 + 2 files changed, 21 insertions(+) create mode 100644 .circleci/bazel.rc diff --git a/.circleci/bazel.rc b/.circleci/bazel.rc new file mode 100644 index 0000000000..0cf9444d5d --- /dev/null +++ b/.circleci/bazel.rc @@ -0,0 +1,20 @@ +# These options are enabled when running on CI +# We do this by copying this file to /etc/bazel.bazelrc at the start of the build. + +# Echo all the configuration settings and their source +build --announce_rc + +# Don't be spammy in the logs +build --noshow_progress + +# Don't run manual tests +test --test_tag_filters=-manual + +# Workaround https://github.com/bazelbuild/bazel/issues/3645 +# Bazel doesn't calculate the memory ceiling correctly when running under Docker. +# Limit Bazel to consuming resources that fit in CircleCI "medium" class which is the default: +# https://circleci.com/docs/2.0/configuration-reference/#resource_class +build --local_resources=3072,2.0,1.0 + +# Retry in the event of flakes +test --flaky_test_attempts=2 diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b01cead96..50d42747b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,6 +85,7 @@ jobs: <<: *defaults steps: - checkout: *post_checkout + - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc - run: bazel run @nodejs//:npm install - run: bazel build //packages/... From 88a3e309e747835410ce7b909823fb263ca37d1c Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 15 Feb 2018 10:48:24 -0500 Subject: [PATCH 160/724] feat(@schematics/angular): Update aliases to all use single character --- packages/schematics/angular/app-shell/schema.json | 2 +- .../schematics/angular/application/index_spec.ts | 6 ++++++ packages/schematics/angular/application/schema.json | 13 ++++++------- packages/schematics/angular/component/schema.json | 10 +++++----- packages/schematics/angular/universal/schema.json | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index cfb3c8d37b..0d6fcf5ad1 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -95,7 +95,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd" + "alias": "D" } }, "required": [ diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 723e8391f1..85138a0c04 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -114,4 +114,10 @@ describe('Application Schematic', () => { const content = tree.readContent(path); expect(content).toMatch(/import { AppComponent } from \'\.\/app\.component\';/); }); + + it('should use the directory option', () => { + const options = { ...defaultOptions, directory: 'my-dir' }; + const tree = schematicRunner.runSchematic('application', options); + expect(tree.exists('/my-dir/package.json')).toEqual(true); + }); }); diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 2166263131..308d5f43a3 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -7,8 +7,7 @@ "directory": { "type": "string", "format": "path", - "description": "The directory name to create the app in.", - "alias": "dir" + "description": "The directory name to create the app in." }, "path": { "type": "string", @@ -22,7 +21,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd", + "alias": "D", "visible": false }, "name": { @@ -34,13 +33,13 @@ "description": "Specifies if the style will be in the ts file.", "type": "boolean", "default": false, - "alias": "is" + "alias": "s" }, "inlineTemplate": { "description": "Specifies if the template will be in the ts file.", "type": "boolean", "default": false, - "alias": "it" + "alias": "t" }, "viewEncapsulation": { "description": "Specifies the view encapsulation strategy.", @@ -73,7 +72,7 @@ "description": "Skip creating spec files.", "type": "boolean", "default": false, - "alias": "st" + "alias": "S" }, "skipInstall": { "description": "Skip installing dependency packages.", @@ -90,7 +89,7 @@ "description": "Skip initializing a git repository.", "type": "boolean", "default": false, - "alias": "sg" + "alias": "g" }, "commit": { "description": "Initial repository commit information.", diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 7479112b38..7bbf952aca 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -16,7 +16,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd", + "alias": "D", "visible": false }, "appRoot": { @@ -33,26 +33,26 @@ "description": "Specifies if the style will be in the ts file.", "type": "boolean", "default": false, - "alias": "is" + "alias": "s" }, "inlineTemplate": { "description": "Specifies if the template will be in the ts file.", "type": "boolean", "default": false, - "alias": "it" + "alias": "t" }, "viewEncapsulation": { "description": "Specifies the view encapsulation strategy.", "enum": ["Emulated", "Native", "None"], "type": "string", - "alias": "ve" + "alias": "v" }, "changeDetection": { "description": "Specifies the change detection strategy.", "enum": ["Default", "OnPush"], "type": "string", "default": "Default", - "alias": "cd" + "alias": "c" }, "prefix": { "type": "string", diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index fa8f3528a8..e579eaefa9 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -81,7 +81,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd" + "alias": "D" } }, "required": [ From 1e3adde965aacf115a322264d50b2ef27ac656be Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 8 Mar 2018 09:33:27 -0800 Subject: [PATCH 161/724] fix(@angular-devkit/schematics): fix order of commit for sinks Right now rename(a => b) then create(a) should work, but results in an error that the file already exist. --- packages/angular_devkit/schematics/src/sink/dryrun.ts | 6 +++--- packages/angular_devkit/schematics/src/sink/host.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/schematics/src/sink/dryrun.ts b/packages/angular_devkit/schematics/src/sink/dryrun.ts index 48511cd078..93df7b9e82 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun.ts @@ -105,6 +105,9 @@ export class DryRunSink extends HostSink { this._subject.next({ kind: 'delete', path }); }); + this._filesToRename.forEach(([path, to]) => { + this._subject.next({ kind: 'rename', path, to }); + }); this._filesToCreate.forEach((content, path) => { // Check if this is a renaming. for (const [_, to] of this._filesToRename) { @@ -123,9 +126,6 @@ export class DryRunSink extends HostSink { this._filesToUpdate.forEach((content, path) => { this._subject.next({ kind: 'update', path, content: content.generate() }); }); - this._filesToRename.forEach(([path, to]) => { - this._subject.next({ kind: 'rename', path, to }); - }); this._subject.complete(); diff --git a/packages/angular_devkit/schematics/src/sink/host.ts b/packages/angular_devkit/schematics/src/sink/host.ts index 4345194c1f..40a435ebb6 100644 --- a/packages/angular_devkit/schematics/src/sink/host.ts +++ b/packages/angular_devkit/schematics/src/sink/host.ts @@ -70,12 +70,12 @@ export class HostSink extends SimpleSinkBase { return concatObservables( observableFrom([...this._filesToDelete.values()]).pipe( concatMap(path => this._host.delete(path))), + observableFrom([...this._filesToRename.entries()]).pipe( + concatMap(([_, [path, to]]) => this._host.rename(path, to))), observableFrom([...this._filesToCreate.entries()]).pipe( concatMap(([path, buffer]) => { return this._host.write(path, buffer.generate() as {} as virtualFs.FileBuffer); })), - observableFrom([...this._filesToRename.entries()]).pipe( - concatMap(([_, [path, to]]) => this._host.rename(path, to))), observableFrom([...this._filesToUpdate.entries()]).pipe( concatMap(([path, buffer]) => { return this._host.write(path, buffer.generate() as {} as virtualFs.FileBuffer); From 71c329072583a2b6a7a27e8046b78bde5c1b8018 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 8 Mar 2018 09:50:01 -0800 Subject: [PATCH 162/724] feat(@angular-devkit/schematics): export callRule and callSource Sometimes you need to be able to call a rule directly, unfortunately. --- packages/angular_devkit/schematics/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index 7f057be253..370f76bff3 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -26,6 +26,7 @@ export { export * from './exception/exception'; export * from './tree/interface'; export * from './rules/base'; +export * from './rules/call'; export * from './rules/move'; export * from './rules/random'; export * from './rules/schematic'; From 8bf639b7e5ddc09c1c42fcc46340f8ec9a3748ce Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 4 Mar 2018 13:15:26 -0800 Subject: [PATCH 163/724] fix(@angular-devkit/core): memory host should always refer to path from root --- .../core/src/virtual-fs/host/memory.ts | 20 +++++++++++++++++-- .../core/src/virtual-fs/host/memory_spec.ts | 17 ++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index b39fd4d045..b6da90dfd0 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -22,7 +22,9 @@ import { Path, PathFragment, dirname, + isAbsolute, join, + normalize, split, } from '../path'; import { @@ -40,6 +42,10 @@ export class SimpleMemoryHost implements Host<{}> { private _cache = new Map(); private _watchers = new Map][]>(); + protected _toAbsolute(path: Path) { + return isAbsolute(path) ? path : normalize('/' + path); + } + protected _isDir(path: Path) { if (path === '/') { return true; @@ -104,6 +110,7 @@ export class SimpleMemoryHost implements Host<{}> { } write(path: Path, content: FileBuffer): Observable { + path = this._toAbsolute(path); if (this._isDir(path)) { return _throw(new PathIsDirectoryException(path)); } @@ -115,6 +122,7 @@ export class SimpleMemoryHost implements Host<{}> { return empty(); } read(path: Path): Observable { + path = this._toAbsolute(path); if (this._isDir(path)) { return _throw(new PathIsDirectoryException(path)); } @@ -126,6 +134,7 @@ export class SimpleMemoryHost implements Host<{}> { } } delete(path: Path): Observable { + path = this._toAbsolute(path); if (this._isDir(path)) { for (const [cachePath, _] of this._cache.entries()) { if (path.startsWith(cachePath + NormalizedSep)) { @@ -140,6 +149,8 @@ export class SimpleMemoryHost implements Host<{}> { return empty(); } rename(from: Path, to: Path): Observable { + from = this._toAbsolute(from); + to = this._toAbsolute(to); if (!this._cache.has(from)) { return _throw(new FileDoesNotExistException(from)); } else if (this._cache.has(to)) { @@ -168,6 +179,7 @@ export class SimpleMemoryHost implements Host<{}> { } list(path: Path): Observable { + path = this._toAbsolute(path); if (this._cache.has(path)) { return _throw(new PathIsFileException(path)); } @@ -191,13 +203,15 @@ export class SimpleMemoryHost implements Host<{}> { } exists(path: Path): Observable { + path = this._toAbsolute(path); + return observableOf(this._cache.has(path) || this._isDir(path)); } isDirectory(path: Path): Observable { - return observableOf(this._isDir(path)); + return observableOf(this._isDir(this._toAbsolute(path))); } isFile(path: Path): Observable { - return observableOf(this._cache.has(path)); + return observableOf(this._cache.has(this._toAbsolute(path))); } stats(_path: Path): Observable> | null { @@ -205,6 +219,8 @@ export class SimpleMemoryHost implements Host<{}> { } watch(path: Path, options?: HostWatchOptions): Observable | null { + path = this._toAbsolute(path); + const subject = new Subject(); let maybeWatcherArray = this._watchers.get(path); if (!maybeWatcherArray) { diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts index be1c2c936b..eebd3cf899 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts @@ -113,4 +113,21 @@ describe('SimpleMemoryHost', () => { expect(host.isDirectory(normalize('/sub/file1'))).toBe(false); expect(host.isDirectory(normalize('/sub/sub1/file3'))).toBe(false); }); + + it('makes every path absolute', () => { + const host = new SyncDelegateHost(new SimpleMemoryHost()); + + const buffer = stringToFileBuffer('hello'); + const buffer2 = stringToFileBuffer('hello 2'); + + host.write(normalize('file1'), buffer); + host.write(normalize('/sub/file2'), buffer); + host.write(normalize('sub/file2'), buffer2); + expect(host.isFile(normalize('file1'))).toBe(true); + expect(host.isFile(normalize('/file1'))).toBe(true); + expect(host.isFile(normalize('/sub/file2'))).toBe(true); + expect(host.read(normalize('sub/file2'))).toBe(buffer2); + expect(host.isDirectory(normalize('/sub'))).toBe(true); + expect(host.isDirectory(normalize('sub'))).toBe(true); + }); }); From 3ff44bda24e34e706ebf2270fd0b22ce3fa9d867 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 7 Mar 2018 14:09:25 -0800 Subject: [PATCH 164/724] ci: increase timeouts for flaky tests And show a better spec log. --- .circleci/config.yml | 2 +- .../build_webpack/test/browser/rebuild_spec_large.ts | 6 +++--- .../build_webpack/test/karma/code-coverage_spec_large.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50d42747b3..6dbc71feef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: steps: - checkout: *post_checkout - restore_cache: *_root_package_lock_key - - run: npm run test-large -- --code-coverage --full + - run: npm run test-large -- --code-coverage --full --spec-reporter integration: <<: *defaults diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index 5fa60281a8..eacd0d932f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -122,7 +122,7 @@ describe('Browser Builder', () => { }), take(3), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 60000); it('rebuilds on CSS changes', (done) => { const overrides = { watch: true }; @@ -134,7 +134,7 @@ describe('Browser Builder', () => { tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), take(2), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 60000); it('type checks on rebuilds', (done) => { host.writeMultipleFiles({ @@ -194,7 +194,7 @@ describe('Browser Builder', () => { }), take(4), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 120000); it('rebuilds on type changes', (done) => { host.writeMultipleFiles({ 'src/type.ts': `export type MyType = number;` }); diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts index f749aa20d7..dfee9aef0b 100644 --- a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts @@ -36,7 +36,7 @@ describe('Karma Builder code coverage', () => { expect(content).toContain('test.ts'); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 120000); it('supports exclude', (done) => { const overrides: Partial = { @@ -59,5 +59,5 @@ describe('Karma Builder code coverage', () => { expect(content).not.toContain('test.ts'); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 120000); }); From bc19053c86c06c9d03f3dfa5d26fe2f98bfaee9f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 7 Mar 2018 11:31:08 -0500 Subject: [PATCH 165/724] feat(@angular-devkit/build-webpack): update internal plugins for webpack 4 --- .../src/angular-cli-files/plugins/bundle-budget.ts | 4 +--- .../angular-cli-files/plugins/karma-webpack-failure-cb.ts | 2 +- .../plugins/suppress-entry-chunks-webpack-plugin.ts | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts index b3c1f74a4a..68d485e19e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts @@ -32,9 +32,8 @@ export class BundleBudgetPlugin { apply(compiler: any): void { const { budgets } = this.options; - compiler.plugin('after-emit', (compilation: any, cb: Function) => { + compiler.hooks.afterEmit.tap('BundleBudgetPlugin', (compilation: any) => { if (!budgets || budgets.length === 0) { - cb(); return; } @@ -59,7 +58,6 @@ export class BundleBudgetPlugin { }); }); - cb(); }); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts index cefda6491a..61050f7e90 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts @@ -8,7 +8,7 @@ export class KarmaWebpackFailureCb { constructor(private callback: () => void) { } apply(compiler: any): void { - compiler.plugin('done', (stats: any) => { + compiler.hooks.done.tap('KarmaWebpackFailureCb', (stats: any) => { if (stats.compilation.errors.length > 0) { this.callback(); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts index 273386f019..378443b2a2 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts @@ -8,7 +8,7 @@ export class SuppressExtractedTextChunksWebpackPlugin { constructor() { } apply(compiler: any): void { - compiler.plugin('compilation', function (compilation: any) { + compiler.hooks.compilation.tap('SuppressExtractedTextChunks', (compilation: any) => { // find which chunks have css only entry points const cssOnlyChunks: string[] = []; const entryPoints = compilation.options.entry; @@ -23,7 +23,7 @@ export class SuppressExtractedTextChunksWebpackPlugin { } } // Remove the js file for supressed chunks - compilation.plugin('after-seal', (callback: any) => { + compilation.hooks.afterSeal.tap('SuppressExtractedTextChunks', () => { compilation.chunks .filter((chunk: any) => cssOnlyChunks.indexOf(chunk.name) !== -1) .forEach((chunk: any) => { @@ -38,7 +38,6 @@ export class SuppressExtractedTextChunksWebpackPlugin { }); chunk.files = newFiles; }); - callback(); }); // Remove scripts tags with a css file as source, because HtmlWebpackPlugin will use // a css file as a script for chunks without js files. From 0387c5ce05f2d384f26708849378ccd0ecb3e03a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 6 Mar 2018 14:54:02 -0500 Subject: [PATCH 166/724] refactor(@angular-devkit/build-webpack): use mini-css-extract-plugin --- package-lock.json | 57 +++++-------------- package.json | 4 +- .../angular_devkit/build_webpack/package.json | 4 +- .../models/webpack-configs/styles.ts | 19 +++---- .../plugins/cleancss-webpack-plugin.ts | 2 +- .../plugins/raw-css-loader.ts | 14 +++++ .../src/angular-cli-files/plugins/webpack.ts | 2 + 7 files changed, 43 insertions(+), 59 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/raw-css-loader.ts diff --git a/package-lock.json b/package-lock.json index 7e1ec493ac..f7142f30b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1560,9 +1560,9 @@ } }, "clean-css": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.9.tgz", - "integrity": "sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE=", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "requires": { "source-map": "0.5.7" } @@ -3121,46 +3121,6 @@ "is-extglob": "1.0.0" } }, - "extract-text-webpack-plugin": { - "version": "4.0.0-beta.0", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-4.0.0-beta.0.tgz", - "integrity": "sha512-Hypkn9jUTnFr0DpekNam53X47tXn3ucY08BQumv7kdGgeVUBLq3DJHJTi6HNxv4jl9W+Skxjz9+RnK0sJyqqjA==", - "requires": { - "async": "2.6.0", - "loader-utils": "1.1.0", - "schema-utils": "0.4.5", - "webpack-sources": "1.1.0" - }, - "dependencies": { - "ajv": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", - "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.4" - } - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.2.1", - "ajv-keywords": "3.1.0" - } - } - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -4688,7 +4648,7 @@ "integrity": "sha512-EZqO91XJwkj8BeLx9C12sKB/AHoTANaZax39vEOP9f/X/9jgJ3r1O2+neabuHqpz5kJO71TapP9JrtCY39su1A==", "requires": { "camel-case": "3.0.0", - "clean-css": "4.1.9", + "clean-css": "4.1.11", "commander": "2.14.1", "he": "1.1.1", "ncname": "1.0.0", @@ -6631,6 +6591,15 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, + "mini-css-extract-plugin": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.1.0.tgz", + "integrity": "sha512-MRokS8rze/gAUQTU7f3jdRhVAFgYXhKb3Ziw/RnKC+jPxJBxqfn4QNt0GLq6yw+vOrsAG2c/jXxUZK1IG/z8Og==", + "requires": { + "loader-utils": "1.1.0", + "webpack-sources": "1.1.0" + } + }, "minimalistic-assert": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", diff --git a/package.json b/package.json index f377265f9a..34ea8485ff 100644 --- a/package.json +++ b/package.json @@ -85,13 +85,12 @@ "chalk": "~2.2.2", "chokidar": "^1.7.0", "circular-dependency-plugin": "^4.4.0", - "clean-css": "^4.1.9", + "clean-css": "^4.1.11", "codelyzer": "^4.0.2", "common-tags": "^1.5.1", "conventional-changelog": "^1.1.0", "copy-webpack-plugin": "^4.5.0", "express": "^4.16.2", - "extract-text-webpack-plugin": "~4.0.0-beta.0", "file-loader": "^1.1.11", "font-awesome": "^4.7.0", "glob": "^7.0.3", @@ -115,6 +114,7 @@ "lodash": "^4.17.4", "material-design-icons": "^3.0.1", "memory-fs": "^0.4.1", + "mini-css-extract-plugin": "~0.2.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", "node-sass": "^4.7.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index a04855c7ca..e10f4513c4 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -15,10 +15,9 @@ "cache-loader": "^1.2.2", "chalk": "~2.2.2", "circular-dependency-plugin": "^4.4.0", - "clean-css": "^4.1.9", + "clean-css": "^4.1.11", "common-tags": "^1.5.1", "copy-webpack-plugin": "^4.5.0", - "extract-text-webpack-plugin": "~4.0.0-beta.0", "file-loader": "^1.1.11", "glob": "^7.0.3", "html-webpack-plugin": "^3.0.6", @@ -28,6 +27,7 @@ "license-webpack-plugin": "^1.2.3", "lodash": "^4.17.4", "memory-fs": "^0.4.1", + "mini-css-extract-plugin": "~0.2.0", "minimatch": "^3.0.4", "node-sass": "^4.7.2", "parse5": "^4.0.0", diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts index e76e61f8a7..081cbffc78 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts @@ -7,10 +7,11 @@ import { SuppressExtractedTextChunksWebpackPlugin } from '../../plugins/webpack' import { extraEntryParser, getOutputHashFormat } from './utils'; import { WebpackConfigOptions } from '../build-options'; import { findUp } from '../../utilities/find-up'; +import { RawCssLoader } from '../../plugins/webpack'; const postcssUrl = require('postcss-url'); const autoprefixer = require('autoprefixer'); -const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const postcssImports = require('postcss-import'); const PostcssCliResources = require('../../plugins/webpack').PostcssCliResources; @@ -210,14 +211,10 @@ export function getStylesConfig(wco: WebpackConfigOptions) { } ]; - const commonLoaders: webpack.Loader[] = [ - { loader: 'raw-loader' }, - ]; - // load component css as raw strings const rules: webpack.Rule[] = baseRules.map(({ test, use }) => ({ exclude: globalStylePaths, test, use: [ - ...commonLoaders, + { loader: 'raw-loader' }, { loader: 'postcss-loader', options: { @@ -235,7 +232,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { rules.push(...baseRules.map(({ test, use }) => { const extractTextPlugin = { use: [ - ...commonLoaders, + { loader: RawCssLoader }, { loader: 'postcss-loader', options: { @@ -252,8 +249,10 @@ export function getStylesConfig(wco: WebpackConfigOptions) { const ret: any = { include: globalStylePaths, test, - use: buildOptions.extractCss ? ExtractTextPlugin.extract(extractTextPlugin) - : ['style-loader', ...extractTextPlugin.use] + use: [ + buildOptions.extractCss ? MiniCssExtractPlugin.loader : 'style-loader', + ...extractTextPlugin.use, + ] }; // Save the original options as arguments for eject. // if (buildOptions.extractCss) { @@ -266,7 +265,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { if (buildOptions.extractCss) { // extract global css from js files into own css file extraPlugins.push( - new ExtractTextPlugin({ filename: `[name]${hashFormat.extract}.css` })); + new MiniCssExtractPlugin({ filename: `[name]${hashFormat.script}.css` })); // suppress empty .js files in css only entry points extraPlugins.push(new SuppressExtractedTextChunksWebpackPlugin()); } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts index 9574fab5dc..ca1796810d 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts @@ -87,7 +87,7 @@ export class CleanCssWebpackPlugin { let content: string; let map: any; - if (asset.sourceAndMap) { + if (this._options.sourceMap && asset.sourceAndMap) { const sourceAndMap = asset.sourceAndMap(); content = sourceAndMap.source; map = sourceAndMap.map; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/raw-css-loader.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/raw-css-loader.ts new file mode 100644 index 0000000000..6b150b0b7f --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/raw-css-loader.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export default function(content: string, map: object) { + const stringifiedContent = JSON.stringify(content); + const stringifiedMap = map && JSON.stringify(map); + + return `module.exports = [[module.id, ${stringifiedContent}, '', ${stringifiedMap}]]`; +} diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts index dcf2293430..a32209e0dd 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts @@ -12,3 +12,5 @@ export { PostcssCliResourcesOptions, } from './postcss-cli-resources'; +import { join } from 'path'; +export const RawCssLoader = require.resolve(join(__dirname, 'raw-css-loader')); From 95da2945775f1e96684fcc9d960fbd8b3a5ff93a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 8 Mar 2018 12:11:27 -0800 Subject: [PATCH 167/724] release: patch Times two because the last one did not include all the commits from master. --- .monorepo.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index afd206ce53..1f32e09ed1 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,8 +42,8 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.3", - "hash": "b1f9f2d8e1eca2a865d39263f0ca5a38" + "version": "0.4.5", + "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "@angular-devkit/architect": { "name": "Architect", @@ -53,14 +53,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.4", - "hash": "57e25727cb63a879effb10fd30599987", + "version": "0.0.6", + "hash": "89ccbb57e8b20da7b20beb870b51702a", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.4", - "hash": "c270aceb888087c61c0647771045fd47", + "version": "0.0.6", + "hash": "00dc4bc12e8da05374137a2aa6af21b6", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -71,8 +71,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.3", - "hash": "55d5c82b05ef9b515e143356a75b895e", + "version": "0.4.5", + "hash": "16619356762199de42e1641d35e5ec7d", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-webpack": { @@ -83,8 +83,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" } ], - "version": "0.0.4", - "hash": "8165f0fc4dce547561e62e4e7605ea6e", + "version": "0.0.6", + "hash": "bb8269555ca239a0bf127bc5568e573a", "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, "@angular-devkit/core": { @@ -95,8 +95,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.3", - "hash": "3dc30c470d7cc9f3c7f226b4259eec28", + "version": "0.4.5", + "hash": "4e94700fca2f542b9f0a633d1dc5bf43", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -107,32 +107,32 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.3", - "hash": "9ac6f3bb734fa1e1751a005fb3c3124a", + "version": "0.4.5", + "hash": "bfd989d6d703396c77c26ed6772ab2ed", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.3", - "hash": "9df0b747019a04f8e01caddd642e7b52", + "version": "0.4.5", + "hash": "0d1449e5e077acc19cec65221b9c158a", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.3", - "hash": "f2f1253db8e7a01eb0e5a945dd08979c", + "version": "0.4.5", + "hash": "1558125147bbf122200e31c20ffaa9be", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.3", + "version": "0.4.5", "section": "Schematics", "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.3", + "version": "0.4.5", "section": "Schematics", "hash": "1abc8090ac37083ca02f92ab794c6d7f", "snapshotRepo": "angular/schematics-package-update-builds" From 51e946ded3fff65780413ba1043a282aeca7d1d3 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 8 Mar 2018 13:58:14 -0500 Subject: [PATCH 168/724] fix(@angular-devkit/schematics): Allow test runner to run private schematics. --- .../schematics/testing/schematic-test-runner.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index b4d14174bf..e6b257d857 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -72,7 +72,7 @@ export class SchematicTestRunner { opts?: SchematicSchemaT, tree?: Tree, ): Observable { - const schematic = this._collection.createSchematic(schematicName); + const schematic = this._collection.createSchematic(schematicName, true); const host = observableOf(tree || new VirtualTree); return schematic.call(opts || {}, host, { logger: this._logger }) @@ -84,7 +84,7 @@ export class SchematicTestRunner { opts?: SchematicSchemaT, tree?: Tree, ): UnitTestTree { - const schematic = this._collection.createSchematic(schematicName); + const schematic = this._collection.createSchematic(schematicName, true); let result: UnitTestTree | null = null; const host = observableOf(tree || new VirtualTree); @@ -106,7 +106,7 @@ export class SchematicTestRunner { tree?: Tree, ): Observable { const externalCollection = this._engine.createCollection(collectionName); - const schematic = externalCollection.createSchematic(schematicName); + const schematic = externalCollection.createSchematic(schematicName, true); const host = observableOf(tree || new VirtualTree); return schematic.call(opts || {}, host, { logger: this._logger }) @@ -120,7 +120,7 @@ export class SchematicTestRunner { tree?: Tree, ): UnitTestTree { const externalCollection = this._engine.createCollection(collectionName); - const schematic = externalCollection.createSchematic(schematicName); + const schematic = externalCollection.createSchematic(schematicName, true); let result: UnitTestTree | null = null; const host = observableOf(tree || new VirtualTree); From 891f4706c89967b9bbe14da57c02e49f35f13799 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 9 Mar 2018 17:00:23 +0000 Subject: [PATCH 169/724] feat(@angular-devkit/architect): expose builder schema --- .../angular_devkit/architect/src/architect.ts | 148 +++++++++++++----- .../angular_devkit/architect/src/builder.ts | 15 +- 2 files changed, 118 insertions(+), 45 deletions(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index f97ee1dd78..c622841b98 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -23,16 +23,18 @@ import { } from '@angular-devkit/core'; import { resolve as nodeResolve } from '@angular-devkit/core/node'; import { Observable } from 'rxjs/Observable'; +import { forkJoin } from 'rxjs/observable/forkJoin'; import { of } from 'rxjs/observable/of'; import { _throw } from 'rxjs/observable/throw'; -import { concatMap } from 'rxjs/operators'; +import { concatMap, map } from 'rxjs/operators'; import { BuildEvent, Builder, BuilderConstructor, BuilderContext, BuilderDescription, - BuilderMap, + BuilderPaths, + BuilderPathsMap, } from './builder'; import { Workspace } from './workspace'; @@ -74,6 +76,12 @@ export class WorkspaceNotYetLoadedException extends BaseException { constructor() { super(`Workspace needs to be loaded before Architect is used.`); } } +export class BuilderNotFoundException extends BaseException { + constructor(builder: string) { + super(`Builder ${builder} could not be found.`); + } +} + export interface Target { root: Path; projectType: string; @@ -87,26 +95,29 @@ export interface TargetOptions { configuration?: string; overrides?: Partial; } - export class Architect { - private readonly _workspaceSchema = join(normalize(__dirname), 'workspace-schema.json'); - private readonly _buildersSchema = join(normalize(__dirname), 'builders-schema.json'); + private readonly _workspaceSchemaPath = join(normalize(__dirname), 'workspace-schema.json'); + private readonly _buildersSchemaPath = join(normalize(__dirname), 'builders-schema.json'); + private _workspaceSchema: JsonObject; + private _buildersSchema: JsonObject; + private _architectSchemasLoaded = false; + private _builderPathsMap = new Map(); + private _builderDescriptionMap = new Map(); + private _builderConstructorMap = new Map>(); private _workspace: Workspace; constructor(private _root: Path, private _host: virtualFs.Host<{}>) { } loadWorkspaceFromHost(workspacePath: Path) { - return this._host.read(join(this._root, workspacePath)).pipe( - concatMap((buffer) => { - const json = JSON.parse(virtualFs.fileBufferToString(buffer)); - - return this.loadWorkspaceFromJson(json); - }), + return this._loadArchitectSchemas().pipe( + concatMap(() => this._loadJsonFile(join(this._root, workspacePath))), + concatMap(json => this.loadWorkspaceFromJson(json as {} as Workspace)), ); } loadWorkspaceFromJson(json: Workspace) { - return this._validateAgainstSchema(json, this._workspaceSchema).pipe( + return this._loadArchitectSchemas().pipe( + concatMap(() => this._validateAgainstSchema(json, this._workspaceSchema)), concatMap((validatedWorkspace: Workspace) => { this._workspace = validatedWorkspace; @@ -115,6 +126,24 @@ export class Architect { ); } + private _loadArchitectSchemas() { + if (this._architectSchemasLoaded) { + return of(null); + } else { + return forkJoin( + this._loadJsonFile(this._workspaceSchemaPath), + this._loadJsonFile(this._buildersSchemaPath), + ).pipe( + concatMap(([workspaceSchema, buildersSchema]) => { + this._workspaceSchema = workspaceSchema; + this._buildersSchema = buildersSchema; + + return of(null); + }), + ); + } + } + getTarget(options: TargetOptions = {}): Target { let { project, target: targetName } = options; const { configuration, overrides } = options; @@ -187,23 +216,27 @@ export class Architect { return this.validateBuilderOptions(target, builderDescription); }), - concatMap(() => of(this.getBuilder(builderDescription, context))), + map(() => this.getBuilder(builderDescription, context)), concatMap(builder => builder.run(target)), ); } getBuilderDescription(target: Target): Observable { + // Check cache for this builder description. + if (this._builderDescriptionMap.has(target.builder)) { + return of(this._builderDescriptionMap.get(target.builder) as BuilderDescription); + } + return new Observable((obs) => { // TODO: this probably needs to be more like NodeModulesEngineHost. const basedir = getSystemPath(this._root); const [pkg, builderName] = target.builder.split(':'); const pkgJsonPath = nodeResolve(pkg, { basedir, resolvePackageJson: true }); let buildersJsonPath: Path; + let builderPaths: BuilderPaths; // Read the `builders` entry of package.json. - return this._host.read(normalize(pkgJsonPath)).pipe( - concatMap(buffer => - of(parseJson(virtualFs.fileBufferToString(buffer), JsonParseMode.Loose))), + return this._loadJsonFile(normalize(pkgJsonPath)).pipe( concatMap((pkgJson: JsonObject) => { const pkgJsonBuildersentry = pkgJson['builders'] as string; if (!pkgJsonBuildersentry) { @@ -212,28 +245,40 @@ export class Architect { buildersJsonPath = join(dirname(normalize(pkgJsonPath)), pkgJsonBuildersentry); - return this._host.read(buildersJsonPath); + return this._loadJsonFile(buildersJsonPath); }), - concatMap((buffer) => of(JSON.parse(virtualFs.fileBufferToString(buffer)))), // Validate builders json. - concatMap((builderMap) => - this._validateAgainstSchema(builderMap, this._buildersSchema)), - + concatMap((builderPathsMap) => + this._validateAgainstSchema(builderPathsMap, this._buildersSchema)), + concatMap((builderPathsMap) => { + builderPaths = builderPathsMap.builders[builderName]; - concatMap((builderMap) => { - const builderDescription = builderMap.builders[builderName]; - - if (!builderDescription) { + if (!builderPaths) { throw new BuilderCannotBeResolvedException(target.builder); } - // Resolve paths in the builder description. + // Resolve paths in the builder paths. const builderJsonDir = dirname(buildersJsonPath); - builderDescription.schema = join(builderJsonDir, builderDescription.schema); - builderDescription.class = join(builderJsonDir, builderDescription.class); + builderPaths.schema = join(builderJsonDir, builderPaths.schema); + builderPaths.class = join(builderJsonDir, builderPaths.class); + + // Save the builder paths so that we can lazily load the builder. + this._builderPathsMap.set(target.builder, builderPaths); - // Validate options again builder schema. - return of(builderDescription); + // Load the schema. + return this._loadJsonFile(builderPaths.schema); + }), + map(builderSchema => { + const builderDescription = { + name: target.builder, + schema: builderSchema, + description: builderPaths.description, + }; + + // Save to cache before returning. + this._builderDescriptionMap.set(builderDescription.name, builderDescription); + + return builderDescription; }), ).subscribe(obs); }); @@ -242,28 +287,44 @@ export class Architect { validateBuilderOptions( target: Target, builderDescription: BuilderDescription, ): Observable { - return this._validateAgainstSchema(target.options, - normalize(builderDescription.schema)); + return this._validateAgainstSchema(target.options, builderDescription.schema); } getBuilder( builderDescription: BuilderDescription, context: BuilderContext, ): Builder { - // TODO: support more than the default export, maybe via builder#import-name. - const builderModule = require(getSystemPath(builderDescription.class)); - const builderClass = builderModule['default'] as BuilderConstructor; + const name = builderDescription.name; + let builderConstructor: BuilderConstructor; + + // Check cache for this builder. + if (this._builderConstructorMap.has(name)) { + builderConstructor = this._builderConstructorMap.get(name) as BuilderConstructor; + } else { + if (!this._builderPathsMap.has(name)) { + throw new BuilderNotFoundException(name); + } + + const builderPaths = this._builderPathsMap.get(name) as BuilderPaths; - return new builderClass(context); + // TODO: support more than the default export, maybe via builder#import-name. + const builderModule = require(getSystemPath(builderPaths.class)); + builderConstructor = builderModule['default'] as BuilderConstructor; + + // Save builder to cache before returning. + this._builderConstructorMap.set(builderDescription.name, builderConstructor); + } + + const builder = new builderConstructor(context); + + return builder; } // Warning: this method changes contentJson in place. // TODO: add transforms to resolve paths. - private _validateAgainstSchema(contentJson: {}, schemaPath: Path): Observable { + private _validateAgainstSchema(contentJson: {}, schemaJson: JsonObject): Observable { const registry = new schema.CoreSchemaRegistry(); - return this._host.read(schemaPath).pipe( - concatMap((buffer) => of(JSON.parse(virtualFs.fileBufferToString(buffer)))), - concatMap((schemaContent) => registry.compile(schemaContent)), + return registry.compile(schemaJson).pipe( concatMap(validator => validator(contentJson)), concatMap(validatorResult => { if (validatorResult.success) { @@ -274,4 +335,11 @@ export class Architect { }), ); } + + private _loadJsonFile(path: Path): Observable { + return this._host.read(normalize(path)).pipe( + map(buffer => virtualFs.fileBufferToString(buffer)), + map(str => parseJson(str, JsonParseMode.Loose) as {} as JsonObject), + ); + } } diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts index 916e92817b..292b22428a 100644 --- a/packages/angular_devkit/architect/src/builder.ts +++ b/packages/angular_devkit/architect/src/builder.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { Path, logging, virtualFs } from '@angular-devkit/core'; +import { JsonObject, Path, logging, virtualFs } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { Architect, Target } from './architect'; @@ -20,7 +20,6 @@ export interface BuilderContext { // TODO: use Build Event Protocol // https://docs.bazel.build/versions/master/build-event-protocol.html // https://github.com/googleapis/googleapis/tree/master/google/devtools/build/v1 -// http://dcode.io/protobuf.js/Message.html#toJSON export interface BuildEvent { success: boolean; } @@ -29,16 +28,22 @@ export interface Builder { run(_target: Target>): Observable; } -export interface BuilderMap { - builders: { [k: string]: BuilderDescription }; +export interface BuilderPathsMap { + builders: { [k: string]: BuilderPaths }; } -export interface BuilderDescription { +export interface BuilderPaths { class: Path; schema: Path; description: string; } +export interface BuilderDescription { + name: string; + schema: JsonObject; + description: string; +} + export interface BuilderConstructor { new(context: BuilderContext): Builder; } From 4724c862b0fc8b46229492e8b148d68e67376045 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 6 Dec 2017 19:01:13 -0800 Subject: [PATCH 170/724] feat(@schematics/schematics): add declaration files by default and npmignore --- .../schematics/schematics/blank/project-files/__dot__npmignore | 3 +++ .../schematics/schematics/blank/project-files/tsconfig.json | 1 + 2 files changed, 4 insertions(+) create mode 100644 packages/schematics/schematics/blank/project-files/__dot__npmignore diff --git a/packages/schematics/schematics/blank/project-files/__dot__npmignore b/packages/schematics/schematics/blank/project-files/__dot__npmignore new file mode 100644 index 0000000000..c55ccfc3f5 --- /dev/null +++ b/packages/schematics/schematics/blank/project-files/__dot__npmignore @@ -0,0 +1,3 @@ +# Ignores TypeScript files, but keeps definitions. +*.ts +!*.d.ts diff --git a/packages/schematics/schematics/blank/project-files/tsconfig.json b/packages/schematics/schematics/blank/project-files/tsconfig.json index e93f82906a..0b296985db 100644 --- a/packages/schematics/schematics/blank/project-files/tsconfig.json +++ b/packages/schematics/schematics/blank/project-files/tsconfig.json @@ -5,6 +5,7 @@ "es2017", "dom" ], + "declaration": true, "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, From 8e2cdc333ab9899178ce1a1266d718f5a137dc1d Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 2 Mar 2018 14:56:15 -0800 Subject: [PATCH 171/724] fix(@angular-devkit/schematics): change task name and export from tasks --- packages/angular_devkit/schematics/tasks/index.ts | 1 + .../schematics/tasks/run-schematic/{init-task.ts => task.ts} | 0 2 files changed, 1 insertion(+) rename packages/angular_devkit/schematics/tasks/run-schematic/{init-task.ts => task.ts} (100%) diff --git a/packages/angular_devkit/schematics/tasks/index.ts b/packages/angular_devkit/schematics/tasks/index.ts index a4bf01809e..fed9aa8237 100644 --- a/packages/angular_devkit/schematics/tasks/index.ts +++ b/packages/angular_devkit/schematics/tasks/index.ts @@ -8,3 +8,4 @@ export { NodePackageInstallTask } from './node-package/install-task'; export { NodePackageLinkTask } from './node-package/link-task'; export { RepositoryInitializerTask } from './repo-init/init-task'; +export { RunSchematicTask } from './run-schematic/init-task'; diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/init-task.ts b/packages/angular_devkit/schematics/tasks/run-schematic/task.ts similarity index 100% rename from packages/angular_devkit/schematics/tasks/run-schematic/init-task.ts rename to packages/angular_devkit/schematics/tasks/run-schematic/task.ts From 4e2a902fe078f3fb6903fce7b37f229797d5e1c9 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 12 Mar 2018 17:17:21 -0700 Subject: [PATCH 172/724] refactor(@angular-devkit/schematics): should always emit once --- packages/angular_devkit/schematics/src/sink/dryrun.ts | 4 ++-- packages/angular_devkit/schematics/src/sink/sink.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/schematics/src/sink/dryrun.ts b/packages/angular_devkit/schematics/src/sink/dryrun.ts index 93df7b9e82..d969040222 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun.ts @@ -9,7 +9,7 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; -import { empty } from 'rxjs/observable/empty'; +import { of } from 'rxjs/observable/of'; import { HostSink } from './host'; @@ -129,6 +129,6 @@ export class DryRunSink extends HostSink { this._subject.complete(); - return empty(); + return of(undefined); } } diff --git a/packages/angular_devkit/schematics/src/sink/sink.ts b/packages/angular_devkit/schematics/src/sink/sink.ts index beb4bf1412..1329603b8d 100644 --- a/packages/angular_devkit/schematics/src/sink/sink.ts +++ b/packages/angular_devkit/schematics/src/sink/sink.ts @@ -16,6 +16,7 @@ import { ignoreElements, map, mergeMap, + reduce, } from 'rxjs/operators'; import { FileAlreadyExistException, FileDoesNotExistException } from '../exception/exception'; import { @@ -140,6 +141,8 @@ export abstract class SimpleSinkBase implements Sink { }), concatMap((action: Action) => this.postCommitAction(action) || empty()), concat(deferObservable(() => this._done())), - concat(deferObservable(() => this.postCommit() || empty()))); + concat(deferObservable(() => this.postCommit() || empty())), + reduce(() => {}), + ); } } From 8749f3e82a668987406e1f662e2a18a76aaf002d Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 12 Mar 2018 17:23:44 -0700 Subject: [PATCH 173/724] fix(@angular-devkit/schematics): export schematic task And fix the option passing. --- packages/angular_devkit/schematics/tasks/index.ts | 2 +- .../angular_devkit/schematics/tasks/run-schematic/executor.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/tasks/index.ts b/packages/angular_devkit/schematics/tasks/index.ts index fed9aa8237..64ec0b30cd 100644 --- a/packages/angular_devkit/schematics/tasks/index.ts +++ b/packages/angular_devkit/schematics/tasks/index.ts @@ -8,4 +8,4 @@ export { NodePackageInstallTask } from './node-package/install-task'; export { NodePackageLinkTask } from './node-package/link-task'; export { RepositoryInitializerTask } from './repo-init/init-task'; -export { RunSchematicTask } from './run-schematic/init-task'; +export { RunSchematicTask } from './run-schematic/task'; diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts b/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts index 7f530f3f40..2e794fc9d8 100644 --- a/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts +++ b/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts @@ -20,7 +20,7 @@ export default function(): TaskExecutor { return maybeWorkflow.execute({ collection: options.collection, schematic: options.name, - options: options as object, + options: options.options, }); }; } From 5b06cc7dd1f3a07e7c6f075383e91d0f1d3f8786 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 12 Mar 2018 17:25:29 -0700 Subject: [PATCH 174/724] feat(@angular-devkit/schematics): allow transform of context And use it to record tasks in Schematic Task Runner. Also refactor Node Workflow to allow dry run accross multiple runs (by keeping a Subject alive longer than each execution). --- .../schematics/src/engine/engine.ts | 7 ++- .../schematics/src/engine/interface.ts | 3 ++ .../testing/schematic-test-runner.ts | 7 +++ .../schematics/tools/fallback-engine-host.ts | 14 +++++- .../tools/file-system-engine-host-base.ts | 4 ++ .../tools/node-module-engine-host.ts | 43 ++++++++++++++---- .../tools/node-modules-test-engine-host.ts | 18 ++++++++ .../tools/workflow/node-workflow.ts | 45 ++++++++++--------- 8 files changed, 109 insertions(+), 32 deletions(-) diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index 0909118b02..1ecd83552d 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -134,7 +134,7 @@ export class SchematicEngine = { debug: parent && parent.debug || false, engine: this, logger: (parent && parent.logger && parent.logger.createChild(schematic.description.name)) @@ -145,6 +145,11 @@ export class SchematicEngine, options: OptionT, ): Observable; + transformContext( + context: TypedSchematicContext, + ): TypedSchematicContext | void; createTaskExecutor(name: string): Observable; hasTaskExecutor(name: string): boolean; diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index e6b257d857..457dfadf6e 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -16,6 +16,7 @@ import { Schematic, SchematicContext, SchematicEngine, + TaskConfiguration, Tree, VirtualTree, formats, @@ -61,11 +62,13 @@ export class SchematicTestRunner { this._engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RunSchematic); this._collection = this._engine.createCollection(this._collectionName); } get logger(): logging.Logger { return this._logger; } + get tasks(): TaskConfiguration[] { return [...this._engineHost.tasks]; } runSchematicAsync( schematicName: string, @@ -74,6 +77,7 @@ export class SchematicTestRunner { ): Observable { const schematic = this._collection.createSchematic(schematicName, true); const host = observableOf(tree || new VirtualTree); + this._engineHost.clearTasks(); return schematic.call(opts || {}, host, { logger: this._logger }) .pipe(map(tree => new UnitTestTree(tree))); @@ -88,6 +92,7 @@ export class SchematicTestRunner { let result: UnitTestTree | null = null; const host = observableOf(tree || new VirtualTree); + this._engineHost.clearTasks(); schematic.call(opts || {}, host, { logger: this._logger }) .subscribe(t => result = new UnitTestTree(t)); @@ -108,6 +113,7 @@ export class SchematicTestRunner { const externalCollection = this._engine.createCollection(collectionName); const schematic = externalCollection.createSchematic(schematicName, true); const host = observableOf(tree || new VirtualTree); + this._engineHost.clearTasks(); return schematic.call(opts || {}, host, { logger: this._logger }) .pipe(map(tree => new UnitTestTree(tree))); @@ -124,6 +130,7 @@ export class SchematicTestRunner { let result: UnitTestTree | null = null; const host = observableOf(tree || new VirtualTree); + this._engineHost.clearTasks(); schematic.call(opts || {}, host, { logger: this._logger }) .subscribe(t => result = new UnitTestTree(t)); diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index 89f3dd891a..735f469e76 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -31,6 +31,8 @@ export type FallbackCollectionDescription = { export type FallbackSchematicDescription = { description: SchematicDescription<{}, {}>; }; +export type FallbackContext = + TypedSchematicContext; export declare type OptionTransform = ( schematic: SchematicDescription, options: T, @@ -85,7 +87,7 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { createSourceFromUrl( url: Url, - context: TypedSchematicContext, + context: FallbackContext, ): Source | null { return context.schematic.collection.description.host.createSourceFromUrl(url, context); } @@ -99,6 +101,16 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { ) as {} as Observable; } + transformContext(context: FallbackContext): FallbackContext { + let result = context; + + this._hosts.forEach(host => { + result = (host.transformContext(result) || result) as FallbackContext; + }); + + return result; + } + /** * @deprecated Use `listSchematicNames`. */ diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index ce085e777c..46ccb14fe3 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -277,6 +277,10 @@ export abstract class FileSystemEngineHostBase implements )) as {} as Observable; } + transformContext(context: FileSystemSchematicContext): FileSystemSchematicContext { + return context; + } + getSchematicRuleFactory( schematic: FileSystemSchematicDesc, _collection: FileSystemCollectionDesc): RuleFactory { diff --git a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts index bc7e52fbec..e0dd10d578 100644 --- a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts @@ -42,6 +42,19 @@ export class NodeModulesEngineHost extends FileSystemEngineHostBase { if (name.startsWith('.') || name.startsWith('/')) { return resolvePath(basedir, name); } else { + // If it's a file inside a package, resolve the package then return the file... + if (name.split('/').length > (name[0] == '@' ? 2 : 1)) { + const rest = name.split('/'); + const packageName = rest.shift() + (name[0] == '@' ? '/' + rest.shift() : ''); + + return resolvePath(core.resolve(packageName, { + basedir, + checkLocal: true, + checkGlobal: true, + resolvePackageJson: true, + }), '..', ...rest); + } + return core.resolve(name, { basedir, checkLocal: true, @@ -51,19 +64,31 @@ export class NodeModulesEngineHost extends FileSystemEngineHostBase { } protected _resolveCollectionPath(name: string): string { - let packageJsonPath = this._resolvePackageJson(name, process.cwd()); - // If it's a file, use it as is. Otherwise append package.json to it. - if (!core.fs.isFile(packageJsonPath)) { - packageJsonPath = join(packageJsonPath, 'package.json'); + let collectionPath: string | undefined = undefined; + + if (name.split('/').length > (name[0] == '@' ? 2 : 1)) { + try { + collectionPath = this._resolvePath(name, process.cwd()); + } catch (_) { + } } - try { + if (!collectionPath) { + let packageJsonPath = this._resolvePackageJson(name, process.cwd()); + // If it's a file, use it as is. Otherwise append package.json to it. + if (!core.fs.isFile(packageJsonPath)) { + packageJsonPath = join(packageJsonPath, 'package.json'); + } + const pkgJsonSchematics = require(packageJsonPath)['schematics']; - if (pkgJsonSchematics) { - const resolvedPath = this._resolvePath(pkgJsonSchematics, dirname(packageJsonPath)); - readJsonFile(resolvedPath); + collectionPath = this._resolvePath(pkgJsonSchematics, dirname(packageJsonPath)); + } + + try { + if (collectionPath) { + readJsonFile(collectionPath); - return resolvedPath; + return collectionPath; } } catch (e) { } diff --git a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts index 003c0b5b75..698ca0cc7f 100644 --- a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts @@ -5,6 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { TaskConfiguration, TaskConfigurationGenerator, TaskId } from '../src/engine/task'; +import { FileSystemSchematicContext } from './description'; import { NodeModulesEngineHost } from './node-module-engine-host'; @@ -14,11 +16,27 @@ import { NodeModulesEngineHost } from './node-module-engine-host'; */ export class NodeModulesTestEngineHost extends NodeModulesEngineHost { private _collections = new Map(); + private _tasks = [] as TaskConfiguration[]; + + get tasks() { return this._tasks; } + + clearTasks() { this._tasks = []; } registerCollection(name: string, path: string) { this._collections.set(name, path); } + transformContext(context: FileSystemSchematicContext): FileSystemSchematicContext { + const oldAddTask = context.addTask; + context.addTask = (task: TaskConfigurationGenerator<{}>, dependencies?: Array) => { + this._tasks.push(task.toConfiguration()); + + return oldAddTask.call(context, task, dependencies); + }; + + return context; + } + protected _resolveCollectionPath(name: string): string { const maybePath = this._collections.get(name); if (maybePath) { diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 15f19fd54e..280a9dca93 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -11,17 +11,17 @@ import { HostSink, HostTree, SchematicEngine, - Sink, Tree, UnsuccessfulWorkflowExecution, formats, workflow, } from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies import { Observable } from 'rxjs/Observable'; +import { Subject } from 'rxjs/Subject'; import { empty } from 'rxjs/observable/empty'; import { of } from 'rxjs/observable/of'; import { _throw } from 'rxjs/observable/throw'; -import { concat, concatMap, ignoreElements, map } from 'rxjs/operators'; +import { concat, concatMap, ignoreElements, map, reduce } from 'rxjs/operators'; import { NodeModulesEngineHost, validateOptionsWithSchema } from '..'; import { DryRunEvent } from '../../src/sink/dryrun'; import { BuiltinTaskExecutor } from '../../tasks/node'; @@ -30,8 +30,7 @@ export class NodeWorkflow implements workflow.Workflow { protected _engine: SchematicEngine<{}, {}>; protected _engineHost: NodeModulesEngineHost; - protected _dryRunSink: DryRunSink; - protected _fsSink: Sink; + protected _reporter: Subject = new Subject(); protected _context: workflow.WorkflowExecutionContext[]; @@ -47,7 +46,7 @@ export class NodeWorkflow implements workflow.Workflow { * Collection or a Schematic. */ this._engineHost = new NodeModulesEngineHost(); - this._engine = new SchematicEngine(this._engineHost); + this._engine = new SchematicEngine(this._engineHost, this); // Add support for schemaJson. const registry = new schema.CoreSchemaRegistry(formats.standardFormats); @@ -55,12 +54,7 @@ export class NodeWorkflow implements workflow.Workflow { this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); - - // We need two sinks if we want to output what will happen, and actually do the work. - // Note that fsSink is technically not used if `--dry-run` is passed, but creating the Sink - // does not have any side effect. - this._dryRunSink = new DryRunSink(this._host, this._options.force); - this._fsSink = new HostSink(this._host, this._options.force); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RunSchematic); this._context = []; } @@ -74,36 +68,46 @@ export class NodeWorkflow implements workflow.Workflow { return maybeContext; } get reporter(): Observable { - return this._dryRunSink.reporter; + return this._reporter.asObservable(); } execute( options: Partial & workflow.RequiredWorkflowExecutionContext, ): Observable { + const parentContext = this._context[this._context.length - 1]; + /** Create the collection and the schematic. */ const collection = this._engine.createCollection(options.collection); - const schematic = collection.createSchematic(options.schematic); + // Only allow private schematics if called from the same collection. + const allowPrivate = parentContext && parentContext.collection === options.collection; + const schematic = collection.createSchematic(options.schematic, allowPrivate); + + // We need two sinks if we want to output what will happen, and actually do the work. + // Note that fsSink is technically not used if `--dry-run` is passed, but creating the Sink + // does not have any side effect. + const dryRunSink = new DryRunSink(this._host, this._options.force); + const fsSink = new HostSink(this._host, this._options.force); let error = false; - const dryRunSubscriber = this._dryRunSink.reporter.subscribe(event => { + const dryRunSubscriber = dryRunSink.reporter.subscribe(event => { + this._reporter.next(event); error = error || (event.kind == 'error'); }); - const parentContext = this._context[this._context.length - 1]; const context = { ...options, debug: options.debug || false, - logger: options.logger || new logging.NullLogger(), + logger: options.logger || (parentContext && parentContext.logger) || new logging.NullLogger(), parentContext, }; this._context.push(context); return schematic.call(options.options, of(new HostTree(this._host)), { - logger: options.logger || new logging.NullLogger(), + logger: context.logger, }).pipe( map(tree => Tree.optimize(tree)), concatMap((tree: Tree) => { - return this._dryRunSink.commit(tree).pipe( + return dryRunSink.commit(tree).pipe( ignoreElements(), concat(of(tree)), ); @@ -117,7 +121,7 @@ export class NodeWorkflow implements workflow.Workflow { return empty(); } - return this._fsSink.commit(tree); + return fsSink.commit(tree); }), concat(new Observable(obs => { if (!this._options.dryRun) { @@ -126,12 +130,11 @@ export class NodeWorkflow implements workflow.Workflow { obs.complete(); } })), - ignoreElements(), concat(new Observable(obs => { this._context.pop(); - obs.complete(); })), + reduce(() => {}), ); } } From d4767b04dfbccf049a90981d5ce05d83dcf695fd Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 12 Mar 2018 17:26:34 -0700 Subject: [PATCH 175/724] docs: Specification for ng update --- docs/specifications/update.md | 190 ++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 docs/specifications/update.md diff --git a/docs/specifications/update.md b/docs/specifications/update.md new file mode 100644 index 0000000000..454b68ea60 --- /dev/null +++ b/docs/specifications/update.md @@ -0,0 +1,190 @@ + +# Update Command + +`ng update` is a new command in the CLI to update one or multiple packages, its peer dependencies, and the peer dependencies that depends on it. + +If there are inconsistencies, for example if peer dependencies cannot be matches by a simple semver range, the tool will error out (and nothing will be committed on the filesystem). + +## Command Line Usage + +```bash +ng update [options] +``` + +You can specify more than one package. Each package follows the convention of `[@scope/]packageName[@version-range-or-dist-tag]`. Packages not found in your dependencies will trigger an error. Any package that has a higher version in your `package.json` will trigger an error. + +| Flag | Argument | Description | +|---|---|---| +| `--all` | `boolean` | If true, implies that all dependencies should be updated. Defaults is false, using dependencies from the command line instead. | +| `--next` | `boolean` | If true, allows version discovery to include Beta and RC. Defaults to false. | +| `--migration-only` | `boolean` | If true, don't change the `package.json` file, only apply migration scripts. | +| `--from` | `version` | Apply migrations from a certain version number. | +| `--to` | `version` | Apply migrations up to a certain version number (inclusive). By default will update to the tag selected. | + +## Details + +The schematic performs the following steps, in order: + +1. Get all installed package names and versions from the `package.json` into `dependencyMap: Map`. +1. From that map, fetch all `package.json` from the NPM repository, which contains all versions, and gather them in a `Map`. + 1. At the same time, update the `Map<>` with the version of the package which is believed to be installed (largest version number matching the version range). + 1. **WARNING**: this might not be the exact installed versions, unfortunately. We should have a proper `package-lock.json` loader, and support `yarn.lock` as well, but these are stretch goals (and where do we stop). +1. For each packages mentioned on the command line, update to the target version (by default largest non-beta non-rc version): + + ```python + # ARGV The packages being requested by the user. + # NPM A map of package name to a map of version to PackageJson structure. + # V A map of package name to available versions. + # PKG A map of package name to PackageJson structure, for the installed versions. + # next A flag for the "--next" command line argument. + + # First add all updating packages' peer dependencies. This should be recursive but simplified + # here for readability. + ARGV += [ NPM[p][max([ v for v in V[p] if (not is_beta(v) or next) ])].peerDependencies + for p in ARGV ] + + for p in ARGV: + x = max([ v for v in V[p] if (not is_beta(v) or next) ]) + + for other in set(PKG.keys()) - set([ p ]): + # Verify all packages' peer dependencies. + if has(other.peerDependencies, p) and !compatible(x, other.peerDependencies[p]): + showError('Cannot update dependency "%s": "%s" is incompatible with the updated dependency' % (x, other)) + + if any( has(other.peerDependencies, peer) and !compatible(x, other.peerDependencies[peer]) + for peer in PKG[p].peerDependencies.keys() ): + showError('Cannot update dependency "%s": "%s" depends on an incompatible peer dependency' % (x, other)) + + update_package_json(p, x) +``` + + + +## Library Developers + +Libraries are responsible for defining their own update schematics. The `ng update` tool will update the package.json, and if it detects am `"ng-update"` key in package.json of the library, will run the update schematic on it (with version information metadata). + +If a library does not define the `"ng-update"` key in their package.json, they are considered not supporting the update workflow and `ng update` is basically equivalent to `npm install`. + +### Migration + +In order to implement migrations in a library, the author must add the `ng-update` key to its `package.json`. This key contains the following fields: + +| Field Name | Type | Description | +|---|---|---| +| `requirements` | `{ [packageName: string]: VersionRange }` | A map of package names to version to check for minimal requirement. If one of the libraries listed here does not match the version range specified in `requirements`, an error will be shown to the user to manually update those libraries. For example, `@angular/core` does not support updates from versions earlier than 5, so this field would be `{ '@angular/core': '>= 5' }`. +| `migrations` | `string` | A relative path (or resolved using Node module resolution) to a Schematics collection definition. | +| `packageGroup` | `string[]` | A list of npm packages that are to be grouped together. When running + +#### Example given: +Library my-lib wants to have 2 steps to update from version 4 -> 4.5 and 4.5 to 5. It would add this information in its `package.json`: + +```json +{ + "ng-update": { + "requirements": { + "my-lib": "^5" + }, + "migrations": "./migrations/migration-collection.json" + } +} +``` + +And create a migration collection (same schema as the Schematics collection): + +```json +{ + "schematics": { + "migration-01": { + "version": "6", + "factory": "./update-6" + }, + "migration-02": { + "version": "6.2", + "factory": "./update-6_2" + }, + "migration-03": { + "version": "6.3", + "factory": "./update-6_3" + }, + "migration-04": { + "version": "7", + "factory": "./update-7" + }, + "migration-05": { + "version": "8", + "factory": "./update-8" + } + } +} +``` + +The update tool would then read the current version of library installed, check against all `version` fields and run the schematics, until it reaches the version required by the user (inclusively). If such a collection is used to update from version 5 to version 7, the `01`, `02`, `03,` and `04` functions would be called. If the current version is 7 and a `--refactor-only` flag is passed, it would run the migration `04` only. More arguments are needed to know from which version you are updating. + +Running `ng update @angular/core` would be the same as `ng generate @angular/core/migrations:migration-01`. + +## Use cases + +### Help + +`ng update`, shows what updates would be applied; + +```sh +$ ng update +We analyzed your package.json, there's some packages to update: + +Name Version Command to update +---------------------------------------------------------------------------- +@angular/cli 1.7.0 > 6.0.0 ng update @angular/cli +@angular/core 5.4.3 > 6.0.1 ng update @angular/core +@angular/material 5.2.1 > 6.0.0 ng update @angular/material +@angular/router 5.4.3 > 6.0.1 ng update @angular/core + +There might be additional packages that are outdated. +``` + +### Simple Multi-steps + +I have a dependency on Angular, Material and CLI. I want to update the CLI, then Angular, then Material in separate steps. + +#### Details +1. `ng update @angular/cli`. +Updates the CLI and packages that have a peer dependencies on the CLI (none), running refactoring tools from CLI 1 to 6. +1. `ng update @angular/core`. +Updates the Core package and all packages that have a peer dependency on it. This can get tricky if `@angular/material` get caught in the update because the version installed does not directly allow the new version of `@angular/core`. In this case + +### Complex Case + +package.json: + +```json +{ + "dependencies": { + "@angular/material": "5.0.0", + "@angular/core": "5.5.5" + } +} +``` + +Commands: + +```bash +ng update @angular/core +``` + +- updates `@angular/core` to the `latest` dist-tag (6.0.0) +- sees that `@angular/material` is not compatible with 6.0.0; **error out.** + +```bash +ng update @angular/material +``` + +- update `@angular/material` to latest version, that should be compatible with the current `@angular/core`. +- if that version is not compatible with you +- tell the user about a higher version that requires an update to `@angular/core`. + + +## Notes + +1. if someone is on CLI 1.5, the command is not supported. The user needs to update to `@angular/cli@latest`, then `ng update @angular/cli`. Post install hook will check versions of cli configuration and show a message to run the `ng update` command. +1. NPM proxies or cache are not supported by the first version of this command. From 96d0be21a278c48510bf85e57d3254ab67c92880 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 12 Mar 2018 17:27:02 -0700 Subject: [PATCH 176/724] feat(@schematics/update): add a generic update workflow Including its tests (which are published on NPM). --- .monorepo.json | 7 + README.md | 1 + packages/schematics/update/collection.json | 15 + packages/schematics/update/migrate/index.ts | 60 ++ .../schematics/update/migrate/schema.json | 24 + packages/schematics/update/migrate/schema.ts | 13 + packages/schematics/update/package.json | 24 + packages/schematics/update/update/index.ts | 635 ++++++++++++++++++ .../schematics/update/update/index_spec.ts | 90 +++ .../update/update/npm-package-json.ts | 26 + packages/schematics/update/update/npm.ts | 59 ++ .../schematics/update/update/package-json.ts | 264 ++++++++ packages/schematics/update/update/schema.json | 40 ++ packages/schematics/update/update/schema.ts | 13 + .../update/packages/update-base/package.json | 5 + .../update-migrations-external/package.json | 11 + .../update-migrations/migrations.json | 9 + .../packages/update-migrations/package.json | 8 + .../update/packages/update-migrations/v1_5.js | 12 + .../update-peer-dependencies-1/package.json | 5 + .../update-peer-dependencies-2/package.json | 8 + tsconfig.json | 3 +- 22 files changed, 1331 insertions(+), 1 deletion(-) create mode 100644 packages/schematics/update/collection.json create mode 100644 packages/schematics/update/migrate/index.ts create mode 100644 packages/schematics/update/migrate/schema.json create mode 100644 packages/schematics/update/migrate/schema.ts create mode 100644 packages/schematics/update/package.json create mode 100644 packages/schematics/update/update/index.ts create mode 100644 packages/schematics/update/update/index_spec.ts create mode 100644 packages/schematics/update/update/npm-package-json.ts create mode 100644 packages/schematics/update/update/npm.ts create mode 100644 packages/schematics/update/update/package-json.ts create mode 100644 packages/schematics/update/update/schema.json create mode 100644 packages/schematics/update/update/schema.ts create mode 100644 tests/schematics/update/packages/update-base/package.json create mode 100644 tests/schematics/update/packages/update-migrations-external/package.json create mode 100644 tests/schematics/update/packages/update-migrations/migrations.json create mode 100644 tests/schematics/update/packages/update-migrations/package.json create mode 100644 tests/schematics/update/packages/update-migrations/v1_5.js create mode 100644 tests/schematics/update/packages/update-peer-dependencies-1/package.json create mode 100644 tests/schematics/update/packages/update-peer-dependencies-2/package.json diff --git a/.monorepo.json b/.monorepo.json index 1f32e09ed1..30db29f999 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -136,6 +136,13 @@ "section": "Schematics", "hash": "1abc8090ac37083ca02f92ab794c6d7f", "snapshotRepo": "angular/schematics-package-update-builds" + }, + "@schematics/update": { + "name": "Package Update Schematics", + "version": "0.3.1", + "section": "Schematics", + "hash": "", + "snapshotRepo": "" } } } diff --git a/README.md b/README.md index 75905a71f0..6d3a3cd6af 100644 --- a/README.md +++ b/README.md @@ -65,5 +65,6 @@ This is a monorepo which contains many packages: **Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | **Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | **Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | +**Package Update Schematics** | [`@schematics/update`](http://npmjs.com/packages/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](http://npmjs.com/packages/@schematics/update) | diff --git a/packages/schematics/update/collection.json b/packages/schematics/update/collection.json new file mode 100644 index 0000000000..fd168be8a3 --- /dev/null +++ b/packages/schematics/update/collection.json @@ -0,0 +1,15 @@ +{ + "schematics": { + "update": { + "factory": "./update", + "schema": "./update/schema.json", + "description": "Update one or multiple packages to versions, updating peer dependencies along the way." + }, + "migrate": { + "factory": "./migrate", + "schema": "./migrate/schema.json", + "description": "Schematic that calls the migrations of an installed package. Can be used separately", + "hidden": true + } + } +} diff --git a/packages/schematics/update/migrate/index.ts b/packages/schematics/update/migrate/index.ts new file mode 100644 index 0000000000..6ad8098ed7 --- /dev/null +++ b/packages/schematics/update/migrate/index.ts @@ -0,0 +1,60 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject } from '@angular-devkit/core'; +import { + Rule, + SchematicContext, + SchematicsException, + Tree, + chain, + externalSchematic, +} from '@angular-devkit/schematics'; +import * as semver from 'semver'; +import { PostUpdateSchema } from './schema'; + + +export default function(options: PostUpdateSchema): Rule { + return (tree: Tree, context: SchematicContext) => { + const schematicsToRun: string[] = []; + + // Create the collection for the package. + const collection = context.engine.createCollection(options.collection); + for (const name of collection.listSchematicNames()) { + const schematic = collection.createSchematic(name, true); + + const description: JsonObject = schematic.description as JsonObject; + + if (typeof description['version'] == 'string') { + let version = description['version'] as string; + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}$/)) { + version += '.0'; + } + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}$/)) { + version += '.0'; + } + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}$/)) { + throw new SchematicsException( + `Invalid migration version: ${JSON.stringify(description['version'])}`, + ); + } + + if (semver.gt(version, options.from) && semver.lte(version, options.to)) { + schematicsToRun.push(name); + } + } + } + + if (schematicsToRun.length > 0) { + const rules = schematicsToRun.map(name => externalSchematic(options.collection, name, {})); + + return chain(rules)(tree, context); + } + + return tree; + }; +} diff --git a/packages/schematics/update/migrate/schema.json b/packages/schematics/update/migrate/schema.json new file mode 100644 index 0000000000..58fca362d0 --- /dev/null +++ b/packages/schematics/update/migrate/schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "PostUpdateSchema", + "type": "object", + "properties": { + "package": { + "description": "The package to migrate.", + "type": "string" + }, + "collection": { + "description": "The collection to load the migrations from.", + "type": "string" + }, + "from": { + "description": "The version installed previously.", + "type": "string" + }, + "to": { + "description": "The version to migrate to.", + "type": "string" + } + }, + "required": ["package", "collection", "from", "to"] +} diff --git a/packages/schematics/update/migrate/schema.ts b/packages/schematics/update/migrate/schema.ts new file mode 100644 index 0000000000..400af572f4 --- /dev/null +++ b/packages/schematics/update/migrate/schema.ts @@ -0,0 +1,13 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export interface PostUpdateSchema { + package: string; + collection: string; + from: string; + to: string; +} diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json new file mode 100644 index 0000000000..e426e4e71d --- /dev/null +++ b/packages/schematics/update/package.json @@ -0,0 +1,24 @@ +{ + "name": "@schematics/update", + "version": "0.0.0", + "description": "Schematics specific to updating packages", + "keywords": [ + "blueprints", + "code generation", + "schematics", + "schematic" + ], + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "schematics": "./collection.json", + "dependencies": { + "semver": "^5.3.0", + "semver-intersect": "^1.1.2", + "rxjs": "^5.5.6" + }, + "peerDependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0" + } +} diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts new file mode 100644 index 0000000000..ff8d5d39c9 --- /dev/null +++ b/packages/schematics/update/update/index.ts @@ -0,0 +1,635 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { logging } from '@angular-devkit/core'; +import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics'; +import { NodePackageInstallTask, RunSchematicTask } from '@angular-devkit/schematics/tasks'; +import { Observable } from 'rxjs/Observable'; +import { from as observableFrom } from 'rxjs/observable/from'; +import { of } from 'rxjs/observable/of'; +import { map, mergeMap, reduce, switchMap } from 'rxjs/operators'; +import * as semver from 'semver'; +import { getNpmPackageJson } from './npm'; +import { NpmRepositoryPackageJson } from './npm-package-json'; +import { JsonSchemaForNpmPackageJsonFiles } from './package-json'; +import { UpdateSchema } from './schema'; + +type VersionRange = string & { __: void; }; + +interface PackageVersionInfo { + version: VersionRange; + packageJson: JsonSchemaForNpmPackageJsonFiles; + updateMetadata: UpdateMetadata; +} + +interface PackageInfo { + name: string; + npmPackageJson: NpmRepositoryPackageJson; + installed: PackageVersionInfo; + target?: PackageVersionInfo; + packageJsonRange: string; +} + +interface UpdateMetadata { + packageGroup: string[]; + requirements: { [packageName: string]: string }; + migrations?: string; +} + +function _validateForwardPeerDependencies( + name: string, + infoMap: Map, + peers: {[name: string]: string}, + logger: logging.LoggerApi, +): boolean { + for (const [peer, range] of Object.entries(peers)) { + logger.debug(`Checking forward peer ${peer}...`); + const maybePeerInfo = infoMap.get(peer); + if (!maybePeerInfo) { + logger.error([ + `Package ${JSON.stringify(name)} has a missing peer dependency of`, + `${JSON.stringify(peer)} @ ${JSON.stringify(range)}.`, + ].join(' ')); + + return true; + } + + const peerVersion = maybePeerInfo.target && maybePeerInfo.target.packageJson.version + ? maybePeerInfo.target.packageJson.version + : maybePeerInfo.installed.version; + + logger.debug(` Range intersects(${range}, ${peerVersion})...`); + if (!semver.satisfies(peerVersion, range)) { + logger.error([ + `Package ${JSON.stringify(name)} has an incompatible peer dependency to`, + `${JSON.stringify(peer)} (requires ${JSON.stringify(range)},`, + `would install ${JSON.stringify(peerVersion)})`, + ].join(' ')); + + return true; + } + } + + return false; +} + + +function _validateReversePeerDependencies( + name: string, + version: string, + infoMap: Map, + logger: logging.LoggerApi, +) { + for (const [installed, installedInfo] of infoMap.entries()) { + const installedLogger = logger.createChild(installed); + installedLogger.debug(`${installed}...`); + const peers = (installedInfo.target || installedInfo.installed).packageJson.peerDependencies; + + for (const [peer, range] of Object.entries(peers || {})) { + if (peer != name) { + // Only check peers to the packages we're updating. We don't care about peers + // that are unmet but we have no effect on. + continue; + } + + if (!semver.satisfies(version, range)) { + logger.error([ + `Package ${JSON.stringify(installed)} has an incompatible peer dependency to`, + `${JSON.stringify(name)} (requires ${JSON.stringify(range)},`, + `would install ${JSON.stringify(version)}).`, + ].join(' ')); + + return true; + } + } + } + + return false; +} + +function _validateUpdatePackages( + infoMap: Map, + logger: logging.LoggerApi, +): void { + logger = logger.createChild('validateUpdate'); + logger.debug('Updating the following packages:'); + infoMap.forEach(info => { + if (info.target) { + logger.debug(` ${info.name} => ${info.target.version}`); + } + }); + + let peerErrors = false; + infoMap.forEach(info => { + const {name, target} = info; + if (!target) { + return; + } + + const pkgLogger = logger.createChild(name); + logger.debug(`${name}...`); + + const peers = target.packageJson.peerDependencies || {}; + peerErrors = _validateForwardPeerDependencies(name, infoMap, peers, pkgLogger) || peerErrors; + peerErrors + = _validateReversePeerDependencies(name, target.version, infoMap, pkgLogger) + || peerErrors; + }); + + if (peerErrors) { + throw new SchematicsException(`Incompatible peer dependencies found. See above.`); + } +} + + +function _performUpdate( + tree: Tree, + context: SchematicContext, + infoMap: Map, + logger: logging.LoggerApi, +): Observable { + const packageJsonContent = tree.read('/package.json'); + if (!packageJsonContent) { + throw new SchematicsException('Could not find a package.json. Are you in a Node project?'); + } + + let packageJson: JsonSchemaForNpmPackageJsonFiles; + try { + packageJson = JSON.parse(packageJsonContent.toString()) as JsonSchemaForNpmPackageJsonFiles; + } catch (e) { + throw new SchematicsException('package.json could not be parsed: ' + e.message); + } + + const toInstall = [...infoMap.values()] + .map(x => [x.name, x.target, x.installed]) + // tslint:disable-next-line:non-null-operator + .filter(([name, target, installed]) => { + return !!name && !!target && !!installed; + }) as [string, PackageVersionInfo, PackageVersionInfo][]; + + toInstall.forEach(([name, target, installed]) => { + logger.info( + `Updating package.json with dependency ${name} ` + + `@ ${JSON.stringify(target.version)} (was ${JSON.stringify(installed.version)})...`, + ); + + if (packageJson.dependencies && packageJson.dependencies[name]) { + packageJson.dependencies[name] = target.version; + + if (packageJson.devDependencies && packageJson.devDependencies[name]) { + delete packageJson.devDependencies[name]; + } + if (packageJson.peerDependencies && packageJson.peerDependencies[name]) { + delete packageJson.peerDependencies[name]; + } + } else if (packageJson.devDependencies && packageJson.devDependencies[name]) { + packageJson.devDependencies[name] = target.version; + + if (packageJson.peerDependencies && packageJson.peerDependencies[name]) { + delete packageJson.peerDependencies[name]; + } + } else if (packageJson.peerDependencies && packageJson.peerDependencies[name]) { + packageJson.peerDependencies[name] = target.version; + } else { + logger.warn(`Package ${name} was not found in dependencies.`); + } + }); + + const newContent = JSON.stringify(packageJson, null, 2); + if (packageJsonContent.toString() != newContent) { + // If something changed, also hook up the task. + tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2)); + const installTask = context.addTask(new NodePackageInstallTask()); + + // Run the migrate schematics with the list of packages to use. The collection contains + // version information and we need to do this post installation. Please note that the + // migration COULD fail and leave side effects on disk. + // Run the schematics task of those packages. + toInstall.forEach(([name, target, installed]) => { + if (!target.updateMetadata.migrations) { + return; + } + + const collection = ( + target.updateMetadata.migrations.match(/^[./]/) + ? name + '/' + : '' + ) + target.updateMetadata.migrations; + + context.addTask(new RunSchematicTask('@schematics/update', 'migrate', { + package: name, + collection, + from: installed.version, + to: target.version, + }), + [installTask], + ); + }); + } + + return of(undefined); +} + + +function _getUpdateMetadata( + packageJson: JsonSchemaForNpmPackageJsonFiles, + logger: logging.LoggerApi, +): UpdateMetadata { + const metadata = packageJson['ng-update']; + + const result: UpdateMetadata = { + packageGroup: [], + requirements: {}, + }; + + if (!metadata || typeof metadata != 'object' || Array.isArray(metadata)) { + return result; + } + + if (metadata['packageGroup']) { + const packageGroup = metadata['packageGroup']; + // Verify that packageGroup is an array of strings. This is not an error but we still warn + // the user and ignore the packageGroup keys. + if (!Array.isArray(packageGroup) || packageGroup.some(x => typeof x != 'string')) { + logger.warn( + `packageGroup metadata of package ${packageJson.name} is malformed. Ignoring.`, + ); + } else { + result.packageGroup = packageGroup; + } + } + + if (metadata['requirements']) { + const requirements = metadata['requirements']; + // Verify that requirements are + if (typeof requirements != 'object' + || Array.isArray(requirements) + || Object.keys(requirements).some(name => typeof requirements[name] != 'string')) { + logger.warn( + `requirements metadata of package ${packageJson.name} is malformed. Ignoring.`, + ); + } else { + result.requirements = requirements; + } + } + + if (metadata['migrations']) { + const migrations = metadata['migrations']; + if (typeof migrations != 'string') { + logger.warn(`migrations metadata of package ${packageJson.name} is malformed. Ignoring.`); + } else { + result.migrations = migrations; + } + } + + return result; +} + + +function _usageMessage( + options: UpdateSchema, + infoMap: Map, + logger: logging.LoggerApi, +) { + logger.info( + 'We analyzed your package.json, there are some packages to update:\n', + ); + + // Find the largest name to know the padding needed. + let namePad = Math.max(...[...infoMap.keys()].map(x => x.length)) + 2; + if (!Number.isFinite(namePad)) { + namePad = 30; + } + + logger.info( + ' ' + + 'Name'.padEnd(namePad) + + 'Version'.padEnd(25) + + ' Command to update', + ); + logger.info(' ' + '-'.repeat(namePad * 2 + 35)); + + [...infoMap.entries()].sort().forEach(([name, info]) => { + const tag = options.next ? 'next' : 'latest'; + const version = info.npmPackageJson['dist-tags'][tag]; + const target = info.npmPackageJson.versions[version]; + + if (target && semver.compare(info.installed.version, version) < 0) { + let command = `npm install ${name}`; + if (target && target['ng-update']) { + // Show the ng command only when migrations are supported, otherwise it's a fancy + // npm install, really. + command = `ng update ${name}`; + } + + logger.info( + ' ' + + name.padEnd(namePad) + + `${info.installed.version} -> ${version}`.padEnd(25) + + ' ' + command, + ); + } + }); + + logger.info('\n'); + logger.info('There might be additional packages that are outdated.'); + logger.info('Or run ng update --all to try to update all at the same time.\n'); + + return of(undefined); +} + + +function _buildPackageInfo( + tree: Tree, + packages: Map, + allDependencies: Map, + npmPackageJson: NpmRepositoryPackageJson, + logger: logging.LoggerApi, +): PackageInfo { + const name = npmPackageJson.name; + const packageJsonRange = allDependencies.get(name); + if (!packageJsonRange) { + throw new SchematicsException( + `Package ${JSON.stringify(name)} was not found in package.json.`, + ); + } + + // Find out the currently installed version. Either from the package.json or the node_modules/ + // TODO: figure out a way to read package-lock.json and/or yarn.lock. + let installedVersion: string | undefined; + const packageContent = tree.read(`/node_modules/${name}/package.json`); + if (packageContent) { + const content = JSON.parse(packageContent.toString()) as JsonSchemaForNpmPackageJsonFiles; + installedVersion = content.version; + } + if (!installedVersion) { + // Find the version from NPM that fits the range to max. + installedVersion = semver.maxSatisfying( + Object.keys(npmPackageJson.versions), + packageJsonRange, + ); + } + + const installedPackageJson = npmPackageJson.versions[installedVersion]; + if (!installedPackageJson) { + throw new SchematicsException( + `An unexpected error happened; package ${name} has no version ${installedVersion}.`, + ); + } + + let targetVersion: VersionRange | undefined = packages.get(name); + if (targetVersion) { + if (npmPackageJson['dist-tags'][targetVersion]) { + targetVersion = npmPackageJson['dist-tags'][targetVersion] as VersionRange; + } else { + targetVersion = semver.maxSatisfying( + Object.keys(npmPackageJson.versions), + targetVersion, + ) as VersionRange; + } + } + + if (targetVersion && semver.lte(targetVersion, installedVersion)) { + logger.debug(`Package ${name} already satisfied by package.json (${packageJsonRange}).`); + targetVersion = undefined; + } + + const target: PackageVersionInfo | undefined = targetVersion + ? { + version: targetVersion, + packageJson: npmPackageJson.versions[targetVersion], + updateMetadata: _getUpdateMetadata(npmPackageJson.versions[targetVersion], logger), + } + : undefined; + + // Check if there's an installed version. + return { + name, + npmPackageJson, + installed: { + version: installedVersion as VersionRange, + packageJson: installedPackageJson, + updateMetadata: _getUpdateMetadata(installedPackageJson, logger), + }, + target, + packageJsonRange, + }; +} + + +function _buildPackageList( + options: UpdateSchema, + projectDeps: Map, + logger: logging.LoggerApi, +): Map { + // Parse the packages options to set the targeted version. + const packages = new Map(); + const commandLinePackages = + (options.packages && options.packages.length > 0) + ? options.packages + : (options.all ? projectDeps.keys() : []); + + for (const pkg of commandLinePackages) { + // Split the version asked on command line. + const m = pkg.match(/^((?:@[^/]{1,100}\/)?[^@]{1,100})(?:@(.{1,100}))?$/); + if (!m) { + logger.warn(`Invalid package argument: ${JSON.stringify(pkg)}. Skipping.`); + continue; + } + + const [, npmName, maybeVersion] = m; + + const version = projectDeps.get(npmName); + if (!version) { + logger.warn(`Package not installed: ${JSON.stringify(npmName)}. Skipping.`); + continue; + } + + // Verify that people have an actual version in the package.json, otherwise (label or URL or + // gist or ...) we don't update it. + if ( + version.startsWith('http:') // HTTP + || version.startsWith('file:') // Local folder + || version.startsWith('git:') // GIT url + || version.match(/^\w{1,100}\/\w{1,100}/) // GitHub's "user/repo" + || version.match(/^(?:\.{0,2}\/)\w{1,100}/) // Local folder, maybe relative. + ) { + // We only do that for --all. Otherwise we have the installed version and the user specified + // it on the command line. + if (options.all) { + logger.warn( + `Package ${JSON.stringify(npmName)} has a custom version: ` + + `${JSON.stringify(version)}. Skipping.`, + ); + continue; + } + } + + packages.set(npmName, (maybeVersion || (options.next ? 'next' : 'latest')) as VersionRange); + } + + return packages; +} + + +function _addPackageGroup( + packages: Map, + allDependencies: ReadonlyMap, + npmPackageJson: NpmRepositoryPackageJson, + logger: logging.LoggerApi, +): void { + const maybePackage = packages.get(npmPackageJson.name); + if (!maybePackage) { + return; + } + + const version = npmPackageJson['dist-tags'][maybePackage] || maybePackage; + if (!npmPackageJson.versions[version]) { + return; + } + const ngUpdateMetadata = npmPackageJson.versions[version]['ng-update']; + if (!ngUpdateMetadata) { + return; + } + + const packageGroup = ngUpdateMetadata['packageGroup']; + if (!packageGroup) { + return; + } + if (!Array.isArray(packageGroup) || packageGroup.some(x => typeof x != 'string')) { + logger.warn(`packageGroup metadata of package ${npmPackageJson.name} is malformed.`); + + return; + } + + packageGroup + .filter(name => !packages.has(name)) // Don't override names from the command line. + .filter(name => allDependencies.has(name)) // Remove packages that aren't installed. + .forEach(name => { + packages.set(name, maybePackage); + }); +} + +/** + * Add peer dependencies of packages on the command line to the list of packages to update. + * We don't do verification of the versions here as this will be done by a later step (and can + * be ignored by the --force flag). + * @private + */ +function _addPeerDependencies( + packages: Map, + _allDependencies: ReadonlyMap, + npmPackageJson: NpmRepositoryPackageJson, + _logger: logging.LoggerApi, +): void { + const maybePackage = packages.get(npmPackageJson.name); + if (!maybePackage) { + return; + } + + const version = npmPackageJson['dist-tags'][maybePackage] || maybePackage; + if (!npmPackageJson.versions[version]) { + return; + } + + const packageJson = npmPackageJson.versions[version]; + const error = false; + + for (const [peer, range] of Object.entries(packageJson.peerDependencies || {})) { + if (!packages.has(peer)) { + packages.set(peer, range as VersionRange); + } + } + + if (error) { + throw new SchematicsException('An error occured, see above.'); + } +} + + +function _getAllDependencies(tree: Tree): Map { + const packageJsonContent = tree.read('/package.json'); + if (!packageJsonContent) { + throw new SchematicsException('Could not find a package.json. Are you in a Node project?'); + } + + let packageJson: JsonSchemaForNpmPackageJsonFiles; + try { + packageJson = JSON.parse(packageJsonContent.toString()) as JsonSchemaForNpmPackageJsonFiles; + } catch (e) { + throw new SchematicsException('package.json could not be parsed: ' + e.message); + } + + return new Map([ + ...Object.entries(packageJson.peerDependencies || {}), + ...Object.entries(packageJson.devDependencies || {}), + ...Object.entries(packageJson.dependencies || {}), + ] as [string, VersionRange][]); +} + +export default function(options: UpdateSchema): Rule { + if (!options.packages) { + // We cannot just return this because we need to fetch the packages from NPM still for the + // help/guide to show. + options.packages = []; + } else if (typeof options.packages == 'string') { + // If a string, then we should split it and make it an array. + options.packages = options.packages.split(/,/g); + } + + return (tree: Tree, context: SchematicContext) => { + const logger = context.logger; + const allDependencies = _getAllDependencies(tree); + const packages = _buildPackageList(options, allDependencies, logger); + + return observableFrom([...allDependencies.keys()]).pipe( + // Grab all package.json from the npm repository. This requires a lot of HTTP calls so we + // try to parallelize as many as possible. + mergeMap(depName => getNpmPackageJson(depName, logger)), + + // Build a map of all dependencies and their packageJson. + reduce>( + (acc, npmPackageJson) => acc.set(npmPackageJson.name, npmPackageJson), + new Map(), + ), + + map(npmPackageJsonMap => { + // Augment the command line package list with packageGroups and forward peer dependencies. + npmPackageJsonMap.forEach((npmPackageJson) => { + _addPackageGroup(packages, allDependencies, npmPackageJson, logger); + _addPeerDependencies(packages, allDependencies, npmPackageJson, logger); + }); + + // Build the PackageInfo for each module. + const packageInfoMap = new Map(); + npmPackageJsonMap.forEach((npmPackageJson) => { + packageInfoMap.set( + npmPackageJson.name, + _buildPackageInfo(tree, packages, allDependencies, npmPackageJson, logger), + ); + }); + + return packageInfoMap; + }), + + switchMap(infoMap => { + // Now that we have all the information, check the flags. + if (packages.size > 0) { + if (!options.force) { + _validateUpdatePackages(infoMap, logger); + } + + return _performUpdate(tree, context, infoMap, logger); + } else { + return _usageMessage(options, infoMap, logger); + } + }), + + switchMap(() => of(tree)), + ); + }; +} diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts new file mode 100644 index 0000000000..15ddb5e370 --- /dev/null +++ b/packages/schematics/update/update/index_spec.ts @@ -0,0 +1,90 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { normalize, virtualFs } from '@angular-devkit/core'; +import { HostTree, VirtualTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import { map } from 'rxjs/operators'; + + +describe('@schematics/update', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/update', __dirname + '/../collection.json', + ); + let host: virtualFs.test.TestHost; + let appTree: UnitTestTree = new UnitTestTree(new VirtualTree()); + + beforeEach(() => { + host = new virtualFs.test.TestHost({ + '/package.json': `{ + "name": "blah", + "dependencies": { + "@angular-devkit-tests/update-base": "1.0.0" + } + }`, + }); + appTree = new UnitTestTree(new HostTree(host)); + }); + + it('updates package.json', done => { + // Since we cannot run tasks in unit tests, we need to validate that the default + // update schematic updates the package.json appropriately, AND validate that the + // migrate schematic actually do work appropriately, in a separate test. + schematicRunner.runSchematicAsync('update', { all: true }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular-devkit-tests/update-base']).toBe('1.1.0'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'node-package', + options: jasmine.objectContaining({ + command: 'install', + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }); + + it('calls migration tasks', done => { + // Add the basic migration package. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '1.0.0'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { all: true }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular-devkit-tests/update-base']).toBe('1.1.0'); + expect(packageJson['dependencies']['@angular-devkit-tests/update-migrations']) + .toBe('1.6.0'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'node-package', + options: jasmine.objectContaining({ + command: 'install', + }), + }, + { + name: 'run-schematic', + options: jasmine.objectContaining({ + name: 'migrate', + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }); +}); diff --git a/packages/schematics/update/update/npm-package-json.ts b/packages/schematics/update/update/npm-package-json.ts new file mode 100644 index 0000000000..bab210b6aa --- /dev/null +++ b/packages/schematics/update/update/npm-package-json.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonSchemaForNpmPackageJsonFiles } from './package-json'; + +export interface NpmRepositoryPackageJson { + name: string; + description: string; + + 'dist-tags': { + [name: string]: string; + }; + versions: { + [version: string]: JsonSchemaForNpmPackageJsonFiles; + }; + time: { + modified: string; + created: string; + + [version: string]: string; + }; +} diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts new file mode 100644 index 0000000000..ce61602000 --- /dev/null +++ b/packages/schematics/update/update/npm.ts @@ -0,0 +1,59 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { logging } from '@angular-devkit/core'; +import * as http from 'http'; +import { Observable } from 'rxjs/Observable'; +import { ReplaySubject } from 'rxjs/ReplaySubject'; +import { NpmRepositoryPackageJson } from './npm-package-json'; + + +const npmPackageJsonCache = new Map>(); + + +/** + * Get the NPM repository's package.json for a package. This is p + * @param {string} packageName The package name to fetch. + * @param {LoggerApi} logger A logger instance to log debug information. + * @returns An observable that will put the pacakge.json content. + * @private + */ +export function getNpmPackageJson( + packageName: string, + logger: logging.LoggerApi, +): Observable { + const url = `http://registry.npmjs.org/${packageName.replace(/\//g, '%2F')}`; + logger.debug( + `Getting package.json from ${JSON.stringify(packageName)} (url: ${JSON.stringify(url)})...`, + ); + + let maybeRequest = npmPackageJsonCache.get(url); + if (!maybeRequest) { + const subject = new ReplaySubject(1); + + const request = http.request(url, response => { + let data = ''; + response.on('data', chunk => data += chunk); + response.on('end', () => { + try { + const json = JSON.parse(data); + subject.next(json as NpmRepositoryPackageJson); + subject.complete(); + } catch (err) { + subject.error(err); + } + }); + response.on('error', err => subject.error(err)); + }); + request.end(); + + maybeRequest = subject.asObservable(); + npmPackageJsonCache.set(url, maybeRequest); + } + + return maybeRequest; +} diff --git a/packages/schematics/update/update/package-json.ts b/packages/schematics/update/update/package-json.ts new file mode 100644 index 0000000000..b4162f6fd2 --- /dev/null +++ b/packages/schematics/update/update/package-json.ts @@ -0,0 +1,264 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ +// tslint:disable + +export type JsonSchemaForNpmPackageJsonFiles = CoreProperties & + JspmDefinition & + ( + | { + bundleDependencies?: BundledDependency; + [k: string]: any; + } + | { + bundledDependencies?: BundledDependency; + [k: string]: any; + }) & { + [k: string]: any; + }; +/** + * A person who has been involved in creating or maintaining this package + */ +export type Person = + | { + [k: string]: any; + } + | string; +/** + * Run AFTER the package is published + */ +export type ScriptsPublishAfter = string; +/** + * Run AFTER the package is installed + */ +export type ScriptsInstallAfter = string; +/** + * Run BEFORE the package is uninstalled + */ +export type ScriptsUninstallBefore = string; +/** + * Run BEFORE bump the package version + */ +export type ScriptsVersionBefore = string; +/** + * Run by the 'npm test' command + */ +export type ScriptsTest = string; +/** + * Run by the 'npm stop' command + */ +export type ScriptsStop = string; +/** + * Run by the 'npm start' command + */ +export type ScriptsStart = string; +/** + * Run by the 'npm restart' command. Note: 'npm restart' will run the stop and start scripts if no restart script is provided. + */ +export type ScriptsRestart = string; +/** + * Array of package names that will be bundled when publishing the package. + */ +export type BundledDependency = string[]; + +export interface CoreProperties { + /** + * The name of the package. + */ + name?: string; + /** + * Version must be parseable by node-semver, which is bundled with npm as a dependency. + */ + version?: string; + /** + * This helps people discover your package, as it's listed in 'npm search'. + */ + description?: string; + /** + * This helps people discover your package as it's listed in 'npm search'. + */ + keywords?: string[]; + /** + * The url to the project homepage. + */ + homepage?: string; + /** + * The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package. + */ + bugs?: + | { + [k: string]: any; + } + | string; + /** + * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. + */ + license?: string; + /** + * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. + */ + licenses?: { + type?: string; + url?: string; + [k: string]: any; + }[]; + author?: Person; + /** + * A list of people who contributed to this package. + */ + contributors?: Person[]; + /** + * A list of people who maintains this package. + */ + maintainers?: Person[]; + /** + * The 'files' field is an array of files to include in your project. If you name a folder in the array, then it will also include the files inside that folder. + */ + files?: string[]; + /** + * The main field is a module ID that is the primary entry point to your program. + */ + main?: string; + bin?: + | string + | { + [k: string]: any; + }; + /** + * Specify either a single file or an array of filenames to put in place for the man program to find. + */ + man?: string[]; + directories?: { + /** + * If you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash. + */ + bin?: string; + /** + * Put markdown files in here. Eventually, these will be displayed nicely, maybe, someday. + */ + doc?: string; + /** + * Put example scripts in here. Someday, it might be exposed in some clever way. + */ + example?: string; + /** + * Tell people where the bulk of your library is. Nothing special is done with the lib folder in any way, but it's useful meta info. + */ + lib?: string; + /** + * A folder that is full of man pages. Sugar to generate a 'man' array by walking the folder. + */ + man?: string; + test?: string; + [k: string]: any; + }; + /** + * Specify the place where your code lives. This is helpful for people who want to contribute. + */ + repository?: + | { + [k: string]: any; + } + | string; + /** + * The 'scripts' member is an object hash of script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point. + */ + scripts?: { + /** + * Run BEFORE the package is published (Also run on local npm install without any arguments) + */ + prepublish?: string; + publish?: ScriptsPublishAfter; + postpublish?: ScriptsPublishAfter; + /** + * Run BEFORE the package is installed + */ + preinstall?: string; + install?: ScriptsInstallAfter; + postinstall?: ScriptsInstallAfter; + preuninstall?: ScriptsUninstallBefore; + uninstall?: ScriptsUninstallBefore; + /** + * Run AFTER the package is uninstalled + */ + postuninstall?: string; + preversion?: ScriptsVersionBefore; + version?: ScriptsVersionBefore; + /** + * Run AFTER bump the package version + */ + postversion?: string; + pretest?: ScriptsTest; + test?: ScriptsTest; + posttest?: ScriptsTest; + prestop?: ScriptsStop; + stop?: ScriptsStop; + poststop?: ScriptsStop; + prestart?: ScriptsStart; + start?: ScriptsStart; + poststart?: ScriptsStart; + prerestart?: ScriptsRestart; + restart?: ScriptsRestart; + postrestart?: ScriptsRestart; + [k: string]: string | undefined; + }; + /** + * A 'config' hash can be used to set configuration parameters used in package scripts that persist across upgrades. + */ + config?: { + [k: string]: any; + }; + dependencies?: Dependency; + devDependencies?: Dependency; + optionalDependencies?: Dependency; + peerDependencies?: Dependency; + engines?: { + [k: string]: string; + }; + engineStrict?: boolean; + /** + * You can specify which operating systems your module will run on + */ + os?: string[]; + /** + * If your code only runs on certain cpu architectures, you can specify which ones. + */ + cpu?: string[]; + /** + * If your package is primarily a command-line application that should be installed globally, then set this value to true to provide a warning if it is installed locally. + */ + preferGlobal?: boolean; + /** + * If set to true, then npm will refuse to publish it. + */ + private?: boolean; + publishConfig?: { + [k: string]: any; + }; + dist?: { + shasum?: string; + tarball?: string; + [k: string]: any; + }; + readme?: string; + [k: string]: any; +} +/** + * Dependencies are specified with a simple hash of package name to version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL. + */ +export interface Dependency { + [k: string]: string; +} +export interface JspmDefinition { + jspm?: CoreProperties; + [k: string]: any; +} diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json new file mode 100644 index 0000000000..ad762e27ee --- /dev/null +++ b/packages/schematics/update/update/schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsUpdateSchema", + "title": "Schematic Options Schema", + "type": "object", + "properties": { + "packages": { + "description": "The packages to get.", + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "$default": { + "$source": "argv" + } + }, + { + "type": "string" + } + ] + }, + "force": { + "description": "If false, will error out if installed packages are incompatible with the update.", + "default": false, + "type": "boolean" + }, + "all": { + "description": "Whether to update all packages in package.json.", + "default": false, + "type": "boolean" + }, + "next": { + "description": "Use the largest version, including beta and RCs.", + "default": false, + "type": "boolean" + } + } +} diff --git a/packages/schematics/update/update/schema.ts b/packages/schematics/update/update/schema.ts new file mode 100644 index 0000000000..b62e3bd009 --- /dev/null +++ b/packages/schematics/update/update/schema.ts @@ -0,0 +1,13 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export interface UpdateSchema { + packages?: string | string[]; + force: boolean; + all: boolean; + next: boolean; +} diff --git a/tests/schematics/update/packages/update-base/package.json b/tests/schematics/update/packages/update-base/package.json new file mode 100644 index 0000000000..19520c8638 --- /dev/null +++ b/tests/schematics/update/packages/update-base/package.json @@ -0,0 +1,5 @@ +{ + "name": "@angular-devkit-tests/update-base", + "version": "1.1.0", + "description": "Tests" +} diff --git a/tests/schematics/update/packages/update-migrations-external/package.json b/tests/schematics/update/packages/update-migrations-external/package.json new file mode 100644 index 0000000000..adaa40d219 --- /dev/null +++ b/tests/schematics/update/packages/update-migrations-external/package.json @@ -0,0 +1,11 @@ +{ + "name": "@angular-devkit-tests/update-migrations-external", + "version": "1.6.0", + "description": "Tests", + "ng-update": { + "migrations": "@angular-devkit-tests/update-migrations/migrations.json" + }, + "dependencies": { + "@angular-devkit-tests/update-migrations": "1.6.0" + } +} diff --git a/tests/schematics/update/packages/update-migrations/migrations.json b/tests/schematics/update/packages/update-migrations/migrations.json new file mode 100644 index 0000000000..f00f3ffbbd --- /dev/null +++ b/tests/schematics/update/packages/update-migrations/migrations.json @@ -0,0 +1,9 @@ +{ + "schematics": { + "1": { + "factory": "./v1_5.js", + "version": "1.5", + "description": "Test." + } + } +} diff --git a/tests/schematics/update/packages/update-migrations/package.json b/tests/schematics/update/packages/update-migrations/package.json new file mode 100644 index 0000000000..d68cb22a68 --- /dev/null +++ b/tests/schematics/update/packages/update-migrations/package.json @@ -0,0 +1,8 @@ +{ + "name": "@angular-devkit-tests/update-migrations", + "version": "1.6.0", + "description": "Tests", + "ng-update": { + "migrations": "./migrations.json" + } +} diff --git a/tests/schematics/update/packages/update-migrations/v1_5.js b/tests/schematics/update/packages/update-migrations/v1_5.js new file mode 100644 index 0000000000..7e79eda93d --- /dev/null +++ b/tests/schematics/update/packages/update-migrations/v1_5.js @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +exports.default = function() { + return function(tree) { + tree.create('/version1_5', ''); + }; +}; diff --git a/tests/schematics/update/packages/update-peer-dependencies-1/package.json b/tests/schematics/update/packages/update-peer-dependencies-1/package.json new file mode 100644 index 0000000000..4fac13f171 --- /dev/null +++ b/tests/schematics/update/packages/update-peer-dependencies-1/package.json @@ -0,0 +1,5 @@ +{ + "name": "@angular-devkit-tests/update-peer-dependencies-1", + "version": "1.1.0", + "description": "Tests" +} diff --git a/tests/schematics/update/packages/update-peer-dependencies-2/package.json b/tests/schematics/update/packages/update-peer-dependencies-2/package.json new file mode 100644 index 0000000000..f8624d818e --- /dev/null +++ b/tests/schematics/update/packages/update-peer-dependencies-2/package.json @@ -0,0 +1,8 @@ +{ + "name": "@angular-devkit-tests/update-peer-dependencies-2", + "version": "1.1.0", + "description": "Tests", + "peerDependencies": { + "@angular-devkit-tests/update-peer-dependencies-2": "1.0.0" + } +} diff --git a/tsconfig.json b/tsconfig.json index ff6b600a05..a97b967b58 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -44,7 +44,8 @@ "@angular-devkit/schematics/tools": [ "./packages/angular_devkit/schematics/tools/index" ], "@angular-devkit/schematics/testing": [ "./packages/angular_devkit/schematics/testing/index" ], "@angular-devkit/build-optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ], - "@angular-devkit/architect": [ "./packages/angular_devkit/architect/src/index" ] + "@angular-devkit/architect": [ "./packages/angular_devkit/architect/src/index" ], + "@schematics/angular": [ "./packages/schematics/angular/index" ] } }, "bazelOptions": { From 4177e6629b18ea4ad2021a9b1a590d506407ab7d Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 9 Mar 2018 14:52:27 -0800 Subject: [PATCH 177/724] feat(@angular-devkit/core): expose smart default providers as part of API --- packages/angular_devkit/core/src/json/schema/interface.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index e642003784..a17211ec93 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -54,4 +54,5 @@ export interface SchemaKeywordValidator { export interface SchemaRegistry { compile(schema: Object): Observable; addFormat(format: SchemaFormat): void; + addSmartDefaultProvider(source: string, provider: SmartDefaultProvider): void; } From 03161172a1312b590c12e5d6082efed81cd71ac5 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 9 Mar 2018 14:52:47 -0800 Subject: [PATCH 178/724] feat(@angular-devkit/schematics): add argv to smart defaults --- .../schematics/tools/workflow/node-workflow.ts | 8 ++++++-- .../angular_devkit/schematics_cli/bin/schematics.ts | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 280a9dca93..7694707fb9 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -29,6 +29,7 @@ import { BuiltinTaskExecutor } from '../../tasks/node'; export class NodeWorkflow implements workflow.Workflow { protected _engine: SchematicEngine<{}, {}>; protected _engineHost: NodeModulesEngineHost; + protected _registry: schema.CoreSchemaRegistry; protected _reporter: Subject = new Subject(); @@ -49,8 +50,8 @@ export class NodeWorkflow implements workflow.Workflow { this._engine = new SchematicEngine(this._engineHost, this); // Add support for schemaJson. - const registry = new schema.CoreSchemaRegistry(formats.standardFormats); - this._engineHost.registerOptionsTransform(validateOptionsWithSchema(registry)); + this._registry = new schema.CoreSchemaRegistry(formats.standardFormats); + this._engineHost.registerOptionsTransform(validateOptionsWithSchema(this._registry)); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); @@ -67,6 +68,9 @@ export class NodeWorkflow implements workflow.Workflow { return maybeContext; } + get registry(): schema.SchemaRegistry { + return this._registry; + } get reporter(): Observable { return this._reporter.asObservable(); } diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 63b5a233c2..a2593cff45 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -7,6 +7,7 @@ * found in the LICENSE file at https://angular.io/license */ import { + JsonObject, normalize, tags, terminal, @@ -188,6 +189,15 @@ const argv2 = minimist(argv['--']); for (const key of Object.keys(argv2)) { args[key] = argv2[key]; } + +// Pass the rest of the arguments as the smart default "argv". Then delete it. +workflow.registry.addSmartDefaultProvider('argv', (schema: JsonObject) => { + if ('index' in schema) { + return argv._[Number(schema['index'])]; + } else { + return argv._; + } +}); delete args._; From b6336a06b2fcb9953826e5c3241b5bac94eb073a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 9 Mar 2018 14:53:07 -0800 Subject: [PATCH 179/724] feat(@schematics/angular): use smart defaults to get name from arguments Application schematic only for demo --- packages/schematics/angular/application/schema.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 308d5f43a3..cf7babe5c6 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -7,7 +7,8 @@ "directory": { "type": "string", "format": "path", - "description": "The directory name to create the app in." + "description": "The directory name to create the app in.", + "default": "" }, "path": { "type": "string", @@ -27,7 +28,11 @@ "name": { "description": "The name of the application.", "type": "string", - "format": "html-selector" + "format": "html-selector", + "$default": { + "$source": "argv", + "index": 0 + } }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", @@ -129,7 +134,5 @@ } }, "required": [ - "name", - "directory" ] } From 943472183c7d7cae8330407a0e91ce8f2f6e59fb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 16 Mar 2018 19:20:43 +0000 Subject: [PATCH 180/724] ci: update webdriver manually This is preferable to updating each time because it can download a new version of chromedriver that is incompatible with the Chrome version on CI. --- .appveyor.yml | 1 + .circleci/config.yml | 1 + package-lock.json | 6 +++--- package.json | 3 ++- .../build_webpack/test/utils/default-workspaces.ts | 4 ++++ .../build_optimizer/webpack/aio-app/package.json | 2 +- .../build_optimizer/webpack/simple-app/package.json | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index fe11617011..bb13c6cce5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,6 +9,7 @@ install: - ps: Install-Product node $env:nodejs_version - npm install -g npm@~5.6.0 - npm install + - npm run webdriver-update test_script: - node --version diff --git a/.circleci/config.yml b/.circleci/config.yml index 6dbc71feef..c19f060dec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,6 +49,7 @@ jobs: steps: - checkout: *post_checkout - restore_cache: *_root_package_lock_key + - run: npm run webdriver-update - run: npm run test-large -- --code-coverage --full --spec-reporter integration: diff --git a/package-lock.json b/package-lock.json index f7142f30b8..b815393440 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6592,9 +6592,9 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, "mini-css-extract-plugin": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.1.0.tgz", - "integrity": "sha512-MRokS8rze/gAUQTU7f3jdRhVAFgYXhKb3Ziw/RnKC+jPxJBxqfn4QNt0GLq6yw+vOrsAG2c/jXxUZK1IG/z8Og==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.2.0.tgz", + "integrity": "sha512-rbuOYZCmNT0FW46hbhIKklBJ6ubwpcWnT81RmTsk0BLTQmL6euOH8lr2d7Wlv5ywJgpH3p7vKy5039dkn4YvxQ==", "requires": { "loader-utils": "1.1.0", "webpack-sources": "1.1.0" diff --git a/package.json b/package.json index 34ea8485ff..8d040d596e 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q --no-save && npm run e2e && npm run benchmark", "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q --no-save && npm run e2e && npm run benchmark", "postinstall": "npm run admin -- patch-dependencies", - "prepush": "node ./bin/devkit-admin hooks/pre-push" + "prepush": "node ./bin/devkit-admin hooks/pre-push", + "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.33" }, "repository": { "type": "git", diff --git a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts index eb87d6a844..b36cea5d87 100644 --- a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts +++ b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts @@ -118,6 +118,10 @@ export const protractorWorkspaceTarget: WorkspaceTarget Date: Fri, 16 Mar 2018 19:03:33 -0400 Subject: [PATCH 181/724] fix(@angular-devkit/build-webpack): workaround ES2015 minifier inlining defect --- .../src/angular-cli-files/models/webpack-configs/common.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts index ea02bd4561..ee109e29d6 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -294,6 +294,9 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // PURE comments work best with 3 passes. // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. passes: buildOptions.buildOptimizer ? 3 : 1, + // Workaround known uglify-es issue + // See https://github.com/mishoo/UglifyJS2/issues/2949#issuecomment-368070307 + inline: wco.supportES2015 ? 1 : 3, }, output: { ascii_only: true, From 961d6c534df6c7747f0d5ff282f752f3b39bb7a8 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 16 Mar 2018 16:50:14 +0000 Subject: [PATCH 182/724] feat(@angular-devkit/core): add experimental workspace scope --- .../angular_devkit/core/src/experimental.ts | 10 + packages/angular_devkit/core/src/index.ts | 2 + .../core/src/workspace/index.ts | 9 + .../core/src/workspace/workspace-schema.json | 94 +++++++ .../core/src/workspace/workspace.ts | 236 ++++++++++++++++++ .../core/src/workspace/workspace_spec.ts | 224 +++++++++++++++++ .../core/workspace/angular-workspace.json | 74 ++++++ 7 files changed, 649 insertions(+) create mode 100644 packages/angular_devkit/core/src/experimental.ts create mode 100644 packages/angular_devkit/core/src/workspace/index.ts create mode 100644 packages/angular_devkit/core/src/workspace/workspace-schema.json create mode 100644 packages/angular_devkit/core/src/workspace/workspace.ts create mode 100644 packages/angular_devkit/core/src/workspace/workspace_spec.ts create mode 100644 tests/@angular_devkit/core/workspace/angular-workspace.json diff --git a/packages/angular_devkit/core/src/experimental.ts b/packages/angular_devkit/core/src/experimental.ts new file mode 100644 index 0000000000..9e2f0199cf --- /dev/null +++ b/packages/angular_devkit/core/src/experimental.ts @@ -0,0 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as workspace from './workspace'; + +export { workspace }; diff --git a/packages/angular_devkit/core/src/index.ts b/packages/angular_devkit/core/src/index.ts index d64907491b..b8125bcd0c 100644 --- a/packages/angular_devkit/core/src/index.ts +++ b/packages/angular_devkit/core/src/index.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import * as experimental from './experimental'; import * as logging from './logger'; import * as terminal from './terminal'; @@ -14,6 +15,7 @@ export * from './utils'; export * from './virtual-fs'; export { + experimental, logging, terminal, }; diff --git a/packages/angular_devkit/core/src/workspace/index.ts b/packages/angular_devkit/core/src/workspace/index.ts new file mode 100644 index 0000000000..ac89707bd4 --- /dev/null +++ b/packages/angular_devkit/core/src/workspace/index.ts @@ -0,0 +1,9 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './workspace'; diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.json b/packages/angular_devkit/core/src/workspace/workspace-schema.json new file mode 100644 index 0000000000..223d4a8a11 --- /dev/null +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.json @@ -0,0 +1,94 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "AngularDevkitWorkspaceSchema", + "title": "Angular Devkit Workspace Schema for validating workspace JSON.", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "description": "Link to schema." + }, + "version": { + "type": "number", + "description": "Workspace Schema version." + }, + "newProjectRoot": { + "type": "string", + "description": "New project root.", + "default": "./" + }, + "cli": { + "$ref": "#/definitions/tool", + "default": {} + }, + "schematics": { + "$ref": "#/definitions/tool", + "default": {} + }, + "architect": { + "$ref": "#/definitions/tool", + "default": {} + }, + "projects": { + "type": "object", + "description": "A map of project names to project options.", + "additionalProperties": { + "$ref": "#/definitions/project" + }, + "default": {} + } + }, + "additionalProperties": false, + "required": [ + "version", + "projects" + ], + "definitions": { + "project": { + "type": "object", + "description": "Project options.", + "properties": { + "projectType": { + "type": "string", + "description": "Project type.", + "enum": [ + "application", + "library" + ] + }, + "root": { + "type": "string", + "description": "Root of the project sourcefiles." + }, + "cli": { + "$ref": "#/definitions/tool", + "default": {} + }, + "schematics": { + "$ref": "#/definitions/tool", + "default": {} + }, + "architect": { + "$ref": "#/definitions/tool", + "default": {} + } + }, + "additionalProperties": false, + "required": [ + "root", + "projectType" + ] + }, + "tool": { + "type": "object", + "description": "Tool options.", + "properties": { + "$schema": { + "type": "string", + "description": "Link to schema." + } + }, + "additionalProperties": true + } + } +} \ No newline at end of file diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts new file mode 100644 index 0000000000..7f36868629 --- /dev/null +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -0,0 +1,236 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Observable } from 'rxjs/Observable'; +import { of } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; +import { concatMap, map, tap } from 'rxjs/operators'; +import { + JsonObject, + JsonParseMode, + Path, + join, + normalize, + parseJson, + schema, + virtualFs, +} from '..'; +import { BaseException } from '../exception/exception'; +// Note: importing BaseException from '..' seems to lead to odd circular dependency errors. +// TypeError: Class extends value undefined is not a constructor or null +// at Object. (\packages\angular_devkit\core\src\workspace\workspace.ts:19:44) + + +export class ProjectNotFoundException extends BaseException { + constructor(name?: string) { + const nameOrDefault = name ? `Project '${name}'` : `Default project`; + super(`${nameOrDefault} could not be found in workspace.`); + } +} + +export class WorkspaceToolNotFoundException extends BaseException { + constructor(name: string) { + super(`Tool ${name} could not be found in workspace.`); + } +} + +export class ProjectToolNotFoundException extends BaseException { + constructor(name: string) { + super(`Tool ${name} could not be found in project.`); + } +} + +export class SchemaValidationException extends BaseException { + constructor(errors: string[]) { + super(`Schema validation failed with the following errors:\n ${errors.join('\n ')}`); + } +} + +export class WorkspaceNotYetLoadedException extends BaseException { + constructor() { super(`Workspace needs to be loaded before it is used.`); } +} + +export interface WorkspaceJson { + version: number; + // TODO: figure out if newProjectRoot should stay here. + newProjectRoot: string; + cli: WorkspaceTool; + schematics: WorkspaceTool; + architect: WorkspaceTool; + projects: { [k: string]: WorkspaceProject }; +} + +export interface WorkspaceProject { + projectType: 'application' | 'library'; + root: string; + cli: WorkspaceTool; + schematics: WorkspaceTool; + architect: WorkspaceTool; +} + +export interface WorkspaceTool extends JsonObject { } + +export class Workspace { + private readonly _workspaceSchemaPath = join(normalize(__dirname), 'workspace-schema.json'); + private _workspaceSchema: JsonObject; + private _workspace: WorkspaceJson; + private _registry: schema.CoreSchemaRegistry; + + constructor(private _root: Path, private _host: virtualFs.Host<{}>) { + this._registry = new schema.CoreSchemaRegistry(); + } + + loadWorkspaceFromJson(json: {}) { + return this._loadWorkspaceSchema().pipe( + concatMap((workspaceSchema) => this.validateAgainstSchema(json, workspaceSchema)), + tap((validatedWorkspace: WorkspaceJson) => this._workspace = validatedWorkspace), + map(() => this), + ); + } + + loadWorkspaceFromHost(workspacePath: Path) { + return this._loadWorkspaceSchema().pipe( + concatMap(() => this._loadJsonFile(join(this._root, workspacePath))), + concatMap(json => this.loadWorkspaceFromJson(json)), + ); + } + + private _loadWorkspaceSchema() { + if (this._workspaceSchema) { + return of(this._workspaceSchema); + } else { + return this._loadJsonFile(this._workspaceSchemaPath).pipe( + tap((workspaceSchema) => this._workspaceSchema = workspaceSchema), + ); + } + } + + private _assertLoaded() { + if (!this._workspace) { + throw new WorkspaceNotYetLoadedException(); + } + } + + get root() { + return this._root; + } + + get host() { + return this._host; + } + + get version() { + this._assertLoaded(); + + return this._workspace.version; + } + + get newProjectRoot() { + this._assertLoaded(); + + return this._workspace.newProjectRoot; + } + + getProject(projectName: string): WorkspaceProject { + this._assertLoaded(); + + const workspaceProject = this._workspace.projects[projectName]; + + if (!workspaceProject) { + throw new ProjectNotFoundException(projectName); + } + + return { + ...workspaceProject, + // Return only the project properties, and remove the tools. + cli: {}, + schematics: {}, + architect: {}, + }; + } + + getCli() { + return this._getTool('cli'); + } + + getSchematics() { + return this._getTool('schematics'); + } + + getArchitect() { + return this._getTool('architect'); + } + + getProjectCli(projectName: string) { + return this._getProjectTool(projectName, 'cli'); + } + + getProjectSchematics(projectName: string) { + return this._getProjectTool(projectName, 'schematics'); + } + + getProjectArchitect(projectName: string) { + return this._getProjectTool(projectName, 'architect'); + } + + private _getTool(toolName: 'cli' | 'schematics' | 'architect'): WorkspaceTool { + this._assertLoaded(); + + const workspaceTool = this._workspace[toolName]; + + if (!workspaceTool) { + throw new WorkspaceToolNotFoundException(toolName); + } + + return workspaceTool; + } + + private _getProjectTool( + projectName: string, toolName: 'cli' | 'schematics' | 'architect', + ): WorkspaceTool { + this._assertLoaded(); + + const workspaceProject = this._workspace.projects[projectName]; + + if (!workspaceProject) { + throw new ProjectNotFoundException(projectName); + } + + const projectTool = workspaceProject[toolName]; + + if (!projectTool) { + throw new ProjectToolNotFoundException(toolName); + } + + return projectTool; + } + + // TODO: add transforms to resolve paths. + validateAgainstSchema(contentJson: {}, schemaJson: JsonObject): Observable { + // JSON validation modifies the content, so we validate a copy of it instead. + const contentJsonCopy = JSON.parse(JSON.stringify(contentJson)); + + return this._registry.compile(schemaJson).pipe( + concatMap(validator => validator(contentJsonCopy)), + concatMap(validatorResult => { + if (validatorResult.success) { + return of(contentJson as T); + } else { + return _throw(new SchemaValidationException(validatorResult.errors as string[])); + } + }), + ); + } + + private _loadJsonFile(path: Path): Observable { + return this._host.read(normalize(path)).pipe( + map(buffer => virtualFs.fileBufferToString(buffer)), + map(str => parseJson(str, JsonParseMode.Loose) as {} as JsonObject), + ); + } +} diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts new file mode 100644 index 0000000000..c754e9de1a --- /dev/null +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -0,0 +1,224 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { tap } from 'rxjs/operators'; +import { NodeJsSyncHost } from '../../node'; +import { join, normalize } from '../virtual-fs'; +import { + ProjectNotFoundException, + SchemaValidationException, + Workspace, + WorkspaceJson, + WorkspaceNotYetLoadedException, +} from './workspace'; + + +describe('Workspace', () => { + const host = new NodeJsSyncHost(); + const root = normalize(__dirname); + // The content of this JSON object should be kept in sync with the path below: + // tests/@angular_devkit/workspace/angular-workspace.json + const workspaceJson: WorkspaceJson = { + version: 1, + newProjectRoot: './projects', + cli: { + '$globalOverride': '${HOME}/.angular-cli.json', + 'schematics': { + 'defaultCollection': '@schematics/angular', + }, + 'warnings': { + 'showDeprecation': false, + }, + }, + schematics: { + '@schematics/angular': { + '*': { + skipImport: true, + 'packageManager': 'yarn', + }, + 'application': { + spec: false, + }, + }, + }, + architect: {}, + projects: { + app: { + root: 'projects/app', + projectType: 'application', + cli: {}, + schematics: { + '@schematics/angular': { + '*': { + spec: false, + }, + }, + }, + architect: { + build: { + builder: '@angular-devkit/build-webpack:browser', + transforms: [ + { + plugin: '@angular-devkit/architect-transforms:replacement', + file: 'environments/environment.ts', + configurations: { + production: 'environments/environment.prod.ts', + }, + }, + ], + options: { + outputPath: '../dist', + index: 'index.html', + main: 'main.ts', + polyfills: 'polyfills.ts', + tsConfig: 'tsconfig.app.json', + progress: false, + }, + configurations: { + production: { + optimizationLevel: 1, + outputHashing: 'all', + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + }, + }, + }, + }, + }, + }, + }; + + it('loads workspace from json', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getProject('app').root).toEqual(workspaceJson.projects['app'].root)), + ).subscribe(undefined, done.fail, done); + }); + + it('loads workspace from host', (done) => { + const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any + const workspaceRoot = join(devkitRoot, 'tests/@angular_devkit/core/workspace'); + const workspace = new Workspace(workspaceRoot, host); + workspace.loadWorkspaceFromHost(normalize('angular-workspace.json')).pipe( + tap((ws) => expect(ws.getProject('app').root).toEqual(workspaceJson.projects['app'].root)), + ).subscribe(undefined, done.fail, done); + }); + + it('errors when workspace fails validation', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson({ foo: 'bar' }) + .subscribe(undefined, (err) => { + expect(err).toEqual(jasmine.any(SchemaValidationException)); + done(); + }, done.fail); + }); + + it('throws when getting information before workspace is loaded', () => { + const workspace = new Workspace(root, host); + expect(() => workspace.version).toThrow(new WorkspaceNotYetLoadedException()); + }); + + it('throws when getting workspace tool before workspace is loaded', () => { + const workspace = new Workspace(root, host); + expect(() => workspace.getCli()).toThrow(new WorkspaceNotYetLoadedException()); + }); + + it('gets workspace root', () => { + const workspace = new Workspace(root, host); + expect(workspace.root).toBe(root); + }); + + it('gets workspace host', () => { + const workspace = new Workspace(root, host); + expect(workspace.host).toBe(host); + }); + + it('gets workspace version', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.version).toEqual(workspaceJson.version)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets workspace new project root', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.newProjectRoot).toEqual(workspaceJson.newProjectRoot)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets project by name', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getProject('app')).toEqual({ + ...workspaceJson.projects['app'], + // Tools should not be returned when getting a project. + cli: {}, + schematics: {}, + architect: {}, + })), + ).subscribe(undefined, done.fail, done); + }); + + it('throws on missing project', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(() => ws.getProject('abc')).toThrow(new ProjectNotFoundException('abc'))), + ).subscribe(undefined, done.fail, done); + }); + + it('gets workspace cli', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getCli()).toEqual(workspaceJson.cli)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets workspace schematics', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getSchematics()).toEqual(workspaceJson.schematics)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets workspace architect', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getArchitect()).toEqual(workspaceJson.architect)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets project cli', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getProjectCli('app')).toEqual(workspaceJson.projects.app.cli)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets project schematics', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getProjectSchematics('app')) + .toEqual(workspaceJson.projects.app.schematics)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets project architect', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getProjectArchitect('app')) + .toEqual(workspaceJson.projects.app.architect)), + ).subscribe(undefined, done.fail, done); + }); + +}); diff --git a/tests/@angular_devkit/core/workspace/angular-workspace.json b/tests/@angular_devkit/core/workspace/angular-workspace.json new file mode 100644 index 0000000000..e05e65d723 --- /dev/null +++ b/tests/@angular_devkit/core/workspace/angular-workspace.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "newProjectRoot": "./projects", + "cli": { + "$globalOverride": "${HOME}/.angular-cli.json", + "schematics": { + "defaultCollection": "@schematics/angular" + }, + "warnings": { + "showDeprecation": false + } + }, + "schematics": { + "@schematics/angular": { + "*": { + "skipImport": true, + "packageManager": "yarn" + }, + "application": { + "spec": false + } + } + }, + "architect": {}, + "projects": { + "app": { + "root": "projects/app", + "projectType": "application", + "cli": {}, + "schematics": { + "@schematics/angular": { + "*": { + "spec": false + } + } + }, + "architect": { + "build": { + "builder": "@angular-devkit/build-webpack:browser", + "transforms": [ + { + "plugin": "@angular-devkit/architect-transforms:replacement", + "file": "environments/environment.ts", + "configurations": { + "production": "environments/environment.prod.ts" + } + } + ], + "options": { + "outputPath": "../dist", + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "tsConfig": "tsconfig.app.json", + "progress": false + }, + "configurations": { + "production": { + "optimizationLevel": 1, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + } + } + } + } + } +} \ No newline at end of file From 726a86221a610ee08c5d65c1238d477593154c1d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 17 Mar 2018 00:27:30 +0000 Subject: [PATCH 183/724] refactor: update architect packages to use new workspace --- .../angular_devkit/architect/src/architect.ts | 246 ++++++++---------- .../architect/src/architect_spec.ts | 162 +++++------- .../angular_devkit/architect/src/builder.ts | 4 +- .../angular_devkit/architect/src/index.ts | 1 - .../architect/src/targets-schema.json | 41 +++ .../architect/src/workspace-schema.json | 106 -------- .../angular_devkit/architect/src/workspace.ts | 30 --- .../architect/test/browser/index.ts | 8 +- .../architect/test/browser/schema.json | 2 +- .../architect_cli/bin/architect.ts | 30 ++- .../build_webpack/src/browser/index.ts | 9 +- .../build_webpack/src/dev-server/index.ts | 31 ++- .../build_webpack/src/extract-i18n/index.ts | 130 ++++----- .../build_webpack/src/karma/index.ts | 9 +- .../build_webpack/src/protractor/index.ts | 71 +++-- .../build_webpack/src/tslint/index.ts | 9 +- .../test/browser/allow-js_spec_large.ts | 13 +- .../test/browser/aot_spec_large.ts | 9 +- .../test/browser/assets_spec_large.ts | 12 +- .../test/browser/base-href_spec_large.ts | 9 +- .../browser/build-optimizer_spec_large.ts | 9 +- .../browser/circular-dependency_spec_large.ts | 10 +- .../test/browser/deploy-url_spec_large.ts | 23 +- .../test/browser/errors_spec_large.ts | 16 +- .../test/browser/i18n_spec_large.ts | 18 +- .../test/browser/lazy-module_spec_large.ts | 30 +-- .../browser/license-extraction_spec_large.ts | 9 +- .../browser/no-entry-module_spec_large.ts | 10 +- .../browser/optimization-level_spec_large.ts | 12 +- .../test/browser/output-hashing_spec_large.ts | 39 ++- .../test/browser/output-path_spec_large.ts | 13 +- .../test/browser/poll_spec_large.ts | 10 +- .../test/browser/rebuild_spec_large.ts | 24 +- .../test/browser/scripts-array_spec_large.ts | 15 +- .../test/browser/source-map_spec_large.ts | 15 +- .../test/browser/stats-json_spec_large.ts | 9 +- .../test/browser/styles_spec_large.ts | 91 +++---- .../subresource-integrity_spec_large.ts | 9 +- .../test/browser/tsconfig-paths_spec_large.ts | 13 +- .../test/browser/vendor-chunk_spec_large.ts | 9 +- .../test/browser/works_spec_large.ts | 9 +- .../test/dev-server/proxy_spec_large.ts | 19 +- .../test/dev-server/public-host_spec_large.ts | 23 +- .../test/dev-server/serve-path_spec_large.ts | 11 +- .../test/dev-server/ssl_spec_large.ts | 18 +- .../test/dev-server/works_spec_large.ts | 11 +- .../test/extract-i18n/works_spec_large.ts | 42 +-- .../test/karma/assets_spec_large.ts | 9 +- .../test/karma/code-coverage_spec_large.ts | 12 +- .../test/karma/rebuilds_spec_large.ts | 13 +- .../test/karma/works_spec_large.ts | 16 +- .../test/protractor/works_spec_large.ts | 32 +-- .../test/tslint/works_spec_large.ts | 40 +-- .../test/utils/default-workspaces.ts | 42 +-- .../build_webpack/test/utils/index.ts | 1 + .../test/utils/run-target-spec.ts | 38 +++ .../core/src/workspace/workspace.ts | 2 +- .../angular-cli-workspace.schema.json | 92 ------- 58 files changed, 647 insertions(+), 1099 deletions(-) create mode 100644 packages/angular_devkit/architect/src/targets-schema.json delete mode 100644 packages/angular_devkit/architect/src/workspace-schema.json delete mode 100644 packages/angular_devkit/architect/src/workspace.ts create mode 100644 packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts delete mode 100644 tests/@angular_devkit/architect/angular-cli-workspace.schema.json diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index c622841b98..4c838f9b6b 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -12,13 +12,13 @@ import { JsonParseMode, Path, dirname, + experimental, getSystemPath, join, logging, normalize, parseJson, resolve, - schema, virtualFs, } from '@angular-devkit/core'; import { resolve as nodeResolve } from '@angular-devkit/core/node'; @@ -26,7 +26,7 @@ import { Observable } from 'rxjs/Observable'; import { forkJoin } from 'rxjs/observable/forkJoin'; import { of } from 'rxjs/observable/of'; import { _throw } from 'rxjs/observable/throw'; -import { concatMap, map } from 'rxjs/operators'; +import { concatMap, map, tap } from 'rxjs/operators'; import { BuildEvent, Builder, @@ -36,15 +36,6 @@ import { BuilderPaths, BuilderPathsMap, } from './builder'; -import { Workspace } from './workspace'; - - -export class ProjectNotFoundException extends BaseException { - constructor(name?: string) { - const nameOrDefault = name ? `Project '${name}'` : `Default project`; - super(`${nameOrDefault} could not be found in workspace.`); - } -} export class TargetNotFoundException extends BaseException { constructor(name?: string) { @@ -59,12 +50,6 @@ export class ConfigurationNotFoundException extends BaseException { } } -export class SchemaValidationException extends BaseException { - constructor(errors: string[]) { - super(`Schema validation failed with the following errors:\n ${errors.join('\n ')}`); - } -} - // TODO: break this exception apart into more granular ones. export class BuilderCannotBeResolvedException extends BaseException { constructor(builder: string) { @@ -72,8 +57,8 @@ export class BuilderCannotBeResolvedException extends BaseException { } } -export class WorkspaceNotYetLoadedException extends BaseException { - constructor() { super(`Workspace needs to be loaded before Architect is used.`); } +export class ArchitectNotYetLoadedException extends BaseException { + constructor() { super(`Architect needs to be loaded before Architect is used.`); } } export class BuilderNotFoundException extends BaseException { @@ -82,155 +67,151 @@ export class BuilderNotFoundException extends BaseException { } } -export interface Target { +export interface BuilderConfiguration { root: Path; projectType: string; builder: string; options: OptionsT; } -export interface TargetOptions { - project?: string; - target?: string; +export interface TargetSpecifier { + project: string; + target: string; configuration?: string; overrides?: Partial; } + +export interface TargetsMap { + [k: string]: Target; +} + +export declare type TargetOptions = T; +export declare type TargetConfiguration = Partial; + +export interface Target { + builder: string; + options: TargetOptions; + configurations?: { [k: string]: TargetConfiguration }; +} + export class Architect { - private readonly _workspaceSchemaPath = join(normalize(__dirname), 'workspace-schema.json'); + private readonly _targetsSchemaPath = join(normalize(__dirname), 'targets-schema.json'); private readonly _buildersSchemaPath = join(normalize(__dirname), 'builders-schema.json'); - private _workspaceSchema: JsonObject; + private _targetsSchema: JsonObject; private _buildersSchema: JsonObject; private _architectSchemasLoaded = false; private _builderPathsMap = new Map(); private _builderDescriptionMap = new Map(); private _builderConstructorMap = new Map>(); - private _workspace: Workspace; - - constructor(private _root: Path, private _host: virtualFs.Host<{}>) { } - - loadWorkspaceFromHost(workspacePath: Path) { - return this._loadArchitectSchemas().pipe( - concatMap(() => this._loadJsonFile(join(this._root, workspacePath))), - concatMap(json => this.loadWorkspaceFromJson(json as {} as Workspace)), - ); - } - - loadWorkspaceFromJson(json: Workspace) { - return this._loadArchitectSchemas().pipe( - concatMap(() => this._validateAgainstSchema(json, this._workspaceSchema)), - concatMap((validatedWorkspace: Workspace) => { - this._workspace = validatedWorkspace; - return of(this); - }), - ); - } + constructor(private _workspace: experimental.workspace.Workspace) { } - private _loadArchitectSchemas() { + loadArchitect() { if (this._architectSchemasLoaded) { - return of(null); + return of(this); } else { return forkJoin( - this._loadJsonFile(this._workspaceSchemaPath), + this._loadJsonFile(this._targetsSchemaPath), this._loadJsonFile(this._buildersSchemaPath), ).pipe( concatMap(([workspaceSchema, buildersSchema]) => { - this._workspaceSchema = workspaceSchema; + this._targetsSchema = workspaceSchema; this._buildersSchema = buildersSchema; + this._architectSchemasLoaded = true; - return of(null); + return of(this); }), ); } } - getTarget(options: TargetOptions = {}): Target { - let { project, target: targetName } = options; - const { configuration, overrides } = options; - - if (!this._workspace) { - throw new WorkspaceNotYetLoadedException(); - } - - project = project || this._workspace.defaultProject as string; - const workspaceProject = this._workspace.projects[project]; - - if (!workspaceProject) { - throw new ProjectNotFoundException(project); - } - - targetName = targetName || workspaceProject.defaultTarget as string; - const workspaceTarget = workspaceProject.targets[targetName]; - - if (!workspaceTarget) { - throw new TargetNotFoundException(targetName); - } + getBuilderConfiguration( + targetSpec: TargetSpecifier, + ): Observable> { + const { + project: projectName, + target: targetName, + configuration: configurationName, + overrides, + } = targetSpec; + + const project = this._workspace.getProject(projectName); + const targets = this._workspace.getProjectArchitect(projectName); + let configuration: TargetConfiguration = {}; + let target: Target, options: TargetOptions; + + return this._workspace.validateAgainstSchema(targets, this._targetsSchema).pipe( + concatMap((validatedWorkspaceTargets) => { + target = validatedWorkspaceTargets[targetName]; + + if (!target) { + return _throw(new TargetNotFoundException(targetName)); + } - const workspaceTargetOptions = workspaceTarget.options; - let workspaceConfiguration; + options = target.options; - if (configuration) { - workspaceConfiguration = workspaceTarget.configurations - && workspaceTarget.configurations[configuration]; + if (configurationName) { + if (!target.configurations) { + return _throw(new ConfigurationNotFoundException(configurationName)); + } - if (!workspaceConfiguration) { - throw new ConfigurationNotFoundException(configuration); - } - } + configuration = target.configurations[configurationName]; - // Resolve root for the target. - // TODO: add Path format to JSON schemas - const target: Target = { - root: resolve(this._root, normalize(workspaceProject.root)), - projectType: workspaceProject.projectType, - builder: workspaceTarget.builder, - options: { - ...workspaceTargetOptions, - ...workspaceConfiguration, - ...overrides as {}, - } as OptionsT, - }; + if (!configuration) { + return _throw(new ConfigurationNotFoundException(configurationName)); + } + } - // Return a copy of the target object, JSON validation changes objects and we don't - // want the original properties to be modified. - return JSON.parse(JSON.stringify(target)); + const builderConfiguration: BuilderConfiguration = { + root: resolve(this._workspace.root, normalize(project.root)), + projectType: project.projectType, + builder: target.builder, + options: { + ...options, + ...configuration, + ...overrides as {}, + } as OptionsT, + }; + + return of(builderConfiguration); + }), + ); } - // Will run the target using the target. run( - target: Target, + builderConfig: BuilderConfiguration, partialContext: Partial = {}, ): Observable { const context: BuilderContext = { logger: new logging.NullLogger(), architect: this, - host: this._host, + host: this._workspace.host, ...partialContext, }; let builderDescription: BuilderDescription; - return this.getBuilderDescription(target).pipe( - concatMap(description => { - builderDescription = description; - - return this.validateBuilderOptions(target, builderDescription); - }), + return this.getBuilderDescription(builderConfig).pipe( + tap(description => builderDescription = description), + concatMap(() => this.validateBuilderOptions(builderConfig, builderDescription)), + tap(validatedBuilderConfig => builderConfig = validatedBuilderConfig), map(() => this.getBuilder(builderDescription, context)), - concatMap(builder => builder.run(target)), + concatMap(builder => builder.run(builderConfig)), ); } - getBuilderDescription(target: Target): Observable { + getBuilderDescription( + builderConfig: BuilderConfiguration, + ): Observable { // Check cache for this builder description. - if (this._builderDescriptionMap.has(target.builder)) { - return of(this._builderDescriptionMap.get(target.builder) as BuilderDescription); + if (this._builderDescriptionMap.has(builderConfig.builder)) { + return of(this._builderDescriptionMap.get(builderConfig.builder) as BuilderDescription); } return new Observable((obs) => { // TODO: this probably needs to be more like NodeModulesEngineHost. - const basedir = getSystemPath(this._root); - const [pkg, builderName] = target.builder.split(':'); + const basedir = getSystemPath(this._workspace.root); + const [pkg, builderName] = builderConfig.builder.split(':'); const pkgJsonPath = nodeResolve(pkg, { basedir, resolvePackageJson: true }); let buildersJsonPath: Path; let builderPaths: BuilderPaths; @@ -240,7 +221,7 @@ export class Architect { concatMap((pkgJson: JsonObject) => { const pkgJsonBuildersentry = pkgJson['builders'] as string; if (!pkgJsonBuildersentry) { - throw new BuilderCannotBeResolvedException(target.builder); + return _throw(new BuilderCannotBeResolvedException(builderConfig.builder)); } buildersJsonPath = join(dirname(normalize(pkgJsonPath)), pkgJsonBuildersentry); @@ -248,13 +229,13 @@ export class Architect { return this._loadJsonFile(buildersJsonPath); }), // Validate builders json. - concatMap((builderPathsMap) => - this._validateAgainstSchema(builderPathsMap, this._buildersSchema)), + concatMap((builderPathsMap) => this._workspace.validateAgainstSchema( + builderPathsMap, this._buildersSchema)), concatMap((builderPathsMap) => { builderPaths = builderPathsMap.builders[builderName]; if (!builderPaths) { - throw new BuilderCannotBeResolvedException(target.builder); + return _throw(new BuilderCannotBeResolvedException(builderConfig.builder)); } // Resolve paths in the builder paths. @@ -263,14 +244,14 @@ export class Architect { builderPaths.class = join(builderJsonDir, builderPaths.class); // Save the builder paths so that we can lazily load the builder. - this._builderPathsMap.set(target.builder, builderPaths); + this._builderPathsMap.set(builderConfig.builder, builderPaths); // Load the schema. return this._loadJsonFile(builderPaths.schema); }), map(builderSchema => { const builderDescription = { - name: target.builder, + name: builderConfig.builder, schema: builderSchema, description: builderPaths.description, }; @@ -285,9 +266,17 @@ export class Architect { } validateBuilderOptions( - target: Target, builderDescription: BuilderDescription, - ): Observable { - return this._validateAgainstSchema(target.options, builderDescription.schema); + builderConfig: BuilderConfiguration, builderDescription: BuilderDescription, + ): Observable> { + return this._workspace.validateAgainstSchema( + builderConfig.options, builderDescription.schema, + ).pipe( + map(validatedOptions => { + builderConfig.options = validatedOptions; + + return builderConfig; + }), + ); } getBuilder( @@ -319,25 +308,8 @@ export class Architect { return builder; } - // Warning: this method changes contentJson in place. - // TODO: add transforms to resolve paths. - private _validateAgainstSchema(contentJson: {}, schemaJson: JsonObject): Observable { - const registry = new schema.CoreSchemaRegistry(); - - return registry.compile(schemaJson).pipe( - concatMap(validator => validator(contentJson)), - concatMap(validatorResult => { - if (validatorResult.success) { - return of(contentJson as T); - } else { - return _throw(new SchemaValidationException(validatorResult.errors as string[])); - } - }), - ); - } - private _loadJsonFile(path: Path): Observable { - return this._host.read(normalize(path)).pipe( + return this._workspace.host.read(normalize(path)).pipe( map(buffer => virtualFs.fileBufferToString(buffer)), map(str => parseJson(str, JsonParseMode.Loose) as {} as JsonObject), ); diff --git a/packages/angular_devkit/architect/src/architect_spec.ts b/packages/angular_devkit/architect/src/architect_spec.ts index c4f57a569b..14c2998d00 100644 --- a/packages/angular_devkit/architect/src/architect_spec.ts +++ b/packages/angular_devkit/architect/src/architect_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { join, normalize } from '@angular-devkit/core'; +import { experimental, join, normalize } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { concatMap, tap, toArray } from 'rxjs/operators'; import { BrowserTargetOptions } from '../test/browser'; @@ -14,27 +14,23 @@ import { Architect, BuilderCannotBeResolvedException, ConfigurationNotFoundException, - ProjectNotFoundException, - Target, TargetNotFoundException, } from './architect'; -import { Workspace } from './workspace'; describe('Architect', () => { const host = new NodeJsSyncHost(); const root = normalize(__dirname); - const workspace: Workspace = { - name: 'spec', + const workspace = new experimental.workspace.Workspace(root, host); + let architect: Architect; + const workspaceJson = { version: 1, - root: 'src', - defaultProject: 'app', + newProjectRoot: 'src', projects: { app: { root: 'app', projectType: 'application', - defaultTarget: 'browser', - targets: { + architect: { browser: { builder: '../test:browser', options: { @@ -42,10 +38,16 @@ describe('Architect', () => { }, configurations: { prod: { - optimizationLevel: 1, + optionalBrowserOption: false, }, }, }, + badBrowser: { + builder: '../test:browser', + options: { + badBrowserOption: 1, + }, + }, karma: { builder: '../test:karma', options: {}, @@ -55,94 +57,46 @@ describe('Architect', () => { }, }; - it('works', (done) => { - const architect = new Architect(root, host); - architect.loadWorkspaceFromJson(workspace).subscribe({ - complete: () => { - const target = architect.getTarget(); - const options = target.options; - - // Check options were composed properly. - expect(target.root).toBe(join(root, 'app')); - expect(target.projectType).toBe('application'); - expect(target.builder).toBe('../test:browser'); - expect(options.browserOption).toBe(1); - - done(); - }, - error: done.fail, - }); - }); - - it('composes project with target and configuration', (done) => { - const architect = new Architect(root, host); - const targetOptions = { - project: 'app', - target: 'browser', - configuration: 'prod', - }; - architect.loadWorkspaceFromJson(workspace).subscribe({ - complete: () => { - const target = architect.getTarget(targetOptions); - const options = target.options; - - // Check options were composed properly. - expect(target.root).toBe(join(root, 'app')); - expect(target.projectType).toBe('application'); - expect(target.builder).toBe('../test:browser'); - expect(options.browserOption).toBe(1); - expect(options.optimizationLevel).toBe(1); - - done(); - }, - error: done.fail, - }); - }); + beforeAll((done) => workspace.loadWorkspaceFromJson(workspaceJson).pipe( + concatMap(ws => new Architect(ws).loadArchitect()), + tap(arch => architect = arch), + ).subscribe(undefined, done.fail, done)); - it('throws when missing project is used', (done) => { - const architect = new Architect(root, host); - const targetOptions = { project: 'missing' }; - architect.loadWorkspaceFromJson(workspace).subscribe({ - complete: () => { - const err = new ProjectNotFoundException('missing'); - expect(() => architect.getTarget(targetOptions)).toThrow(err); - done(); - }, - error: done.fail, - }); + it('works', (done) => { + const targetSpec = { project: 'app', target: 'browser', configuration: 'prod' }; + architect.getBuilderConfiguration(targetSpec).pipe( + tap(builderConfig => { + expect(builderConfig.root).toBe(join(root, 'app')); + expect(builderConfig.projectType).toBe('application'); + expect(builderConfig.builder).toBe('../test:browser'); + expect(builderConfig.options.browserOption).toBe(1); + expect(builderConfig.options.optionalBrowserOption).toBe(false); + }), + ).subscribe(undefined, done.fail, done); }); - it('throws when missing target is used', (done) => { - const architect = new Architect(root, host); - const targetOptions = { target: 'missing' }; - architect.loadWorkspaceFromJson(workspace).subscribe({ - complete: () => { - const err = new TargetNotFoundException('missing'); - expect(() => architect.getTarget(targetOptions)).toThrow(err); + it('errors when missing target is used', (done) => { + const targetSpec = { project: 'app', target: 'missing', configuration: 'prod' }; + architect.getBuilderConfiguration(targetSpec) + .subscribe(undefined, (err: Error) => { + expect(err).toEqual(jasmine.any(TargetNotFoundException)); done(); - }, - error: done.fail, - }); + }, done.fail); }); it('throws when missing configuration is used', (done) => { - const architect = new Architect(root, host); - const targetOptions = { configuration: 'missing' }; - architect.loadWorkspaceFromJson(workspace).subscribe({ - complete: () => { - const err = new ConfigurationNotFoundException('missing'); - expect(() => architect.getTarget(targetOptions)).toThrow(err); + const targetSpec = { project: 'app', target: 'browser', configuration: 'missing' }; + architect.getBuilderConfiguration(targetSpec) + .subscribe(undefined, (err: Error) => { + expect(err).toEqual(jasmine.any(ConfigurationNotFoundException)); done(); - }, - error: done.fail, - }); + }, done.fail); }); it('runs targets', (done) => { - const architect = new Architect(root, host); - const targetOptions = { project: 'app', target: 'browser' }; - architect.loadWorkspaceFromJson(workspace).pipe( - concatMap((architect) => architect.run(architect.getTarget(targetOptions))), + const targetSpec = { project: 'app', target: 'browser', configuration: 'prod' }; + architect.getBuilderConfiguration(targetSpec).pipe( + concatMap((builderConfig) => architect.run(builderConfig)), toArray(), tap(events => { expect(events.length).toBe(3); @@ -150,24 +104,26 @@ describe('Architect', () => { expect(events[1].success).toBe(false); expect(events[2].success).toBe(true); }), - ).subscribe(done, done.fail); - + ).subscribe(undefined, done.fail, done); }); - it('throws when invalid target is used', (done) => { - let target: Target; - const architect = new Architect(root, host); - const targetOptions = { project: 'app', target: 'karma' }; - architect.loadWorkspaceFromJson(workspace).pipe( - concatMap((architect) => { - target = architect.getTarget(targetOptions); + it('errors when builder cannot be resolved', (done) => { + const targetSpec = { project: 'app', target: 'karma' }; + architect.getBuilderConfiguration(targetSpec).pipe( + concatMap((builderConfig) => architect.run(builderConfig)), + ).subscribe(undefined, (err: Error) => { + expect(err).toEqual(jasmine.any(BuilderCannotBeResolvedException)); + done(); + }, done.fail); + }); - return architect.run(target); - }), - ).subscribe(() => done.fail(), (err: Error) => { - const expectedErr = new BuilderCannotBeResolvedException(target.builder); - expect(err.message).toEqual(expectedErr.message); + it('errors when builder options fail validation', (done) => { + const targetSpec = { project: 'app', target: 'badBrowser' }; + architect.getBuilderConfiguration(targetSpec).pipe( + concatMap((builderConfig) => architect.run(builderConfig)), + ).subscribe(undefined, (err: Error) => { + expect(err).toEqual(jasmine.any(experimental.workspace.SchemaValidationException)); done(); - }); + }, done.fail); }); }); diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts index 292b22428a..3d218d1cd3 100644 --- a/packages/angular_devkit/architect/src/builder.ts +++ b/packages/angular_devkit/architect/src/builder.ts @@ -8,7 +8,7 @@ import { JsonObject, Path, logging, virtualFs } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; -import { Architect, Target } from './architect'; +import { Architect, BuilderConfiguration } from './architect'; export interface BuilderContext { @@ -25,7 +25,7 @@ export interface BuildEvent { } export interface Builder { - run(_target: Target>): Observable; + run(builderConfig: BuilderConfiguration>): Observable; } export interface BuilderPathsMap { diff --git a/packages/angular_devkit/architect/src/index.ts b/packages/angular_devkit/architect/src/index.ts index 64ad39b023..44e3fe06ab 100644 --- a/packages/angular_devkit/architect/src/index.ts +++ b/packages/angular_devkit/architect/src/index.ts @@ -8,4 +8,3 @@ export * from './architect'; export * from './builder'; -export * from './workspace'; diff --git a/packages/angular_devkit/architect/src/targets-schema.json b/packages/angular_devkit/architect/src/targets-schema.json new file mode 100644 index 0000000000..95b9de5d9e --- /dev/null +++ b/packages/angular_devkit/architect/src/targets-schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "ArchitectTargets", + "title": "Targets schema for validating Architect targets configuration.", + "type": "object", + "description": "A map of available project targets.", + "additionalProperties": { + "$ref": "#/definitions/target" + }, + "required": [], + "definitions": { + "target": { + "type": "object", + "description": "Target options.", + "properties": { + "builder": { + "type": "string", + "description": "The builder used for this package." + }, + "options": { + "$ref": "#/definitions/options" + }, + "configurations": { + "type": "object", + "description": "A map of alternative target options.", + "additionalProperties": { + "$ref": "#/definitions/options" + } + } + }, + "required": [ + "builder", + "options" + ] + }, + "options": { + "type": "object", + "description": "Target options." + } + } +} \ No newline at end of file diff --git a/packages/angular_devkit/architect/src/workspace-schema.json b/packages/angular_devkit/architect/src/workspace-schema.json deleted file mode 100644 index 7cfaf9b80c..0000000000 --- a/packages/angular_devkit/architect/src/workspace-schema.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "id": "BuildFacaceWorkspaceSchema", - "title": "Workspace schema for validating a Architect workspace configuration file.", - "type": "object", - "properties": { - "$schema": { - "type": "string", - "description": "Link to schema." - }, - "name": { - "type": "string", - "description": "Workspace name." - }, - "version": { - "type": "number", - "description": "Workspace Schema version." - }, - "root": { - "type": "string", - "description": "Workspace root.", - "default": "./" - }, - "defaultProject": { - "type": "string", - "description": "Default target to run." - }, - "projects": { - "type": "object", - "description": "A map of project names to project options.", - "additionalProperties": { - "$ref": "#/definitions/project" - } - } - }, - "additionalProperties": false, - "required": [ - "name", - "version", - "projects" - ], - "definitions": { - "project": { - "type": "object", - "description": "Project options.", - "properties": { - "defaultTarget": { - "type": "string", - "description": "Default target to run." - }, - "projectType": { - "type": "string", - "description": "Project type.", - "enum": [ - "application", - "library" - ] - }, - "root": { - "type": "string", - "description": "Root of the project sourcefiles." - }, - "targets": { - "type": "object", - "description": "A map of available project targets.", - "additionalProperties": { - "$ref": "#/definitions/target" - } - } - }, - "additionalProperties": false, - "required": [ - "projectType", - "root" - ] - }, - "target": { - "type": "object", - "description": "Target options.", - "properties": { - "builder": { - "type": "string", - "description": "The builder used for this package." - }, - "options": { - "$ref": "#/definitions/options" - }, - "configurations": { - "type": "object", - "description": "A map of alternative target options.", - "additionalProperties": { - "$ref": "#/definitions/options" - } - } - }, - "required": [ - "builder", - "options" - ] - }, - "options": { - "type": "object", - "description": "Target options." - } - } -} diff --git a/packages/angular_devkit/architect/src/workspace.ts b/packages/angular_devkit/architect/src/workspace.ts deleted file mode 100644 index 2157d24680..0000000000 --- a/packages/angular_devkit/architect/src/workspace.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { JsonObject } from '@angular-devkit/core'; - -export interface Workspace { - name: string; - version: number; - root: string; - defaultProject?: string; - projects: { [k: string]: WorkspaceProject }; -} - -export interface WorkspaceProject { - projectType: 'application' | 'library'; - root: string; - defaultTarget?: string; - targets: { [k: string]: WorkspaceTarget }; -} - -export interface WorkspaceTarget { - builder: string; - options: TargetOptions; - configurations?: { [k: string]: Partial }; -} diff --git a/packages/angular_devkit/architect/test/browser/index.ts b/packages/angular_devkit/architect/test/browser/index.ts index fee4853274..c390a731f9 100644 --- a/packages/angular_devkit/architect/test/browser/index.ts +++ b/packages/angular_devkit/architect/test/browser/index.ts @@ -7,7 +7,7 @@ */ import { Observable } from 'rxjs/Observable'; -import { BuildEvent, Builder, Target } from '../../src'; +import { BuildEvent, Builder, BuilderConfiguration } from '../../src'; const successBuildEvent: BuildEvent = { @@ -20,13 +20,11 @@ const failBuildEvent: BuildEvent = { export interface BrowserTargetOptions { browserOption: number; - optimizationLevel: number; + optionalBrowserOption: boolean; } export default class BrowserTarget implements Builder { - // constructor(public context: BuilderContext) { } - - run(_info: Target>): Observable { + run(_browserConfig: BuilderConfiguration>): Observable { return new Observable(obs => { obs.next(successBuildEvent); obs.next(failBuildEvent); diff --git a/packages/angular_devkit/architect/test/browser/schema.json b/packages/angular_devkit/architect/test/browser/schema.json index 064bafe1a8..ee1dc6002b 100644 --- a/packages/angular_devkit/architect/test/browser/schema.json +++ b/packages/angular_devkit/architect/test/browser/schema.json @@ -9,7 +9,7 @@ "type": "number", "description": "A required option" }, - "optimize": { + "optionalBrowserOption": { "type": "boolean", "description": "A non-required option with a default", "default": false diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index 865bf7e45c..4b60ffa352 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -7,8 +7,8 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect, Workspace } from '@angular-devkit/architect'; -import { dirname, normalize, tags } from '@angular-devkit/core'; +import { Architect } from '@angular-devkit/architect'; +import { dirname, experimental, normalize, tags } from '@angular-devkit/core'; import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; import { existsSync, readFileSync } from 'fs'; import * as minimist from 'minimist'; @@ -81,7 +81,7 @@ if (targetStr) { // Load workspace configuration file. const currentPath = process.cwd(); -const configFileName = '.architect.json'; +const configFileName = '.workspace.json'; const configFilePath = findUp([configFileName], currentPath); if (!configFilePath) { @@ -91,25 +91,33 @@ if (!configFilePath) { throw 3; // TypeScript doesn't know that process.exit() never returns. } -const workspacePath = dirname(normalize(configFilePath)); +const root = dirname(normalize(configFilePath)); const configContent = readFileSync(configFilePath, 'utf-8'); -const configJson = JSON.parse(configContent) as Workspace; +const workspaceJson = JSON.parse(configContent); const host = new NodeJsSyncHost(); -const architect = new Architect(workspacePath, host); -architect.loadWorkspaceFromJson(configJson).pipe( - concatMap(() => { +const workspace = new experimental.workspace.Workspace(root, host); +let architect: Architect; + +workspace.loadWorkspaceFromJson(workspaceJson).pipe( + concatMap(ws => new Architect(ws).loadArchitect()), + concatMap(arch => { + architect = arch; + const overrides = { ...argv }; delete overrides['help']; delete overrides['_']; - const targetOptions = { + const targetSpec = { project, target: targetName, configuration, overrides, }; - const target = architect.getTarget(targetOptions); + + return architect.getBuilderConfiguration(targetSpec); + }), + concatMap(builderConfig => { // TODO: better logging of what's happening. if (argv.help) { @@ -117,7 +125,7 @@ architect.loadWorkspaceFromJson(configJson).pipe( return _throw('Target help NYI.'); // architect.help(targetOptions, logger); } else { - return architect.run(target, { logger }); + return architect.run(builderConfig, { logger }); } }), ).subscribe({ diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 4b9dd9a698..45a09c0b41 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; import { Path, getSystemPath, normalize, resolve } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { of } from 'rxjs/observable/of'; @@ -117,7 +122,7 @@ export class BrowserBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { + run(target: BuilderConfiguration): Observable { const options = target.options; // TODO: verify using of(null) to kickstart things is a pattern. diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index 58145a5ee1..8960df1be6 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -6,12 +6,17 @@ * found in the LICENSE file at https://angular.io/license */ -import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; import { getSystemPath, tags } from '@angular-devkit/core'; import { existsSync, readFileSync } from 'fs'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; -import { concatMap } from 'rxjs/operators'; +import { concatMap, map, tap } from 'rxjs/operators'; import * as url from 'url'; import * as webpack from 'webpack'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; @@ -78,7 +83,7 @@ export class DevServerBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { + run(target: BuilderConfiguration): Observable { const root = getSystemPath(target.root); const options = target.options; @@ -407,15 +412,17 @@ export class DevServerBuilder implements Builder { const [project, target, configuration] = options.browserTarget.split(':'); // Override browser build watch setting. const overrides = { watch: options.watch }; - let browserTarget: Target; - - const browserTargetOptions = { project, target, configuration, overrides }; - browserTarget = this.context.architect.getTarget(browserTargetOptions); - - return this.context.architect.getBuilderDescription(browserTarget).pipe( - concatMap(browserDescription => - this.context.architect.validateBuilderOptions(browserTarget, browserDescription)), - ); + const browserTargetSpec = { project, target, configuration, overrides }; + let builderConfig: BuilderConfiguration; + + return this.context.architect.getBuilderConfiguration(browserTargetSpec) + .pipe( + tap(cfg => builderConfig = cfg), + concatMap(builderConfig => this.context.architect.getBuilderDescription(builderConfig)), + concatMap(browserDescription => + this.context.architect.validateBuilderOptions(builderConfig, browserDescription)), + map(browserConfig => browserConfig.options), + ); } } diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts index 4a3613f9f4..6adb5de7c1 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts @@ -6,10 +6,15 @@ * found in the LICENSE file at https://angular.io/license */ -import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; -import { concatMap } from 'rxjs/operators'; +import { concatMap, map, tap } from 'rxjs/operators'; import * as webpack from 'webpack'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; @@ -29,73 +34,76 @@ export class ExtractI18nBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { + run(target: BuilderConfiguration): Observable { const options = target.options; const [project, targetName, configuration] = options.browserTarget.split(':'); // Override browser build watch setting. const overrides = { watch: false }; - const browserTargetOptions = { project, target: targetName, configuration, overrides }; - const browserTarget = this.context.architect - .getTarget(browserTargetOptions); - - return this.context.architect.getBuilderDescription(browserTarget).pipe( - concatMap(browserDescription => - this.context.architect.validateBuilderOptions(browserTarget, browserDescription)), - concatMap((validatedBrowserOptions) => new Observable(obs => { - const browserOptions = validatedBrowserOptions; - const browserBuilder = new BrowserBuilder(this.context); - - // We need to determine the outFile name so that AngularCompiler can retrieve it. - let outFile = options.outFile || getI18nOutfile(options.i18nFormat); - if (options.outputPath) { - // AngularCompilerPlugin doesn't support genDir so we have to adjust outFile instead. - outFile = path.join(options.outputPath, outFile); - } - - // Extracting i18n uses the browser target webpack config with some specific options. - const webpackConfig = browserBuilder.buildWebpackConfig(target.root, { - ...browserOptions, - optimizationLevel: 0, - i18nLocale: options.i18nLocale, - i18nOutFormat: options.i18nFormat, - i18nOutFile: outFile, - aot: true, - }); - - const webpackCompiler = webpack(webpackConfig); - webpackCompiler.outputFileSystem = new MemoryFS(); - const statsConfig = getWebpackStatsConfig(); - - const callback: webpack.compiler.CompilerCallback = (err, stats) => { - if (err) { - return obs.error(err); + const browserTargetSpec = { project, target: targetName, configuration, overrides }; + let browserBuilderConfig: BuilderConfiguration; + + return this.context.architect.getBuilderConfiguration(browserTargetSpec) + .pipe( + tap(cfg => browserBuilderConfig = cfg), + concatMap(builderConfig => this.context.architect.getBuilderDescription(builderConfig)), + concatMap(browserDescription => + this.context.architect.validateBuilderOptions(browserBuilderConfig, browserDescription)), + map(browserBuilderConfig => browserBuilderConfig.options), + concatMap((validatedBrowserOptions) => new Observable(obs => { + const browserOptions = validatedBrowserOptions; + const browserBuilder = new BrowserBuilder(this.context); + + // We need to determine the outFile name so that AngularCompiler can retrieve it. + let outFile = options.outFile || getI18nOutfile(options.i18nFormat); + if (options.outputPath) { + // AngularCompilerPlugin doesn't support genDir so we have to adjust outFile instead. + outFile = path.join(options.outputPath, outFile); } - const json = stats.toJson('verbose'); - if (stats.hasWarnings()) { - this.context.logger.warn(statsWarningsToString(json, statsConfig)); + // Extracting i18n uses the browser target webpack config with some specific options. + const webpackConfig = browserBuilder.buildWebpackConfig(target.root, { + ...browserOptions, + optimizationLevel: 0, + i18nLocale: options.i18nLocale, + i18nOutFormat: options.i18nFormat, + i18nOutFile: outFile, + aot: true, + }); + + const webpackCompiler = webpack(webpackConfig); + webpackCompiler.outputFileSystem = new MemoryFS(); + const statsConfig = getWebpackStatsConfig(); + + const callback: webpack.compiler.CompilerCallback = (err, stats) => { + if (err) { + return obs.error(err); + } + + const json = stats.toJson('verbose'); + if (stats.hasWarnings()) { + this.context.logger.warn(statsWarningsToString(json, statsConfig)); + } + + if (stats.hasErrors()) { + this.context.logger.error(statsErrorsToString(json, statsConfig)); + } + + obs.next({ success: !stats.hasErrors() }); + + obs.complete(); + }; + + try { + webpackCompiler.run(callback); + } catch (err) { + if (err) { + this.context.logger.error( + '\nAn error occured during the extraction:\n' + ((err && err.stack) || err)); + } + throw err; } - - if (stats.hasErrors()) { - this.context.logger.error(statsErrorsToString(json, statsConfig)); - } - - obs.next({ success: !stats.hasErrors() }); - - obs.complete(); - }; - - try { - webpackCompiler.run(callback); - } catch (err) { - if (err) { - this.context.logger.error( - '\nAn error occured during the extraction:\n' + ((err && err.stack) || err)); - } - throw err; - } - }))); + }))); } } diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts index 51f19b7d95..b7d44d7fb8 100644 --- a/packages/angular_devkit/build_webpack/src/karma/index.ts +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; import { getSystemPath } from '@angular-devkit/core'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; @@ -65,7 +70,7 @@ export interface KarmaBuilderOptions { export class KarmaBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { + run(target: BuilderConfiguration): Observable { const root = getSystemPath(target.root); const options = target.options; diff --git a/packages/angular_devkit/build_webpack/src/protractor/index.ts b/packages/angular_devkit/build_webpack/src/protractor/index.ts index d50d7eaf7d..e8c63ef257 100644 --- a/packages/angular_devkit/build_webpack/src/protractor/index.ts +++ b/packages/angular_devkit/build_webpack/src/protractor/index.ts @@ -9,16 +9,16 @@ import { BuildEvent, Builder, + BuilderConfiguration, BuilderContext, BuilderDescription, - Target, } from '@angular-devkit/architect'; import { getSystemPath, tags } from '@angular-devkit/core'; import { resolve } from 'path'; import { Observable } from 'rxjs/Observable'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { of } from 'rxjs/observable/of'; -import { concatMap, take } from 'rxjs/operators'; +import { concatMap, take, tap } from 'rxjs/operators'; import * as url from 'url'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; import { DevServerBuilderOptions } from '../dev-server'; @@ -41,7 +41,7 @@ export class ProtractorBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { + run(target: BuilderConfiguration): Observable { const root = getSystemPath(target.root); const options = target.options; @@ -60,43 +60,42 @@ export class ProtractorBuilder implements Builder { // Override browser build watch setting. const overrides = { watch: false, host: options.host, port: options.port }; const browserTargetOptions = { project, target: targetName, configuration, overrides }; - const devServerTarget = this.context.architect - .getTarget(browserTargetOptions); + let devServerBuilderConfig: BuilderConfiguration; let devServerDescription: BuilderDescription; let baseUrl: string; - return this.context.architect.getBuilderDescription(devServerTarget).pipe( - concatMap(description => { - devServerDescription = description; - - return this.context.architect.validateBuilderOptions(devServerTarget, - devServerDescription); - }), - concatMap(() => { - // Compute baseUrl from devServerOptions. - if (options.devServerTarget && devServerTarget.options.publicHost) { - let publicHost = devServerTarget.options.publicHost; - if (!/^\w+:\/\//.test(publicHost)) { - publicHost = `${devServerTarget.options.ssl - ? 'https' - : 'http'}://${publicHost}`; + return this.context.architect + .getBuilderConfiguration(browserTargetOptions).pipe( + tap(cfg => devServerBuilderConfig = cfg), + concatMap(builderConfig => this.context.architect.getBuilderDescription(builderConfig)), + tap(description => devServerDescription = description), + concatMap(devServerDescription => this.context.architect.validateBuilderOptions( + devServerBuilderConfig, devServerDescription)), + concatMap(() => { + // Compute baseUrl from devServerOptions. + if (options.devServerTarget && devServerBuilderConfig.options.publicHost) { + let publicHost = devServerBuilderConfig.options.publicHost; + if (!/^\w+:\/\//.test(publicHost)) { + publicHost = `${devServerBuilderConfig.options.ssl + ? 'https' + : 'http'}://${publicHost}`; + } + const clientUrl = url.parse(publicHost); + baseUrl = url.format(clientUrl); + } else if (options.devServerTarget) { + baseUrl = url.format({ + protocol: devServerBuilderConfig.options.ssl ? 'https' : 'http', + hostname: options.host, + port: devServerBuilderConfig.options.port.toString(), + }); } - const clientUrl = url.parse(publicHost); - baseUrl = url.format(clientUrl); - } else if (options.devServerTarget) { - baseUrl = url.format({ - protocol: devServerTarget.options.ssl ? 'https' : 'http', - hostname: options.host, - port: devServerTarget.options.port.toString(), - }); - } - - // Save the computed baseUrl back so that Protractor can use it. - options.baseUrl = baseUrl; - - return of(this.context.architect.getBuilder(devServerDescription, this.context)); - }), - concatMap(builder => builder.run(devServerTarget)), + + // Save the computed baseUrl back so that Protractor can use it. + options.baseUrl = baseUrl; + + return of(this.context.architect.getBuilder(devServerDescription, this.context)); + }), + concatMap(builder => builder.run(devServerBuilderConfig)), ); } diff --git a/packages/angular_devkit/build_webpack/src/tslint/index.ts b/packages/angular_devkit/build_webpack/src/tslint/index.ts index bf267fb7ab..04d00e473a 100644 --- a/packages/angular_devkit/build_webpack/src/tslint/index.ts +++ b/packages/angular_devkit/build_webpack/src/tslint/index.ts @@ -6,7 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; import { getSystemPath } from '@angular-devkit/core'; import { readFileSync } from 'fs'; import * as glob from 'glob'; @@ -35,7 +40,7 @@ export class TslintBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { + run(target: BuilderConfiguration): Observable { const root = getSystemPath(target.root); const options = target.options; diff --git a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts index 3b37c7b008..fd9976c53d 100644 --- a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts @@ -6,15 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder allow js', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -28,8 +25,7 @@ describe('Browser Builder allow js', () => { // TODO: this test originally edited tsconfig to have `"allowJs": true` but works without it. // Investigate. - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -42,8 +38,7 @@ describe('Browser Builder allow js', () => { const overrides = { aot: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts index bd1a3a118c..efd0675400 100644 --- a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -23,8 +21,7 @@ describe('Browser Builder', () => { it('works', (done) => { const overrides = { aot: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts index 0f8a94331b..bbe172ca64 100644 --- a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder assets', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -41,8 +39,7 @@ describe('Browser Builder assets', () => { ], }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { // Assets we expect should be there. @@ -95,8 +92,7 @@ describe('Browser Builder assets', () => { ], }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts index 2999b550c7..ac3399bde5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder base href', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -28,8 +26,7 @@ describe('Browser Builder base href', () => { const overrides = { baseHref: '/myUrl' }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts index a84fe20c36..70b4fa271b 100644 --- a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder build optimizer', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -22,8 +20,7 @@ describe('Browser Builder build optimizer', () => { it('works', (done) => { const overrides = { aot: true, buildOptimizer: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts index 01fff0218b..f97aa66533 100644 --- a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts @@ -6,21 +6,18 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; +import { tap } from 'rxjs/operators'; import { TestLogger, TestProjectHost, browserWorkspaceTarget, - makeWorkspace, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Browser Builder circular dependency detection', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -32,8 +29,7 @@ describe('Browser Builder circular dependency detection', () => { const overrides = { baseHref: '/myUrl' }; const logger = new TestLogger('circular-dependencies'); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + runTargetSpec(host, browserWorkspaceTarget, overrides, logger).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(logger.includes('Circular dependency detected')).toBe(true)), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts index 70e02a9957..f21b76412d 100644 --- a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts @@ -6,34 +6,30 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder deploy url', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('uses deploy url for bundles urls', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ - overrides: { deployUrl: 'deployUrl/' }, - }))), + const overrides = { deployUrl: 'deployUrl/' }; + + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toContain('deployUrl/main.js'); }), - concatMap(() => architect.run(architect.getTarget({ - overrides: { deployUrl: 'http://example.com/some/path/' }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { deployUrl: 'http://example.com/some/path/' })), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); @@ -44,10 +40,9 @@ describe('Browser Builder deploy url', () => { }, 30000); it('uses deploy url for in webpack runtime', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ - overrides: { deployUrl: 'deployUrl/' }, - }))), + const overrides = { deployUrl: 'deployUrl/' }; + + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'runtime.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts index 066e496305..bd154055ec 100644 --- a/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts @@ -6,21 +6,18 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; +import { tap } from 'rxjs/operators'; import { TestLogger, TestProjectHost, browserWorkspaceTarget, - makeWorkspace, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Browser Builder errors', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -32,8 +29,7 @@ describe('Browser Builder errors', () => { `); const logger = new TestLogger('errors-compilation'); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget(), { logger })), + runTargetSpec(host, browserWorkspaceTarget, undefined, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(logger.includes('polyfills.ts is missing from the TypeScript')).toBe(true); @@ -45,8 +41,7 @@ describe('Browser Builder errors', () => { host.appendToFile('src/app/app.component.ts', ']]]'); const logger = new TestLogger('errors-syntax'); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget(), { logger })), + runTargetSpec(host, browserWorkspaceTarget, undefined, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(logger.includes('Declaration or statement expected.')).toBe(true); @@ -58,8 +53,7 @@ describe('Browser Builder errors', () => { host.replaceInFile('src/app/app.component.ts', `'app-root'`, `(() => 'app-root')()`); const logger = new TestLogger('errors-static'); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides: { aot: true } }), { logger })), + runTargetSpec(host, browserWorkspaceTarget, { aot: true }, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(logger.includes('Function expressions are not supported in')).toBe(true); diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts index affd2a2e5a..4757f29919 100644 --- a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder i18n', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); const emptyTranslationFile = ` @@ -56,8 +54,7 @@ describe('Browser Builder i18n', () => { i18nLocale: 'fr', }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); @@ -79,8 +76,7 @@ describe('Browser Builder i18n', () => { host.writeMultipleFiles({ 'src/locale/messages.fr.xlf': emptyTranslationFile }); host.appendToFile('src/app/app.component.html', '

Other content

'); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); @@ -102,8 +98,7 @@ describe('Browser Builder i18n', () => { host.writeMultipleFiles({ 'src/locale/messages.fr.xlf': emptyTranslationFile }); host.appendToFile('src/app/app.component.html', '

Other content

'); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -111,8 +106,7 @@ describe('Browser Builder i18n', () => { it('register locales', (done) => { const overrides = { aot: true, i18nLocale: 'fr_FR' }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts index df638c85cd..a60df1cc63 100644 --- a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts @@ -6,11 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; +import { tap } from 'rxjs/operators'; import { BrowserBuilderOptions } from '../../src'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; export const lazyModuleFiles: { [path: string]: string } = { @@ -72,7 +71,6 @@ export const lazyModuleImport: { [path: string]: string } = { describe('Browser Builder lazy modules', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -82,8 +80,7 @@ describe('Browser Builder lazy modules', () => { host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles(lazyModuleImport); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -97,8 +94,7 @@ describe('Browser Builder lazy modules', () => { // Using `import()` in TS require targetting `esnext` modules. host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -114,8 +110,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -127,8 +122,7 @@ describe('Browser Builder lazy modules', () => { 'src/main.ts': `declare var System: any; System.import('./lazy-module');`, }); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -143,8 +137,7 @@ describe('Browser Builder lazy modules', () => { const overrides: Partial = { namedChunks: false }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -158,8 +151,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), @@ -178,8 +170,7 @@ describe('Browser Builder lazy modules', () => { const overrides: Partial = { commonChunk: false }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), @@ -212,8 +203,7 @@ describe('Browser Builder lazy modules', () => { const overrides: Partial = { lazyModules: ['app/lazy/lazy.module'] }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))) .toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts index c9307fa227..906e57de3f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder license extraction', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -24,8 +22,7 @@ describe('Browser Builder license extraction', () => { // TODO: make license extraction independent from optimization level. const overrides = { extractLicenses: true, optimizationLevel: 1 }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, '3rdpartylicenses.txt'); diff --git a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts index d9f3767f49..87d696a7a7 100644 --- a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts @@ -6,15 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder no entry module', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -26,8 +23,7 @@ describe('Browser Builder no entry module', () => { const overrides = { baseHref: '/myUrl' }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts index 07876dcd95..592437a4f8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder optimization level', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -23,8 +21,7 @@ describe('Browser Builder optimization level', () => { it('works', (done) => { const overrides = { optimizationLevel: 1 }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); @@ -40,8 +37,7 @@ describe('Browser Builder optimization level', () => { const overrides = { optimizationLevel: 1 }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'vendor.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts index 1bc3774ac0..76f28d08d8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts @@ -6,16 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { normalize } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; describe('Browser Builder output hashing', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -64,8 +62,7 @@ describe('Browser Builder output hashing', () => { // We must do several builds instead of a single one in watch mode, so that the output // path is deleted on each run and only contains the most recent files. - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap(() => { // Save the current hashes. oldHashes = generateFileHashMap(); @@ -73,7 +70,7 @@ describe('Browser Builder output hashing', () => { host.writeMultipleFiles(lazyModuleImport); }), // Lazy chunk hash should have changed without modifying main bundle. - concatMap(() => architect.run(architect.getTarget({ overrides }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, []); @@ -81,7 +78,7 @@ describe('Browser Builder output hashing', () => { host.writeMultipleFiles({ 'src/styles.css': 'body { background: blue; }' }); }), // Style hash should change. - concatMap(() => architect.run(architect.getTarget({ overrides }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, ['styles']); @@ -89,7 +86,7 @@ describe('Browser Builder output hashing', () => { host.writeMultipleFiles({ 'src/app/app.component.css': 'h1 { margin: 10px; }' }); }), // Main hash should change, since inline styles go in the main bundle. - concatMap(() => architect.run(architect.getTarget({ overrides }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, ['main']); @@ -97,7 +94,7 @@ describe('Browser Builder output hashing', () => { host.appendToFile('src/app/lazy/lazy.module.ts', `console.log(1);`); }), // Lazy loaded bundle should change, and so should inline. - concatMap(() => architect.run(architect.getTarget({ overrides }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, ['lazy.module']); @@ -105,7 +102,7 @@ describe('Browser Builder output hashing', () => { host.appendToFile('src/main.ts', ''); }), // Nothing should have changed. - concatMap(() => architect.run(architect.getTarget({ overrides }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, []); @@ -120,11 +117,8 @@ describe('Browser Builder output hashing', () => { // We must do several builds instead of a single one in watch mode, so that the output // path is deleted on each run and only contains the most recent files. - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - // 'all' should hash everything. - concatMap(() => architect.run(architect.getTarget( - { overrides: { outputHashing: 'all', extractCss: true } }, - ))), + // 'all' should hash everything. + runTargetSpec(host, browserWorkspaceTarget, { outputHashing: 'all', extractCss: true }).pipe( tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy(); expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy(); @@ -134,9 +128,8 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); }), // 'none' should hash nothing. - concatMap(() => architect.run(architect.getTarget( - { overrides: { outputHashing: 'none', extractCss: true } }, - ))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { outputHashing: 'none', extractCss: true })), tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy(); expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeFalsy(); @@ -146,9 +139,8 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); }), // 'media' should hash css resources only. - concatMap(() => architect.run(architect.getTarget( - { overrides: { outputHashing: 'media', extractCss: true } }, - ))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { outputHashing: 'media', extractCss: true })), tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy(); expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeFalsy(); @@ -158,9 +150,8 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); }), // 'bundles' should hash bundles only. - concatMap(() => architect.run(architect.getTarget( - { overrides: { outputHashing: 'bundles', extractCss: true } }, - ))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { outputHashing: 'bundles', extractCss: true })), tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy(); expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy(); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts index eab2e8d9e3..c601f1a2ba 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder output path', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -27,8 +25,7 @@ describe('Browser Builder output path', () => { // Failed compilations still delete files, but don't output any. host.asSync().delete(join(workspaceRoot, 'src', 'app', 'app.component.ts')); - return architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(host.asSync().exists(outputPath)).toBe(false); @@ -39,8 +36,6 @@ describe('Browser Builder output path', () => { it('does not allow output path to be project root', (done) => { const overrides = { outputPath: './' }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), - ).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserWorkspaceTarget, overrides).subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts index b78310f759..294ae49af5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts @@ -6,15 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, debounceTime, take, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { debounceTime, take, tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder poll', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -23,8 +20,7 @@ describe('Browser Builder poll', () => { const overrides = { watch: true, poll: 1000 }; let msAvg = 1000; let lastTime: number; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( // Debounce 1s, otherwise changes are too close together and polling doesn't work. debounceTime(1000), tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index eacd0d932f..9c1e122c49 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -6,14 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, debounceTime, take, tap } from 'rxjs/operators'; +import { debounceTime, take, tap } from 'rxjs/operators'; import { TestLogger, TestProjectHost, browserWorkspaceTarget, - makeWorkspace, + runTargetSpec, workspaceRoot, } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; @@ -21,7 +20,6 @@ import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; describe('Browser Builder', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -80,8 +78,7 @@ describe('Browser Builder', () => { let buildNumber = 0; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( // We must debounce on watch mode because file watchers are not very accurate. // Changes from just before a process runs can be picked up and cause rebuilds. // In this case, cleanup from the test right before this one causes a few rebuilds. @@ -127,8 +124,7 @@ describe('Browser Builder', () => { it('rebuilds on CSS changes', (done) => { const overrides = { watch: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( debounceTime(500), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), @@ -151,8 +147,7 @@ describe('Browser Builder', () => { const typeError = `is not assignable to parameter of type 'number'`; let buildNumber = 0; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + runTargetSpec(host, browserWorkspaceTarget, overrides, logger).pipe( debounceTime(500), tap((buildEvent) => { buildNumber += 1; @@ -202,8 +197,7 @@ describe('Browser Builder', () => { const overrides = { watch: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( debounceTime(500), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })), @@ -227,8 +221,7 @@ describe('Browser Builder', () => { const syntaxError = 'Declaration or statement expected.'; let buildNumber = 0; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + runTargetSpec(host, browserWorkspaceTarget, overrides, logger).pipe( debounceTime(1000), tap((buildEvent) => { buildNumber += 1; @@ -297,8 +290,7 @@ describe('Browser Builder', () => { const overrides = { watch: true, aot: true, forkTypeChecker: false }; let buildNumber = 0; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( debounceTime(1000), tap((buildEvent) => { buildNumber += 1; diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts index 8edbe089a9..734ccf17bd 100644 --- a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { PathFragment, join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder scripts array', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); const scripts: { [path: string]: string } = { 'src/input-script.js': 'console.log(\'input-script\'); var number = 1+1;', @@ -68,8 +66,7 @@ describe('Browser Builder scripts array', () => { scripts: getScriptsOption(), }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); @@ -88,8 +85,7 @@ describe('Browser Builder scripts array', () => { scripts: getScriptsOption(), }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const scriptsBundle = host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js/); @@ -118,8 +114,7 @@ describe('Browser Builder scripts array', () => { const overrides = { scripts: getScriptsOption() }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const re = new RegExp( diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts index 489ad3bd8c..40da9e8677 100644 --- a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder source map', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -23,8 +21,7 @@ describe('Browser Builder source map', () => { it('works', (done) => { const overrides = { sourceMap: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js.map'); @@ -36,8 +33,7 @@ describe('Browser Builder source map', () => { it('does not output source map when disabled', (done) => { const overrides = { sourceMap: false }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js.map'); @@ -49,8 +45,7 @@ describe('Browser Builder source map', () => { it('supports eval source map', (done) => { const overrides = { sourceMap: true, evalSourceMap: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(join(outputPath, 'main.js.map'))).toBe(false); diff --git a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts index e5184011db..7976f4673f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder stats json', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -23,8 +21,7 @@ describe('Browser Builder stats json', () => { it('works', (done) => { const overrides = { statsJson: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'stats.json'); diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts index 8ea0973e28..be4ef354a4 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { normalize, tags, virtualFs } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder styles', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const extensionsWithImportSupport = ['css', 'scss', 'less', 'styl']; const extensionsWithVariableSupport = ['scss', 'less', 'styl']; const imgSvg = ` @@ -69,8 +67,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, styles: getStylesOption() }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), // Check css files were created. tap(() => Object.keys(cssMatches).forEach(fileName => { @@ -87,8 +84,8 @@ describe('Browser Builder styles', () => { expect(content).toMatch(cssIndexMatches[fileName]); })), // Also test with extractCss false. - concatMap(() => architect.run(architect.getTarget( - { overrides: { extractCss: false, styles: getStylesOption() } }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { extractCss: false, styles: getStylesOption() })), // TODO: figure out why adding this tap breaks typings. // This also happens in the output-hashing spec. // tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -127,8 +124,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -177,8 +173,7 @@ describe('Browser Builder styles', () => { host.replaceInFile('src/app/app.component.ts', './app.component.css', `./app.component.${ext}`); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); @@ -208,8 +203,7 @@ describe('Browser Builder styles', () => { styles: [{ input: `styles.${ext}` }], }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -224,8 +218,7 @@ describe('Browser Builder styles', () => { ], }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -274,8 +267,7 @@ describe('Browser Builder styles', () => { }, }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); @@ -308,8 +300,7 @@ describe('Browser Builder styles', () => { styles: [{ input: `styles.scss` }], }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; @@ -352,8 +343,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, styles: [{ input: `styles.scss` }] }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), // TODO: find a way to check logger/output for warnings. // if (stdout.match(/postcss-url: \.+: Can't read file '\.+', ignoring/)) { @@ -372,8 +362,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, optimizationLevel: 0 }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; @@ -396,8 +385,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, optimizationLevel: 1 }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; @@ -431,11 +419,8 @@ describe('Browser Builder styles', () => { const stylesBundle = 'dist/styles.css'; const mainBundle = 'dist/main.js'; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - // Check base paths are correctly generated. - concatMap(() => architect.run(architect.getTarget({ - overrides: { aot: true, extractCss: true }, - }))), + // Check base paths are correctly generated. + runTargetSpec(host, browserWorkspaceTarget, { aot: true, extractCss: true }).pipe( tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -449,9 +434,9 @@ describe('Browser Builder styles', () => { expect(host.asSync().exists(normalize('dist/component-img-relative.png'))).toBe(true); }), // Check urls with deploy-url scheme are used as is. - concatMap(() => architect.run(architect.getTarget({ - overrides: { extractCss: true, baseHref: '/base/', deployUrl: 'http://deploy.url/' }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { extractCss: true, baseHref: '/base/', deployUrl: 'http://deploy.url/' }, + )), tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -459,9 +444,9 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); }), // Check urls with base-href scheme are used as is (with deploy-url). - concatMap(() => architect.run(architect.getTarget({ - overrides: { extractCss: true, baseHref: 'http://base.url/', deployUrl: 'deploy/' }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { extractCss: true, baseHref: 'http://base.url/', deployUrl: 'deploy/' }, + )), tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -469,13 +454,12 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('http://base.url/deploy/assets/component-img-absolute.svg')`); }), // Check urls with deploy-url and base-href scheme only use deploy-url. - concatMap(() => architect.run(architect.getTarget({ - overrides: { - extractCss: true, - baseHref: 'http://base.url/', - deployUrl: 'http://deploy.url/', - }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, { + extractCss: true, + baseHref: 'http://base.url/', + deployUrl: 'http://deploy.url/', + }, + )), tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -483,9 +467,9 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); }), // Check with schemeless base-href and deploy-url flags. - concatMap(() => architect.run(architect.getTarget({ - overrides: { extractCss: true, baseHref: '/base/', deployUrl: 'deploy/' }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { extractCss: true, baseHref: '/base/', deployUrl: 'deploy/' }, + )), tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -493,9 +477,9 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('/base/deploy/assets/component-img-absolute.svg')`); }), // Check with identical base-href and deploy-url flags. - concatMap(() => architect.run(architect.getTarget({ - overrides: { extractCss: true, baseHref: '/base/', deployUrl: '/base/' }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { extractCss: true, baseHref: '/base/', deployUrl: '/base/' }, + )), tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -503,9 +487,9 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); }), // Check with only base-href flag. - concatMap(() => architect.run(architect.getTarget({ - overrides: { extractCss: true, baseHref: '/base/' }, - }))), + concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + { extractCss: true, baseHref: '/base/' }, + )), tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -522,8 +506,7 @@ describe('Browser Builder styles', () => { scripts: [{ input: '../../../../../node_modules/bootstrap/dist/js/bootstrap.js' }], }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts index 0a3c8503a5..18f31f6dba 100644 --- a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder subresource integrity', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -29,8 +27,7 @@ describe('Browser Builder subresource integrity', () => { const overrides = { subresourceIntegrity: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); diff --git a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts index 54b985f281..ab7a46ea60 100644 --- a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts @@ -6,15 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder tsconfig paths', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -36,8 +33,7 @@ describe('Browser Builder tsconfig paths', () => { }, `); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -79,8 +75,7 @@ describe('Browser Builder tsconfig paths', () => { console.log(meaning5) `); - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts index e6f28a5932..dae89a5867 100644 --- a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts @@ -6,15 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder vendor chunk', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -23,8 +21,7 @@ describe('Browser Builder vendor chunk', () => { it('works', (done) => { const overrides = { vendorChunk: true }; - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'vendor.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts index cfa5147c00..576c12f815 100644 --- a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts @@ -6,23 +6,20 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, browserWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { // Default files should be in outputPath. diff --git a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts index 8e0b17dd83..69d24eb697 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts @@ -6,8 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; import * as express from 'express'; // tslint:disable-line:no-implicit-dependencies import * as http from 'http'; import { fromPromise } from 'rxjs/observable/fromPromise'; @@ -17,15 +15,14 @@ import { TestProjectHost, browserWorkspaceTarget, devServerWorkspaceTarget, - makeWorkspace, request, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Dev Server Builder proxy', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -51,11 +48,7 @@ describe('Dev Server Builder proxy', () => { const overrides: Partial = { proxyConfig: '../proxy.config.json' }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/api/test'))), tap(response => { @@ -69,11 +62,7 @@ describe('Dev Server Builder proxy', () => { it('errors out with a missing proxy file', (done) => { const overrides: Partial = { proxyConfig: '../proxy.config.json' }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), - ).subscribe(undefined, done, done.fail); + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides) + .subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts index b02e8f20b2..73cf50c4e7 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts @@ -6,8 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; @@ -15,15 +13,14 @@ import { TestProjectHost, browserWorkspaceTarget, devServerWorkspaceTarget, - makeWorkspace, request, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Dev Server Builder public host', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); // We have to spoof the host to a non-numeric one because Webpack Dev Server does not // check the hosts anymore when requests come from numeric IP addresses. const headers = { host: 'http://spoofy.mcspoofface' }; @@ -32,11 +29,7 @@ describe('Dev Server Builder public host', () => { afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget]).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('Invalid Host header')), @@ -47,11 +40,7 @@ describe('Dev Server Builder public host', () => { it('works', (done) => { const overrides: Partial = { publicHost: headers.host }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('HelloWorldApp')), @@ -62,11 +51,7 @@ describe('Dev Server Builder public host', () => { it('works', (done) => { const overrides: Partial = { disableHostCheck: true }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts index 3946b3206d..53d1065c3c 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts @@ -6,8 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; @@ -15,15 +13,14 @@ import { TestProjectHost, browserWorkspaceTarget, devServerWorkspaceTarget, - makeWorkspace, request, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Dev Server Builder serve path', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -32,11 +29,7 @@ describe('Dev Server Builder serve path', () => { it('works', (done) => { const overrides: Partial = { servePath: 'test/' }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/test/'))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts index 210241bee1..0ebd0d2061 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize, tags } from '@angular-devkit/core'; +import { tags } from '@angular-devkit/core'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; @@ -15,15 +14,14 @@ import { TestProjectHost, browserWorkspaceTarget, devServerWorkspaceTarget, - makeWorkspace, request, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Dev Server Builder ssl', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -31,11 +29,7 @@ describe('Dev Server Builder ssl', () => { it('works', (done) => { const overrides: Partial = { ssl: true }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), @@ -107,11 +101,7 @@ describe('Dev Server Builder ssl', () => { sslCert: '../ssl/server.crt', }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts index 2cfec54504..1500d6f1a0 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts @@ -6,33 +6,26 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { TestProjectHost, browserWorkspaceTarget, devServerWorkspaceTarget, - makeWorkspace, request, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Dev Server Builder', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - devServerWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget]).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts index 1b842b1a24..a406d0256b 100644 --- a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts @@ -6,22 +6,20 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; +import { tap } from 'rxjs/operators'; import { TestLogger, TestProjectHost, browserWorkspaceTarget, extractI18nWorkspaceTarget, - makeWorkspace, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Extract i18n Target', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const extractionFile = join(normalize('src'), 'messages.xlf'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -30,11 +28,7 @@ describe('Extract i18n Target', () => { it('works', (done) => { host.appendToFile('src/app/app.component.html', '

i18n test

'); - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget]).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists((extractionFile))).toBe(true); @@ -49,11 +43,7 @@ describe('Extract i18n Target', () => { host.appendToFile('src/app/app.component.html', '

Hello world inner

'); - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget(), { logger })), + runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], {}, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); const msg = 'Could not mark an element as translatable inside a translatable section'; @@ -66,11 +56,7 @@ describe('Extract i18n Target', () => { host.appendToFile('src/app/app.component.html', '

i18n test

'); const overrides = { i18nLocale: 'fr' }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists((extractionFile))).toBe(true); @@ -86,11 +72,7 @@ describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), outFile); const overrides = { outFile }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(extractionFile)).toBe(true); @@ -107,11 +89,7 @@ describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), outputPath, 'messages.xlf'); const overrides = { outputPath }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(extractionFile)).toBe(true); @@ -126,11 +104,7 @@ describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), 'messages.xmb'); const overrides = { i18nFormat: 'xmb' }; - architect.loadWorkspaceFromJson(makeWorkspace([ - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(extractionFile)).toBe(true); diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts index 7acf9d1789..9916c86cdb 100644 --- a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts @@ -6,15 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap } from 'rxjs/operators'; -import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Karma Builder assets', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -98,8 +94,7 @@ describe('Karma Builder assets', () => { ], }; - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( ).subscribe(undefined, done.fail, done); }, 45000); }); diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts index dfee9aef0b..8e3dc84ee7 100644 --- a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts @@ -6,16 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, debounceTime, tap } from 'rxjs/operators'; +import { debounceTime, tap } from 'rxjs/operators'; import { KarmaBuilderOptions } from '../../src'; -import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Karma Builder code coverage', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const coverageFilePath = normalize('coverage/lcov.info'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -24,8 +22,7 @@ describe('Karma Builder code coverage', () => { it('works', (done) => { const overrides: Partial = { codeCoverage: true }; - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( // It seems like the coverage files take a while being written to disk, so we wait 500ms here. debounceTime(500), tap(buildEvent => { @@ -47,8 +44,7 @@ describe('Karma Builder code coverage', () => { ], }; - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( // It seems like the coverage files take a while being written to disk, so we wait 500ms here. debounceTime(500), tap(buildEvent => { diff --git a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts index b8f78ebecb..60e2718d5f 100644 --- a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts @@ -6,10 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, debounceTime, take, tap } from 'rxjs/operators'; -import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { debounceTime, take, tap } from 'rxjs/operators'; +import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; // Karma watch mode is currently bugged: @@ -18,15 +16,13 @@ import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } f // TODO: fix these before 6.0 final. xdescribe('Karma Builder watch mode', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { const overrides = { watch: true }; - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( debounceTime(500), tap((buildEvent) => expect(buildEvent.success).toBe(true)), take(1), @@ -37,8 +33,7 @@ xdescribe('Karma Builder watch mode', () => { const overrides = { watch: true }; let buildNumber = 0; - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( debounceTime(500), tap((buildEvent) => { buildNumber += 1; diff --git a/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts index d050cca48c..c6b16f59c5 100644 --- a/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts @@ -6,22 +6,18 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, karmaWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +import { tap } from 'rxjs/operators'; +import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; describe('Karma Builder', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('runs', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, karmaWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -30,8 +26,7 @@ describe('Karma Builder', () => { host.writeMultipleFiles({ 'src/app/app.component.spec.ts': '

definitely not typescript

', }); - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, karmaWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -40,8 +35,7 @@ describe('Karma Builder', () => { // Need to investigate why. Might be TS 2.7. xit('supports ES2015 target', (done) => { host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); - architect.loadWorkspaceFromJson(makeWorkspace(karmaWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, karmaWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts index 8696b935f1..d1c4b31952 100644 --- a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts @@ -6,33 +6,30 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { normalize } from '@angular-devkit/core'; -import { concatMap, retry } from 'rxjs/operators'; +import { retry } from 'rxjs/operators'; import { TestProjectHost, browserWorkspaceTarget, devServerWorkspaceTarget, - makeWorkspace, protractorWorkspaceTarget, + runTargetSpec, workspaceRoot, } from '../utils'; describe('Protractor Builder', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace([ + runTargetSpec(host, [ browserWorkspaceTarget, devServerWorkspaceTarget, protractorWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget())), + ]).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 30000); @@ -40,8 +37,7 @@ describe('Protractor Builder', () => { it('works with no devServerTarget', (done) => { const overrides = { devServerTarget: undefined }; - architect.loadWorkspaceFromJson(makeWorkspace(protractorWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, protractorWorkspaceTarget, overrides).pipe( // This should fail because no server is available for connection. ).subscribe(undefined, done, done.fail); }, 30000); @@ -49,14 +45,12 @@ describe('Protractor Builder', () => { it('picks up changed port in devServer', (done) => { const modifiedDevServerTarget = devServerWorkspaceTarget; modifiedDevServerTarget.options.port = 4400; - const workspace = makeWorkspace([ + + runTargetSpec(host, [ browserWorkspaceTarget, modifiedDevServerTarget, protractorWorkspaceTarget, - ]); - - architect.loadWorkspaceFromJson(workspace).pipe( - concatMap(() => architect.run(architect.getTarget())), + ]).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 60000); @@ -67,12 +61,11 @@ describe('Protractor Builder', () => { const overrides = { specs: ['./e2e/renamed-app.e2e-spec.ts'] }; - architect.loadWorkspaceFromJson(makeWorkspace([ + runTargetSpec(host, [ browserWorkspaceTarget, devServerWorkspaceTarget, protractorWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + ], overrides).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 60000); @@ -91,12 +84,11 @@ describe('Protractor Builder', () => { const overrides = { suite: 'app' }; - architect.loadWorkspaceFromJson(makeWorkspace([ + runTargetSpec(host, [ browserWorkspaceTarget, devServerWorkspaceTarget, protractorWorkspaceTarget, - ])).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + ], overrides).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 60000); diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts index 749ee73a1a..c4205cd5d5 100644 --- a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts @@ -6,14 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect } from '@angular-devkit/architect'; import { normalize, virtualFs } from '@angular-devkit/core'; -import { concatMap, tap } from 'rxjs/operators'; +import { tap } from 'rxjs/operators'; import { TslintBuilderOptions } from '../../src'; import { TestLogger, TestProjectHost, - makeWorkspace, + runTargetSpec, tslintWorkspaceTarget, workspaceRoot, } from '../utils'; @@ -21,22 +20,13 @@ import { describe('Tslint Target', () => { const host = new TestProjectHost(workspaceRoot); - const architect = new Architect(normalize(workspaceRoot), host); const filesWithErrors = { 'src/foo.ts': 'const foo = "";\n' }; beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), - tap((buildEvent) => expect(buildEvent.success).toBe(true)), - ).subscribe(undefined, done.fail, done); - }, 30000); - - it('works', (done) => { - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget())), + runTargetSpec(host, tslintWorkspaceTarget).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -45,8 +35,7 @@ describe('Tslint Target', () => { host.writeMultipleFiles(filesWithErrors); const overrides: Partial = { exclude: ['**/foo.ts'] }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -55,8 +44,7 @@ describe('Tslint Target', () => { host.writeMultipleFiles(filesWithErrors); const overrides: Partial = { fix: true }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = normalize('src/foo.ts'); @@ -71,8 +59,7 @@ describe('Tslint Target', () => { const logger = new TestLogger('lint-force'); const overrides: Partial = { force: true }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + runTargetSpec(host, tslintWorkspaceTarget, overrides, logger).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(logger.includes(`" should be '`)).toBe(true); @@ -86,8 +73,7 @@ describe('Tslint Target', () => { const logger = new TestLogger('lint-format'); const overrides: Partial = { format: 'stylish' }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }), { logger })), + runTargetSpec(host, tslintWorkspaceTarget, overrides, logger).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), tap(() => { expect(logger.includes(`quotemark`)).toBe(true); @@ -111,8 +97,7 @@ describe('Tslint Target', () => { }); const overrides: Partial = { tslintConfig: undefined }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -133,8 +118,7 @@ describe('Tslint Target', () => { }); const overrides: Partial = { tslintConfig: '../tslint.json' }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -145,8 +129,7 @@ describe('Tslint Target', () => { files: ['app/**/*.ts'], }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -157,8 +140,7 @@ describe('Tslint Target', () => { typeCheck: true, }; - architect.loadWorkspaceFromJson(makeWorkspace(tslintWorkspaceTarget)).pipe( - concatMap(() => architect.run(architect.getTarget({ overrides }))), + runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( ).subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts index b36cea5d87..0cfbc1c43e 100644 --- a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts +++ b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import { Workspace, WorkspaceTarget } from '@angular-devkit/architect'; -import { getSystemPath, join, normalize, relative } from '@angular-devkit/core'; +import { Target } from '@angular-devkit/architect'; +import { experimental, getSystemPath, join, normalize, relative } from '@angular-devkit/core'; import { BrowserBuilderOptions, DevServerBuilderOptions, @@ -24,43 +24,29 @@ export const workspaceRoot = join(devkitRoot, const builderPath = join(devkitRoot, 'packages/angular_devkit/build_webpack'); const relativeBuilderPath = relative(workspaceRoot, builderPath); - -// Workspace and options need to be created from functions because JSON Schema validation -// will mutate change the objects. -export function makeWorkspace( - WorkspaceTargets: WorkspaceTarget<{}> | WorkspaceTarget<{}>[], -): Workspace { - if (!Array.isArray(WorkspaceTargets)) { - WorkspaceTargets = [WorkspaceTargets]; - } - - const workspace: Workspace = { - name: 'spec', +export function makeWorkspace(WorkspaceTargets: Target[] ): experimental.workspace.WorkspaceJson { + const workspace = { version: 1, - root: '', - defaultProject: 'app', projects: { app: { root: 'src', projectType: 'application', - targets: {}, + architect: {} as { [k: string]: Target }, }, }, }; WorkspaceTargets.forEach(WorkspaceTarget => { - workspace.projects.app.targets[WorkspaceTarget.builder] = { + workspace.projects.app.architect[WorkspaceTarget.builder] = { builder: `${getSystemPath(relativeBuilderPath)}:${WorkspaceTarget.builder}`, options: WorkspaceTarget.options, - } as WorkspaceTarget; - // Last spec target is the default. - workspace.projects.app.defaultTarget = WorkspaceTarget.builder; + } as Target; }); - return workspace; + return workspace as {} as experimental.workspace.WorkspaceJson; } -export const browserWorkspaceTarget: WorkspaceTarget> = { +export const browserWorkspaceTarget: Target> = { builder: 'browser', options: { outputPath: '../dist', @@ -79,7 +65,7 @@ export const browserWorkspaceTarget: WorkspaceTarget> = { +export const devServerWorkspaceTarget: Target> = { builder: 'devServer', options: { browserTarget: 'app:browser', @@ -87,14 +73,14 @@ export const devServerWorkspaceTarget: WorkspaceTarget> = { +export const extractI18nWorkspaceTarget: Target> = { builder: 'extractI18n', options: { browserTarget: 'app:browser', }, }; -export const karmaWorkspaceTarget: WorkspaceTarget> = { +export const karmaWorkspaceTarget: Target> = { builder: 'karma', options: { main: 'test.ts', @@ -113,7 +99,7 @@ export const karmaWorkspaceTarget: WorkspaceTarget> }, }; -export const protractorWorkspaceTarget: WorkspaceTarget> = { +export const protractorWorkspaceTarget: Target> = { builder: 'protractor', options: { protractorConfig: '../protractor.conf.js', @@ -125,7 +111,7 @@ export const protractorWorkspaceTarget: WorkspaceTarget> = { +export const tslintWorkspaceTarget: Target> = { builder: 'tslint', options: { tsConfig: 'tsconfig.app.json', diff --git a/packages/angular_devkit/build_webpack/test/utils/index.ts b/packages/angular_devkit/build_webpack/test/utils/index.ts index 24373de34c..281c8b6e8d 100644 --- a/packages/angular_devkit/build_webpack/test/utils/index.ts +++ b/packages/angular_devkit/build_webpack/test/utils/index.ts @@ -10,3 +10,4 @@ export * from './default-workspaces'; export * from './request'; export * from './test-project-host'; export * from './test-logger'; +export * from './run-target-spec'; diff --git a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts new file mode 100644 index 0000000000..72dc809be3 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts @@ -0,0 +1,38 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, BuildEvent, Target } from '@angular-devkit/architect'; +import { experimental, logging } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; +import { concatMap, tap } from 'rxjs/operators'; +import { TestProjectHost, workspaceRoot } from '../utils'; +import { makeWorkspace } from './default-workspaces'; + + +export function runTargetSpec( + host: TestProjectHost, + targets: Target<{}> | Target<{}>[], + overrides = {}, + logger: logging.Logger = new logging.NullLogger(), +): Observable { + if (!Array.isArray(targets)) { + targets = [targets]; + } + + const targetName = targets[targets.length - 1].builder; + const targetSpec = { project: 'app', target: targetName, overrides }; + const workspace = new experimental.workspace.Workspace(workspaceRoot, host); + let architect: Architect; + + return workspace.loadWorkspaceFromJson(makeWorkspace(targets)).pipe( + concatMap(ws => new Architect(ws).loadArchitect()), + tap(arch => architect = arch), + concatMap(() => architect.getBuilderConfiguration(targetSpec)), + concatMap(cfg => architect.run(cfg, { logger })), + ); +} diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 7f36868629..4815b392dc 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -219,7 +219,7 @@ export class Workspace { concatMap(validator => validator(contentJsonCopy)), concatMap(validatorResult => { if (validatorResult.success) { - return of(contentJson as T); + return of(contentJsonCopy as T); } else { return _throw(new SchemaValidationException(validatorResult.errors as string[])); } diff --git a/tests/@angular_devkit/architect/angular-cli-workspace.schema.json b/tests/@angular_devkit/architect/angular-cli-workspace.schema.json deleted file mode 100644 index 4f60f41280..0000000000 --- a/tests/@angular_devkit/architect/angular-cli-workspace.schema.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$schema": "../../../packages/angular_devkit/architect/src/workspace-schema.json", - "name": "pet-finder", - "version": 1, - "root": "src", - "defaultProject": "myApp", - "projects": { - "myApp": { - "projectType": "application", - "root": "src/my-app", - "defaultTarget": "browser", - "targets": { - "browser": { - "builder": "@angular-devkit/build-webpack:browser", - "options": { - "tsConfigPath": "tsconfig.app.json", - "outputPath": "dist", - "indexPath": "index.html", - "entryPoints": { - "main": "main.ts", - "polyfills": "polyfills.ts" - } - }, - "configurations": { - "production": { - "optimizationLevel": 1 - } - } - }, - "devServer": { - "builder": "@angular-devkit/build-webpack:devServer", - "options": { - "browserTarget": "myApp:browser" - } - }, - "extractI18n": { - "builder": "@angular-devkit/build-webpack:extractI18n", - "options": { - "browserTarget": "myApp:browser" - } - }, - "karma": { - "builder": "@angular-devkit/build-webpack:karma", - "options": { - "tsConfigPath": "tsconfig.app.json", - "karmaConfigPath": "karma.conf.js", - "entryPoints": { - "main": "main.ts", - "polyfills": "polyfills.ts" - } - } - }, - "tslint": { - "builder": "@angular-devkit/build-webpack:tslint", - "options": { - "tsConfigPath": "tsconfig.app.json" - } - } - } - }, - "myLibrary": { - "projectType": "library", - "root": "./src/library", - "targets": { - "nodeModule": { - "builder": "@angular-devkit/build-ng-packagr:nodeModule", - "options": { - "tsConfigPath": "tsconfig.json", - "packageJsonPath": "package.json", - "entryPoints": { - "index": "index.ts" - } - } - } - } - }, - "e2e": { - "projectType": "application", - "root": "./e2e", - "defaultTarget": "browser", - "targets": { - "browser": { - "builder": "@angular-devkit/build-webpack:protractor", - "options": { - "protractorConfigPath": "protractor.conf.js", - "devServerTarget": "myApp:browser" - } - } - } - } - } -} From f6d5d15dc3886403567a99407a9338112be47edf Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 16 Mar 2018 22:39:18 -0700 Subject: [PATCH 184/724] release: 0.4.6 --- .monorepo.json | 42 +++++++++---------- package-lock.json | 6 +-- package.json | 2 +- .../angular_devkit/build_webpack/package.json | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 30db29f999..3d307274d9 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,7 +42,7 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.5", + "version": "0.4.6", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "@angular-devkit/architect": { @@ -53,14 +53,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.6", - "hash": "89ccbb57e8b20da7b20beb870b51702a", + "version": "0.0.7", + "hash": "4673efec2a63e71ed639a928bc2d83d8", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.6", - "hash": "00dc4bc12e8da05374137a2aa6af21b6", + "version": "0.0.7", + "hash": "290511f4eb44413a19f4beae44d900bf", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -71,7 +71,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.5", + "version": "0.4.6", "hash": "16619356762199de42e1641d35e5ec7d", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -83,8 +83,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" } ], - "version": "0.0.6", - "hash": "bb8269555ca239a0bf127bc5568e573a", + "version": "0.0.7", + "hash": "530b50f4c826937facf9d94881e4040e", "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, "@angular-devkit/core": { @@ -95,8 +95,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.5", - "hash": "4e94700fca2f542b9f0a633d1dc5bf43", + "version": "0.4.6", + "hash": "5ed585e9eccdc0c98e254dca7aa29f68", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -107,41 +107,41 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.5", - "hash": "bfd989d6d703396c77c26ed6772ab2ed", + "version": "0.4.6", + "hash": "bbc4ed77fe0169277aafff89dd48cfe4", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.5", - "hash": "0d1449e5e077acc19cec65221b9c158a", + "version": "0.4.6", + "hash": "ebdb3ec1ec15ef5c91a7f46f93df6137", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.5", - "hash": "1558125147bbf122200e31c20ffaa9be", + "version": "0.4.6", + "hash": "0cf53840426bea125cb32561a04022b8", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.5", + "version": "0.4.6", "section": "Schematics", - "hash": "c9723671e270d9d6eb7f4cdbfc37c77e" + "hash": "85f50de4da92597ef8adb1d484107825" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.5", + "version": "0.4.6", "section": "Schematics", "hash": "1abc8090ac37083ca02f92ab794c6d7f", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.3.1", + "version": "0.4.6", "section": "Schematics", - "hash": "", + "hash": "3c9aa9830a3b56aa729aac923a815059", "snapshotRepo": "" } } diff --git a/package-lock.json b/package-lock.json index b815393440..e45c9e00db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -104,9 +104,9 @@ "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, "@ngtools/webpack": { - "version": "6.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.0.0-beta.4.tgz", - "integrity": "sha512-K3JKyeZdicNHM0fhiftlBeXijbf6vD8S8SdlZ6XSyofGX8Dv4M8K2PnMhsxayD2X6Zw/m3mgd47tYr4VRMFGhw==", + "version": "6.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.0.0-beta.6.tgz", + "integrity": "sha512-Os/bJ0EwiX+E/J57Wt2qqhZEd230rlA3DRMaVZeaZV+nGmZpffEFwti7+2z2u543/8AutvAKFWBM4R0U+fN6rA==", "requires": { "chalk": "2.2.2", "semver": "5.4.1", diff --git a/package.json b/package.json index 8d040d596e..be380c4653 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@angular/router": "^5.2.6", "@angular/service-worker": "^5.2.7", "@ngtools/json-schema": "^1.0.9", - "@ngtools/webpack": "6.0.0-beta.4", + "@ngtools/webpack": "6.0.0-beta.6", "@types/common-tags": "^1.4.0", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index e10f4513c4..afd65a8d2d 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@angular-devkit/build-optimizer": "0.0.0", - "@ngtools/webpack": "6.0.0-beta.4", + "@ngtools/webpack": "6.0.0-beta.6", "autoprefixer": "^7.2.3", "cache-loader": "^1.2.2", "chalk": "~2.2.2", From 388bcca67d1cd00a9ec31c6db8c74e045440ee86 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 17 Mar 2018 13:03:52 +0000 Subject: [PATCH 185/724] refactor(@angular-devkit/build-webpack): use dash-case for builder names --- packages/angular_devkit/build_webpack/builders.json | 4 ++-- .../build_webpack/test/utils/default-workspaces.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_webpack/builders.json b/packages/angular_devkit/build_webpack/builders.json index 244d219724..eb6ec4ad9e 100644 --- a/packages/angular_devkit/build_webpack/builders.json +++ b/packages/angular_devkit/build_webpack/builders.json @@ -6,12 +6,12 @@ "schema": "./src/browser/schema.json", "description": "Build a browser app." }, - "devServer": { + "dev-server": { "class": "./src/dev-server", "schema": "./src/dev-server/schema.json", "description": "Serve a browser app." }, - "extractI18n": { + "extract-i18n": { "class": "./src/extract-i18n", "schema": "./src/extract-i18n/schema.json", "description": "Extract i18n strings from a browser app." diff --git a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts index 0cfbc1c43e..ceee41d99f 100644 --- a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts +++ b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts @@ -66,7 +66,7 @@ export const browserWorkspaceTarget: Target> = { }; export const devServerWorkspaceTarget: Target> = { - builder: 'devServer', + builder: 'dev-server', options: { browserTarget: 'app:browser', watch: false, @@ -74,7 +74,7 @@ export const devServerWorkspaceTarget: Target> }; export const extractI18nWorkspaceTarget: Target> = { - builder: 'extractI18n', + builder: 'extract-i18n', options: { browserTarget: 'app:browser', }, From f2473e684490ff554cee95a5f39edb45166ffdf0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 17 Mar 2018 13:22:43 +0000 Subject: [PATCH 186/724] feat(@schematics/angular): use workspace for architect options --- .../application/files/__dot__angular-cli.json | 46 +----- .../application/files/__dot__angular.json | 145 ++++++++++++++++++ .../angular/application/files/karma.conf.js | 9 +- .../angular/universal/index_spec.ts | 6 +- 4 files changed, 155 insertions(+), 51 deletions(-) create mode 100644 packages/schematics/angular/application/files/__dot__angular.json diff --git a/packages/schematics/angular/application/files/__dot__angular-cli.json b/packages/schematics/angular/application/files/__dot__angular-cli.json index 151b05d7d5..280d4d8392 100644 --- a/packages/schematics/angular/application/files/__dot__angular-cli.json +++ b/packages/schematics/angular/application/files/__dot__angular-cli.json @@ -6,54 +6,10 @@ "apps": [ { "root": "<%= sourceDir %>", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", "prefix": "<%= prefix %>", - "styles": [ - "styles.<%= style %>" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - }<% if (serviceWorker) { %>, - "serviceWorker": true<% } %> + "main": "main.ts" } ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "<%= sourceDir %>/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, - { - "project": "<%= sourceDir %>/tsconfig.spec.json", - "exclude": "**/node_modules/**" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, "defaults": { "styleExt": "<%= style %>",<% if (minimal || skipTests) { %> "class": { diff --git a/packages/schematics/angular/application/files/__dot__angular.json b/packages/schematics/angular/application/files/__dot__angular.json new file mode 100644 index 0000000000..7e98c0a7e2 --- /dev/null +++ b/packages/schematics/angular/application/files/__dot__angular.json @@ -0,0 +1,145 @@ +{ + "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json", + "version": 1, + "newProjectRoot": "./projects", + "cli": {}, + "schematics": {}, + "architect": {}, + "projects": { + "app": { + "root": "<%= sourceDir %>", + "projectType": "application", + "schematics": {}, + "architect": { + "build": { + "builder": "@angular-devkit/build-webpack:browser", + "options": { + "outputPath": "dist", + "index": "<%= sourceDir %>/index.html", + "main": "<%= sourceDir %>/main.ts", + "polyfills": "<%= sourceDir %>/polyfills.ts", + "tsConfig": "<%= sourceDir %>/tsconfig.app.json", + "assets": [ + { + "glob": "favicon.ico", + "input": "<%= sourceDir %>/", + "output": "./" + }, + { + "glob": "**/*", + "input": "<%= sourceDir %>/assets", + "output": "assets" + } + ], + "styles": [ + { + "input": "<%= sourceDir %>/styles.<%= style %>" + } + ], + "scripts": [] + <% if (serviceWorker) { %>, + "serviceWorker": true<% + } %> + }, + "configurations": { + "production": { + "optimizationLevel": 1, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + } + }, + "serve": { + "builder": "@angular-devkit/build-webpack:dev-server", + "options": { + "browserTarget": "app:build" + }, + "configurations": { + "production": { + "browserTarget": "app:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-webpack:extract-i18n", + "options": { + "browserTarget": "app:build" + } + }, + "test": { + "builder": "@angular-devkit/build-webpack:karma", + "options": { + "main": "<%= sourceDir %>/test.ts", + "polyfills": "<%= sourceDir %>/polyfills.ts", + "tsConfig": "<%= sourceDir %>/tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "styles": [ + { + "input": "<%= sourceDir %>/styles.<%= style %>" + } + ], + "scripts": [], + "assets": [ + { + "glob": "favicon.ico", + "input": "<%= sourceDir %>/", + "output": "./" + }, + { + "glob": "**/*", + "input": "<%= sourceDir %>/assets", + "output": "assets" + } + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-webpack:tslint", + "options": { + "tsConfig": "<%= sourceDir %>/tsconfig.app.json", + "exclude": [ + "**/node_modules/**" + ] + } + }, + "lint-test": { + "builder": "@angular-devkit/build-webpack:tslint", + "options": { + "tsConfig": "<%= sourceDir %>/tsconfig.spec.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + }, + "app-e2e": { + "root": "e2e", + "projectType": "application", + "architect": { + "e2e": { + "builder": "@angular-devkit/build-webpack:protractor", + "options": { + "protractorConfig": "protractor.conf.js", + "devServerTarget": "app:dev-server" + } + }, + "lint": { + "builder": "@angular-devkit/build-webpack:tslint", + "options": { + "tsConfig": "e2e/tsconfig.e2e.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/schematics/angular/application/files/karma.conf.js b/packages/schematics/angular/application/files/karma.conf.js index af139fada3..85874a9222 100644 --- a/packages/schematics/angular/application/files/karma.conf.js +++ b/packages/schematics/angular/application/files/karma.conf.js @@ -4,19 +4,20 @@ module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular/cli'], + frameworks: ['jasmine', '@angular-devkit/build-webpack'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular/cli/plugins/karma') + require('@angular-devkit/build-webpack/plugins/karma') ], - client:{ + client: { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - reports: [ 'html', 'lcovonly' ], + dir: require('path').join(__dirname, 'coverage'), + reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, angularCli: { diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index d82f9fc03a..e5e0135c96 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -85,10 +85,12 @@ describe('Universal Schematic', () => { expect(app.outDir).toEqual('dist-server'); expect(app.index).toEqual('index.html'); expect(app.main).toEqual('main.server.ts'); - expect(app.test).toEqual('test.ts'); + // // TODO: re-add this check when updating this schematic to use workspace. + // expect(app.test).toEqual('test.ts'); expect(app.tsconfig).toEqual('tsconfig.server.json'); expect(app.testTsconfig).toEqual('tsconfig.spec.json'); - expect(app.environmentSource).toEqual('environments/environment.ts'); + // TODO: re-add this check when updating this schematic to use workspace. + // expect(app.environmentSource).toEqual('environments/environment.ts'); expect(app.polyfills).not.toBeDefined(); }); From 5d6e73e74a2232069b9b565a408010a25040042e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 17 Mar 2018 13:54:34 +0000 Subject: [PATCH 187/724] refactor: use workspace relative paths everywhere in architect --- .../angular_devkit/architect/src/architect.ts | 4 +-- .../architect/src/architect_spec.ts | 4 +-- .../angular_devkit/architect/src/builder.ts | 3 +- .../angular-cli-files/models/build-options.ts | 1 + .../models/webpack-configs/browser.ts | 15 ++++---- .../models/webpack-configs/common.ts | 21 +++++------ .../models/webpack-configs/styles.ts | 8 ++--- .../models/webpack-configs/test.ts | 6 ++-- .../models/webpack-configs/typescript.ts | 26 +++++++------- .../models/webpack-configs/utils.ts | 2 +- .../src/angular-cli-files/plugins/karma.ts | 14 ++++---- .../build_webpack/src/browser/index.ts | 19 +++++----- .../build_webpack/src/browser/schema.json | 3 +- .../build_webpack/src/dev-server/index.ts | 28 +++++++++------ .../build_webpack/src/extract-i18n/index.ts | 9 +++-- .../build_webpack/src/karma/index.ts | 32 +++++++++-------- .../build_webpack/src/protractor/index.ts | 26 ++++++++------ .../build_webpack/src/tslint/index.ts | 19 +++++----- .../test/browser/assets_spec_large.ts | 2 +- .../test/browser/i18n_spec_large.ts | 6 ++-- .../test/browser/lazy-module_spec_large.ts | 2 +- .../test/browser/scripts-array_spec_large.ts | 20 +++++------ .../test/browser/styles_spec_large.ts | 26 +++++++------- .../test/browser/works_spec_large.ts | 2 +- .../test/dev-server/proxy_spec_large.ts | 2 +- .../test/karma/code-coverage_spec_large.ts | 2 +- .../test/tslint/works_spec_large.ts | 4 +-- .../test/utils/default-workspaces.ts | 36 +++++++++---------- .../core/src/workspace/workspace.ts | 4 +-- .../core/src/workspace/workspace_spec.ts | 6 ++-- 30 files changed, 187 insertions(+), 165 deletions(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 4c838f9b6b..9c102fd953 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -18,7 +18,6 @@ import { logging, normalize, parseJson, - resolve, virtualFs, } from '@angular-devkit/core'; import { resolve as nodeResolve } from '@angular-devkit/core/node'; @@ -163,7 +162,7 @@ export class Architect { } const builderConfiguration: BuilderConfiguration = { - root: resolve(this._workspace.root, normalize(project.root)), + root: project.root, projectType: project.projectType, builder: target.builder, options: { @@ -186,6 +185,7 @@ export class Architect { logger: new logging.NullLogger(), architect: this, host: this._workspace.host, + workspace: this._workspace, ...partialContext, }; diff --git a/packages/angular_devkit/architect/src/architect_spec.ts b/packages/angular_devkit/architect/src/architect_spec.ts index 14c2998d00..1761d83d24 100644 --- a/packages/angular_devkit/architect/src/architect_spec.ts +++ b/packages/angular_devkit/architect/src/architect_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { experimental, join, normalize } from '@angular-devkit/core'; +import { experimental, normalize } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { concatMap, tap, toArray } from 'rxjs/operators'; import { BrowserTargetOptions } from '../test/browser'; @@ -66,7 +66,7 @@ describe('Architect', () => { const targetSpec = { project: 'app', target: 'browser', configuration: 'prod' }; architect.getBuilderConfiguration(targetSpec).pipe( tap(builderConfig => { - expect(builderConfig.root).toBe(join(root, 'app')); + expect(builderConfig.root).toBe('app'); expect(builderConfig.projectType).toBe('application'); expect(builderConfig.builder).toBe('../test:browser'); expect(builderConfig.options.browserOption).toBe(1); diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts index 3d218d1cd3..e90bbcb0e9 100644 --- a/packages/angular_devkit/architect/src/builder.ts +++ b/packages/angular_devkit/architect/src/builder.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, Path, logging, virtualFs } from '@angular-devkit/core'; +import { JsonObject, Path, experimental, logging, virtualFs } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { Architect, BuilderConfiguration } from './architect'; @@ -14,6 +14,7 @@ import { Architect, BuilderConfiguration } from './architect'; export interface BuilderContext { logger: logging.Logger; host: virtualFs.Host<{}>; + workspace: experimental.workspace.Workspace; architect: Architect; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts index 6c2d35995e..f49c496e1c 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts @@ -40,6 +40,7 @@ export interface BuildOptions { } export interface WebpackConfigOptions { + root: string; projectRoot: string; buildOptions: T; appConfig: any; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts index 2bcd466e58..86c3d41ecf 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -20,23 +20,22 @@ import { WebpackConfigOptions } from '../build-options'; + */ export function getBrowserConfig(wco: WebpackConfigOptions) { - const { projectRoot, buildOptions, appConfig } = wco; + const { root, projectRoot, buildOptions, appConfig } = wco; - const appRoot = path.resolve(projectRoot, appConfig.root); let extraPlugins: any[] = []; // figure out which are the lazy loaded entry points const lazyChunks = lazyChunksFilter([ - ...extraEntryParser(appConfig.scripts, appRoot, 'scripts'), - ...extraEntryParser(appConfig.styles, appRoot, 'styles') + ...extraEntryParser(appConfig.scripts, root, 'scripts'), + ...extraEntryParser(appConfig.styles, root, 'styles') ]); // TODO: Enable this once HtmlWebpackPlugin supports Webpack 4 const generateIndexHtml = false; if (generateIndexHtml) { extraPlugins.push(new HtmlWebpackPlugin({ - template: path.resolve(appRoot, appConfig.index), + template: path.resolve(root, appConfig.index), filename: path.resolve(buildOptions.outputPath, appConfig.index), chunksSortMode: packageChunkSort(appConfig), excludeChunks: lazyChunks, @@ -87,7 +86,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } - const globalStylesEntries = extraEntryParser(appConfig.styles, appRoot, 'styles') + const globalStylesEntries = extraEntryParser(appConfig.styles, root, 'styles') .map(style => style.entry); return { @@ -121,8 +120,8 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { }, plugins: extraPlugins.concat([ new IndexHtmlWebpackPlugin({ - input: path.resolve(appRoot, appConfig.index), - output: appConfig.index, + input: path.resolve(root, appConfig.index), + output: path.relative(projectRoot, path.resolve(root, appConfig.index)), baseHref: buildOptions.baseHref, entrypoints: generateEntryPoints(appConfig), deployUrl: buildOptions.deployUrl, diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts index ee109e29d6..f069aef818 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -33,9 +33,8 @@ const resolve = require('resolve'); */ export function getCommonConfig(wco: WebpackConfigOptions) { - const { projectRoot, buildOptions, appConfig } = wco; + const { root, projectRoot, buildOptions, appConfig } = wco; - const appRoot = path.resolve(projectRoot, appConfig.root); const nodeModules = findUp('node_modules', projectRoot); if (!nodeModules) { throw new Error('Cannot locate node_modules directory.') @@ -45,11 +44,11 @@ export function getCommonConfig(wco: WebpackConfigOptions) { let entryPoints: { [key: string]: string[] } = {}; if (appConfig.main) { - entryPoints['main'] = [path.resolve(appRoot, appConfig.main)]; + entryPoints['main'] = [path.resolve(root, appConfig.main)]; } if (appConfig.polyfills) { - entryPoints['polyfills'] = [path.resolve(appRoot, appConfig.polyfills)]; + entryPoints['polyfills'] = [path.resolve(root, appConfig.polyfills)]; } // determine hashing format @@ -57,7 +56,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // process global scripts if (appConfig.scripts.length > 0) { - const globalScripts = extraEntryParser(appConfig.scripts, appRoot, 'scripts'); + const globalScripts = extraEntryParser(appConfig.scripts, root, 'scripts'); const globalScriptsByEntry = globalScripts .reduce((prev: { entry: string, paths: string[], lazy: boolean }[], curr) => { @@ -83,7 +82,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { extraPlugins.push(new ScriptsWebpackPlugin({ name: script.entry, sourceMap: buildOptions.sourceMap, - filename: `${script.entry}${hash}.js`, + filename: `${path.basename(script.entry)}${hash}.js`, scripts: script.paths, basePath: projectRoot, })); @@ -96,8 +95,9 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // Convert all string assets to object notation. asset = typeof asset === 'string' ? { glob: asset } : asset; // Add defaults. - // Input is always resolved relative to the appRoot. - asset.input = path.resolve(appRoot, asset.input || '').replace(/\\/g, '/'); + // Input is always resolved relative to the projectRoot. + // TODO: add smart defaults to schema to use project root as default. + asset.input = path.resolve(root, asset.input || projectRoot).replace(/\\/g, '/'); asset.output = asset.output || ''; asset.glob = asset.glob || ''; @@ -152,6 +152,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } }; }); + const copyWebpackPluginOptions = { ignore: ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'] }; const copyWebpackPluginInstance = new CopyWebpackPlugin(copyWebpackPluginPatterns, @@ -223,7 +224,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { resolve: { extensions: ['.ts', '.js'], symlinks: !buildOptions.preserveSymlinks, - modules: [appRoot, 'node_modules'], + modules: [projectRoot, 'node_modules'], alias }, resolveLoader: { @@ -232,7 +233,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { context: projectRoot, entry: entryPoints, output: { - path: path.resolve(projectRoot, buildOptions.outputPath as string), + path: path.resolve(root, buildOptions.outputPath as string), publicPath: buildOptions.deployUrl, filename: `[name]${hashFormat.chunk}.js`, }, diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts index 081cbffc78..5f4791c593 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts @@ -38,9 +38,9 @@ interface PostcssUrlAsset { } export function getStylesConfig(wco: WebpackConfigOptions) { - const { projectRoot, buildOptions, appConfig } = wco; + const { root, projectRoot, buildOptions, appConfig } = wco; - const appRoot = path.resolve(projectRoot, appConfig.root); + // const appRoot = path.resolve(projectRoot, appConfig.root); const entryPoints: { [key: string]: string[] } = {}; const globalStylePaths: string[] = []; const extraPlugins: any[] = []; @@ -158,7 +158,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { && appConfig.stylePreprocessorOptions.includePaths.length > 0 ) { appConfig.stylePreprocessorOptions.includePaths.forEach((includePath: string) => - includePaths.push(path.resolve(appRoot, includePath))); + includePaths.push(path.resolve(root, includePath))); lessPathOptions = { paths: includePaths, }; @@ -166,7 +166,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { // process global styles if (appConfig.styles.length > 0) { - const globalStyles = extraEntryParser(appConfig.styles, appRoot, 'styles'); + const globalStyles = extraEntryParser(appConfig.styles, root, 'styles'); // add style entry points globalStyles.forEach(style => entryPoints[style.entry as any] diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts index 3193766cde..c2e67b8c31 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts @@ -18,7 +18,7 @@ import { WebpackConfigOptions, WebpackTestOptions } from '../build-options'; export function getTestConfig(wco: WebpackConfigOptions) { - const { projectRoot, buildOptions, appConfig } = wco; + const { root, buildOptions, appConfig } = wco; const extraRules: any[] = []; const extraPlugins: any[] = []; @@ -34,7 +34,7 @@ export function getTestConfig(wco: WebpackConfigOptions) { if (codeCoverageExclude) { codeCoverageExclude.forEach((excludeGlob: string) => { const excludeFiles = glob - .sync(path.join(projectRoot, excludeGlob), { nodir: true }) + .sync(path.join(root, excludeGlob), { nodir: true }) .map(file => path.normalize(file)); exclude.push(...excludeFiles); }); @@ -57,7 +57,7 @@ export function getTestConfig(wco: WebpackConfigOptions) { }, devtool: buildOptions.sourceMap ? 'inline-source-map' : 'eval', entry: { - main: path.resolve(projectRoot, appConfig.root, appConfig.main) + main: path.resolve(root, appConfig.main) }, module: { rules: [].concat(extraRules as any) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index 7a0da5594f..59e01fe458 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -20,8 +20,7 @@ const webpackLoader: string = g['angularCliIsLocal'] function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = true) { - const { appConfig, projectRoot, buildOptions } = wco; - const appRoot = path.resolve(projectRoot, appConfig.root); + const { appConfig, root, buildOptions } = wco; options.compilerOptions = options.compilerOptions || {}; if (wco.buildOptions.preserveSymlinks) { @@ -71,27 +70,26 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru const envFile = appConfig.environments[buildOptions.environment as any]; hostReplacementPaths = { - [path.resolve(appRoot, sourcePath)]: path.resolve(appRoot, envFile) + [path.resolve(root, sourcePath)]: path.resolve(root, envFile) }; } let i18nInFile = buildOptions.i18nFile - ? path.resolve(appRoot, buildOptions.i18nFile) + ? path.resolve(root, buildOptions.i18nFile) : undefined; const additionalLazyModules: { [module: string]: string } = {}; if (appConfig.lazyModules) { for (const lazyModule of appConfig.lazyModules) { additionalLazyModules[lazyModule] = path.resolve( - projectRoot, - appConfig.root, + root, lazyModule, ); } } const pluginOptions: AngularCompilerPluginOptions = { - mainPath: useMain ? path.join(projectRoot, appConfig.root, appConfig.main) : undefined, + mainPath: useMain ? path.join(root, appConfig.main) : undefined, i18nInFile: i18nInFile, i18nInFormat: buildOptions.i18nFormat, i18nOutFile: buildOptions.i18nOutFile, @@ -110,8 +108,8 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru } export function getNonAotConfig(wco: WebpackConfigOptions) { - const { appConfig, projectRoot } = wco; - const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); + const { appConfig, root } = wco; + const tsConfigPath = path.resolve(root, appConfig.tsConfig); return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, @@ -120,8 +118,8 @@ export function getNonAotConfig(wco: WebpackConfigOptions) { } export function getAotConfig(wco: WebpackConfigOptions) { - const { projectRoot, buildOptions, appConfig } = wco; - const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); + const { root, buildOptions, appConfig } = wco; + const tsConfigPath = path.resolve(root, appConfig.tsConfig); const loaders: any[] = [webpackLoader]; if (buildOptions.buildOptimizer) { @@ -140,15 +138,15 @@ export function getAotConfig(wco: WebpackConfigOptions) { } export function getNonAotTestConfig(wco: WebpackConfigOptions) { - const { projectRoot, appConfig } = wco; - const tsConfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsConfig); + const { root, appConfig } = wco; + const tsConfigPath = path.resolve(root, appConfig.tsConfig); let pluginOptions: any = { tsConfigPath, skipCodeGeneration: true }; if (appConfig.polyfills) { // TODO: remove singleFileIncludes for 2.0, this is just to support old projects that did not // include 'polyfills.ts' in `tsconfig.spec.json'. - const polyfillsPath = path.resolve(projectRoot, appConfig.root, appConfig.polyfills); + const polyfillsPath = path.resolve(root, appConfig.polyfills); pluginOptions.singleFileIncludes = [polyfillsPath]; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts index 1a420a754d..8294c17646 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts @@ -69,7 +69,7 @@ export function extraEntryParser( if (extraEntry.output) { extraEntry.entry = extraEntry.output.replace(/\.(js|css)$/i, ''); } else if (extraEntry.lazy) { - extraEntry.entry = extraEntry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, ''); + extraEntry.entry = path.basename(extraEntry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')); } else { extraEntry.entry = defaultEntry; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts index a6fbd5975c..c121e6c8d3 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts @@ -49,10 +49,10 @@ function addKarmaFiles(files: any[], newFiles: any[], prepend = false) { } const init: any = (config: any, emitter: any, customFileHandlers: any) => { - const options: any = config.webpackBuildFacade.options; - const appRoot = path.join(config.basePath, options.root); - successCb = config.webpackBuildFacade.successCb; - failureCb = config.webpackBuildFacade.failureCb; + const options = config.buildWebpack.options; + const projectRoot = config.buildWebpack.projectRoot; + successCb = config.buildWebpack.successCb; + failureCb = config.buildWebpack.failureCb; config.reporters.unshift('@angular-devkit/build-webpack--event-reporter'); // Add a reporter that fixes sourcemap urls. @@ -78,8 +78,8 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { // Convert all string patterns to Pattern type. pattern = typeof pattern === 'string' ? { glob: pattern } : pattern; // Add defaults. - // Input is always resolved relative to the appRoot. - pattern.input = path.resolve(appRoot, pattern.input || ''); + // Input is always resolved relative to the projectRoot. + pattern.input = path.resolve(projectRoot, pattern.input || ''); pattern.output = pattern.output || ''; pattern.glob = pattern.glob || ''; @@ -107,7 +107,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { } // Add webpack config. - const webpackConfig = config.webpackBuildFacade.webpackConfig; + const webpackConfig = config.buildWebpack.webpackConfig; const webpackMiddlewareConfig = { noInfo: true, // Hide webpack output because its noisy. watchOptions: { poll: options.poll }, diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 45a09c0b41..47755bc847 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -111,6 +111,7 @@ export interface ExtraEntryPoint { } export interface WebpackConfigOptions { + root: string; projectRoot: string; buildOptions: BrowserBuilderOptions; appConfig: BrowserBuilderOptions; @@ -122,13 +123,15 @@ export class BrowserBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: BuilderConfiguration): Observable { - const options = target.options; + run(builderConfig: BuilderConfiguration): Observable { + const options = builderConfig.options; + const root = this.context.workspace.root; + const projectRoot = resolve(root, builderConfig.root); // TODO: verify using of(null) to kickstart things is a pattern. return of(null).pipe( concatMap(() => options.deleteOutputPath - ? this._deleteOutputDir(target.root, normalize(options.outputPath)) + ? this._deleteOutputDir(root, normalize(options.outputPath)) : of(null)), concatMap(() => new Observable(obs => { // Ensure Build Optimizer is only used with AOT. @@ -138,7 +141,7 @@ export class BrowserBuilder implements Builder { let webpackConfig; try { - webpackConfig = this.buildWebpackConfig(target.root, options); + webpackConfig = this.buildWebpackConfig(root, projectRoot, options); } catch (e) { // TODO: why do I have to catch this error? I thought throwing inside an observable // always got converted into an error. @@ -205,8 +208,7 @@ export class BrowserBuilder implements Builder { ); } - buildWebpackConfig(root: Path, options: BrowserBuilderOptions) { - const systemRoot = getSystemPath(root); + buildWebpackConfig(root: Path, projectRoot: Path, options: BrowserBuilderOptions) { let wco: WebpackConfigOptions; // TODO: make target defaults into configurations instead @@ -215,7 +217,7 @@ export class BrowserBuilder implements Builder { const tsconfigPath = normalize(resolve(root, normalize(options.tsConfig as string))); const tsConfig = readTsconfig(getSystemPath(tsconfigPath)); - const projectTs = requireProjectModule(systemRoot, 'typescript') as typeof ts; + const projectTs = requireProjectModule(getSystemPath(projectRoot), 'typescript') as typeof ts; const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 && tsConfig.options.target !== projectTs.ScriptTarget.ES5; @@ -226,7 +228,8 @@ export class BrowserBuilder implements Builder { (options as any).root = ''; // tslint:disable-line:no-any wco = { - projectRoot: systemRoot, + root: getSystemPath(root), + projectRoot: getSystemPath(projectRoot), // TODO: use only this.options, it contains all flags and configs items already. buildOptions: options, appConfig: options, diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 9b3b4ac955..49bb10d41b 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -254,8 +254,7 @@ }, "input": { "type": "string", - "description": "The input path dir in which to apply 'glob'.", - "default": "./" + "description": "The input path dir in which to apply 'glob'." }, "output": { "type": "string", diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index 8960df1be6..089840edc4 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -12,7 +12,7 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { getSystemPath, tags } from '@angular-devkit/core'; +import { Path, getSystemPath, resolve, tags } from '@angular-devkit/core'; import { existsSync, readFileSync } from 'fs'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; @@ -83,9 +83,10 @@ export class DevServerBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: BuilderConfiguration): Observable { - const root = getSystemPath(target.root); - const options = target.options; + run(builderConfig: BuilderConfiguration): Observable { + const options = builderConfig.options; + const root = this.context.workspace.root; + const projectRoot = resolve(root, builderConfig.root); return checkPort(options.port, options.host).pipe( concatMap((port) => { @@ -95,13 +96,14 @@ export class DevServerBuilder implements Builder { }), concatMap((browserOptions) => new Observable(obs => { const browserBuilder = new BrowserBuilder(this.context); - const webpackConfig = browserBuilder.buildWebpackConfig(target.root, browserOptions); + const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, browserOptions); const webpackCompiler = webpack(webpackConfig); const statsConfig = getWebpackStatsConfig(browserOptions.verbose); let webpackDevServerConfig: WebpackDevServerConfigurationOptions; try { - webpackDevServerConfig = this._buildServerConfig(root, options, browserOptions); + webpackDevServerConfig = this._buildServerConfig( + root, projectRoot, options, browserOptions); } catch (err) { obs.error(err); @@ -213,10 +215,12 @@ export class DevServerBuilder implements Builder { } private _buildServerConfig( - root: string, + root: Path, + projectRoot: Path, options: DevServerBuilderOptions, browserOptions: BrowserBuilderOptions, ) { + const systemRoot = getSystemPath(root); if (options.disableHostCheck) { this.context.logger.warn(tags.oneLine` WARNING: Running a server with --disable-host-check is a security risk. @@ -230,7 +234,9 @@ export class DevServerBuilder implements Builder { const config: WebpackDevServerConfigurationOptions = { headers: { 'Access-Control-Allow-Origin': '*' }, historyApiFallback: { - index: `${servePath}/${browserOptions.index}`, + index: `${servePath}/${ + path.relative(projectRoot, path.resolve(root, browserOptions.index)) + }`, disableDotRule: true, htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], }, @@ -252,11 +258,11 @@ export class DevServerBuilder implements Builder { }; if (options.ssl) { - this._addSslConfig(root, options, config); + this._addSslConfig(systemRoot, options, config); } if (options.proxyConfig) { - this._addProxyConfig(root, options, config); + this._addProxyConfig(systemRoot, options, config); } return config; @@ -422,7 +428,7 @@ export class DevServerBuilder implements Builder { concatMap(browserDescription => this.context.architect.validateBuilderOptions(builderConfig, browserDescription)), map(browserConfig => browserConfig.options), - ); + ); } } diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts index 6adb5de7c1..76e2cfbf48 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts @@ -12,6 +12,7 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; +import { resolve } from '@angular-devkit/core'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; import { concatMap, map, tap } from 'rxjs/operators'; @@ -34,8 +35,10 @@ export class ExtractI18nBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: BuilderConfiguration): Observable { - const options = target.options; + run(builderConfig: BuilderConfiguration): Observable { + const options = builderConfig.options; + const root = this.context.workspace.root; + const projectRoot = resolve(root, builderConfig.root); const [project, targetName, configuration] = options.browserTarget.split(':'); // Override browser build watch setting. const overrides = { watch: false }; @@ -62,7 +65,7 @@ export class ExtractI18nBuilder implements Builder { } // Extracting i18n uses the browser target webpack config with some specific options. - const webpackConfig = browserBuilder.buildWebpackConfig(target.root, { + const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, { ...browserOptions, optimizationLevel: 0, i18nLocale: options.i18nLocale, diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts index b7d44d7fb8..0b750f19ea 100644 --- a/packages/angular_devkit/build_webpack/src/karma/index.ts +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -12,8 +12,7 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { getSystemPath } from '@angular-devkit/core'; -import * as path from 'path'; +import { Path, getSystemPath, normalize, resolve } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { @@ -70,14 +69,16 @@ export interface KarmaBuilderOptions { export class KarmaBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: BuilderConfiguration): Observable { + run(builderConfig: BuilderConfiguration): Observable { - const root = getSystemPath(target.root); - const options = target.options; + // const root = getSystemPath(builderConfig.root); + const options = builderConfig.options; + const root = this.context.workspace.root; + const projectRoot = resolve(root, builderConfig.root); return new Observable(obs => { - const karma = requireProjectModule(root, 'karma'); - const karmaConfig = path.resolve(root, options.karmaConfig); + const karma = requireProjectModule(getSystemPath(projectRoot), 'karma'); + const karmaConfig = getSystemPath(resolve(root, normalize(options.karmaConfig))); // TODO: adjust options to account for not passing them blindly to karma. // const karmaOptions: any = Object.assign({}, options); @@ -91,9 +92,11 @@ export class KarmaBuilder implements Builder { karmaOptions.browsers = options.browsers.split(','); } - karmaOptions.webpackBuildFacade = { + karmaOptions.buildWebpack = { + root: getSystemPath(root), + projectRoot: getSystemPath(projectRoot), options: options, - webpackConfig: this._buildWebpackConfig(root, options), + webpackConfig: this._buildWebpackConfig(root, projectRoot, options), // Pass onto Karma to emit BuildEvents. successCb: () => obs.next({ success: true }), failureCb: () => obs.next({ success: false }), @@ -101,7 +104,7 @@ export class KarmaBuilder implements Builder { // TODO: inside the configs, always use the project root and not the workspace root. // Until then we pretend the app root is relative (``) but the same as `projectRoot`. - (karmaOptions.webpackBuildFacade.options as any).root = ''; // tslint:disable-line:no-any + (karmaOptions.buildWebpack.options as any).root = ''; // tslint:disable-line:no-any // Assign additional karmaConfig options to the local ngapp config karmaOptions.configFile = karmaConfig; @@ -121,14 +124,14 @@ export class KarmaBuilder implements Builder { }); } - private _buildWebpackConfig(projectRoot: string, options: KarmaBuilderOptions) { + private _buildWebpackConfig(root: Path, projectRoot: Path, options: KarmaBuilderOptions) { // tslint:disable-next-line:no-any let wco: any; - const tsconfigPath = path.resolve(projectRoot, options.tsConfig as string); + const tsconfigPath = getSystemPath(resolve(root, normalize(options.tsConfig as string))); const tsConfig = readTsconfig(tsconfigPath); - const projectTs = requireProjectModule(projectRoot, 'typescript') as typeof ts; + const projectTs = requireProjectModule(getSystemPath(projectRoot), 'typescript') as typeof ts; const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 && tsConfig.options.target !== projectTs.ScriptTarget.ES5; @@ -143,7 +146,8 @@ export class KarmaBuilder implements Builder { }; wco = { - projectRoot, + root: getSystemPath(root), + projectRoot: getSystemPath(projectRoot), // TODO: use only this.options, it contains all flags and configs items already. buildOptions: compatOptions, appConfig: compatOptions, diff --git a/packages/angular_devkit/build_webpack/src/protractor/index.ts b/packages/angular_devkit/build_webpack/src/protractor/index.ts index e8c63ef257..26caeec257 100644 --- a/packages/angular_devkit/build_webpack/src/protractor/index.ts +++ b/packages/angular_devkit/build_webpack/src/protractor/index.ts @@ -13,8 +13,7 @@ import { BuilderContext, BuilderDescription, } from '@angular-devkit/architect'; -import { getSystemPath, tags } from '@angular-devkit/core'; -import { resolve } from 'path'; +import { Path, getSystemPath, normalize, resolve, tags } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { of } from 'rxjs/observable/of'; @@ -41,15 +40,17 @@ export class ProtractorBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: BuilderConfiguration): Observable { + run(builderConfig: BuilderConfiguration): Observable { - const root = getSystemPath(target.root); - const options = target.options; + const options = builderConfig.options; + const root = this.context.workspace.root; + const projectRoot = resolve(root, builderConfig.root); + // const projectSystemRoot = getSystemPath(projectRoot); // TODO: verify using of(null) to kickstart things is a pattern. return of(null).pipe( concatMap(() => options.devServerTarget ? this._startDevServer(options) : of(null)), - concatMap(() => options.webdriverUpdate ? this._updateWebdriver(root) : of(null)), + concatMap(() => options.webdriverUpdate ? this._updateWebdriver(projectRoot) : of(null)), concatMap(() => this._runProtractor(root, options)), take(1), ); @@ -99,19 +100,19 @@ export class ProtractorBuilder implements Builder { ); } - private _updateWebdriver(root: string) { + private _updateWebdriver(projectRoot: Path) { // The webdriver-manager update command can only be accessed via a deep import. const webdriverDeepImport = 'webdriver-manager/built/lib/cmds/update'; let webdriverUpdate: any; // tslint:disable-line:no-any try { // When using npm, webdriver is within protractor/node_modules. - webdriverUpdate = requireProjectModule(root, + webdriverUpdate = requireProjectModule(getSystemPath(projectRoot), `protractor/node_modules/${webdriverDeepImport}`); } catch (e) { try { // When using yarn, webdriver is found as a root module. - webdriverUpdate = requireProjectModule(root, webdriverDeepImport); + webdriverUpdate = requireProjectModule(getSystemPath(projectRoot), webdriverDeepImport); } catch (e) { throw new Error(tags.stripIndents` Cannot automatically find webdriver-manager to update. @@ -129,7 +130,7 @@ export class ProtractorBuilder implements Builder { })); } - private _runProtractor(root: string, options: ProtractorBuilderOptions): Observable { + private _runProtractor(root: Path, options: ProtractorBuilderOptions): Observable { const additionalProtractorConfig = { elementExplorer: options.elementExplorer, baseUrl: options.baseUrl, @@ -144,7 +145,10 @@ export class ProtractorBuilder implements Builder { root, 'protractor/built/launcher', 'init', - [resolve(root, options.protractorConfig), additionalProtractorConfig], + [ + getSystemPath(resolve(root, normalize(options.protractorConfig))), + additionalProtractorConfig, + ], ); } } diff --git a/packages/angular_devkit/build_webpack/src/tslint/index.ts b/packages/angular_devkit/build_webpack/src/tslint/index.ts index 04d00e473a..3658ebab9c 100644 --- a/packages/angular_devkit/build_webpack/src/tslint/index.ts +++ b/packages/angular_devkit/build_webpack/src/tslint/index.ts @@ -12,7 +12,7 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { getSystemPath } from '@angular-devkit/core'; +import { getSystemPath, resolve } from '@angular-devkit/core'; import { readFileSync } from 'fs'; import * as glob from 'glob'; import { Minimatch } from 'minimatch'; @@ -40,29 +40,32 @@ export class TslintBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: BuilderConfiguration): Observable { + run(builderConfig: BuilderConfiguration): Observable { - const root = getSystemPath(target.root); - const options = target.options; + const root = this.context.workspace.root; + const systemRoot = getSystemPath(root); + const projectRoot = resolve(root, builderConfig.root); + const options = builderConfig.options; if (!options.tsConfig && options.typeCheck) { throw new Error('A "project" must be specified to enable type checking.'); } return new Observable(obs => { - const projectTslint = requireProjectModule(root, 'tslint') as typeof tslint; + const projectTslint = requireProjectModule( + getSystemPath(projectRoot), 'tslint') as typeof tslint; const tslintConfigPath = options.tslintConfig - ? path.resolve(root, options.tslintConfig) + ? path.resolve(systemRoot, options.tslintConfig) : null; const Linter = projectTslint.Linter; const Configuration = projectTslint.Configuration; let program: ts.Program | undefined = undefined; if (options.tsConfig) { - program = Linter.createProgram(path.resolve(root, options.tsConfig)); + program = Linter.createProgram(path.resolve(systemRoot, options.tsConfig)); } - const files = getFilesToLint(root, options, Linter, program); + const files = getFilesToLint(systemRoot, options, Linter, program); const lintOptions = { fix: options.fix, formatter: options.format, diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts index bbe172ca64..89791efe25 100644 --- a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts @@ -35,7 +35,7 @@ describe('Browser Builder assets', () => { assets: [ { glob: 'glob-asset.txt' }, { glob: 'output-asset.txt', output: 'output-folder' }, - { glob: '**/*', input: 'folder', output: 'folder' }, + { glob: '**/*', input: 'src/folder', output: 'folder' }, ], }; diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts index 4757f29919..30967a97b7 100644 --- a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts @@ -49,7 +49,7 @@ describe('Browser Builder i18n', () => { const overrides = { aot: true, - i18nFile: 'locale/messages.fr.xlf', + i18nFile: 'src/locale/messages.fr.xlf', i18nFormat: 'true', i18nLocale: 'fr', }; @@ -67,7 +67,7 @@ describe('Browser Builder i18n', () => { it('ignores missing translations', (done) => { const overrides = { aot: true, - i18nFile: 'locale/messages.fr.xlf', + i18nFile: 'src/locale/messages.fr.xlf', i18nFormat: 'true', i18nLocale: 'fr', i18nMissingTranslation: 'ignore', @@ -89,7 +89,7 @@ describe('Browser Builder i18n', () => { it('reports errors for missing translations', (done) => { const overrides = { aot: true, - i18nFile: 'locale/messages.fr.xlf', + i18nFile: 'src/locale/messages.fr.xlf', i18nFormat: 'true', i18nLocale: 'fr', i18nMissingTranslation: 'error', diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts index a60df1cc63..4f811062b7 100644 --- a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts @@ -201,7 +201,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - const overrides: Partial = { lazyModules: ['app/lazy/lazy.module'] }; + const overrides: Partial = { lazyModules: ['src/app/lazy/lazy.module'] }; runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts index 734ccf17bd..b7608ebf93 100644 --- a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts @@ -27,16 +27,16 @@ describe('Browser Builder scripts array', () => { 'src/pre-rename-lazy-script.js': 'console.log(\'pre-rename-lazy-script\');', }; const getScriptsOption = () => [ - { input: 'input-script.js' }, - { input: 'zinput-script.js' }, - { input: 'finput-script.js' }, - { input: 'uinput-script.js' }, - { input: 'binput-script.js' }, - { input: 'ainput-script.js' }, - { input: 'cinput-script.js' }, - { input: 'lazy-script.js', lazy: true }, - { input: 'pre-rename-script.js', output: 'renamed-script' }, - { input: 'pre-rename-lazy-script.js', output: 'renamed-lazy-script', lazy: true }, + { input: 'src/input-script.js' }, + { input: 'src/zinput-script.js' }, + { input: 'src/finput-script.js' }, + { input: 'src/uinput-script.js' }, + { input: 'src/binput-script.js' }, + { input: 'src/ainput-script.js' }, + { input: 'src/cinput-script.js' }, + { input: 'src/lazy-script.js', lazy: true }, + { input: 'src/pre-rename-script.js', output: 'renamed-script' }, + { input: 'src/pre-rename-lazy-script.js', output: 'renamed-lazy-script', lazy: true }, ]; beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts index be4ef354a4..6e9bf5b1ba 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts @@ -33,10 +33,10 @@ describe('Browser Builder styles', () => { 'src/pre-rename-lazy-style.css': '.pre-rename-lazy-style { color: red }', }; const getStylesOption = () => [ - { input: 'input-style.css' }, - { input: 'lazy-style.css', lazy: true }, - { input: 'pre-rename-style.css', output: 'renamed-style' }, - { input: 'pre-rename-lazy-style.css', output: 'renamed-lazy-style', lazy: true }, + { input: 'src/input-style.css' }, + { input: 'src/lazy-style.css', lazy: true }, + { input: 'src/pre-rename-style.css', output: 'renamed-style' }, + { input: 'src/pre-rename-lazy-style.css', output: 'renamed-lazy-style', lazy: true }, ]; const cssMatches: { [path: string]: string } = { './dist/styles.css': '.input-style', @@ -167,7 +167,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, sourceMap: true, - styles: [{ input: `styles.${ext}` }], + styles: [{ input: `src/styles.${ext}` }], }; host.replaceInFile('src/app/app.component.ts', './app.component.css', @@ -200,7 +200,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, - styles: [{ input: `styles.${ext}` }], + styles: [{ input: `src/styles.${ext}` }], }; runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( @@ -214,7 +214,7 @@ describe('Browser Builder styles', () => { extractCss: true, optimizationLevel: 1, styles: [ - { input: '../../../../../node_modules/material-design-icons/iconfont/material-icons.css' }, + { input: '../../../../node_modules/material-design-icons/iconfont/material-icons.css' }, ], }; @@ -261,9 +261,9 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, - styles: [{ input: `styles.${ext}` }], + styles: [{ input: `src/styles.${ext}` }], stylePreprocessorOptions: { - includePaths: ['style-paths'], + includePaths: ['src/style-paths'], }, }; @@ -297,7 +297,7 @@ describe('Browser Builder styles', () => { const overrides = { aot: true, extractCss: true, - styles: [{ input: `styles.scss` }], + styles: [{ input: `src/styles.scss` }], }; runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( @@ -341,7 +341,7 @@ describe('Browser Builder styles', () => { `, }); - const overrides = { extractCss: true, styles: [{ input: `styles.scss` }] }; + const overrides = { extractCss: true, styles: [{ input: `src/styles.scss` }] }; runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -502,8 +502,8 @@ describe('Browser Builder styles', () => { it(`supports bootstrap@4`, (done) => { const overrides = { extractCss: true, - styles: [{ input: '../../../../../node_modules/bootstrap/dist/css/bootstrap.css' }], - scripts: [{ input: '../../../../../node_modules/bootstrap/dist/js/bootstrap.js' }], + styles: [{ input: '../../../../node_modules/bootstrap/dist/css/bootstrap.css' }], + scripts: [{ input: '../../../../node_modules/bootstrap/dist/js/bootstrap.js' }], }; runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts index 576c12f815..1be6d52350 100644 --- a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts @@ -16,7 +16,7 @@ describe('Browser Builder', () => { const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); - afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + // afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { runTargetSpec(host, browserWorkspaceTarget).pipe( diff --git a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts index 69d24eb697..142ca2e98d 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts @@ -46,7 +46,7 @@ describe('Dev Server Builder proxy', () => { 'proxy.config.json': `{ "/api/*": { "target": "${proxyServerUrl}" } }`, }); - const overrides: Partial = { proxyConfig: '../proxy.config.json' }; + const overrides: Partial = { proxyConfig: 'proxy.config.json' }; runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts index 8e3dc84ee7..89b80fbcc4 100644 --- a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts @@ -39,7 +39,7 @@ describe('Karma Builder code coverage', () => { const overrides: Partial = { codeCoverage: true, codeCoverageExclude: [ - 'polyfills.ts', + 'src/polyfills.ts', '**/test.ts', ], }; diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts index c4205cd5d5..0013c70e58 100644 --- a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts @@ -116,7 +116,7 @@ describe('Tslint Target', () => { } `, }); - const overrides: Partial = { tslintConfig: '../tslint.json' }; + const overrides: Partial = { tslintConfig: 'tslint.json' }; runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -126,7 +126,7 @@ describe('Tslint Target', () => { it('supports using files with no project', (done) => { const overrides: Partial = { tsConfig: undefined, - files: ['app/**/*.ts'], + files: ['src/app/**/*.ts'], }; runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( diff --git a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts index ceee41d99f..2b305b26f1 100644 --- a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts +++ b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts @@ -49,18 +49,18 @@ export function makeWorkspace(WorkspaceTargets: Target[] ): experimental.workspa export const browserWorkspaceTarget: Target> = { builder: 'browser', options: { - outputPath: '../dist', - index: 'index.html', - main: 'main.ts', - polyfills: 'polyfills.ts', - tsConfig: 'tsconfig.app.json', + outputPath: 'dist', + index: 'src/index.html', + main: 'src/main.ts', + polyfills: 'src/polyfills.ts', + tsConfig: 'src/tsconfig.app.json', progress: false, aot: false, - styles: [{ input: 'styles.css', lazy: false }], + styles: [{ input: 'src/styles.css', lazy: false }], scripts: [], assets: [ - { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, - { glob: '**/*', input: 'assets', output: 'assets', allowOutsideOutDir: false }, + { glob: 'favicon.ico', input: 'src/', output: './', allowOutsideOutDir: false }, + { glob: '**/*', input: 'src/assets', output: 'assets', allowOutsideOutDir: false }, ], }, }; @@ -83,18 +83,18 @@ export const extractI18nWorkspaceTarget: Target> = { builder: 'karma', options: { - main: 'test.ts', - polyfills: 'polyfills.ts', + main: 'src/test.ts', + polyfills: 'src/polyfills.ts', // Use Chrome Headless for CI envs. browsers: 'ChromeHeadless', - tsConfig: 'tsconfig.spec.json', - karmaConfig: '../karma.conf.js', + tsConfig: 'src/tsconfig.spec.json', + karmaConfig: 'karma.conf.js', progress: false, - styles: [{ input: 'styles.css', lazy: false }], + styles: [{ input: 'src/styles.css', lazy: false }], scripts: [], assets: [ - { glob: 'favicon.ico', input: './', output: './', allowOutsideOutDir: false }, - { glob: '**/*', input: 'assets', output: 'assets', allowOutsideOutDir: false }, + { glob: 'favicon.ico', input: 'src/', output: './', allowOutsideOutDir: false }, + { glob: '**/*', input: 'src/assets', output: 'assets', allowOutsideOutDir: false }, ], }, }; @@ -102,8 +102,8 @@ export const karmaWorkspaceTarget: Target> = { export const protractorWorkspaceTarget: Target> = { builder: 'protractor', options: { - protractorConfig: '../protractor.conf.js', - devServerTarget: 'app:devServer', + protractorConfig: 'protractor.conf.js', + devServerTarget: 'app:dev-server', // Webdriver is updated with a specific version on devkit install. // This is preferable to updating each time because it can download a new version of // chromedriver that is incompatible with the Chrome version on CI. @@ -114,7 +114,7 @@ export const protractorWorkspaceTarget: Target export const tslintWorkspaceTarget: Target> = { builder: 'tslint', options: { - tsConfig: 'tsconfig.app.json', + tsConfig: 'src/tsconfig.app.json', exclude: ['**/node_modules/**'], }, }; diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 4815b392dc..43dcc433c5 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -58,7 +58,7 @@ export class WorkspaceNotYetLoadedException extends BaseException { export interface WorkspaceJson { version: number; // TODO: figure out if newProjectRoot should stay here. - newProjectRoot: string; + newProjectRoot: Path; cli: WorkspaceTool; schematics: WorkspaceTool; architect: WorkspaceTool; @@ -67,7 +67,7 @@ export interface WorkspaceJson { export interface WorkspaceProject { projectType: 'application' | 'library'; - root: string; + root: Path; cli: WorkspaceTool; schematics: WorkspaceTool; architect: WorkspaceTool; diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index c754e9de1a..ece765a508 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -13,8 +13,8 @@ import { ProjectNotFoundException, SchemaValidationException, Workspace, - WorkspaceJson, WorkspaceNotYetLoadedException, + WorkspaceProject, } from './workspace'; @@ -23,7 +23,7 @@ describe('Workspace', () => { const root = normalize(__dirname); // The content of this JSON object should be kept in sync with the path below: // tests/@angular_devkit/workspace/angular-workspace.json - const workspaceJson: WorkspaceJson = { + const workspaceJson = { version: 1, newProjectRoot: './projects', cli: { @@ -166,7 +166,7 @@ describe('Workspace', () => { cli: {}, schematics: {}, architect: {}, - })), + } as {} as WorkspaceProject)), ).subscribe(undefined, done.fail, done); }); From 1523765a1f5827f47a99f97b85d85b10262a1a60 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 17 Mar 2018 19:34:42 +0000 Subject: [PATCH 188/724] test(@angular-devkit/build-webpack): use workspace file --- .../test/browser/allow-js_spec_large.ts | 8 +- .../test/browser/aot_spec_large.ts | 5 +- .../test/browser/assets_spec_large.ts | 10 +- .../test/browser/base-href_spec_large.ts | 5 +- .../browser/build-optimizer_spec_large.ts | 5 +- .../browser/circular-dependency_spec_large.ts | 12 +- .../browser/custom-lazy-modules_spec_large.ts | 6 +- .../test/browser/deploy-url_spec_large.ts | 9 +- .../test/browser/errors_spec_large.ts | 16 +- .../browser/file-replacements_spec_large.ts | 10 +- .../test/browser/i18n_spec_large.ts | 11 +- .../test/browser/lazy-module_spec_large.ts | 20 +-- .../browser/license-extraction_spec_large.ts | 5 +- .../browser/no-entry-module_spec_large.ts | 6 +- .../browser/optimization-level_spec_large.ts | 7 +- .../test/browser/output-hashing_spec_large.ts | 24 ++- .../test/browser/output-path_spec_large.ts | 7 +- .../test/browser/poll_spec_large.ts | 6 +- .../test/browser/rebuild_spec_large.ts | 21 +-- .../test/browser/scripts-array_spec_large.ts | 10 +- .../test/browser/source-map_spec_large.ts | 9 +- .../test/browser/stats-json_spec_large.ts | 5 +- .../test/browser/styles_spec_large.ts | 41 +++-- .../subresource-integrity_spec_large.ts | 5 +- .../test/browser/tsconfig-paths_spec_large.ts | 8 +- .../test/browser/vendor-chunk_spec_large.ts | 5 +- .../test/browser/works_spec_large.ts | 7 +- .../test/dev-server/proxy_spec_large.ts | 15 +- .../test/dev-server/public-host_spec_large.ts | 16 +- .../test/dev-server/serve-path_spec_large.ts | 13 +- .../test/dev-server/ssl_spec_large.ts | 15 +- .../test/dev-server/works_spec_large.ts | 13 +- .../test/extract-i18n/works_spec_large.ts | 22 +-- .../test/karma/assets_spec_large.ts | 6 +- .../test/karma/code-coverage_spec_large.ts | 7 +- .../test/karma/rebuilds_spec_large.ts | 8 +- .../test/karma/works_spec_large.ts | 10 +- .../test/protractor/works_spec_large.ts | 44 +----- .../test/tslint/works_spec_large.ts | 27 ++-- .../test/utils/default-workspaces.ts | 120 -------------- .../build_webpack/test/utils/index.ts | 1 - .../test/utils/run-target-spec.ts | 32 ++-- .../hello-world-app/.angular-cli.json | 60 ------- .../hello-world-app/.angular.json | 148 ++++++++++++++++++ 44 files changed, 333 insertions(+), 507 deletions(-) delete mode 100644 packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts delete mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/.angular.json diff --git a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts index fd9976c53d..e824eccc60 100644 --- a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts @@ -7,12 +7,10 @@ */ import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder allow js', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -25,7 +23,7 @@ describe('Browser Builder allow js', () => { // TODO: this test originally edited tsconfig to have `"allowJs": true` but works without it. // Investigate. - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -38,7 +36,7 @@ describe('Browser Builder allow js', () => { const overrides = { aot: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts index efd0675400..195ca2d57a 100644 --- a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -21,7 +20,7 @@ describe('Browser Builder', () => { it('works', (done) => { const overrides = { aot: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts index 89791efe25..0877f40a58 100644 --- a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts @@ -8,12 +8,10 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder assets', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -39,7 +37,7 @@ describe('Browser Builder assets', () => { ], }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { // Assets we expect should be there. @@ -68,7 +66,7 @@ describe('Browser Builder assets', () => { // ], // }; - // architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( + // architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( // concatMap(() => architect.run(architect.getTarget({ overrides }))), // ).subscribe(undefined, (err) => { // expect(err.message) @@ -92,7 +90,7 @@ describe('Browser Builder assets', () => { ], }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts index ac3399bde5..92adfc6eb8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder base href', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -26,7 +25,7 @@ describe('Browser Builder base href', () => { const overrides = { baseHref: '/myUrl' }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts index 70b4fa271b..ebe296cfcb 100644 --- a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder build optimizer', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -20,7 +19,7 @@ describe('Browser Builder build optimizer', () => { it('works', (done) => { const overrides = { aot: true, buildOptimizer: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts index f97aa66533..76be51e286 100644 --- a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts @@ -7,18 +7,10 @@ */ import { tap } from 'rxjs/operators'; -import { - TestLogger, - TestProjectHost, - browserWorkspaceTarget, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder circular dependency detection', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -29,7 +21,7 @@ describe('Browser Builder circular dependency detection', () => { const overrides = { baseHref: '/myUrl' }; const logger = new TestLogger('circular-dependencies'); - runTargetSpec(host, browserWorkspaceTarget, overrides, logger).pipe( + runTargetSpec(host, browserTargetSpec, overrides, logger).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(logger.includes('Circular dependency detected')).toBe(true)), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts index f7b2267e2b..e887894fe1 100644 --- a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts @@ -9,14 +9,14 @@ // import { Architect } from '@angular-devkit/architect'; // import { join, normalize } from '@angular-devkit/core'; // import { concatMap, tap, toArray } from 'rxjs/operators'; -// import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +// import { host, browserTargetSpec, makeWorkspace } from '../utils'; // import { lazyModuleFiles, lazyModuleImport } from './rebuild_spec_large'; // TODO: re-enable this test when the custom lazy module changes have been ported over to // webpack-builder from the CLI. // describe('Browser Builder custom lazy modules', () => { -// const host = new TestProjectHost(workspaceRoot); +// // const architect = new Architect(normalize(workspaceRoot), host); // const outputPath = normalize('dist'); @@ -47,7 +47,7 @@ // const overrides = { lazyModules: ['app/lazy/lazy.module'] }; -// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap((buildEvent) => expect(buildEvent.success).toBe(true)), // tap(() => diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts index f21b76412d..9812ce6def 100644 --- a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder deploy url', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -21,14 +20,14 @@ describe('Browser Builder deploy url', () => { it('uses deploy url for bundles urls', (done) => { const overrides = { deployUrl: 'deployUrl/' }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); expect(content).toContain('deployUrl/main.js'); }), - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { deployUrl: 'http://example.com/some/path/' })), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { @@ -42,7 +41,7 @@ describe('Browser Builder deploy url', () => { it('uses deploy url for in webpack runtime', (done) => { const overrides = { deployUrl: 'deployUrl/' }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'runtime.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts index bd154055ec..6a75d37258 100644 --- a/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts @@ -7,18 +7,10 @@ */ import { tap } from 'rxjs/operators'; -import { - TestLogger, - TestProjectHost, - browserWorkspaceTarget, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder errors', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -29,7 +21,7 @@ describe('Browser Builder errors', () => { `); const logger = new TestLogger('errors-compilation'); - runTargetSpec(host, browserWorkspaceTarget, undefined, logger).pipe( + runTargetSpec(host, browserTargetSpec, undefined, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(logger.includes('polyfills.ts is missing from the TypeScript')).toBe(true); @@ -41,7 +33,7 @@ describe('Browser Builder errors', () => { host.appendToFile('src/app/app.component.ts', ']]]'); const logger = new TestLogger('errors-syntax'); - runTargetSpec(host, browserWorkspaceTarget, undefined, logger).pipe( + runTargetSpec(host, browserTargetSpec, undefined, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(logger.includes('Declaration or statement expected.')).toBe(true); @@ -53,7 +45,7 @@ describe('Browser Builder errors', () => { host.replaceInFile('src/app/app.component.ts', `'app-root'`, `(() => 'app-root')()`); const logger = new TestLogger('errors-static'); - runTargetSpec(host, browserWorkspaceTarget, { aot: true }, logger).pipe( + runTargetSpec(host, browserTargetSpec, { aot: true }, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(logger.includes('Function expressions are not supported in')).toBe(true); diff --git a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts index 10a852e83a..6e4e4757e5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts @@ -9,12 +9,12 @@ // import { Architect } from '@angular-devkit/architect'; // import { join, normalize, virtualFs } from '@angular-devkit/core'; // import { concatMap, tap } from 'rxjs/operators'; -// import { TestProjectHost, browserWorkspaceTarget, makeWorkspace, workspaceRoot } from '../utils'; +// import { host, browserTargetSpec, makeWorkspace } from '../utils'; // TODO: re-enable this test when the functionality is implemented, wether by option or via VFS. // describe('Browser Builder file replacements', () => { -// const host = new TestProjectHost(workspaceRoot); +// // const architect = new Architect(normalize(workspaceRoot), host); // const outputPath = normalize('dist'); @@ -28,7 +28,7 @@ // ], // }; -// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap(() => { // const fileName = join(outputPath, 'main.js'); @@ -48,7 +48,7 @@ // ], // }; -// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap((buildEvent) => expect(buildEvent.success).toBe(false)), // ).subscribe(undefined, done.fail, done); @@ -64,7 +64,7 @@ // ], // }; -// architect.loadWorkspaceFromJson(makeWorkspace(browserWorkspaceTarget)).pipe( +// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap((buildEvent) => expect(buildEvent.success).toBe(false)), // ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts index 30967a97b7..011942d605 100644 --- a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder i18n', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); const emptyTranslationFile = ` @@ -54,7 +53,7 @@ describe('Browser Builder i18n', () => { i18nLocale: 'fr', }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); @@ -76,7 +75,7 @@ describe('Browser Builder i18n', () => { host.writeMultipleFiles({ 'src/locale/messages.fr.xlf': emptyTranslationFile }); host.appendToFile('src/app/app.component.html', '

Other content

'); - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); @@ -98,7 +97,7 @@ describe('Browser Builder i18n', () => { host.writeMultipleFiles({ 'src/locale/messages.fr.xlf': emptyTranslationFile }); host.appendToFile('src/app/app.component.html', '

Other content

'); - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -106,7 +105,7 @@ describe('Browser Builder i18n', () => { it('register locales', (done) => { const overrides = { aot: true, i18nLocale: 'fr_FR' }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts index 4f811062b7..b30d005685 100644 --- a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts @@ -9,7 +9,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; import { BrowserBuilderOptions } from '../../src'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; export const lazyModuleFiles: { [path: string]: string } = { @@ -70,7 +70,7 @@ export const lazyModuleImport: { [path: string]: string } = { }; describe('Browser Builder lazy modules', () => { - const host = new TestProjectHost(workspaceRoot); + const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -80,7 +80,7 @@ describe('Browser Builder lazy modules', () => { host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles(lazyModuleImport); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -94,7 +94,7 @@ describe('Browser Builder lazy modules', () => { // Using `import()` in TS require targetting `esnext` modules. host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -110,7 +110,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -122,7 +122,7 @@ describe('Browser Builder lazy modules', () => { 'src/main.ts': `declare var System: any; System.import('./lazy-module');`, }); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -137,7 +137,7 @@ describe('Browser Builder lazy modules', () => { const overrides: Partial = { namedChunks: false }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); @@ -151,7 +151,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), @@ -170,7 +170,7 @@ describe('Browser Builder lazy modules', () => { const overrides: Partial = { commonChunk: false }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), @@ -203,7 +203,7 @@ describe('Browser Builder lazy modules', () => { const overrides: Partial = { lazyModules: ['src/app/lazy/lazy.module'] }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))) .toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts index 906e57de3f..b2babf9cdb 100644 --- a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder license extraction', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -22,7 +21,7 @@ describe('Browser Builder license extraction', () => { // TODO: make license extraction independent from optimization level. const overrides = { extractLicenses: true, optimizationLevel: 1 }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, '3rdpartylicenses.txt'); diff --git a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts index 87d696a7a7..83de77248e 100644 --- a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts @@ -7,12 +7,10 @@ */ import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder no entry module', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -23,7 +21,7 @@ describe('Browser Builder no entry module', () => { const overrides = { baseHref: '/myUrl' }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts index 592437a4f8..d6677ca364 100644 --- a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder optimization level', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -21,7 +20,7 @@ describe('Browser Builder optimization level', () => { it('works', (done) => { const overrides = { optimizationLevel: 1 }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); @@ -37,7 +36,7 @@ describe('Browser Builder optimization level', () => { const overrides = { optimizationLevel: 1 }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'vendor.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts index 76f28d08d8..eafe12bda2 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts @@ -8,13 +8,11 @@ import { normalize } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; describe('Browser Builder output hashing', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -62,7 +60,7 @@ describe('Browser Builder output hashing', () => { // We must do several builds instead of a single one in watch mode, so that the output // path is deleted on each run and only contains the most recent files. - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap(() => { // Save the current hashes. oldHashes = generateFileHashMap(); @@ -70,7 +68,7 @@ describe('Browser Builder output hashing', () => { host.writeMultipleFiles(lazyModuleImport); }), // Lazy chunk hash should have changed without modifying main bundle. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), + concatMap(() => runTargetSpec(host, browserTargetSpec, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, []); @@ -78,7 +76,7 @@ describe('Browser Builder output hashing', () => { host.writeMultipleFiles({ 'src/styles.css': 'body { background: blue; }' }); }), // Style hash should change. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), + concatMap(() => runTargetSpec(host, browserTargetSpec, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, ['styles']); @@ -86,7 +84,7 @@ describe('Browser Builder output hashing', () => { host.writeMultipleFiles({ 'src/app/app.component.css': 'h1 { margin: 10px; }' }); }), // Main hash should change, since inline styles go in the main bundle. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), + concatMap(() => runTargetSpec(host, browserTargetSpec, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, ['main']); @@ -94,7 +92,7 @@ describe('Browser Builder output hashing', () => { host.appendToFile('src/app/lazy/lazy.module.ts', `console.log(1);`); }), // Lazy loaded bundle should change, and so should inline. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), + concatMap(() => runTargetSpec(host, browserTargetSpec, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, ['lazy.module']); @@ -102,7 +100,7 @@ describe('Browser Builder output hashing', () => { host.appendToFile('src/main.ts', ''); }), // Nothing should have changed. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, overrides)), + concatMap(() => runTargetSpec(host, browserTargetSpec, overrides)), tap(() => { newHashes = generateFileHashMap(); validateHashes(oldHashes, newHashes, []); @@ -118,7 +116,7 @@ describe('Browser Builder output hashing', () => { // We must do several builds instead of a single one in watch mode, so that the output // path is deleted on each run and only contains the most recent files. // 'all' should hash everything. - runTargetSpec(host, browserWorkspaceTarget, { outputHashing: 'all', extractCss: true }).pipe( + runTargetSpec(host, browserTargetSpec, { outputHashing: 'all', extractCss: true }).pipe( tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy(); expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy(); @@ -128,7 +126,7 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); }), // 'none' should hash nothing. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { outputHashing: 'none', extractCss: true })), tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy(); @@ -139,7 +137,7 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); }), // 'media' should hash css resources only. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { outputHashing: 'media', extractCss: true })), tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy(); @@ -150,7 +148,7 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeTruthy(); }), // 'bundles' should hash bundles only. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { outputHashing: 'bundles', extractCss: true })), tap(() => { expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy(); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts index c601f1a2ba..26fc7aeee7 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder output path', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -25,7 +24,7 @@ describe('Browser Builder output path', () => { // Failed compilations still delete files, but don't output any. host.asSync().delete(join(workspaceRoot, 'src', 'app', 'app.component.ts')); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); expect(host.asSync().exists(outputPath)).toBe(false); @@ -36,6 +35,6 @@ describe('Browser Builder output path', () => { it('does not allow output path to be project root', (done) => { const overrides = { outputPath: './' }; - runTargetSpec(host, browserWorkspaceTarget, overrides).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts index 294ae49af5..219808e5a7 100644 --- a/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts @@ -7,12 +7,10 @@ */ import { debounceTime, take, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder poll', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -20,7 +18,7 @@ describe('Browser Builder poll', () => { const overrides = { watch: true, poll: 1000 }; let msAvg = 1000; let lastTime: number; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( // Debounce 1s, otherwise changes are too close together and polling doesn't work. debounceTime(1000), tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index 9c1e122c49..578b094efb 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -8,18 +8,11 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { debounceTime, take, tap } from 'rxjs/operators'; -import { - TestLogger, - TestProjectHost, - browserWorkspaceTarget, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; describe('Browser Builder', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -78,7 +71,7 @@ describe('Browser Builder', () => { let buildNumber = 0; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( // We must debounce on watch mode because file watchers are not very accurate. // Changes from just before a process runs can be picked up and cause rebuilds. // In this case, cleanup from the test right before this one causes a few rebuilds. @@ -124,7 +117,7 @@ describe('Browser Builder', () => { it('rebuilds on CSS changes', (done) => { const overrides = { watch: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( debounceTime(500), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), @@ -147,7 +140,7 @@ describe('Browser Builder', () => { const typeError = `is not assignable to parameter of type 'number'`; let buildNumber = 0; - runTargetSpec(host, browserWorkspaceTarget, overrides, logger).pipe( + runTargetSpec(host, browserTargetSpec, overrides, logger).pipe( debounceTime(500), tap((buildEvent) => { buildNumber += 1; @@ -197,7 +190,7 @@ describe('Browser Builder', () => { const overrides = { watch: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( debounceTime(500), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })), @@ -221,7 +214,7 @@ describe('Browser Builder', () => { const syntaxError = 'Declaration or statement expected.'; let buildNumber = 0; - runTargetSpec(host, browserWorkspaceTarget, overrides, logger).pipe( + runTargetSpec(host, browserTargetSpec, overrides, logger).pipe( debounceTime(1000), tap((buildEvent) => { buildNumber += 1; @@ -290,7 +283,7 @@ describe('Browser Builder', () => { const overrides = { watch: true, aot: true, forkTypeChecker: false }; let buildNumber = 0; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( debounceTime(1000), tap((buildEvent) => { buildNumber += 1; diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts index b7608ebf93..5e758d080c 100644 --- a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts @@ -8,11 +8,11 @@ import { PathFragment, join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder scripts array', () => { - const host = new TestProjectHost(workspaceRoot); + const outputPath = normalize('dist'); const scripts: { [path: string]: string } = { 'src/input-script.js': 'console.log(\'input-script\'); var number = 1+1;', @@ -66,7 +66,7 @@ describe('Browser Builder scripts array', () => { scripts: getScriptsOption(), }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); @@ -85,7 +85,7 @@ describe('Browser Builder scripts array', () => { scripts: getScriptsOption(), }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const scriptsBundle = host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js/); @@ -114,7 +114,7 @@ describe('Browser Builder scripts array', () => { const overrides = { scripts: getScriptsOption() }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const re = new RegExp( diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts index 40da9e8677..52280f7f9f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder source map', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -21,7 +20,7 @@ describe('Browser Builder source map', () => { it('works', (done) => { const overrides = { sourceMap: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js.map'); @@ -33,7 +32,7 @@ describe('Browser Builder source map', () => { it('does not output source map when disabled', (done) => { const overrides = { sourceMap: false }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js.map'); @@ -45,7 +44,7 @@ describe('Browser Builder source map', () => { it('supports eval source map', (done) => { const overrides = { sourceMap: true, evalSourceMap: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(join(outputPath, 'main.js.map'))).toBe(false); diff --git a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts index 7976f4673f..8230d8c77b 100644 --- a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder stats json', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -21,7 +20,7 @@ describe('Browser Builder stats json', () => { it('works', (done) => { const overrides = { statsJson: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'stats.json'); diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts index 6e9bf5b1ba..7a67db8c3f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts @@ -8,11 +8,10 @@ import { normalize, tags, virtualFs } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder styles', () => { - const host = new TestProjectHost(workspaceRoot); const extensionsWithImportSupport = ['css', 'scss', 'less', 'styl']; const extensionsWithVariableSupport = ['scss', 'less', 'styl']; const imgSvg = ` @@ -67,7 +66,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, styles: getStylesOption() }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), // Check css files were created. tap(() => Object.keys(cssMatches).forEach(fileName => { @@ -84,7 +83,7 @@ describe('Browser Builder styles', () => { expect(content).toMatch(cssIndexMatches[fileName]); })), // Also test with extractCss false. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: false, styles: getStylesOption() })), // TODO: figure out why adding this tap breaks typings. // This also happens in the output-hashing spec. @@ -124,7 +123,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -173,7 +172,7 @@ describe('Browser Builder styles', () => { host.replaceInFile('src/app/app.component.ts', './app.component.css', `./app.component.${ext}`); - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); @@ -203,7 +202,7 @@ describe('Browser Builder styles', () => { styles: [{ input: `src/styles.${ext}` }], }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -218,7 +217,7 @@ describe('Browser Builder styles', () => { ], }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -267,7 +266,7 @@ describe('Browser Builder styles', () => { }, }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); @@ -300,7 +299,7 @@ describe('Browser Builder styles', () => { styles: [{ input: `src/styles.scss` }], }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; @@ -343,7 +342,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, styles: [{ input: `src/styles.scss` }] }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), // TODO: find a way to check logger/output for warnings. // if (stdout.match(/postcss-url: \.+: Can't read file '\.+', ignoring/)) { @@ -362,7 +361,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, optimizationLevel: 0 }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; @@ -385,7 +384,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, optimizationLevel: 1 }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; @@ -420,7 +419,7 @@ describe('Browser Builder styles', () => { const mainBundle = 'dist/main.js'; // Check base paths are correctly generated. - runTargetSpec(host, browserWorkspaceTarget, { aot: true, extractCss: true }).pipe( + runTargetSpec(host, browserTargetSpec, { aot: true, extractCss: true }).pipe( tap(() => { const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); @@ -434,7 +433,7 @@ describe('Browser Builder styles', () => { expect(host.asSync().exists(normalize('dist/component-img-relative.png'))).toBe(true); }), // Check urls with deploy-url scheme are used as is. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: '/base/', deployUrl: 'http://deploy.url/' }, )), tap(() => { @@ -444,7 +443,7 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); }), // Check urls with base-href scheme are used as is (with deploy-url). - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: 'http://base.url/', deployUrl: 'deploy/' }, )), tap(() => { @@ -454,7 +453,7 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('http://base.url/deploy/assets/component-img-absolute.svg')`); }), // Check urls with deploy-url and base-href scheme only use deploy-url. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, { + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: 'http://base.url/', deployUrl: 'http://deploy.url/', @@ -467,7 +466,7 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); }), // Check with schemeless base-href and deploy-url flags. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: '/base/', deployUrl: 'deploy/' }, )), tap(() => { @@ -477,7 +476,7 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('/base/deploy/assets/component-img-absolute.svg')`); }), // Check with identical base-href and deploy-url flags. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: '/base/', deployUrl: '/base/' }, )), tap(() => { @@ -487,7 +486,7 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); }), // Check with only base-href flag. - concatMap(() => runTargetSpec(host, browserWorkspaceTarget, + concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: '/base/' }, )), tap(() => { @@ -506,7 +505,7 @@ describe('Browser Builder styles', () => { scripts: [{ input: '../../../../node_modules/bootstrap/dist/js/bootstrap.js' }], }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts index 18f31f6dba..9cb357e6a2 100644 --- a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder subresource integrity', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -27,7 +26,7 @@ describe('Browser Builder subresource integrity', () => { const overrides = { subresourceIntegrity: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); diff --git a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts index ab7a46ea60..185acf7e4b 100644 --- a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts @@ -7,12 +7,10 @@ */ import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder tsconfig paths', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -33,7 +31,7 @@ describe('Browser Builder tsconfig paths', () => { }, `); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -75,7 +73,7 @@ describe('Browser Builder tsconfig paths', () => { console.log(meaning5) `); - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts index dae89a5867..41c69f6476 100644 --- a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts @@ -8,11 +8,10 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder vendor chunk', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -21,7 +20,7 @@ describe('Browser Builder vendor chunk', () => { it('works', (done) => { const overrides = { vendorChunk: true }; - runTargetSpec(host, browserWorkspaceTarget, overrides).pipe( + runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'vendor.js'); diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts index 1be6d52350..b8bca23248 100644 --- a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts @@ -8,18 +8,17 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { TestProjectHost, browserWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder', () => { - const host = new TestProjectHost(workspaceRoot); const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); - // afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - runTargetSpec(host, browserWorkspaceTarget).pipe( + runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { // Default files should be in outputPath. diff --git a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts index 142ca2e98d..a55ed00209 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts @@ -11,19 +11,10 @@ import * as http from 'http'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; -import { - TestProjectHost, - browserWorkspaceTarget, - devServerWorkspaceTarget, - request, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; describe('Dev Server Builder proxy', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -48,7 +39,7 @@ describe('Dev Server Builder proxy', () => { const overrides: Partial = { proxyConfig: 'proxy.config.json' }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( + runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/api/test'))), tap(response => { @@ -62,7 +53,7 @@ describe('Dev Server Builder proxy', () => { it('errors out with a missing proxy file', (done) => { const overrides: Partial = { proxyConfig: '../proxy.config.json' }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides) + runTargetSpec(host, devServerTargetSpec, overrides) .subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts index 73cf50c4e7..8a461a62ef 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts @@ -9,18 +9,10 @@ import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; -import { - TestProjectHost, - browserWorkspaceTarget, - devServerWorkspaceTarget, - request, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; describe('Dev Server Builder public host', () => { - const host = new TestProjectHost(workspaceRoot); // We have to spoof the host to a non-numeric one because Webpack Dev Server does not // check the hosts anymore when requests come from numeric IP addresses. const headers = { host: 'http://spoofy.mcspoofface' }; @@ -29,7 +21,7 @@ describe('Dev Server Builder public host', () => { afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget]).pipe( + runTargetSpec(host, devServerTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('Invalid Host header')), @@ -40,7 +32,7 @@ describe('Dev Server Builder public host', () => { it('works', (done) => { const overrides: Partial = { publicHost: headers.host }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( + runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('HelloWorldApp')), @@ -51,7 +43,7 @@ describe('Dev Server Builder public host', () => { it('works', (done) => { const overrides: Partial = { disableHostCheck: true }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( + runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts index 53d1065c3c..9d42e0a217 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts @@ -9,19 +9,10 @@ import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; -import { - TestProjectHost, - browserWorkspaceTarget, - devServerWorkspaceTarget, - request, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; describe('Dev Server Builder serve path', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -29,7 +20,7 @@ describe('Dev Server Builder serve path', () => { it('works', (done) => { const overrides: Partial = { servePath: 'test/' }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( + runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/test/'))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts index 0ebd0d2061..567cd9c1b7 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts @@ -10,26 +10,17 @@ import { tags } from '@angular-devkit/core'; import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; -import { - TestProjectHost, - browserWorkspaceTarget, - devServerWorkspaceTarget, - request, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; describe('Dev Server Builder ssl', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { const overrides: Partial = { ssl: true }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( + runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), @@ -101,7 +92,7 @@ describe('Dev Server Builder ssl', () => { sslCert: '../ssl/server.crt', }; - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget], overrides).pipe( + runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts index 1500d6f1a0..40a8819f96 100644 --- a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts @@ -8,24 +8,15 @@ import { fromPromise } from 'rxjs/observable/fromPromise'; import { concatMap, take, tap } from 'rxjs/operators'; -import { - TestProjectHost, - browserWorkspaceTarget, - devServerWorkspaceTarget, - request, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; describe('Dev Server Builder', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - runTargetSpec(host, [browserWorkspaceTarget, devServerWorkspaceTarget]).pipe( + runTargetSpec(host, devServerTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), concatMap(() => fromPromise(request('http://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), diff --git a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts index a406d0256b..27a51b7c89 100644 --- a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts @@ -8,18 +8,10 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { - TestLogger, - TestProjectHost, - browserWorkspaceTarget, - extractI18nWorkspaceTarget, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { TestLogger, extractI18nTargetSpec, host, runTargetSpec } from '../utils'; describe('Extract i18n Target', () => { - const host = new TestProjectHost(workspaceRoot); const extractionFile = join(normalize('src'), 'messages.xlf'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -28,7 +20,7 @@ describe('Extract i18n Target', () => { it('works', (done) => { host.appendToFile('src/app/app.component.html', '

i18n test

'); - runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget]).pipe( + runTargetSpec(host, extractI18nTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists((extractionFile))).toBe(true); @@ -43,7 +35,7 @@ describe('Extract i18n Target', () => { host.appendToFile('src/app/app.component.html', '

Hello world inner

'); - runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], {}, logger).pipe( + runTargetSpec(host, extractI18nTargetSpec, {}, logger).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); const msg = 'Could not mark an element as translatable inside a translatable section'; @@ -56,7 +48,7 @@ describe('Extract i18n Target', () => { host.appendToFile('src/app/app.component.html', '

i18n test

'); const overrides = { i18nLocale: 'fr' }; - runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( + runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists((extractionFile))).toBe(true); @@ -72,7 +64,7 @@ describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), outFile); const overrides = { outFile }; - runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( + runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(extractionFile)).toBe(true); @@ -89,7 +81,7 @@ describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), outputPath, 'messages.xlf'); const overrides = { outputPath }; - runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( + runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(extractionFile)).toBe(true); @@ -104,7 +96,7 @@ describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), 'messages.xmb'); const overrides = { i18nFormat: 'xmb' }; - runTargetSpec(host, [browserWorkspaceTarget, extractI18nWorkspaceTarget], overrides).pipe( + runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(host.asSync().exists(extractionFile)).toBe(true); diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts index 9916c86cdb..a46ef74b19 100644 --- a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts @@ -6,12 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { host, karmaTargetSpec, runTargetSpec } from '../utils'; describe('Karma Builder assets', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); @@ -94,7 +92,7 @@ describe('Karma Builder assets', () => { ], }; - runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( + runTargetSpec(host, karmaTargetSpec, overrides).pipe( ).subscribe(undefined, done.fail, done); }, 45000); }); diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts index 89b80fbcc4..882f8421f1 100644 --- a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts @@ -9,11 +9,10 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { debounceTime, tap } from 'rxjs/operators'; import { KarmaBuilderOptions } from '../../src'; -import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { host, karmaTargetSpec, runTargetSpec } from '../utils'; describe('Karma Builder code coverage', () => { - const host = new TestProjectHost(workspaceRoot); const coverageFilePath = normalize('coverage/lcov.info'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); @@ -22,7 +21,7 @@ describe('Karma Builder code coverage', () => { it('works', (done) => { const overrides: Partial = { codeCoverage: true }; - runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( + runTargetSpec(host, karmaTargetSpec, overrides).pipe( // It seems like the coverage files take a while being written to disk, so we wait 500ms here. debounceTime(500), tap(buildEvent => { @@ -44,7 +43,7 @@ describe('Karma Builder code coverage', () => { ], }; - runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( + runTargetSpec(host, karmaTargetSpec, overrides).pipe( // It seems like the coverage files take a while being written to disk, so we wait 500ms here. debounceTime(500), tap(buildEvent => { diff --git a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts index 60e2718d5f..71f8acd518 100644 --- a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts @@ -7,7 +7,7 @@ */ import { debounceTime, take, tap } from 'rxjs/operators'; -import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { host, karmaTargetSpec, runTargetSpec } from '../utils'; // Karma watch mode is currently bugged: @@ -15,14 +15,12 @@ import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } f // - karma does not have a way to close the server gracefully. // TODO: fix these before 6.0 final. xdescribe('Karma Builder watch mode', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { const overrides = { watch: true }; - runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( + runTargetSpec(host, karmaTargetSpec, overrides).pipe( debounceTime(500), tap((buildEvent) => expect(buildEvent.success).toBe(true)), take(1), @@ -33,7 +31,7 @@ xdescribe('Karma Builder watch mode', () => { const overrides = { watch: true }; let buildNumber = 0; - runTargetSpec(host, karmaWorkspaceTarget, overrides).pipe( + runTargetSpec(host, karmaTargetSpec, overrides).pipe( debounceTime(500), tap((buildEvent) => { buildNumber += 1; diff --git a/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts index c6b16f59c5..f8acacf4e3 100644 --- a/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts @@ -7,17 +7,15 @@ */ import { tap } from 'rxjs/operators'; -import { TestProjectHost, karmaWorkspaceTarget, runTargetSpec, workspaceRoot } from '../utils'; +import { host, karmaTargetSpec, runTargetSpec } from '../utils'; describe('Karma Builder', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('runs', (done) => { - runTargetSpec(host, karmaWorkspaceTarget).pipe( + runTargetSpec(host, karmaTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -26,7 +24,7 @@ describe('Karma Builder', () => { host.writeMultipleFiles({ 'src/app/app.component.spec.ts': '

definitely not typescript

', }); - runTargetSpec(host, karmaWorkspaceTarget).pipe( + runTargetSpec(host, karmaTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -35,7 +33,7 @@ describe('Karma Builder', () => { // Need to investigate why. Might be TS 2.7. xit('supports ES2015 target', (done) => { host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); - runTargetSpec(host, karmaWorkspaceTarget).pipe( + runTargetSpec(host, karmaTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts index d1c4b31952..dca2077f86 100644 --- a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts @@ -8,28 +8,15 @@ import { normalize } from '@angular-devkit/core'; import { retry } from 'rxjs/operators'; -import { - TestProjectHost, - browserWorkspaceTarget, - devServerWorkspaceTarget, - protractorWorkspaceTarget, - runTargetSpec, - workspaceRoot, -} from '../utils'; +import { host, protractorTargetSpec, runTargetSpec } from '../utils'; describe('Protractor Builder', () => { - const host = new TestProjectHost(workspaceRoot); - beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - runTargetSpec(host, [ - browserWorkspaceTarget, - devServerWorkspaceTarget, - protractorWorkspaceTarget, - ]).pipe( + runTargetSpec(host, protractorTargetSpec).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 30000); @@ -37,35 +24,18 @@ describe('Protractor Builder', () => { it('works with no devServerTarget', (done) => { const overrides = { devServerTarget: undefined }; - runTargetSpec(host, protractorWorkspaceTarget, overrides).pipe( + runTargetSpec(host, protractorTargetSpec, overrides).pipe( // This should fail because no server is available for connection. ).subscribe(undefined, done, done.fail); }, 30000); - it('picks up changed port in devServer', (done) => { - const modifiedDevServerTarget = devServerWorkspaceTarget; - modifiedDevServerTarget.options.port = 4400; - - runTargetSpec(host, [ - browserWorkspaceTarget, - modifiedDevServerTarget, - protractorWorkspaceTarget, - ]).pipe( - retry(3), - ).subscribe(undefined, done.fail, done); - }, 60000); - it('overrides protractor specs', (done) => { host.asSync().rename(normalize('./e2e/app.e2e-spec.ts'), normalize('./e2e/renamed-app.e2e-spec.ts')); const overrides = { specs: ['./e2e/renamed-app.e2e-spec.ts'] }; - runTargetSpec(host, [ - browserWorkspaceTarget, - devServerWorkspaceTarget, - protractorWorkspaceTarget, - ], overrides).pipe( + runTargetSpec(host, protractorTargetSpec, overrides).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 60000); @@ -84,11 +54,7 @@ describe('Protractor Builder', () => { const overrides = { suite: 'app' }; - runTargetSpec(host, [ - browserWorkspaceTarget, - devServerWorkspaceTarget, - protractorWorkspaceTarget, - ], overrides).pipe( + runTargetSpec(host, protractorTargetSpec, overrides).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 60000); diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts index 0013c70e58..760159010e 100644 --- a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts @@ -9,24 +9,17 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; import { TslintBuilderOptions } from '../../src'; -import { - TestLogger, - TestProjectHost, - runTargetSpec, - tslintWorkspaceTarget, - workspaceRoot, -} from '../utils'; +import { TestLogger, host, runTargetSpec, tslintTargetSpec } from '../utils'; describe('Tslint Target', () => { - const host = new TestProjectHost(workspaceRoot); const filesWithErrors = { 'src/foo.ts': 'const foo = "";\n' }; beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - runTargetSpec(host, tslintWorkspaceTarget).pipe( + runTargetSpec(host, tslintTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -35,7 +28,7 @@ describe('Tslint Target', () => { host.writeMultipleFiles(filesWithErrors); const overrides: Partial = { exclude: ['**/foo.ts'] }; - runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( + runTargetSpec(host, tslintTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -44,7 +37,7 @@ describe('Tslint Target', () => { host.writeMultipleFiles(filesWithErrors); const overrides: Partial = { fix: true }; - runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( + runTargetSpec(host, tslintTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = normalize('src/foo.ts'); @@ -59,7 +52,7 @@ describe('Tslint Target', () => { const logger = new TestLogger('lint-force'); const overrides: Partial = { force: true }; - runTargetSpec(host, tslintWorkspaceTarget, overrides, logger).pipe( + runTargetSpec(host, tslintTargetSpec, overrides, logger).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { expect(logger.includes(`" should be '`)).toBe(true); @@ -73,7 +66,7 @@ describe('Tslint Target', () => { const logger = new TestLogger('lint-format'); const overrides: Partial = { format: 'stylish' }; - runTargetSpec(host, tslintWorkspaceTarget, overrides, logger).pipe( + runTargetSpec(host, tslintTargetSpec, overrides, logger).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), tap(() => { expect(logger.includes(`quotemark`)).toBe(true); @@ -97,7 +90,7 @@ describe('Tslint Target', () => { }); const overrides: Partial = { tslintConfig: undefined }; - runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( + runTargetSpec(host, tslintTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -118,7 +111,7 @@ describe('Tslint Target', () => { }); const overrides: Partial = { tslintConfig: 'tslint.json' }; - runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( + runTargetSpec(host, tslintTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -129,7 +122,7 @@ describe('Tslint Target', () => { files: ['src/app/**/*.ts'], }; - runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( + runTargetSpec(host, tslintTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -140,7 +133,7 @@ describe('Tslint Target', () => { typeCheck: true, }; - runTargetSpec(host, tslintWorkspaceTarget, overrides).pipe( + runTargetSpec(host, tslintTargetSpec, overrides).pipe( ).subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts b/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts deleted file mode 100644 index 2b305b26f1..0000000000 --- a/packages/angular_devkit/build_webpack/test/utils/default-workspaces.ts +++ /dev/null @@ -1,120 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Target } from '@angular-devkit/architect'; -import { experimental, getSystemPath, join, normalize, relative } from '@angular-devkit/core'; -import { - BrowserBuilderOptions, - DevServerBuilderOptions, - ExtractI18nBuilderOptions, - KarmaBuilderOptions, - ProtractorBuilderOptions, - TslintBuilderOptions, -} from '../../src'; - - -const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any -export const workspaceRoot = join(devkitRoot, - 'tests/@angular_devkit/build_webpack/hello-world-app/'); -const builderPath = join(devkitRoot, 'packages/angular_devkit/build_webpack'); -const relativeBuilderPath = relative(workspaceRoot, builderPath); - -export function makeWorkspace(WorkspaceTargets: Target[] ): experimental.workspace.WorkspaceJson { - const workspace = { - version: 1, - projects: { - app: { - root: 'src', - projectType: 'application', - architect: {} as { [k: string]: Target }, - }, - }, - }; - - WorkspaceTargets.forEach(WorkspaceTarget => { - workspace.projects.app.architect[WorkspaceTarget.builder] = { - builder: `${getSystemPath(relativeBuilderPath)}:${WorkspaceTarget.builder}`, - options: WorkspaceTarget.options, - } as Target; - }); - - return workspace as {} as experimental.workspace.WorkspaceJson; -} - -export const browserWorkspaceTarget: Target> = { - builder: 'browser', - options: { - outputPath: 'dist', - index: 'src/index.html', - main: 'src/main.ts', - polyfills: 'src/polyfills.ts', - tsConfig: 'src/tsconfig.app.json', - progress: false, - aot: false, - styles: [{ input: 'src/styles.css', lazy: false }], - scripts: [], - assets: [ - { glob: 'favicon.ico', input: 'src/', output: './', allowOutsideOutDir: false }, - { glob: '**/*', input: 'src/assets', output: 'assets', allowOutsideOutDir: false }, - ], - }, -}; - -export const devServerWorkspaceTarget: Target> = { - builder: 'dev-server', - options: { - browserTarget: 'app:browser', - watch: false, - }, -}; - -export const extractI18nWorkspaceTarget: Target> = { - builder: 'extract-i18n', - options: { - browserTarget: 'app:browser', - }, -}; - -export const karmaWorkspaceTarget: Target> = { - builder: 'karma', - options: { - main: 'src/test.ts', - polyfills: 'src/polyfills.ts', - // Use Chrome Headless for CI envs. - browsers: 'ChromeHeadless', - tsConfig: 'src/tsconfig.spec.json', - karmaConfig: 'karma.conf.js', - progress: false, - styles: [{ input: 'src/styles.css', lazy: false }], - scripts: [], - assets: [ - { glob: 'favicon.ico', input: 'src/', output: './', allowOutsideOutDir: false }, - { glob: '**/*', input: 'src/assets', output: 'assets', allowOutsideOutDir: false }, - ], - }, -}; - -export const protractorWorkspaceTarget: Target> = { - builder: 'protractor', - options: { - protractorConfig: 'protractor.conf.js', - devServerTarget: 'app:dev-server', - // Webdriver is updated with a specific version on devkit install. - // This is preferable to updating each time because it can download a new version of - // chromedriver that is incompatible with the Chrome version on CI. - webdriverUpdate: false, - }, -}; - -export const tslintWorkspaceTarget: Target> = { - builder: 'tslint', - options: { - tsConfig: 'src/tsconfig.app.json', - exclude: ['**/node_modules/**'], - }, -}; diff --git a/packages/angular_devkit/build_webpack/test/utils/index.ts b/packages/angular_devkit/build_webpack/test/utils/index.ts index 281c8b6e8d..5b60c5339f 100644 --- a/packages/angular_devkit/build_webpack/test/utils/index.ts +++ b/packages/angular_devkit/build_webpack/test/utils/index.ts @@ -6,7 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -export * from './default-workspaces'; export * from './request'; export * from './test-project-host'; export * from './test-logger'; diff --git a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts index 72dc809be3..9707c13249 100644 --- a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts +++ b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts @@ -6,30 +6,38 @@ * found in the LICENSE file at https://angular.io/license */ -import { Architect, BuildEvent, Target } from '@angular-devkit/architect'; -import { experimental, logging } from '@angular-devkit/core'; +import { Architect, BuildEvent, TargetSpecifier } from '@angular-devkit/architect'; +import { experimental, join, logging, normalize } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; import { concatMap, tap } from 'rxjs/operators'; -import { TestProjectHost, workspaceRoot } from '../utils'; -import { makeWorkspace } from './default-workspaces'; +import { TestProjectHost } from '../utils/test-project-host'; +const workspaceFile = normalize('.angular.json'); +const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any + +export const workspaceRoot = join(devkitRoot, + 'tests/@angular_devkit/build_webpack/hello-world-app/'); +export const host = new TestProjectHost(workspaceRoot); +export const outputPath = normalize('dist'); +export const browserTargetSpec = { project: 'app', target: 'build' }; +export const devServerTargetSpec = { project: 'app', target: 'serve' }; +export const extractI18nTargetSpec = { project: 'app', target: 'extract-i18n' }; +export const karmaTargetSpec = { project: 'app', target: 'test' }; +export const tslintTargetSpec = { project: 'app', target: 'lint' }; +export const protractorTargetSpec = { project: 'app-e2e', target: 'e2e' }; + export function runTargetSpec( host: TestProjectHost, - targets: Target<{}> | Target<{}>[], + targetSpec: TargetSpecifier, overrides = {}, logger: logging.Logger = new logging.NullLogger(), ): Observable { - if (!Array.isArray(targets)) { - targets = [targets]; - } - - const targetName = targets[targets.length - 1].builder; - const targetSpec = { project: 'app', target: targetName, overrides }; + targetSpec = { ...targetSpec, overrides }; const workspace = new experimental.workspace.Workspace(workspaceRoot, host); let architect: Architect; - return workspace.loadWorkspaceFromJson(makeWorkspace(targets)).pipe( + return workspace.loadWorkspaceFromHost(workspaceFile).pipe( concatMap(ws => new Architect(ws).loadArchitect()), tap(arch => architect = arch), concatMap(() => architect.getBuilderConfiguration(targetSpec)), diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json deleted file mode 100644 index 19f81d409d..0000000000 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.angular-cli.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "hello-world-app" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - "styles": [ - "styles.css" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, - { - "project": "src/tsconfig.spec.json", - "exclude": "**/node_modules/**" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } -} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json new file mode 100644 index 0000000000..d3318d0f16 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json @@ -0,0 +1,148 @@ +{ + "$schema": "../../../../packages/angular_devkit/core/src/workspace/workspace-schema.json", + "version": 1, + "newProjectRoot": "./projects", + "cli": {}, + "schematics": {}, + "architect": {}, + "projects": { + "app": { + "root": "src", + "projectType": "application", + "schematics": {}, + "architect": { + "build": { + "builder": "../../../../packages/angular_devkit/build_webpack:browser", + "options": { + "outputPath": "dist", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.app.json", + "progress": false, + "assets": [ + { + "glob": "favicon.ico", + "input": "src/", + "output": "./" + }, + { + "glob": "**/*", + "input": "src/assets", + "output": "assets" + } + ], + "styles": [ + { + "input": "src/styles.css" + } + ], + "scripts": [] + }, + "configurations": { + "production": { + "optimizationLevel": 1, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + } + }, + "serve": { + "builder": "../../../../packages/angular_devkit/build_webpack:dev-server", + "options": { + "browserTarget": "app:build", + "watch": false + }, + "configurations": { + "production": { + "browserTarget": "app:build:production" + } + } + }, + "extract-i18n": { + "builder": "../../../../packages/angular_devkit/build_webpack:extract-i18n", + "options": { + "browserTarget": "app:build" + } + }, + "test": { + "builder": "../../../../packages/angular_devkit/build_webpack:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "browsers": "ChromeHeadless", + "progress": false, + "watch": false, + "styles": [ + { + "input": "src/styles.css" + } + ], + "scripts": [], + "assets": [ + { + "glob": "favicon.ico", + "input": "src/", + "output": "./" + }, + { + "glob": "**/*", + "input": "src/assets", + "output": "assets" + } + ] + } + }, + "lint": { + "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "options": { + "tsConfig": "src/tsconfig.app.json", + "exclude": [ + "**/node_modules/**" + ] + } + }, + "lint-test": { + "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "options": { + "tsConfig": "src/tsconfig.spec.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + }, + "app-e2e": { + "root": "e2e", + "projectType": "application", + "architect": { + "e2e": { + "builder": "../../../../packages/angular_devkit/build_webpack:protractor", + "options": { + "protractorConfig": "protractor.conf.js", + "devServerTarget": "app:serve", + "webdriverUpdate": false + } + }, + "lint": { + "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "options": { + "tsConfig": "e2e/tsconfig.e2e.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + } +} From 40c5eebfbe64d913546d7590172edda0742c9391 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 00:27:35 +0000 Subject: [PATCH 189/724] feat(@angular-devkit/core): add workspace.listProjectNames() --- packages/angular_devkit/core/src/workspace/workspace.ts | 4 ++++ .../angular_devkit/core/src/workspace/workspace_spec.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 43dcc433c5..62521c8124 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -136,6 +136,10 @@ export class Workspace { return this._workspace.newProjectRoot; } + listProjectNames(): string[] { + return Object.keys(this._workspace.projects); + } + getProject(projectName: string): WorkspaceProject { this._assertLoaded(); diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index ece765a508..4c8cd6fbe8 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -157,6 +157,13 @@ describe('Workspace', () => { ).subscribe(undefined, done.fail, done); }); + it('lists project names', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.listProjectNames()).toEqual(['app'])), + ).subscribe(undefined, done.fail, done); + }); + it('gets project by name', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( From fceeee54afd6016ddd8c63012c3233d86194c599 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 17 Mar 2018 19:04:58 -0700 Subject: [PATCH 190/724] fix(@angular-devkit/build-optimizer): support fesm5 paths This is a workaround for #523 --- .../build_optimizer/src/build-optimizer/build-optimizer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts index 1a14e6bd5c..8cf66d88c8 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts @@ -37,11 +37,14 @@ const whitelistedAngularModules = [ /[\\/]node_modules[\\/]@angular[\\/]cdk[\\/]/, ]; +// TODO: this code is very fragile and should be reworked. +// See: https://github.com/angular/devkit/issues/523 const es5AngularModules = [ // Angular 4 packaging format has .es5.js as the extension. /\.es5\.js$/, // Angular 4 // Angular 5 has esm5 folders. - /[\\/]node_modules[\\/]@angular[\\/][^\\/]+[\\/]esm5[\\/]/, + // Angular 6 has fesm5 folders. + /[\\/]node_modules[\\/]@angular[\\/][^\\/]+[\\/]f?esm5[\\/]/, // All Angular versions have UMD with es5. /\.umd\.js$/, ]; From bb8149bcd88837a81293b8b496f629c3c278d098 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 16:57:14 +0000 Subject: [PATCH 191/724] fix(@schematics/angular): use correct protractor devServerTarget --- .../schematics/angular/application/files/__dot__angular.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/__dot__angular.json b/packages/schematics/angular/application/files/__dot__angular.json index 7e98c0a7e2..9611f8e6e3 100644 --- a/packages/schematics/angular/application/files/__dot__angular.json +++ b/packages/schematics/angular/application/files/__dot__angular.json @@ -127,7 +127,7 @@ "builder": "@angular-devkit/build-webpack:protractor", "options": { "protractorConfig": "protractor.conf.js", - "devServerTarget": "app:dev-server" + "devServerTarget": "app:serve" } }, "lint": { From 467f153468b9d2f1e4935cc5bb45ac96a7582fc1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 17:00:22 +0000 Subject: [PATCH 192/724] fix(@angular-devkit/architect): fix target not found error message --- packages/angular_devkit/architect/src/architect.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 9c102fd953..d9cda7a786 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -37,9 +37,8 @@ import { } from './builder'; export class TargetNotFoundException extends BaseException { - constructor(name?: string) { - const nameOrDefault = name ? `Target '${name}'` : `Default target`; - super(`${nameOrDefault} could not be found in workspace.`); + constructor(name: string) { + super(`Target '${name}' could not be found in workspace.`); } } From d4435d2198a0827ca3ba64ab1a11f853c5c11517 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 17:00:35 +0000 Subject: [PATCH 193/724] fix(@angular-devkit/core): fix project not found error message --- packages/angular_devkit/core/src/workspace/workspace.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 62521c8124..34550e8683 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -27,9 +27,8 @@ import { BaseException } from '../exception/exception'; export class ProjectNotFoundException extends BaseException { - constructor(name?: string) { - const nameOrDefault = name ? `Project '${name}'` : `Default project`; - super(`${nameOrDefault} could not be found in workspace.`); + constructor(name: string) { + super(`Project '${name}' could not be found in workspace.`); } } From 181704f1aa48ec603d94ca462b28b89496571368 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 18:21:46 +0000 Subject: [PATCH 194/724] fix(@angular-devkit/build-webpack): fix karma asset paths --- .../models/webpack-configs/common.ts | 4 +-- .../models/webpack-configs/utils.ts | 4 +-- .../src/angular-cli-files/plugins/karma.ts | 35 ++++++------------- .../build_webpack/src/karma/schema.json | 3 +- .../test/karma/assets_spec_large.ts | 4 ++- 5 files changed, 18 insertions(+), 32 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts index f069aef818..fe222b6bbe 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -91,9 +91,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // process asset entries if (appConfig.assets) { - const copyWebpackPluginPatterns = appConfig.assets.map((asset: string | AssetPattern) => { - // Convert all string assets to object notation. - asset = typeof asset === 'string' ? { glob: asset } : asset; + const copyWebpackPluginPatterns = appConfig.assets.map((asset: AssetPattern) => { // Add defaults. // Input is always resolved relative to the projectRoot. // TODO: add smart defaults to schema to use project root as default. diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts index 8294c17646..080493c793 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts @@ -99,6 +99,6 @@ export function getOutputHashFormat(option: string, length = 20): HashFormat { export interface AssetPattern { glob: string; input?: string; - output?: string; - allowOutsideOutDir?: boolean; + output: string; + allowOutsideOutDir: boolean; } diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts index c121e6c8d3..29cecff829 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts @@ -8,7 +8,6 @@ import * as webpack from 'webpack'; const webpackDevMiddleware = require('webpack-dev-middleware'); import { AssetPattern } from '../models/webpack-configs/utils'; -import { isDirectory } from '../utilities/is-directory'; import { KarmaWebpackFailureCb } from './karma-webpack-failure-cb'; /** @@ -50,7 +49,7 @@ function addKarmaFiles(files: any[], newFiles: any[], prepend = false) { const init: any = (config: any, emitter: any, customFileHandlers: any) => { const options = config.buildWebpack.options; - const projectRoot = config.buildWebpack.projectRoot; + const projectRoot = config.buildWebpack.projectRoot as string; successCb = config.buildWebpack.successCb; failureCb = config.buildWebpack.failureCb; @@ -71,38 +70,26 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { ], true); } - // Add assets. This logic is mimics the one present in GlobCopyWebpackPlugin. + // Add assets. This logic is mimics the one present in GlobCopyWebpackPlugin, but proxies + // asset requests to the Webpack server. if (options.assets) { config.proxies = config.proxies || {}; options.assets.forEach((pattern: AssetPattern) => { - // Convert all string patterns to Pattern type. - pattern = typeof pattern === 'string' ? { glob: pattern } : pattern; - // Add defaults. - // Input is always resolved relative to the projectRoot. - pattern.input = path.resolve(projectRoot, pattern.input || ''); - pattern.output = pattern.output || ''; - pattern.glob = pattern.glob || ''; - - // Build karma file pattern. - const assetPath = path.join(pattern.input, pattern.glob); - const filePattern = isDirectory(assetPath) ? assetPath + '/**' : assetPath; - addKarmaFiles(config.files, [{ pattern: filePattern, included: false }]); - - // The `files` entry serves the file from `/base/{asset.input}/{asset.glob}`. - // We need to add a URL rewrite that exposes the asset as `/{asset.output}/{asset.glob}`. - let relativePath: string, proxyPath: string; - if (fs.existsSync(assetPath)) { - relativePath = path.relative(config.basePath, assetPath); + // TODO: use smart defaults in schema to do this instead. + // Default input to be projectRoot. + pattern.input = pattern.input || projectRoot; + + // Determine Karma proxy path. + let proxyPath: string; + if (fs.existsSync(path.join(pattern.input, pattern.glob))) { proxyPath = path.join(pattern.output, pattern.glob); } else { // For globs (paths that don't exist), proxy pattern.output to pattern.input. - relativePath = path.relative(config.basePath, pattern.input); proxyPath = path.join(pattern.output); - } // Proxy paths must have only forward slashes. proxyPath = proxyPath.replace(/\\/g, '/'); - config.proxies['/' + proxyPath] = '/base/' + relativePath; + config.proxies['/' + proxyPath] = '/_karma_webpack_/' + proxyPath; }); } diff --git a/packages/angular_devkit/build_webpack/src/karma/schema.json b/packages/angular_devkit/build_webpack/src/karma/schema.json index 931393b51e..a026e5d228 100644 --- a/packages/angular_devkit/build_webpack/src/karma/schema.json +++ b/packages/angular_devkit/build_webpack/src/karma/schema.json @@ -122,8 +122,7 @@ }, "input": { "type": "string", - "description": "The input path dir in which to apply 'glob'.", - "default": "./" + "description": "The input path dir in which to apply 'glob'." }, "output": { "type": "string", diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts index a46ef74b19..f3f8417aff 100644 --- a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +import { tap } from 'rxjs/operators'; import { host, karmaTargetSpec, runTargetSpec } from '../utils'; @@ -88,11 +89,12 @@ describe('Karma Builder assets', () => { assets: [ { glob: 'glob-asset.txt' }, { glob: 'output-asset.txt', output: 'output-folder' }, - { glob: '**/*', input: 'folder', output: 'folder' }, + { glob: '**/*', input: 'src/folder', output: 'folder' }, ], }; runTargetSpec(host, karmaTargetSpec, overrides).pipe( + tap(buildEvent => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 45000); }); From 842145cb95c9b76754cdf299d6bf70968b61c0e1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 18:27:27 +0000 Subject: [PATCH 195/724] fix(@angular-devkit/build-webpack): always run karma in development mode --- .../src/angular-cli-files/models/webpack-configs/test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts index c2e67b8c31..373b46707b 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts @@ -49,6 +49,7 @@ export function getTestConfig(wco: WebpackConfigOptions) { } return { + mode: 'development', resolve: { mainFields: [ ...(wco.supportES2015 ? ['es2015'] : []), From 5a8d4ee00eedccd068486bd158f64b0027ba14a1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 18 Mar 2018 18:35:23 +0000 Subject: [PATCH 196/724] fix(@angular-devkit/build-webpack): only show webpack build errors on test --- .../src/angular-cli-files/plugins/karma.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts index 29cecff829..28dc63c782 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts @@ -96,18 +96,9 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { // Add webpack config. const webpackConfig = config.buildWebpack.webpackConfig; const webpackMiddlewareConfig = { - noInfo: true, // Hide webpack output because its noisy. + logLevel: 'error', // Hide webpack output because its noisy. watchOptions: { poll: options.poll }, publicPath: '/_karma_webpack_/', - stats: { // Also prevent chunk and module display output, cleaner look. Only emit errors. - assets: false, - colors: true, - version: false, - hash: false, - timings: false, - chunks: false, - chunkModules: false - } }; // Finish Karma run early in case of compilation error. From 9065fac0820c7b633d5484d282cc4503e49e00cc Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 12 Mar 2018 10:57:51 -0700 Subject: [PATCH 197/724] ci: add unused variable lint check This is faster than waiting for the build. --- tslint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tslint.json b/tslint.json index f0f33ec1de..cf19229e9d 100644 --- a/tslint.json +++ b/tslint.json @@ -46,6 +46,7 @@ "no-internal-module": true, "no-trailing-whitespace": true, "no-unused-expression": true, + "no-unused-variable": [true, {"ignore-pattern": "^_"}], "no-var-keyword": true, "one-line": [ true, From f0f81348117853b4571320f0b311d5234e4b8e1b Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 12 Mar 2018 10:42:50 -0700 Subject: [PATCH 198/724] fix(@angular-devkit/schematics): renaming then creating same file fixed --- .../schematics/src/sink/host.ts | 8 ++++++-- .../schematics/src/sink/host_spec.ts | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/src/sink/host.ts b/packages/angular_devkit/schematics/src/sink/host.ts index 40a435ebb6..bd0c9a845e 100644 --- a/packages/angular_devkit/schematics/src/sink/host.ts +++ b/packages/angular_devkit/schematics/src/sink/host.ts @@ -34,6 +34,8 @@ export class HostSink extends SimpleSinkBase { return observableOf(true); } else if (this._filesToDelete.has(p)) { return observableOf(false); + } else if ([...this._filesToRename.values()].some(([from]) => from == p)) { + return observableOf(false); } else { return this._host.exists(p); } @@ -69,9 +71,11 @@ export class HostSink extends SimpleSinkBase { // Really commit everything to the actual filesystem. return concatObservables( observableFrom([...this._filesToDelete.values()]).pipe( - concatMap(path => this._host.delete(path))), + concatMap(path => this._host.delete(path)), + ), observableFrom([...this._filesToRename.entries()]).pipe( - concatMap(([_, [path, to]]) => this._host.rename(path, to))), + concatMap(([_, [path, to]]) => this._host.rename(path, to)), + ), observableFrom([...this._filesToCreate.entries()]).pipe( concatMap(([path, buffer]) => { return this._host.write(path, buffer.generate() as {} as virtualFs.FileBuffer); diff --git a/packages/angular_devkit/schematics/src/sink/host_spec.ts b/packages/angular_devkit/schematics/src/sink/host_spec.ts index d850ec12a1..f8ee665968 100644 --- a/packages/angular_devkit/schematics/src/sink/host_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/host_spec.ts @@ -8,6 +8,7 @@ // tslint:disable:no-implicit-dependencies import { normalize, virtualFs } from '@angular-devkit/core'; import { FileSystemTree, HostSink } from '@angular-devkit/schematics'; +import { fileBufferToString } from '../../../core/src/virtual-fs/host'; import { FileSystemCreateTree } from '../tree/filesystem'; import { optimize } from '../tree/static'; @@ -110,5 +111,23 @@ describe('FileSystemSink', () => { }) .then(done, done.fail); }); + + it('can rename then create the same file', done => { + const host = new virtualFs.test.TestHost({ + '/file0': 'world', + }); + const tree = new FileSystemTree(host); + tree.rename('/file0', '/file1'); + tree.create('/file0', 'hello'); + + const sink = new HostSink(host); + sink.commit(optimize(tree)) + .toPromise() + .then(() => { + expect(host.sync.read(normalize('/file0')).toString()).toBe('hello'); + expect(fileBufferToString(host.sync.read(normalize('/file1')))).toBe('world'); + }) + .then(done, done.fail); + }); }); }); From c07523b3c3628b9cdc15e61b4b04c3223a47719a Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 13 Mar 2018 11:46:24 -0700 Subject: [PATCH 199/724] feat(devkit): add a devkit package schematic Took me 15 minutes. Add a new schematic package "devkit" (unpublished) that contains schematics for the devkit. To use, use something like: schematics devkit:package --name=my-test-package --description="Some Description" --displayName="test" --- .monorepo.json | 4 + packages/_/devkit/collection.json | 9 ++ packages/_/devkit/package.json | 14 +++ packages/_/devkit/package/factory.ts | 105 ++++++++++++++++++ .../package/project-files/__path__/README.md | 3 + .../project-files/__path__/package.json | 18 +++ .../project-files/__path__/src/index.ts | 10 ++ packages/_/devkit/package/schema.d.ts | 13 +++ packages/_/devkit/package/schema.json | 28 +++++ tsconfig.json | 1 + 10 files changed, 205 insertions(+) create mode 100644 packages/_/devkit/collection.json create mode 100644 packages/_/devkit/package.json create mode 100644 packages/_/devkit/package/factory.ts create mode 100644 packages/_/devkit/package/project-files/__path__/README.md create mode 100644 packages/_/devkit/package/project-files/__path__/package.json create mode 100644 packages/_/devkit/package/project-files/__path__/src/index.ts create mode 100644 packages/_/devkit/package/schema.d.ts create mode 100644 packages/_/devkit/package/schema.json diff --git a/.monorepo.json b/.monorepo.json index 3d307274d9..cf7b690676 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -45,6 +45,10 @@ "version": "0.4.6", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, + "devkit": { + "version": "0.4.5", + "hash": "" + }, "@angular-devkit/architect": { "name": "Architect", "links": [ diff --git a/packages/_/devkit/collection.json b/packages/_/devkit/collection.json new file mode 100644 index 0000000000..0353b64430 --- /dev/null +++ b/packages/_/devkit/collection.json @@ -0,0 +1,9 @@ +{ + "schematics": { + "package": { + "factory": "./package/factory", + "schema": "./package/schema.json", + "description": "Create an empty schematic project or add a blank schematic to the current project." + } + } +} diff --git a/packages/_/devkit/package.json b/packages/_/devkit/package.json new file mode 100644 index 0000000000..89f4bd3cab --- /dev/null +++ b/packages/_/devkit/package.json @@ -0,0 +1,14 @@ +{ + "name": "devkit", + "version": "0.0.0", + "description": "Schematics specific to DevKit (used internally, not released)", + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "schematics": "./collection.json", + "private": true, + "peerDependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0" + } +} diff --git a/packages/_/devkit/package/factory.ts b/packages/_/devkit/package/factory.ts new file mode 100644 index 0000000000..fac301e95f --- /dev/null +++ b/packages/_/devkit/package/factory.ts @@ -0,0 +1,105 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonAstObject, JsonValue, parseJsonAst } from '@angular-devkit/core'; +import { + Rule, + SchematicContext, + Tree, + UpdateRecorder, + apply, + chain, + mergeWith, + template, + url, +} from '@angular-devkit/schematics'; +import { Schema } from './schema'; + + +function appendPropertyInAstObject( + recorder: UpdateRecorder, + node: JsonAstObject, + propertyName: string, + value: JsonValue, + indent = 4, +) { + const indentStr = '\n' + new Array(indent + 1).join(' '); + + if (node.properties.length > 0) { + // Insert comma. + const last = node.properties[node.properties.length - 1]; + recorder.insertRight(last.start.offset + last.text.replace(/\s+$/, '').length, ','); + } + + recorder.insertLeft( + node.end.offset - 1, + ' ' + + `"${propertyName}": ${JSON.stringify(value, null, 2).replace(/\n/g, indentStr)}` + + indentStr.slice(0, -2), + ); +} + +function addPackageToMonorepo(options: Schema, path: string): Rule { + return (tree: Tree) => { + const collectionJsonContent = tree.read('/.monorepo.json'); + if (!collectionJsonContent) { + throw new Error('Could not find monorepo.json'); + } + const collectionJsonAst = parseJsonAst(collectionJsonContent.toString('utf-8')); + if (collectionJsonAst.kind !== 'object') { + throw new Error('Invalid monorepo content.'); + } + + const packages = collectionJsonAst.properties.find(x => x.key.value == 'packages'); + if (!packages) { + throw new Error('Cannot find packages key in monorepo.'); + } + if (packages.value.kind != 'object') { + throw new Error('Invalid packages key.'); + } + + const readmeUrl = `https://github.com/angular/devkit/blob/master/${path}/README.md`; + + const recorder = tree.beginUpdate('/.monorepo.json'); + appendPropertyInAstObject( + recorder, + packages.value, + options.name, + { + name: options.displayName, + links: [{ label: 'README', url: readmeUrl }], + version: '0.0.1', + hash: '', + }, + ); + tree.commitUpdate(recorder); + }; +} + + +export default function (options: Schema): Rule { + const path = 'packages/' + + options.name + .replace(/^@/, '') + .replace(/-/g, '_'); + + // Verify if we need to create a full project, or just add a new schematic. + return (tree: Tree, context: SchematicContext) => { + const source = apply(url('./project-files'), [ + template({ + ...options as object, + dot: '.', + path, + }), + ]); + + return chain([ + mergeWith(source), + addPackageToMonorepo(options, path), + ])(tree, context); + }; +} diff --git a/packages/_/devkit/package/project-files/__path__/README.md b/packages/_/devkit/package/project-files/__path__/README.md new file mode 100644 index 0000000000..f4b4254753 --- /dev/null +++ b/packages/_/devkit/package/project-files/__path__/README.md @@ -0,0 +1,3 @@ +# <%= displayName %> + +Work in progress diff --git a/packages/_/devkit/package/project-files/__path__/package.json b/packages/_/devkit/package/project-files/__path__/package.json new file mode 100644 index 0000000000..c99ab58a80 --- /dev/null +++ b/packages/_/devkit/package/project-files/__path__/package.json @@ -0,0 +1,18 @@ +{ + "name": "<%= name %>", + "version": "0.0.0", + "description": "<%= description %>", + "main": "src/index.js", + "typings": "src/index.d.ts", + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "keywords": [ + ], + "license": "MIT", + "dependencies": { + }, + "peerDependencies": { + "@angular-devkit/core": "0.0.0" + } +} diff --git a/packages/_/devkit/package/project-files/__path__/src/index.ts b/packages/_/devkit/package/project-files/__path__/src/index.ts new file mode 100644 index 0000000000..258badcf91 --- /dev/null +++ b/packages/_/devkit/package/project-files/__path__/src/index.ts @@ -0,0 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +// TODO: Make this useful (and awesome). +export default 1; diff --git a/packages/_/devkit/package/schema.d.ts b/packages/_/devkit/package/schema.d.ts new file mode 100644 index 0000000000..0f2b32ac37 --- /dev/null +++ b/packages/_/devkit/package/schema.d.ts @@ -0,0 +1,13 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + name: string; + description: string; + displayName: string; +} diff --git a/packages/_/devkit/package/schema.json b/packages/_/devkit/package/schema.json new file mode 100644 index 0000000000..1689719bd9 --- /dev/null +++ b/packages/_/devkit/package/schema.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsSchematicSchema", + "title": "DevKit Package Schematic Schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The package name for the new schematic.", + "$default": { + "$source": "argv", + "index": 0 + } + }, + "description": { + "type": "string", + "description": "The description of the new package" + }, + "displayName": { + "type": "string", + "$default": { + "$source": "interpolation", + "value": "${name}" + }, + "description": "The human readable name." + } + } +} diff --git a/tsconfig.json b/tsconfig.json index a97b967b58..957e53c2d2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -55,6 +55,7 @@ "bazel-*/**/*", "dist/**/*", "node_modules/**/*", + "packages/_/devkit/**/*files/**/*", "packages/schematics/*/*/*files/**/*", "tmp/**/*", "scripts/patches/**/*", From c31be34934aab69966b4f9ffc37eed1e2e30b358 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 13 Mar 2018 14:34:21 -0700 Subject: [PATCH 200/724] feat(@angular-devkit/core): add level cap logger and simplifiy indent The IndentLogger was a little bit extreme. We now filter out path segments that are empty (loggers with no name). --- .../angular_devkit/core/src/logger/indent.ts | 2 +- .../angular_devkit/core/src/logger/index.ts | 1 + .../angular_devkit/core/src/logger/level.ts | 47 +++++++++++++++++++ .../angular_devkit/core/src/logger/logger.ts | 2 +- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 packages/angular_devkit/core/src/logger/level.ts diff --git a/packages/angular_devkit/core/src/logger/indent.ts b/packages/angular_devkit/core/src/logger/indent.ts index e6fe06b686..7eb1958fc8 100644 --- a/packages/angular_devkit/core/src/logger/indent.ts +++ b/packages/angular_devkit/core/src/logger/indent.ts @@ -27,7 +27,7 @@ export class IndentLogger extends Logger { const indentMap = indentationMap[indentation]; this._observable = this._observable.pipe(map(entry => { - const l = entry.path.length; + const l = entry.path.filter(x => !!x).length; if (l >= indentMap.length) { let current = indentMap[indentMap.length - 1]; while (l >= indentMap.length) { diff --git a/packages/angular_devkit/core/src/logger/index.ts b/packages/angular_devkit/core/src/logger/index.ts index 50fafbe700..63bc0860b0 100644 --- a/packages/angular_devkit/core/src/logger/index.ts +++ b/packages/angular_devkit/core/src/logger/index.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ export * from './indent'; +export * from './level'; export * from './logger'; export * from './null-logger'; export * from './transform-logger'; diff --git a/packages/angular_devkit/core/src/logger/level.ts b/packages/angular_devkit/core/src/logger/level.ts new file mode 100644 index 0000000000..7de3255d90 --- /dev/null +++ b/packages/angular_devkit/core/src/logger/level.ts @@ -0,0 +1,47 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject } from '../json/interface'; +import { LogLevel, Logger } from './logger'; + +export class LevelTransformLogger extends Logger { + constructor( + public readonly name: string, + public readonly parent: Logger | null = null, + public readonly levelTransform: (level: LogLevel) => LogLevel, + ) { + super(name, parent); + } + + log(level: LogLevel, message: string, metadata: JsonObject = {}): void { + return super.log(this.levelTransform(level), message, metadata); + } + + createChild(name: string): Logger { + return new LevelTransformLogger(name, this, this.levelTransform); + } +} + +export class LevelCapLogger extends LevelTransformLogger { + static levelMap: {[cap: string]: {[level: string]: string}} = { + debug: { debug: 'debug', info: 'debug', warn: 'debug', error: 'debug', fatal: 'debug' }, + info: { debug: 'debug', info: 'info', warn: 'info', error: 'info', fatal: 'info' }, + warn: { debug: 'debug', info: 'info', warn: 'warn', error: 'warn', fatal: 'warn' }, + error: { debug: 'debug', info: 'info', warn: 'warn', error: 'error', fatal: 'error' }, + fatal: { debug: 'debug', info: 'info', warn: 'warn', error: 'error', fatal: 'fatal' }, + }; + + constructor( + public readonly name: string, + public readonly parent: Logger | null = null, + public readonly levelCap: LogLevel, + ) { + super(name, parent, (level: LogLevel) => { + return (LevelCapLogger.levelMap[levelCap][level] || level) as LogLevel; + }); + } +} diff --git a/packages/angular_devkit/core/src/logger/logger.ts b/packages/angular_devkit/core/src/logger/logger.ts index d8da9da8f1..a0ff0596f0 100644 --- a/packages/angular_devkit/core/src/logger/logger.ts +++ b/packages/angular_devkit/core/src/logger/logger.ts @@ -98,7 +98,7 @@ export class Logger extends Observable implements LoggerApi { } createChild(name: string) { - return new Logger(name, this); + return new (this.constructor as typeof Logger)(name, this); } complete() { From 078a46e9d1f2e5958d3f7ed11b3568a3f142ee8d Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 13 Mar 2018 14:35:21 -0700 Subject: [PATCH 201/724] feat(@schematics/update): add doc for --force flag And show packages that have invalid deps when --force, but as a warning. --- docs/specifications/update.md | 1 + packages/schematics/update/update/index.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/specifications/update.md b/docs/specifications/update.md index 454b68ea60..7535d37b82 100644 --- a/docs/specifications/update.md +++ b/docs/specifications/update.md @@ -16,6 +16,7 @@ You can specify more than one package. Each package follows the convention of `[ | Flag | Argument | Description | |---|---|---| | `--all` | `boolean` | If true, implies that all dependencies should be updated. Defaults is false, using dependencies from the command line instead. | +| `--force` | `boolean` | If true, skip the verification step and perform the update even if some peer dependencies would be invalidated. Peer dependencies errors will still be shown as warning. Defaults to false. | | `--next` | `boolean` | If true, allows version discovery to include Beta and RC. Defaults to false. | | `--migration-only` | `boolean` | If true, don't change the `package.json` file, only apply migration scripts. | | `--from` | `version` | Apply migrations from a certain version number. | diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index ff8d5d39c9..5f553df05b 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -113,9 +113,9 @@ function _validateReversePeerDependencies( function _validateUpdatePackages( infoMap: Map, + force: boolean, logger: logging.LoggerApi, ): void { - logger = logger.createChild('validateUpdate'); logger.debug('Updating the following packages:'); infoMap.forEach(info => { if (info.target) { @@ -140,7 +140,7 @@ function _validateUpdatePackages( || peerErrors; }); - if (peerErrors) { + if (!force && peerErrors) { throw new SchematicsException(`Incompatible peer dependencies found. See above.`); } } @@ -619,9 +619,12 @@ export default function(options: UpdateSchema): Rule { switchMap(infoMap => { // Now that we have all the information, check the flags. if (packages.size > 0) { - if (!options.force) { - _validateUpdatePackages(infoMap, logger); - } + const sublog = new logging.LevelCapLogger( + 'validation', + logger.createChild(''), + 'warn', + ); + _validateUpdatePackages(infoMap, options.force, sublog); return _performUpdate(tree, context, infoMap, logger); } else { From 952bc84d5c295c527e3194c558e03d84265f327d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 11:24:58 +0000 Subject: [PATCH 202/724] fix(@angular-devkit/architect): don't allow additional properties in target schema --- packages/angular_devkit/architect/src/targets-schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/architect/src/targets-schema.json b/packages/angular_devkit/architect/src/targets-schema.json index 95b9de5d9e..b415dc4926 100644 --- a/packages/angular_devkit/architect/src/targets-schema.json +++ b/packages/angular_devkit/architect/src/targets-schema.json @@ -28,6 +28,7 @@ } } }, + "additionalProperties": false, "required": [ "builder", "options" From f32607e3cc625e7503147b0334e2a76c43340aca Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 13:01:47 +0000 Subject: [PATCH 203/724] feat(@angular-devkit/architect): add project target listing Listing project targets requires the target map to be loaded and validated when Architect is loaded. This in turn simplifies the API by making `getBuilderConfiguration()` not need to return an observable. --- .../angular_devkit/architect/src/architect.ts | 118 +++++++++++------- .../architect/src/architect_spec.ts | 53 ++++---- 2 files changed, 96 insertions(+), 75 deletions(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index d9cda7a786..bf41eb8f37 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -36,15 +36,21 @@ import { BuilderPathsMap, } from './builder'; +export class ProjectNotFoundException extends BaseException { + constructor(projectName: string) { + super(`Project '${projectName}' could not be found in Workspace.`); + } +} + export class TargetNotFoundException extends BaseException { - constructor(name: string) { - super(`Target '${name}' could not be found in workspace.`); + constructor(projectName: string, targetName: string) { + super(`Target '${targetName}' could not be found in project '${projectName}'.`); } } export class ConfigurationNotFoundException extends BaseException { - constructor(name: string) { - super(`Configuration '${name}' could not be found in project.`); + constructor(projectName: string, configurationName: string) { + super(`Configuration '${configurationName}' could not be found in project '${projectName}'.`); } } @@ -79,7 +85,7 @@ export interface TargetSpecifier { overrides?: Partial; } -export interface TargetsMap { +export interface TargetMap { [k: string]: Target; } @@ -98,6 +104,7 @@ export class Architect { private _targetsSchema: JsonObject; private _buildersSchema: JsonObject; private _architectSchemasLoaded = false; + private _targetMapMap = new Map(); private _builderPathsMap = new Map(); private _builderDescriptionMap = new Map(); private _builderConstructorMap = new Map>(); @@ -112,20 +119,53 @@ export class Architect { this._loadJsonFile(this._targetsSchemaPath), this._loadJsonFile(this._buildersSchemaPath), ).pipe( - concatMap(([workspaceSchema, buildersSchema]) => { - this._targetsSchema = workspaceSchema; + concatMap(([targetsSchema, buildersSchema]) => { + this._targetsSchema = targetsSchema; this._buildersSchema = buildersSchema; this._architectSchemasLoaded = true; - return of(this); + // Validate and cache all project target maps. + return forkJoin( + ...this._workspace.listProjectNames().map(projectName => { + const unvalidatedTargetMap = this._workspace.getProjectArchitect(projectName); + + return this._workspace.validateAgainstSchema( + unvalidatedTargetMap, this._targetsSchema).pipe( + tap(targetMap => this._targetMapMap.set(projectName, targetMap)), + ); + }), + ); }), + map(() => this), ); } } - getBuilderConfiguration( - targetSpec: TargetSpecifier, - ): Observable> { + listProjectTargets(projectName: string): string[] { + return Object.keys(this._getProjectTargetMap(projectName)); + } + + private _getProjectTargetMap(projectName: string): TargetMap { + if (!this._targetMapMap.has(projectName)) { + throw new ProjectNotFoundException(projectName); + } + + return this._targetMapMap.get(projectName) as TargetMap; + } + + private _getProjectTarget(projectName: string, targetName: string): Target { + const targetMap = this._getProjectTargetMap(projectName); + + const target = targetMap[targetName] as {} as Target; + + if (!target) { + throw new TargetNotFoundException(projectName, targetName); + } + + return target; + } + + getBuilderConfiguration(targetSpec: TargetSpecifier): BuilderConfiguration { const { project: projectName, target: targetName, @@ -134,46 +174,34 @@ export class Architect { } = targetSpec; const project = this._workspace.getProject(projectName); - const targets = this._workspace.getProjectArchitect(projectName); + const target = this._getProjectTarget(projectName, targetName); + const options = target.options; let configuration: TargetConfiguration = {}; - let target: Target, options: TargetOptions; - return this._workspace.validateAgainstSchema(targets, this._targetsSchema).pipe( - concatMap((validatedWorkspaceTargets) => { - target = validatedWorkspaceTargets[targetName]; - - if (!target) { - return _throw(new TargetNotFoundException(targetName)); - } + if (configurationName) { + if (!target.configurations) { + throw new ConfigurationNotFoundException(projectName, configurationName); + } - options = target.options; + configuration = target.configurations[configurationName]; - if (configurationName) { - if (!target.configurations) { - return _throw(new ConfigurationNotFoundException(configurationName)); - } + if (!configuration) { + throw new ConfigurationNotFoundException(projectName, configurationName); + } + } - configuration = target.configurations[configurationName]; + const builderConfiguration: BuilderConfiguration = { + root: project.root, + projectType: project.projectType, + builder: target.builder, + options: { + ...options, + ...configuration, + ...overrides as {}, + } as OptionsT, + }; - if (!configuration) { - return _throw(new ConfigurationNotFoundException(configurationName)); - } - } - - const builderConfiguration: BuilderConfiguration = { - root: project.root, - projectType: project.projectType, - builder: target.builder, - options: { - ...options, - ...configuration, - ...overrides as {}, - } as OptionsT, - }; - - return of(builderConfiguration); - }), - ); + return builderConfiguration; } run( diff --git a/packages/angular_devkit/architect/src/architect_spec.ts b/packages/angular_devkit/architect/src/architect_spec.ts index 1761d83d24..0cbec7e4c7 100644 --- a/packages/angular_devkit/architect/src/architect_spec.ts +++ b/packages/angular_devkit/architect/src/architect_spec.ts @@ -62,41 +62,36 @@ describe('Architect', () => { tap(arch => architect = arch), ).subscribe(undefined, done.fail, done)); - it('works', (done) => { + it('works', () => { const targetSpec = { project: 'app', target: 'browser', configuration: 'prod' }; - architect.getBuilderConfiguration(targetSpec).pipe( - tap(builderConfig => { - expect(builderConfig.root).toBe('app'); - expect(builderConfig.projectType).toBe('application'); - expect(builderConfig.builder).toBe('../test:browser'); - expect(builderConfig.options.browserOption).toBe(1); - expect(builderConfig.options.optionalBrowserOption).toBe(false); - }), - ).subscribe(undefined, done.fail, done); + const builderConfig = architect.getBuilderConfiguration(targetSpec); + expect(builderConfig.root).toBe('app'); + expect(builderConfig.projectType).toBe('application'); + expect(builderConfig.builder).toBe('../test:browser'); + expect(builderConfig.options.browserOption).toBe(1); + expect(builderConfig.options.optionalBrowserOption).toBe(false); + }); + + it('lists targets by name', () => { + expect(architect.listProjectTargets('app')).toEqual(['browser', 'badBrowser', 'karma']); }); - it('errors when missing target is used', (done) => { + it('errors when missing target is used', () => { const targetSpec = { project: 'app', target: 'missing', configuration: 'prod' }; - architect.getBuilderConfiguration(targetSpec) - .subscribe(undefined, (err: Error) => { - expect(err).toEqual(jasmine.any(TargetNotFoundException)); - done(); - }, done.fail); + expect(() => architect.getBuilderConfiguration(targetSpec)) + .toThrow(new TargetNotFoundException(targetSpec.project, targetSpec.target)); }); - it('throws when missing configuration is used', (done) => { + it('throws when missing configuration is used', () => { const targetSpec = { project: 'app', target: 'browser', configuration: 'missing' }; - architect.getBuilderConfiguration(targetSpec) - .subscribe(undefined, (err: Error) => { - expect(err).toEqual(jasmine.any(ConfigurationNotFoundException)); - done(); - }, done.fail); + expect(() => architect.getBuilderConfiguration(targetSpec)) + .toThrow(new ConfigurationNotFoundException(targetSpec.project, targetSpec.configuration)); }); it('runs targets', (done) => { const targetSpec = { project: 'app', target: 'browser', configuration: 'prod' }; - architect.getBuilderConfiguration(targetSpec).pipe( - concatMap((builderConfig) => architect.run(builderConfig)), + const builderConfig = architect.getBuilderConfiguration(targetSpec); + architect.run(builderConfig).pipe( toArray(), tap(events => { expect(events.length).toBe(3); @@ -109,9 +104,8 @@ describe('Architect', () => { it('errors when builder cannot be resolved', (done) => { const targetSpec = { project: 'app', target: 'karma' }; - architect.getBuilderConfiguration(targetSpec).pipe( - concatMap((builderConfig) => architect.run(builderConfig)), - ).subscribe(undefined, (err: Error) => { + const builderConfig = architect.getBuilderConfiguration(targetSpec); + architect.run(builderConfig).subscribe(undefined, (err: Error) => { expect(err).toEqual(jasmine.any(BuilderCannotBeResolvedException)); done(); }, done.fail); @@ -119,9 +113,8 @@ describe('Architect', () => { it('errors when builder options fail validation', (done) => { const targetSpec = { project: 'app', target: 'badBrowser' }; - architect.getBuilderConfiguration(targetSpec).pipe( - concatMap((builderConfig) => architect.run(builderConfig)), - ).subscribe(undefined, (err: Error) => { + const builderConfig = architect.getBuilderConfiguration(targetSpec); + architect.run(builderConfig).subscribe(undefined, (err: Error) => { expect(err).toEqual(jasmine.any(experimental.workspace.SchemaValidationException)); done(); }, done.fail); From 81353372f91812fe72476dd63e3c083be2223a3d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 13:08:40 +0000 Subject: [PATCH 204/724] fix(@angular-devkit/architect-cli): use updated architect API --- packages/angular_devkit/architect_cli/bin/architect.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index 4b60ffa352..7b80ac9a44 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -115,16 +115,14 @@ workspace.loadWorkspaceFromJson(workspaceJson).pipe( overrides, }; - return architect.getBuilderConfiguration(targetSpec); - }), - concatMap(builderConfig => { - // TODO: better logging of what's happening. if (argv.help) { // TODO: add target help return _throw('Target help NYI.'); // architect.help(targetOptions, logger); } else { + const builderConfig = architect.getBuilderConfiguration(targetSpec); + return architect.run(builderConfig, { logger }); } }), From 5feb724f65da162df5a2cf88b9998707d6123d54 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 13:19:39 +0000 Subject: [PATCH 205/724] fix(@angular-devkit/build-webpack): use updated architect API --- .../build_webpack/src/dev-server/index.ts | 21 ++- .../build_webpack/src/extract-i18n/index.ts | 122 +++++++++--------- .../build_webpack/src/protractor/index.ts | 65 +++++----- .../test/utils/run-target-spec.ts | 7 +- 4 files changed, 105 insertions(+), 110 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index 089840edc4..6a49956b81 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -16,7 +16,7 @@ import { Path, getSystemPath, resolve, tags } from '@angular-devkit/core'; import { existsSync, readFileSync } from 'fs'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; -import { concatMap, map, tap } from 'rxjs/operators'; +import { concatMap, map } from 'rxjs/operators'; import * as url from 'url'; import * as webpack from 'webpack'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; @@ -235,7 +235,7 @@ export class DevServerBuilder implements Builder { headers: { 'Access-Control-Allow-Origin': '*' }, historyApiFallback: { index: `${servePath}/${ - path.relative(projectRoot, path.resolve(root, browserOptions.index)) + path.relative(projectRoot, path.resolve(root, browserOptions.index)) }`, disableDotRule: true, htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], @@ -415,19 +415,18 @@ export class DevServerBuilder implements Builder { } private _getBrowserOptions(options: DevServerBuilderOptions) { + const architect = this.context.architect; const [project, target, configuration] = options.browserTarget.split(':'); // Override browser build watch setting. const overrides = { watch: options.watch }; const browserTargetSpec = { project, target, configuration, overrides }; - let builderConfig: BuilderConfiguration; - - return this.context.architect.getBuilderConfiguration(browserTargetSpec) - .pipe( - tap(cfg => builderConfig = cfg), - concatMap(builderConfig => this.context.architect.getBuilderDescription(builderConfig)), - concatMap(browserDescription => - this.context.architect.validateBuilderOptions(builderConfig, browserDescription)), - map(browserConfig => browserConfig.options), + const builderConfig = architect.getBuilderConfiguration( + browserTargetSpec); + + return architect.getBuilderDescription(builderConfig).pipe( + concatMap(browserDescription => + architect.validateBuilderOptions(builderConfig, browserDescription)), + map(browserConfig => browserConfig.options), ); } } diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts index 76e2cfbf48..f58204f97e 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts @@ -15,7 +15,7 @@ import { import { resolve } from '@angular-devkit/core'; import * as path from 'path'; import { Observable } from 'rxjs/Observable'; -import { concatMap, map, tap } from 'rxjs/operators'; +import { concatMap, map } from 'rxjs/operators'; import * as webpack from 'webpack'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; @@ -36,6 +36,7 @@ export class ExtractI18nBuilder implements Builder { constructor(public context: BuilderContext) { } run(builderConfig: BuilderConfiguration): Observable { + const architect = this.context.architect; const options = builderConfig.options; const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); @@ -44,69 +45,68 @@ export class ExtractI18nBuilder implements Builder { const overrides = { watch: false }; const browserTargetSpec = { project, target: targetName, configuration, overrides }; - let browserBuilderConfig: BuilderConfiguration; - - return this.context.architect.getBuilderConfiguration(browserTargetSpec) - .pipe( - tap(cfg => browserBuilderConfig = cfg), - concatMap(builderConfig => this.context.architect.getBuilderDescription(builderConfig)), - concatMap(browserDescription => - this.context.architect.validateBuilderOptions(browserBuilderConfig, browserDescription)), - map(browserBuilderConfig => browserBuilderConfig.options), - concatMap((validatedBrowserOptions) => new Observable(obs => { - const browserOptions = validatedBrowserOptions; - const browserBuilder = new BrowserBuilder(this.context); - - // We need to determine the outFile name so that AngularCompiler can retrieve it. - let outFile = options.outFile || getI18nOutfile(options.i18nFormat); - if (options.outputPath) { - // AngularCompilerPlugin doesn't support genDir so we have to adjust outFile instead. - outFile = path.join(options.outputPath, outFile); + const browserBuilderConfig = architect.getBuilderConfiguration( + browserTargetSpec); + + return architect.getBuilderDescription(browserBuilderConfig).pipe( + concatMap(browserDescription => + architect.validateBuilderOptions(browserBuilderConfig, browserDescription)), + map(browserBuilderConfig => browserBuilderConfig.options), + concatMap((validatedBrowserOptions) => new Observable(obs => { + const browserOptions = validatedBrowserOptions; + const browserBuilder = new BrowserBuilder(this.context); + + // We need to determine the outFile name so that AngularCompiler can retrieve it. + let outFile = options.outFile || getI18nOutfile(options.i18nFormat); + if (options.outputPath) { + // AngularCompilerPlugin doesn't support genDir so we have to adjust outFile instead. + outFile = path.join(options.outputPath, outFile); + } + + // Extracting i18n uses the browser target webpack config with some specific options. + const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, { + ...browserOptions, + optimizationLevel: 0, + i18nLocale: options.i18nLocale, + i18nOutFormat: options.i18nFormat, + i18nOutFile: outFile, + aot: true, + }); + + const webpackCompiler = webpack(webpackConfig); + webpackCompiler.outputFileSystem = new MemoryFS(); + const statsConfig = getWebpackStatsConfig(); + + const callback: webpack.compiler.CompilerCallback = (err, stats) => { + if (err) { + return obs.error(err); } - // Extracting i18n uses the browser target webpack config with some specific options. - const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, { - ...browserOptions, - optimizationLevel: 0, - i18nLocale: options.i18nLocale, - i18nOutFormat: options.i18nFormat, - i18nOutFile: outFile, - aot: true, - }); - - const webpackCompiler = webpack(webpackConfig); - webpackCompiler.outputFileSystem = new MemoryFS(); - const statsConfig = getWebpackStatsConfig(); - - const callback: webpack.compiler.CompilerCallback = (err, stats) => { - if (err) { - return obs.error(err); - } - - const json = stats.toJson('verbose'); - if (stats.hasWarnings()) { - this.context.logger.warn(statsWarningsToString(json, statsConfig)); - } - - if (stats.hasErrors()) { - this.context.logger.error(statsErrorsToString(json, statsConfig)); - } - - obs.next({ success: !stats.hasErrors() }); - - obs.complete(); - }; - - try { - webpackCompiler.run(callback); - } catch (err) { - if (err) { - this.context.logger.error( - '\nAn error occured during the extraction:\n' + ((err && err.stack) || err)); - } - throw err; + const json = stats.toJson('verbose'); + if (stats.hasWarnings()) { + this.context.logger.warn(statsWarningsToString(json, statsConfig)); } - }))); + + if (stats.hasErrors()) { + this.context.logger.error(statsErrorsToString(json, statsConfig)); + } + + obs.next({ success: !stats.hasErrors() }); + + obs.complete(); + }; + + try { + webpackCompiler.run(callback); + } catch (err) { + if (err) { + this.context.logger.error( + '\nAn error occured during the extraction:\n' + ((err && err.stack) || err)); + } + throw err; + } + })), + ); } } diff --git a/packages/angular_devkit/build_webpack/src/protractor/index.ts b/packages/angular_devkit/build_webpack/src/protractor/index.ts index 26caeec257..c4447742de 100644 --- a/packages/angular_devkit/build_webpack/src/protractor/index.ts +++ b/packages/angular_devkit/build_webpack/src/protractor/index.ts @@ -56,47 +56,46 @@ export class ProtractorBuilder implements Builder { ); } + // Note: this method mutates the options argument. private _startDevServer(options: ProtractorBuilderOptions) { + const architect = this.context.architect; const [project, targetName, configuration] = (options.devServerTarget as string).split(':'); // Override browser build watch setting. const overrides = { watch: false, host: options.host, port: options.port }; - const browserTargetOptions = { project, target: targetName, configuration, overrides }; - let devServerBuilderConfig: BuilderConfiguration; + const targetSpec = { project, target: targetName, configuration, overrides }; + const builderConfig = architect.getBuilderConfiguration(targetSpec); let devServerDescription: BuilderDescription; let baseUrl: string; - return this.context.architect - .getBuilderConfiguration(browserTargetOptions).pipe( - tap(cfg => devServerBuilderConfig = cfg), - concatMap(builderConfig => this.context.architect.getBuilderDescription(builderConfig)), - tap(description => devServerDescription = description), - concatMap(devServerDescription => this.context.architect.validateBuilderOptions( - devServerBuilderConfig, devServerDescription)), - concatMap(() => { - // Compute baseUrl from devServerOptions. - if (options.devServerTarget && devServerBuilderConfig.options.publicHost) { - let publicHost = devServerBuilderConfig.options.publicHost; - if (!/^\w+:\/\//.test(publicHost)) { - publicHost = `${devServerBuilderConfig.options.ssl - ? 'https' - : 'http'}://${publicHost}`; - } - const clientUrl = url.parse(publicHost); - baseUrl = url.format(clientUrl); - } else if (options.devServerTarget) { - baseUrl = url.format({ - protocol: devServerBuilderConfig.options.ssl ? 'https' : 'http', - hostname: options.host, - port: devServerBuilderConfig.options.port.toString(), - }); + return architect.getBuilderDescription(builderConfig).pipe( + tap(description => devServerDescription = description), + concatMap(devServerDescription => architect.validateBuilderOptions( + builderConfig, devServerDescription)), + concatMap(() => { + // Compute baseUrl from devServerOptions. + if (options.devServerTarget && builderConfig.options.publicHost) { + let publicHost = builderConfig.options.publicHost; + if (!/^\w+:\/\//.test(publicHost)) { + publicHost = `${builderConfig.options.ssl + ? 'https' + : 'http'}://${publicHost}`; } - - // Save the computed baseUrl back so that Protractor can use it. - options.baseUrl = baseUrl; - - return of(this.context.architect.getBuilder(devServerDescription, this.context)); - }), - concatMap(builder => builder.run(devServerBuilderConfig)), + const clientUrl = url.parse(publicHost); + baseUrl = url.format(clientUrl); + } else if (options.devServerTarget) { + baseUrl = url.format({ + protocol: builderConfig.options.ssl ? 'https' : 'http', + hostname: options.host, + port: builderConfig.options.port.toString(), + }); + } + + // Save the computed baseUrl back so that Protractor can use it. + options.baseUrl = baseUrl; + + return of(this.context.architect.getBuilder(devServerDescription, this.context)); + }), + concatMap(builder => builder.run(builderConfig)), ); } diff --git a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts index 9707c13249..f35cbd5444 100644 --- a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts +++ b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts @@ -9,7 +9,7 @@ import { Architect, BuildEvent, TargetSpecifier } from '@angular-devkit/architect'; import { experimental, join, logging, normalize } from '@angular-devkit/core'; import { Observable } from 'rxjs/Observable'; -import { concatMap, tap } from 'rxjs/operators'; +import { concatMap } from 'rxjs/operators'; import { TestProjectHost } from '../utils/test-project-host'; @@ -35,12 +35,9 @@ export function runTargetSpec( ): Observable { targetSpec = { ...targetSpec, overrides }; const workspace = new experimental.workspace.Workspace(workspaceRoot, host); - let architect: Architect; return workspace.loadWorkspaceFromHost(workspaceFile).pipe( concatMap(ws => new Architect(ws).loadArchitect()), - tap(arch => architect = arch), - concatMap(() => architect.getBuilderConfiguration(targetSpec)), - concatMap(cfg => architect.run(cfg, { logger })), + concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec), { logger })), ); } From 9fa382c7b596bce089f1d645b2efbce6211f26ba Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 20:54:24 -0700 Subject: [PATCH 206/724] fix(@angular-devkit/core): sometimes NullLogger.createChild can be called --- packages/angular_devkit/core/src/logger/logger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/logger/logger.ts b/packages/angular_devkit/core/src/logger/logger.ts index a0ff0596f0..231999d0ec 100644 --- a/packages/angular_devkit/core/src/logger/logger.ts +++ b/packages/angular_devkit/core/src/logger/logger.ts @@ -77,7 +77,7 @@ export class Logger extends Observable implements LoggerApi { } this._metadata = { name, path }; this._observable = this._subject.asObservable(); - if (this.parent) { + if (this.parent && this.parent._subject) { // When the parent completes, complete us as well. this.parent._subject.subscribe(undefined, undefined, () => this.complete()); } From 5d0129a79ed1e73043de1404b8860de398cdcf7b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 19 Mar 2018 11:35:15 -0400 Subject: [PATCH 207/724] feat(@angular-devkit/build-optimizer): support webpack side effects flag --- .../build_optimizer/src/build-optimizer/webpack-loader.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts index 215e488de6..e05666f8b5 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/webpack-loader.ts @@ -32,6 +32,9 @@ export default function buildOptimizerLoader inputFilePath, outputFilePath, emitSourceMap: options.sourceMap, + isSideEffectFree: this._module + && this._module.factoryMeta + && this._module.factoryMeta.sideEffectFree, }); if (boOutput.emitSkipped || boOutput.content === null) { From 7118018bbf1e5969318995c30f59d9b991bd9bf5 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 7 Mar 2018 20:01:25 +0100 Subject: [PATCH 208/724] build: add ng-packagr dep, update monorepo and readme --- .monorepo.json | 11 ++ README.md | 1 + package-lock.json | 365 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 4 files changed, 378 insertions(+) diff --git a/.monorepo.json b/.monorepo.json index cf7b690676..5f89e377d6 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -79,6 +79,17 @@ "hash": "16619356762199de42e1641d35e5ec7d", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, + "@angular-devkit/build-ng-packagr": { + "name": "Build NgPackagr", + "links": [ + { + "label": "README", + "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" + } + ], + "version": "0.0.1", + "hash": "" + }, "@angular-devkit/build-webpack": { "name": "Build Webpack", "links": [ diff --git a/README.md b/README.md index 6d3a3cd6af..13e16ef081 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ This is a monorepo which contains many packages: |---|---|---|---| **Architect** | [`@angular-devkit/architect`](http://npmjs.com/packages/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) **Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/packages/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect-cli) | +**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](http://npmjs.com/packages/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) **Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) **Build Webpack** | [`@angular-devkit/build-webpack`](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-webpack/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md) **Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) diff --git a/package-lock.json b/package-lock.json index e45c9e00db..0dc31a4774 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1224,6 +1224,11 @@ "ieee754": "1.1.8" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, "buffer-indexof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", @@ -1680,6 +1685,11 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, + "commenting": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.4.tgz", + "integrity": "sha1-0UCvMmNPy97k1xOWk0wfzawUflA=" + }, "common-tags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.5.1.tgz", @@ -2077,6 +2087,24 @@ "require-from-string": "1.2.1" } }, + "cpx": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", + "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", + "requires": { + "babel-runtime": "6.26.0", + "chokidar": "1.7.0", + "duplexer": "0.1.1", + "glob": "7.1.2", + "glob2base": "0.0.12", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "resolve": "1.1.7", + "safe-buffer": "5.1.1", + "shell-quote": "1.6.1", + "subarg": "1.0.0" + } + }, "create-ecdh": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", @@ -2615,6 +2643,11 @@ "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", "optional": true }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, "duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -2871,6 +2904,11 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" }, + "estree-walker": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz", + "integrity": "sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao=" + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -3247,6 +3285,16 @@ "pkg-dir": "2.0.0" } }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -3347,6 +3395,16 @@ "null-check": "1.0.0" } }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -4369,6 +4427,14 @@ "is-glob": "2.0.1" } }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "requires": { + "find-index": "0.1.1" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -4967,6 +5033,11 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, + "injection-js": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.2.1.tgz", + "integrity": "sha512-zHI+E+dM0PXix5FFTO1Y4/UOyAzE7zG1l/QwAn4jchTThOoBq+UYRFK4AVG7lQgFL+go62SbrzSsjXy9DFEZUg==" + }, "inline-source-map": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", @@ -5195,6 +5266,11 @@ "is-extglob": "1.0.0" } }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" + }, "is-my-json-valid": { "version": "2.16.1", "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", @@ -5631,6 +5707,14 @@ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "4.1.11" + } + }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -6368,6 +6452,14 @@ "yallist": "2.1.2" } }, + "magic-string": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", + "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", + "requires": { + "vlq": "0.2.3" + } + }, "mailcomposer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", @@ -6772,6 +6864,11 @@ } } }, + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -6879,6 +6976,74 @@ "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", "optional": true }, + "ng-packagr": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-2.1.0.tgz", + "integrity": "sha512-IBrb/Q5QyRyvwynbHjKth82a25SMovm9Dh5C7PylRAkjuiXdTGTla51RGLFFAMuA59HlRuTd1FDcZUT+9idynw==", + "requires": { + "@ngtools/json-schema": "1.1.0", + "autoprefixer": "7.2.3", + "browserslist": "2.10.0", + "commander": "2.12.2", + "cpx": "1.5.0", + "fs-extra": "5.0.0", + "glob": "7.1.2", + "injection-js": "2.2.1", + "less": "2.7.3", + "node-sass": "4.7.2", + "node-sass-tilde-importer": "1.0.1", + "postcss": "6.0.19", + "postcss-discard-comments": "2.0.4", + "postcss-url": "7.3.1", + "rimraf": "2.6.2", + "rollup": "0.55.5", + "rollup-plugin-cleanup": "2.0.0", + "rollup-plugin-commonjs": "8.4.1", + "rollup-plugin-license": "0.5.0", + "rollup-plugin-node-resolve": "3.2.0", + "rxjs": "5.5.6", + "sorcery": "0.10.0", + "strip-bom": "3.0.0", + "stylus": "0.54.5", + "uglify-js": "3.3.13" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "uglify-js": { + "version": "3.3.13", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.13.tgz", + "integrity": "sha512-7rdn/bDOG1ElSTPdh7AI5TCjLv63ZD4k8BBadN3ssIkhlaQL2c0yRxmXCyOYhZK0wZTgGgUSnYQ4CGu+Jos5cA==", + "requires": { + "commander": "2.14.1", + "source-map": "0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + } + } + } + } + }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -7082,6 +7247,14 @@ } } }, + "node-sass-tilde-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.1.tgz", + "integrity": "sha512-Fh9+WztCbell05Xy2KpU96Fkj5JWrs5RX/nP4ko2n6zi1/SJnw1tMXDzS1wD9ttFNy3A0jsmTFqObdPIjx35Wg==", + "requires": { + "find-parent-dir": "0.3.0" + } + }, "nodemailer": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", @@ -7845,6 +8018,51 @@ } } }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.0", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + } + } + }, "postcss-import": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", @@ -8709,6 +8927,91 @@ "inherits": "2.0.3" } }, + "rollup": { + "version": "0.55.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.55.5.tgz", + "integrity": "sha512-2hke9NOy332kxvnmMQOgl7DHm94zihNyYJNd8ZLWo4U0EjFvjUkeWa0+ge+70bTg+mY0xJ7NUsf5kIhDtrGrtA==" + }, + "rollup-plugin-cleanup": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-2.0.0.tgz", + "integrity": "sha1-hZdzGaO/VHUKnXX7kJx+UfWaLaQ=", + "requires": { + "acorn": "4.0.13", + "magic-string": "0.22.4", + "rollup-pluginutils": "2.0.1" + } + }, + "rollup-plugin-commonjs": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz", + "integrity": "sha512-mg+WuD+jlwoo8bJtW3Mvx7Tz6TsIdMsdhuvCnDMoyjh0oxsVgsjB/N0X984RJCWwc5IIiqNVJhXeeITcc73++A==", + "requires": { + "acorn": "5.5.1", + "estree-walker": "0.5.1", + "magic-string": "0.22.4", + "resolve": "1.5.0", + "rollup-pluginutils": "2.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.1.tgz", + "integrity": "sha512-D/KGiCpM/VOtTMDS+wfjywEth926WUrArrzYov4N4SI7t+3y8747dPpCmmAvrm/Z3ygqMHnyPxvYYO0yTdn/nQ==" + }, + "estree-walker": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", + "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "requires": { + "path-parse": "1.0.5" + } + } + } + }, + "rollup-plugin-license": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.5.0.tgz", + "integrity": "sha1-XnBzdftY0pV1JToNKOl+QYgmgvc=", + "requires": { + "commenting": "1.0.4", + "lodash": "4.17.4", + "magic-string": "0.22.4", + "mkdirp": "0.5.1", + "moment": "2.18.1" + } + }, + "rollup-plugin-node-resolve": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.2.0.tgz", + "integrity": "sha512-stvVrKaQiNu65ObGJLCHyHH/NXjiPMt/ZHwvl444KgJPrii1zCgyg+NTK2Uy6WExL+OuUWdHd7T8EoPQDtYEkw==", + "requires": { + "builtin-modules": "2.0.0", + "is-module": "1.0.0", + "resolve": "1.1.7" + }, + "dependencies": { + "builtin-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", + "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==" + } + } + }, + "rollup-pluginutils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", + "integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=", + "requires": { + "estree-walker": "0.3.1", + "micromatch": "2.3.11" + } + }, "run-queue": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", @@ -8738,6 +9041,32 @@ "ret": "0.1.15" } }, + "sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", + "requires": { + "es6-promise": "3.3.1", + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + } + } + }, "sass-graph": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", @@ -9423,6 +9752,17 @@ "socks": "1.1.10" } }, + "sorcery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", + "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", + "requires": { + "buffer-crc32": "0.2.13", + "minimist": "1.2.0", + "sander": "0.5.1", + "sourcemap-codec": "1.4.0" + } + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -9465,6 +9805,21 @@ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, + "sourcemap-codec": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.0.tgz", + "integrity": "sha512-66s3CwUASiYGiwQxkr34IctPs/LDkaJ8qNqVK6bBektymq3Sx1rX9qDZ8MNXFwiXqKuM3JYwzG3NAhI1ivqkjA==", + "requires": { + "vlq": "1.0.0" + }, + "dependencies": { + "vlq": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.0.tgz", + "integrity": "sha512-o3WmXySo+oI5thgqr7Qy8uBkT/v9Zr+sRyrh1lr8aWPUkgDWdWt4Nae2WKBrLsocgE8BuWWD0jLc+VW8LeU+2g==" + } + } + }, "spdx": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", @@ -10464,6 +10819,11 @@ "imurmurhash": "0.1.4" } }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -10785,6 +11145,11 @@ } } }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" + }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", diff --git a/package.json b/package.json index be380c4653..a3796759e6 100644 --- a/package.json +++ b/package.json @@ -118,6 +118,7 @@ "mini-css-extract-plugin": "~0.2.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", + "ng-packagr": "^2.1.0", "node-sass": "^4.7.2", "opn": "^5.1.0", "parse5": "^4.0.0", From 68b2bdfc685dccd862edb80a55561dfa4289ea76 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 7 Mar 2018 20:02:16 +0100 Subject: [PATCH 209/724] feat(@schematics/angular): add library scaffolding --- packages/schematics/angular/collection.json | 6 + .../angular/library/files/__entryFile__.ts | 3 + .../angular/library/files/package.json | 10 ++ packages/schematics/angular/library/index.ts | 111 +++++++++++++ .../schematics/angular/library/index_spec.ts | 154 ++++++++++++++++++ .../schematics/angular/library/schema.d.ts | 30 ++++ .../schematics/angular/library/schema.json | 38 +++++ 7 files changed, 352 insertions(+) create mode 100644 packages/schematics/angular/library/files/__entryFile__.ts create mode 100644 packages/schematics/angular/library/files/package.json create mode 100644 packages/schematics/angular/library/index.ts create mode 100644 packages/schematics/angular/library/index_spec.ts create mode 100644 packages/schematics/angular/library/schema.d.ts create mode 100644 packages/schematics/angular/library/schema.json diff --git a/packages/schematics/angular/collection.json b/packages/schematics/angular/collection.json index 1230c6a1db..093f07d48f 100644 --- a/packages/schematics/angular/collection.json +++ b/packages/schematics/angular/collection.json @@ -69,6 +69,12 @@ "factory": "./app-shell", "description": "Create an app shell.", "schema": "./app-shell/schema.json" + }, + "library": { + "aliases": ["lib"], + "factory": "./library", + "schema": "./library/schema.json", + "description": "Generate a library project for Angular." } } } diff --git a/packages/schematics/angular/library/files/__entryFile__.ts b/packages/schematics/angular/library/files/__entryFile__.ts new file mode 100644 index 0000000000..42ef133238 --- /dev/null +++ b/packages/schematics/angular/library/files/__entryFile__.ts @@ -0,0 +1,3 @@ +/* + * Public API Surface of <%= name %> + */ diff --git a/packages/schematics/angular/library/files/package.json b/packages/schematics/angular/library/files/package.json new file mode 100644 index 0000000000..efee9298d5 --- /dev/null +++ b/packages/schematics/angular/library/files/package.json @@ -0,0 +1,10 @@ +{ + "name": "<%= name %>", + "version": "1.0.0", + "peerDependencies": [], + "ngPackage": { + "lib": { + "entryFile": "<%= entryFile %>.ts" + } + } +} \ No newline at end of file diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts new file mode 100644 index 0000000000..249ea865aa --- /dev/null +++ b/packages/schematics/angular/library/index.ts @@ -0,0 +1,111 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as path from 'path'; +import { strings } from '@angular-devkit/core'; +import { + VirtualTree, + Rule, + Tree, + SchematicContext, + SchematicsException, + apply, + branchAndMerge, + chain, + mergeWith, + move, + noop, + template, + url, +} from '@angular-devkit/schematics'; +import { Schema as GenerateLibraryOptions } from './schema'; + +function updateJsonFile(host: Tree, path: string, callback: (a: any) => any): Tree { + const sourceText = host.read(path)!.toString('utf-8'); + const json = JSON.parse(sourceText); + callback(json); + host.overwrite(path, JSON.stringify(json, null, 2)); + return host; +} + +function updateTsConfig(npmPackageName: string, entryFilePath: string) { + + return (host: Tree) => { + if (!host.exists('tsconfig.json')) return host; + + return updateJsonFile(host, 'tsconfig.json', (tsconfig) => { + tsconfig.compilerOptions.baseUrl = '.'; + if (!tsconfig.compilerOptions.paths) { + tsconfig.compilerOptions.paths = {}; + } + if (!tsconfig.compilerOptions.paths[npmPackageName]) { + tsconfig.compilerOptions.paths[npmPackageName] = []; + } + tsconfig.compilerOptions.paths[npmPackageName].push(entryFilePath); + }); + }; +} + +function addDependenciesAndScriptsToPackageJson(name: string, sourceDir: string) { + + return (host: Tree) => { + if (!host.exists('package.json')) return host; + + return updateJsonFile(host, 'package.json', (json) => { + if (!json['devDependencies']) { + json['devDependencies'] = {}; + } + + json.devDependencies = { + '@angular/compiler': '^5.0.0', + '@angular/compiler-cli': '^5.0.0', + 'ng-packagr': '^2.1.0', + 'tsickle': '>=0.25.5', + 'tslib': '^1.7.1', + 'typescript': '>=2.4.2', + // de-structure last keeps existing user dependencies + ...json.devDependencies + }; + + // Add package.json script + if (!json.scripts) { + json.scripts = {}; + } + json.scripts[`libs:${name}:build`] = `ng-packagr -p ${sourceDir}/package.json`; + }); + }; +} + +export default function (options: GenerateLibraryOptions): Rule { + if (!options.name) { + throw new SchematicsException(`name option is required.`); + } + options.entryFile = options.entryFile ? options.entryFile : 'public_api'; + if (options.entryFile.endsWith('.ts')) { + options.entryFile = options.entryFile.substring(0, options.entryFile.length - 3); + } + const sourceDir = path.join(options.baseDir, options.name); + const entryFilePath = path.join(sourceDir, options.entryFile!) + '.ts'; + + return (host: Tree, context: SchematicContext) => { + const templateSource = apply(url('./files'), [ + template({ + ...strings, + ...options, + }), + move(sourceDir) + ]); + + return chain([ + branchAndMerge(chain([ + mergeWith(templateSource), + ])), + options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(options.name!, sourceDir), + options.skipTsConfig ? noop() : updateTsConfig(options.name!, entryFilePath) + ])(host, context); + }; +} diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts new file mode 100644 index 0000000000..e3e34320d6 --- /dev/null +++ b/packages/schematics/angular/library/index_spec.ts @@ -0,0 +1,154 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { HostTree, VirtualTree, Tree } from '@angular-devkit/schematics'; +import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { getFileContent } from '../../angular/utility/test'; +import { Schema as GenerateLibrarySchema } from './schema'; +import { SimpleMemoryHost, stringToFileBuffer, fileBufferToString } from '../../../angular_devkit/core/src/virtual-fs/host'; +import { normalize } from '@angular-devkit/core'; + +function getJsonFileContent(tree: Tree, path: string) { + return JSON.parse(getFileContent(tree, path)); +} + +describe('Library Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/ng_packagr', + path.join(__dirname, '../collection.json'), + ); + const defaultOptions: GenerateLibrarySchema = { + name: 'foo', + baseDir: 'my-libs', + entryFile: 'my_index.ts', + }; + + it('should create entryFile', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions); + expect(tree.files.length).toEqual(2); + expect(tree.files[1]).toEqual('/my-libs/foo/my_index.ts'); + }); + + it('should create a package.json named "foo"', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions); + const fileContent = getFileContent(tree, '/my-libs/foo/package.json'); + expect(fileContent).toMatch(/"name": "foo"/); + }); + + it('should create a package.json with ngPackage conf', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions); + const fileContent = getJsonFileContent(tree, '/my-libs/foo/package.json'); + expect(fileContent.ngPackage).toBeDefined(); + expect(fileContent.ngPackage.lib.entryFile).toEqual('my_index.ts'); + }); + + it('should use default value for sourceDir and entryFile', () => { + const tree = schematicRunner.runSchematic('library', { + name: 'foobar' + }); + expect(tree.files.length).toEqual(2); + expect(tree.files[1]).toEqual('/lib/foobar/public_api.ts'); + }); + + describe(`update tsconfig.json`, () => { + let mockTree: Tree; + beforeEach(() => { + mockTree = new VirtualTree(); + mockTree.create('tsconfig.json', JSON.stringify({ + compilerOptions: { + target: 'es2015', + module: 'es2015' + } + })); + }); + + it(`should add paths mapping to empty tsconfig`, () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + + const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); + expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); + expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(1); + expect(tsConfigJson.compilerOptions.paths.foo[0]).toEqual('my-libs/foo/my_index.ts'); + }); + + it(`should append to existing paths mappings`, () => { + mockTree.overwrite('tsconfig.json', JSON.stringify({ + compilerOptions: { + target: 'es2015', + module: 'es2015', + paths: { + 'unrelated': ['./something/else.ts'], + 'foo': ['libs/*'] + } + } + })); + const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + + const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); + expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); + expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(2); + expect(tsConfigJson.compilerOptions.paths.foo[1]).toEqual('my-libs/foo/my_index.ts'); + }); + + it(`should not modify the file when --skipTsConfig`, () => { + const tree = schematicRunner.runSchematic('library', { + name: 'foo', + skipTsConfig: true + }, mockTree); + + const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); + expect(tsConfigJson.compilerOptions.paths).toBeUndefined(); + }); + }); + + describe(`update package.json`, () => { + let mockTree: VirtualTree; + let memoryfs: SimpleMemoryHost; + beforeEach(() => { + memoryfs = new SimpleMemoryHost(); + memoryfs.write(normalize('/package.json'), stringToFileBuffer(JSON.stringify({ + devDependencies: { + typescript: '~2.5.0' + } + }))); + mockTree = new HostTree(memoryfs); + }); + + it(`should add ng-packagr to devDependencies`, () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + + const packageJson = getJsonFileContent(tree, 'package.json'); + expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.1.0'); + // TODO ... + }); + + it(`should add a script for ng-packagr`, () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + + const packageJson = getJsonFileContent(tree, 'package.json'); + expect(packageJson.scripts['libs:foo:build']).toEqual('ng-packagr -p my-libs/foo/package.json'); + }); + + it(`should not override existing users dependencies`, () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + + const packageJson = getJsonFileContent(tree, 'package.json'); + expect(packageJson.devDependencies.typescript).toEqual('~2.5.0'); + }); + + it(`should not modify the file when --skipPackageJson`, () => { + const tree = schematicRunner.runSchematic('library', { + name: 'foo', + skipPackageJson: true + }, mockTree); + + const packageJson = getJsonFileContent(tree, 'package.json'); + expect(packageJson.devDependencies['ng-packagr']).toBeUndefined(); + }); + }); +}); diff --git a/packages/schematics/angular/library/schema.d.ts b/packages/schematics/angular/library/schema.d.ts new file mode 100644 index 0000000000..9e080730d2 --- /dev/null +++ b/packages/schematics/angular/library/schema.d.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + /** + * The name of the library. Required field. + */ + name?: string; + /** + * The path to create the interface. + */ + entryFile: string; + /** + * The path of the base directory. The library source folder will be a sub-folder. + */ + baseDir: string; + /** + * Do not add dependencies to package.json (e.g., --skipPackageJson) + */ + skipPackageJson?: boolean; + /** + * Do not update tsconfig.json for development experience (e.g., --skipTsConfig) + */ + skipTsConfig?: boolean; +} diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json new file mode 100644 index 0000000000..35881fb2fb --- /dev/null +++ b/packages/schematics/angular/library/schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsLibrary", + "title": "Library Options Schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the library." + }, + "entryFile": { + "type": "string", + "format": "path", + "description": "The path to create the library's public API file.", + "default": "public_api.ts" + }, + "baseDir": { + "type": "string", + "format": "path", + "description": "The base path where the library sources will be created.", + "default": "lib", + "visible": false + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to package.json (e.g., --skipPackageJson)" + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update tsconfig.json for development experience (e.g., --skipTsConfig)" + } + }, + "required": [ + "name" + ] +} From 2ed9ace3d7651a325906606f5df08911a01c22b1 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 7 Mar 2018 20:02:48 +0100 Subject: [PATCH 210/724] feat(@angular-devkit/build-ng-packagr): add build architect for ng packagr --- .../angular_devkit/build_ng_packagr/README.md | 3 + .../build_ng_packagr/builders.json | 10 + .../build_ng_packagr/package.json | 17 + .../build_ng_packagr/src/build/index.ts | 44 + .../build_ng_packagr/src/build/index_spec.ts | 53 + .../build_ng_packagr/src/build/schema.json | 15 + .../build_ng_packagr/src/index.ts | 9 + .../ng-packaged/.angular-cli.json | 60 + .../ng-packaged/.editorconfig | 13 + .../build_ng_packagr/ng-packaged/.gitignore | 42 + .../build_ng_packagr/ng-packaged/README.md | 27 + .../ng-packaged/e2e/app.e2e-spec.ts | 14 + .../ng-packaged/e2e/app.po.ts | 11 + .../ng-packaged/e2e/tsconfig.e2e.json | 14 + .../ng-packaged/karma.conf.js | 33 + .../ng-packaged/libs/one/index.ts | 1 + .../ng-packaged/libs/one/package.json | 9 + .../build_ng_packagr/ng-packaged/package.json | 49 + .../ng-packaged/protractor.conf.js | 28 + .../ng-packaged/src/app/app.component.css | 0 .../ng-packaged/src/app/app.component.html | 20 + .../ng-packaged/src/app/app.component.spec.ts | 27 + .../ng-packaged/src/app/app.component.ts | 10 + .../ng-packaged/src/app/app.module.ts | 18 + .../ng-packaged/src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 3 + .../src/environments/environment.ts | 8 + .../ng-packaged/src/favicon.ico | Bin 0 -> 5430 bytes .../ng-packaged/src/index.html | 14 + .../build_ng_packagr/ng-packaged/src/main.ts | 12 + .../ng-packaged/src/polyfills.ts | 66 + .../ng-packaged/src/styles.css | 1 + .../build_ng_packagr/ng-packaged/src/test.ts | 32 + .../ng-packaged/src/tsconfig.app.json | 13 + .../ng-packaged/src/tsconfig.spec.json | 20 + .../ng-packaged/src/typings.d.ts | 5 + .../ng-packaged/tsconfig.json | 19 + .../build_ng_packagr/ng-packaged/tslint.json | 144 + .../build_ng_packagr/ng-packaged/yarn.lock | 6211 +++++++++++++++++ 39 files changed, 7075 insertions(+) create mode 100644 packages/angular_devkit/build_ng_packagr/README.md create mode 100644 packages/angular_devkit/build_ng_packagr/builders.json create mode 100644 packages/angular_devkit/build_ng_packagr/package.json create mode 100644 packages/angular_devkit/build_ng_packagr/src/build/index.ts create mode 100644 packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts create mode 100644 packages/angular_devkit/build_ng_packagr/src/build/schema.json create mode 100644 packages/angular_devkit/build_ng_packagr/src/index.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/.gitignore create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/index.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/package.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.css create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/assets/.gitkeep create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/favicon.ico create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/index.html create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock diff --git a/packages/angular_devkit/build_ng_packagr/README.md b/packages/angular_devkit/build_ng_packagr/README.md new file mode 100644 index 0000000000..acfeaea954 --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/README.md @@ -0,0 +1,3 @@ +# Angular Build Architect for ng-packagr + +WIP \ No newline at end of file diff --git a/packages/angular_devkit/build_ng_packagr/builders.json b/packages/angular_devkit/build_ng_packagr/builders.json new file mode 100644 index 0000000000..58db53b1c4 --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/builders.json @@ -0,0 +1,10 @@ +{ + "$schema": "../architect/src/builders-schema.json", + "builders": { + "build": { + "class": "./src/build", + "schema": "./src/build/schema.json", + "description": "Build a library with ng-packagr." + } + } +} diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json new file mode 100644 index 0000000000..bd65f49af5 --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -0,0 +1,17 @@ +{ + "name": "@angular-devkit/build-ng-packagr", + "version": "0.0.0", + "description": "Angular Build Architect for ng-packagr", + "main": "src/index.js", + "typings": "src/index.d.ts", + "builders": "builders.json", + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "dependencies": { + "@angular-devkit/architect": "0.0.0", + "@angular-devkit/core": "0.0.0", + "rxjs": "0.0.0", + "ng-packagr": "^2.0.0" + } +} diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index.ts b/packages/angular_devkit/build_ng_packagr/src/build/index.ts new file mode 100644 index 0000000000..c5c6d647f1 --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/src/build/index.ts @@ -0,0 +1,44 @@ +import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; +import { getSystemPath } from '@angular-devkit/core'; +import * as ngPackagr from 'ng-packagr'; +import { resolve as resolvePath } from 'path'; +import { Observable } from 'rxjs/Observable'; + +// XX: blatantly copy-pasted from 'require-project-module.ts' +const resolve = require('resolve'); +function requireProjectModule(root: string, moduleName: string) { + return require(resolve.sync(moduleName, { basedir: root })); +} + + +export interface NgPackagrBuilderOptions { + project: string; +} + +export class NgPackagrBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(target: Target): Observable { + const root = getSystemPath(target.root); + const options = target.options; + + if (!options.project) { + throw new Error('A "project" must be specified to build a library\'s npm package.'); + } + + return new Observable(obs => { + const projectNgPackagr = requireProjectModule(root, 'ng-packagr') as typeof ngPackagr; + const packageJsonPath = resolvePath(root, options.project); + + projectNgPackagr.ngPackagr() + .forProject(packageJsonPath) + .build() + .then(() => obs.complete()) + .catch((e: any) => obs.error(e)); + }); + } + +} + +export default NgPackagrBuilder; diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts new file mode 100644 index 0000000000..fd3e6378fa --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, Workspace } from '@angular-devkit/architect'; +import { normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { relative, resolve } from 'path'; +import { concatMap, tap, toArray } from 'rxjs/operators'; + + +describe('NgPackagr Target', () => { + const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any + const root = resolve(devkitRoot, 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); + const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_ng_packagr'); + const relativeBuilderPath = relative(root, builderPath); + const host = new NodeJsSyncHost(); + + const getWorkspace = (): Workspace => ({ + name: 'spec', + version: 1, + root: '', + defaultProject: 'one', + projects: { + one: { + root: 'libs/one', + projectType: 'library', + defaultTarget: 'build', + targets: { + build: { + builder: `${relativeBuilderPath}:build`, + options: { + project: './package.json' + }, + }, + }, + }, + }, + }); + + it('runs', (done) => { + const architect = new Architect(normalize(root), host); + architect.loadWorkspaceFromJson(getWorkspace()).pipe( + concatMap((architect) => architect.run(architect.getTarget())), + toArray(), + tap(events => expect(events.length).toBe(0)), + ).subscribe(done, done.fail); + }, 30000); +}); diff --git a/packages/angular_devkit/build_ng_packagr/src/build/schema.json b/packages/angular_devkit/build_ng_packagr/src/build/schema.json new file mode 100644 index 0000000000..7c784f38bd --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/src/build/schema.json @@ -0,0 +1,15 @@ +{ + "title": "ng-packagr Target", + "description": "ng-packagr target options for Build Architect.", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The file path of the package.json for distribution via npm." + } + }, + "additionalProperties": false, + "required": [ + "project" + ] +} diff --git a/packages/angular_devkit/build_ng_packagr/src/index.ts b/packages/angular_devkit/build_ng_packagr/src/index.ts new file mode 100644 index 0000000000..51ed774b37 --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/src/index.ts @@ -0,0 +1,9 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './build'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json new file mode 100644 index 0000000000..01c1363c00 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json @@ -0,0 +1,60 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "ng-packaged" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.ico" + ], + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", + "prefix": "app", + "styles": [ + "styles.css" + ], + "scripts": [], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "lint": [ + { + "project": "src/tsconfig.app.json", + "exclude": "**/node_modules/**" + }, + { + "project": "src/tsconfig.spec.json", + "exclude": "**/node_modules/**" + }, + { + "project": "e2e/tsconfig.e2e.json", + "exclude": "**/node_modules/**" + } + ], + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "component": {} + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig new file mode 100644 index 0000000000..6e87a003da --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.gitignore b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.gitignore new file mode 100644 index 0000000000..54bfd2001e --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +testem.log +/typings + +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md b/tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md new file mode 100644 index 0000000000..a74c515d5d --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md @@ -0,0 +1,27 @@ +# NgPackaged + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.3. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts new file mode 100644 index 0000000000..4c0e7a769f --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('ng-packaged App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to app!'); + }); +}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts new file mode 100644 index 0000000000..82ea75ba50 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json new file mode 100644 index 0000000000..1d9e5edf09 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js new file mode 100644 index 0000000000..af139fada3 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js @@ -0,0 +1,33 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular/cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular/cli/plugins/karma') + ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/index.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/index.ts new file mode 100644 index 0000000000..73894e4f7f --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/index.ts @@ -0,0 +1 @@ +export const HELLO_PACKAGR = 'I am packaged with ng-packagr!'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/package.json new file mode 100644 index 0000000000..002d71b45a --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/package.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../../../node_modules/ng-packagr/package.schema.json", + "name": "ng-packaged-one", + "ngPackage": { + "lib": { + "entryFile": "index.ts" + } + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json new file mode 100644 index 0000000000..680686cd75 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json @@ -0,0 +1,49 @@ +{ + "name": "ng-packaged", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.0.0", + "@angular/common": "^5.0.0", + "@angular/compiler": "^5.0.0", + "@angular/core": "^5.0.0", + "@angular/forms": "^5.0.0", + "@angular/http": "^5.0.0", + "@angular/platform-browser": "^5.0.0", + "@angular/platform-browser-dynamic": "^5.0.0", + "@angular/router": "^5.0.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.2", + "zone.js": "^0.8.14" + }, + "devDependencies": { + "@angular/cli": "1.6.3", + "@angular/compiler-cli": "^5.0.0", + "@angular/language-service": "^5.0.0", + "@types/jasmine": "~2.5.53", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.6.2", + "jasmine-spec-reporter": "~4.1.0", + "karma": "~1.7.0", + "karma-chrome-launcher": "~2.1.1", + "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~3.2.0", + "tslint": "~5.7.0", + "typescript": "~2.4.2" + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js new file mode 100644 index 0000000000..7ee3b5ee86 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js @@ -0,0 +1,28 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter } = require('jasmine-spec-reporter'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './e2e/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + onPrepare() { + require('ts-node').register({ + project: 'e2e/tsconfig.e2e.json' + }); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + } +}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.css b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html new file mode 100644 index 0000000000..fa2706a406 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html @@ -0,0 +1,20 @@ + +
+

+ Welcome to {{ title }}! +

+ Angular Logo +
+

Here are some links to help you start:

+ + diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts new file mode 100644 index 0000000000..bcbdf36b3e --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts @@ -0,0 +1,27 @@ +import { TestBed, async } from '@angular/core/testing'; +import { AppComponent } from './app.component'; +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + it(`should have as title 'app'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('app'); + })); + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); + })); +}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts new file mode 100644 index 0000000000..7b0f672831 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'app'; +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts new file mode 100644 index 0000000000..926975afe8 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts @@ -0,0 +1,18 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; + + +import { AppComponent } from './app.component'; + + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule + ], + providers: [], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/assets/.gitkeep b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts new file mode 100644 index 0000000000..3612073bc3 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts new file mode 100644 index 0000000000..b7f639aeca --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts @@ -0,0 +1,8 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const environment = { + production: false +}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/favicon.ico b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8081c7ceaf2be08bf59010158c586170d9d2d517 GIT binary patch literal 5430 zcmc(je{54#6vvCoAI3i*G5%$U7!sA3wtMZ$fH6V9C`=eXGJb@R1%(I_{vnZtpD{6n z5Pl{DmxzBDbrB>}`90e12m8T*36WoeDLA&SD_hw{H^wM!cl_RWcVA!I+x87ee975; z@4kD^=bYPn&pmG@(+JZ`rqQEKxW<}RzhW}I!|ulN=fmjVi@x{p$cC`)5$a!)X&U+blKNvN5tg=uLvuLnuqRM;Yc*swiexsoh#XPNu{9F#c`G zQLe{yWA(Y6(;>y|-efAy11k<09(@Oo1B2@0`PtZSkqK&${ zgEY}`W@t{%?9u5rF?}Y7OL{338l*JY#P!%MVQY@oqnItpZ}?s z!r?*kwuR{A@jg2Chlf0^{q*>8n5Ir~YWf*wmsh7B5&EpHfd5@xVaj&gqsdui^spyL zB|kUoblGoO7G(MuKTfa9?pGH0@QP^b#!lM1yHWLh*2iq#`C1TdrnO-d#?Oh@XV2HK zKA{`eo{--^K&MW66Lgsktfvn#cCAc*(}qsfhrvOjMGLE?`dHVipu1J3Kgr%g?cNa8 z)pkmC8DGH~fG+dlrp(5^-QBeEvkOvv#q7MBVLtm2oD^$lJZx--_=K&Ttd=-krx(Bb zcEoKJda@S!%%@`P-##$>*u%T*mh+QjV@)Qa=Mk1?#zLk+M4tIt%}wagT{5J%!tXAE;r{@=bb%nNVxvI+C+$t?!VJ@0d@HIyMJTI{vEw0Ul ze(ha!e&qANbTL1ZneNl45t=#Ot??C0MHjjgY8%*mGisN|S6%g3;Hlx#fMNcL<87MW zZ>6moo1YD?P!fJ#Jb(4)_cc50X5n0KoDYfdPoL^iV`k&o{LPyaoqMqk92wVM#_O0l z09$(A-D+gVIlq4TA&{1T@BsUH`Bm=r#l$Z51J-U&F32+hfUP-iLo=jg7Xmy+WLq6_tWv&`wDlz#`&)Jp~iQf zZP)tu>}pIIJKuw+$&t}GQuqMd%Z>0?t%&BM&Wo^4P^Y z)c6h^f2R>X8*}q|bblAF?@;%?2>$y+cMQbN{X$)^R>vtNq_5AB|0N5U*d^T?X9{xQnJYeU{ zoZL#obI;~Pp95f1`%X3D$Mh*4^?O?IT~7HqlWguezmg?Ybq|7>qQ(@pPHbE9V?f|( z+0xo!#m@Np9PljsyxBY-UA*{U*la#8Wz2sO|48_-5t8%_!n?S$zlGe+NA%?vmxjS- zHE5O3ZarU=X}$7>;Okp(UWXJxI%G_J-@IH;%5#Rt$(WUX?6*Ux!IRd$dLP6+SmPn= z8zjm4jGjN772R{FGkXwcNv8GBcZI#@Y2m{RNF_w8(Z%^A*!bS*!}s6sh*NnURytky humW;*g7R+&|Ledvc- + + + + NgPackaged + + + + + + + + + diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts new file mode 100644 index 0000000000..91ec6da5f0 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts new file mode 100644 index 0000000000..d68672ffe4 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts @@ -0,0 +1,66 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; + + +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/platform-browser/animations`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css new file mode 100644 index 0000000000..90d4ee0072 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts new file mode 100644 index 0000000000..cd612eeb0e --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts @@ -0,0 +1,32 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/long-stack-trace-zone'; +import 'zone.js/dist/proxy.js'; +import 'zone.js/dist/sync-test'; +import 'zone.js/dist/jasmine-patch'; +import 'zone.js/dist/async-test'; +import 'zone.js/dist/fake-async-test'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. +declare const __karma__: any; +declare const require: any; + +// Prevent Karma from running prematurely. +__karma__.loaded = function () {}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); +// Finally, start Karma to run the tests. +__karma__.start(); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json new file mode 100644 index 0000000000..39ba8dbacb --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "baseUrl": "./", + "module": "es2015", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json new file mode 100644 index 0000000000..63d89ff283 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "baseUrl": "./", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts new file mode 100644 index 0000000000..ef5c7bd620 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts @@ -0,0 +1,5 @@ +/* SystemJS module definition */ +declare var module: NodeModule; +interface NodeModule { + id: string; +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json new file mode 100644 index 0000000000..a6c016bf38 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json new file mode 100644 index 0000000000..a2e30eff29 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json @@ -0,0 +1,144 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs", + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "typeof-compare": true, + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock b/tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock new file mode 100644 index 0000000000..30ea25248d --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock @@ -0,0 +1,6211 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@angular-devkit/build-optimizer@~0.0.36": + version "0.0.42" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.0.42.tgz#402b0dda4883db91e2381c3ddc55888408a7894e" + dependencies: + loader-utils "^1.1.0" + source-map "^0.5.6" + typescript "~2.6.2" + webpack-sources "^1.0.1" + +"@angular-devkit/schematics@~0.0.42": + version "0.0.52" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-0.0.52.tgz#cbd2f42778b50d6422a254ffaec05ad4ef3cb6c0" + dependencies: + "@ngtools/json-schema" "^1.1.0" + rxjs "^5.5.6" + +"@angular/animations@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-5.2.5.tgz#3e72184321c4979305619c74902b8be92d76db70" + dependencies: + tslib "^1.7.1" + +"@angular/cli@1.6.3": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-1.6.3.tgz#63120b347fc8ee206f773074d25fdd4807c189e3" + dependencies: + "@angular-devkit/build-optimizer" "~0.0.36" + "@angular-devkit/schematics" "~0.0.42" + "@ngtools/json-schema" "1.1.0" + "@ngtools/webpack" "1.9.3" + "@schematics/angular" "~0.1.11" + autoprefixer "^6.5.3" + chalk "~2.2.0" + circular-dependency-plugin "^4.2.1" + common-tags "^1.3.1" + copy-webpack-plugin "^4.1.1" + core-object "^3.1.0" + css-loader "^0.28.1" + cssnano "^3.10.0" + denodeify "^1.2.1" + ember-cli-string-utils "^1.0.0" + exports-loader "^0.6.3" + extract-text-webpack-plugin "^3.0.2" + file-loader "^1.1.5" + fs-extra "^4.0.0" + glob "^7.0.3" + html-webpack-plugin "^2.29.0" + istanbul-instrumenter-loader "^2.0.0" + karma-source-map-support "^1.2.0" + less "^2.7.2" + less-loader "^4.0.5" + license-webpack-plugin "^1.0.0" + loader-utils "1.1.0" + lodash "^4.11.1" + memory-fs "^0.4.1" + minimatch "^3.0.4" + node-modules-path "^1.0.0" + nopt "^4.0.1" + opn "~5.1.0" + portfinder "~1.0.12" + postcss-custom-properties "^6.1.0" + postcss-loader "^2.0.8" + postcss-url "^7.1.2" + raw-loader "^0.5.1" + resolve "^1.1.7" + rxjs "^5.5.2" + sass-loader "^6.0.3" + semver "^5.1.0" + silent-error "^1.0.0" + source-map-loader "^0.2.0" + source-map-support "^0.4.1" + style-loader "^0.13.1" + stylus "^0.54.5" + stylus-loader "^3.0.1" + uglifyjs-webpack-plugin "^1.1.5" + url-loader "^0.6.2" + webpack "~3.10.0" + webpack-dev-middleware "~1.12.0" + webpack-dev-server "~2.9.3" + webpack-merge "^4.1.0" + webpack-sources "^1.0.0" + webpack-subresource-integrity "^1.0.1" + zone.js "^0.8.14" + optionalDependencies: + node-sass "^4.3.0" + +"@angular/common@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.2.5.tgz#08dd636fa46077d047066b13a1aae494066f6c55" + dependencies: + tslib "^1.7.1" + +"@angular/compiler-cli@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-5.2.5.tgz#b1988bb2c0a956e7fc163acf8c7d794a07a88d08" + dependencies: + chokidar "^1.4.2" + minimist "^1.2.0" + reflect-metadata "^0.1.2" + tsickle "^0.26.0" + +"@angular/compiler@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-5.2.5.tgz#5e3b511906048a579fcd007aba72911472e5aa28" + dependencies: + tslib "^1.7.1" + +"@angular/core@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.2.5.tgz#24f9cd75c5b2728f2ddd1869777590ea7177bca9" + dependencies: + tslib "^1.7.1" + +"@angular/forms@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-5.2.5.tgz#2ad7a420c6ef6cd87a34071c5319ec83f7ed56aa" + dependencies: + tslib "^1.7.1" + +"@angular/http@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/http/-/http-5.2.5.tgz#1208256e36f0e486d96d10a733fdc8424ffa16bf" + dependencies: + tslib "^1.7.1" + +"@angular/language-service@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-5.2.5.tgz#7c3021f347dd4b28ae0a867700894f3de4930f48" + +"@angular/platform-browser-dynamic@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.5.tgz#b89df410bd953e2a6843325f9ac3c09a10eadaf0" + dependencies: + tslib "^1.7.1" + +"@angular/platform-browser@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-5.2.5.tgz#eae4af2b742fb901d84d6367cd99f9e88102151f" + dependencies: + tslib "^1.7.1" + +"@angular/router@^5.0.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-5.2.5.tgz#f8f220d5fb85fc10d60fe606b0f2a64732265142" + dependencies: + tslib "^1.7.1" + +"@ngtools/json-schema@1.1.0", "@ngtools/json-schema@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922" + +"@ngtools/webpack@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-1.9.3.tgz#353e27e6f21ab35467d17b67e3096dfc5d9bf80c" + dependencies: + chalk "~2.2.0" + enhanced-resolve "^3.1.0" + loader-utils "^1.0.2" + magic-string "^0.22.3" + semver "^5.3.0" + source-map "^0.5.6" + tree-kill "^1.0.0" + webpack-sources "^1.1.0" + +"@schematics/angular@~0.1.11": + version "0.1.17" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-0.1.17.tgz#084a7cbe2de6f94a856bd08d95c9d35ef8905e2b" + dependencies: + typescript "~2.6.2" + +"@types/jasmine@*": + version "2.8.6" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.6.tgz#14445b6a1613cf4e05dd61c3c3256d0e95c0421e" + +"@types/jasmine@~2.5.53": + version "2.5.54" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.5.54.tgz#a6b5f2ae2afb6e0307774e8c7c608e037d491c63" + +"@types/jasminewd2@~2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/jasminewd2/-/jasminewd2-2.0.3.tgz#0d2886b0cbdae4c0eeba55e30792f584bf040a95" + dependencies: + "@types/jasmine" "*" + +"@types/node@^6.0.46", "@types/node@~6.0.60": + version "6.0.101" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.101.tgz#0c5911cfb434af4a51c0a499931fe6423207d921" + +"@types/q@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" + +"@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": + version "2.53.43" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz#2de3d718819bc20165754c4a59afb7e9833f6707" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +accepts@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +accepts@~1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" + dependencies: + mime-types "~2.1.16" + negotiator "0.6.1" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" + +adm-zip@0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" + +adm-zip@^0.4.7: + version "0.4.7" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" + +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + +agent-base@2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7" + dependencies: + extend "~3.0.0" + semver "~5.0.1" + +ajv-keywords@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + +ajv-keywords@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ajv@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.1.1.tgz#978d597fbc2b7d0e5a5c3ddeb149a682f2abfa0e" + dependencies: + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.1.0, ansi-styles@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +app-root-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +aproba@^1.0.3, aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-flatten@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-slice@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + +async@^1.4.0, async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.2, async@^2.1.4, async@^2.1.5, async@^2.4.1, async@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +autoprefixer@^6.3.1, autoprefixer@^6.5.3: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.2.1, aws4@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-generator@^6.18.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + +balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + +base64-js@^1.0.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" + +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + dependencies: + callsite "1.0.0" + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +blocking-proxy@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.5.tgz#462905e0dcfbea970f41aa37223dda9c07b1912b" + dependencies: + minimist "^1.2.0" + +bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +body-parser@1.18.2, body-parser@^1.16.1: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +boom@4.x.x: + version "4.3.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^0.1.2: + version "0.1.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" + dependencies: + expand-range "^0.1.0" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + dependencies: + pako "~1.0.5" + +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +cacache@^10.0.1: + version "10.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" + dependencies: + bluebird "^3.5.1" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^2.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.2" + ssri "^5.2.4" + unique-filename "^1.1.0" + y18n "^4.0.0" + +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000809" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000809.tgz#b0b88434a598f40b546d46a4dbd839b0ff798f4d" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" + dependencies: + ansi-styles "^3.2.0" + escape-string-regexp "^1.0.5" + supports-color "^5.2.0" + +chalk@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.2.tgz#4403f5cf18f35c05f51fbdf152bf588f956cf7cb" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +chokidar@^1.4.1, chokidar@^1.4.2, chokidar@^1.6.0, chokidar@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-dependency-plugin@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz#f8a1a746a3f6c8e57f4dae9b54d991cd2a582f5d" + +clap@^1.0.9: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" + dependencies: + chalk "^1.1.3" + +clean-css@4.1.x: + version "4.1.9" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301" + dependencies: + source-map "0.5.x" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone-deep@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.3.0.tgz#348c61ae9cdbe0edfe053d91ff4cc521d790ede8" + dependencies: + for-own "^1.0.0" + is-plain-object "^2.0.1" + kind-of "^3.2.2" + shallow-clone "^0.1.2" + +clone@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" + +clone@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +codelyzer@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-4.1.0.tgz#3117754538d8f5ffa36dff91d340573a836cf373" + dependencies: + app-root-path "^2.0.1" + css-selector-tokenizer "^0.7.0" + cssauron "^1.4.0" + semver-dsl "^1.0.1" + source-map "^0.5.6" + sprintf-js "^1.0.3" + +color-convert@^1.3.0, color-convert@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@1.1.2, colors@^1.1.0, colors@^1.1.2, colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combine-lists@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" + dependencies: + lodash "^4.5.0" + +combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + +commander@2.14.x, commander@^2.9.0, commander@~2.14.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" + +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + +common-tags@^1.3.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.7.2.tgz#24d9768c63d253a56ecff93845b44b4df1d52771" + dependencies: + babel-runtime "^6.26.0" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + +compressible@~2.0.11: + version "2.0.13" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" + dependencies: + mime-db ">= 1.33.0 < 2" + +compression@^1.5.2: + version "1.7.1" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.1.tgz#eff2603efc2e22cf86f35d2eb93589f9875373db" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.11" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect-history-api-fallback@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" + +connect@^3.6.0: + version "3.6.6" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" + dependencies: + debug "2.6.9" + finalhandler "1.1.0" + parseurl "~1.3.2" + utils-merge "1.0.1" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +convert-source-map@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-webpack-plugin@^4.1.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz#1e8c366211db6dc2ddee40e5a3e4fc661dd149e8" + dependencies: + cacache "^10.0.1" + find-cache-dir "^1.0.0" + globby "^7.1.1" + is-glob "^4.0.0" + loader-utils "^0.2.15" + minimatch "^3.0.4" + p-limit "^1.0.0" + serialize-javascript "^1.4.0" + +core-js@^2.2.0, core-js@^2.4.0, core-js@^2.4.1: + version "2.5.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + +core-object@^3.1.0: + version "3.1.5" + resolved "https://registry.yarnpkg.com/core-object/-/core-object-3.1.5.tgz#fa627b87502adc98045e44678e9a8ec3b9c0d2a9" + dependencies: + chalk "^2.0.0" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css-loader@^0.28.1: + version "0.28.9" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.9.tgz#68064b85f4e271d7ce4c48a58300928e535d1c95" + dependencies: + babel-code-frame "^6.26.0" + css-selector-tokenizer "^0.7.0" + cssnano "^3.10.0" + icss-utils "^2.1.0" + loader-utils "^1.0.2" + lodash.camelcase "^4.3.0" + object-assign "^4.1.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.2.0" + postcss-modules-local-by-default "^1.2.0" + postcss-modules-scope "^1.1.0" + postcss-modules-values "^1.3.0" + postcss-value-parser "^3.3.0" + source-list-map "^2.0.0" + +css-parse@1.7.x: + version "1.7.0" + resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" + +css-select@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +cssauron@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" + dependencies: + through X.X.X + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +cssnano@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug@*, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.6.6, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +del@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +del@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" + dependencies: + globby "^6.1.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + p-map "^1.1.1" + pify "^3.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +denodeify@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" + +depd@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +depd@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +detect-node@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + +diff@^3.1.0, diff@^3.2.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + dependencies: + buffer-indexof "^1.0.0" + +dom-converter@~0.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" + dependencies: + utila "~0.3" + +dom-serialize@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" + dependencies: + domelementtype "1" + +domutils@1.1: + version "1.1.6" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +duplexify@^3.4.2, duplexify@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.3.tgz#8b5818800df92fd0125b27ab896491912858243e" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +ejs@^2.5.7: + version "2.5.7" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a" + +electron-to-chromium@^1.2.7: + version "1.3.33" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +ember-cli-string-utils@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ember-cli-string-utils/-/ember-cli-string-utils-1.1.0.tgz#39b677fc2805f55173735376fcef278eaa4452a1" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + dependencies: + once "^1.4.0" + +engine.io-client@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" + dependencies: + component-emitter "1.2.1" + component-inherit "0.0.3" + debug "2.3.3" + engine.io-parser "1.3.2" + has-cors "1.1.0" + indexof "0.0.1" + parsejson "0.0.3" + parseqs "0.0.5" + parseuri "0.0.5" + ws "1.1.2" + xmlhttprequest-ssl "1.5.3" + yeast "0.1.2" + +engine.io-parser@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" + dependencies: + after "0.8.2" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.5" + blob "0.0.4" + has-binary "0.1.7" + wtf-8 "1.0.0" + +engine.io@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" + dependencies: + accepts "1.3.3" + base64id "1.0.0" + cookie "0.3.1" + debug "2.3.3" + engine.io-parser "1.3.2" + ws "1.1.2" + +enhanced-resolve@^3.1.0, enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +errno@^0.1.1, errno@^0.1.3, errno@^0.1.4: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.7.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.39" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.39.tgz#fca21b67559277ca4ac1a1ed7048b107b6f76d87" + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esrecurse@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" + dependencies: + estraverse "^4.1.0" + object-assign "^4.0.1" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +eventsource@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" + dependencies: + original ">=0.0.5" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + +expand-braces@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" + dependencies: + array-slice "^0.2.3" + array-unique "^0.2.1" + braces "^0.1.2" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" + dependencies: + is-number "^0.1.1" + repeat-string "^0.2.2" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +exports-loader@^0.6.3: + version "0.6.4" + resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-0.6.4.tgz#d70fc6121975b35fc12830cf52754be2740fc886" + dependencies: + loader-utils "^1.0.2" + source-map "0.5.x" + +express@^4.16.2: + version "4.16.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" + dependencies: + accepts "~1.3.4" + array-flatten "1.1.1" + body-parser "1.18.2" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.0" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.2" + qs "6.5.1" + range-parser "~1.2.0" + safe-buffer "5.1.1" + send "0.16.1" + serve-static "1.13.1" + setprototypeof "1.1.0" + statuses "~1.3.1" + type-is "~1.6.15" + utils-merge "1.0.1" + vary "~1.1.2" + +extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extract-text-webpack-plugin@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7" + dependencies: + async "^2.4.1" + loader-utils "^1.1.0" + schema-utils "^0.3.0" + webpack-sources "^1.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" + dependencies: + websocket-driver ">=0.5.1" + +file-loader@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.6.tgz#7b9a8f2c58f00a77fddf49e940f7ac978a3ea0e8" + dependencies: + loader-utils "^1.0.2" + schema-utils "^0.3.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + dependencies: + debug "2.6.9" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +flush-write-stream@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.2.tgz#c81b90d8746766f1a609a46809946c45dd8ae417" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.4" + +for-in@^0.1.3: + version "0.1.8" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +form-data@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-access@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" + dependencies: + null-check "^1.0.0" + +fs-extra@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.39" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gaze@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + dependencies: + globule "^1.0.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@7.0.x: + version "7.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + +globule@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" + dependencies: + glob "~7.1.1" + lodash "~4.17.4" + minimatch "~3.0.2" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +handle-thing@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" + +handlebars@^4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-binary@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + dependencies: + isarray "0.0.1" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hawk@3.1.3, hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + +he@1.1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hoek@4.x.x: + version "4.2.1" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" + +homedir-polyfill@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +html-minifier@^3.2.3: + version "3.5.9" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.9.tgz#74424014b872598d4bb0e20ac420926ec61024b6" + dependencies: + camel-case "3.0.x" + clean-css "4.1.x" + commander "2.14.x" + he "1.1.x" + ncname "1.0.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.3.x" + +html-webpack-plugin@^2.29.0: + version "2.30.1" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz#7f9c421b7ea91ec460f56527d78df484ee7537d5" + dependencies: + bluebird "^3.4.7" + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + toposort "^1.0.0" + +htmlparser2@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" + dependencies: + domelementtype "1" + domhandler "2.1" + domutils "1.1" + readable-stream "1.0" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + +http-errors@1.6.2, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-parser-js@>=0.4.0: + version "0.4.10" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" + +http-proxy-middleware@~0.17.4: + version "0.17.4" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" + dependencies: + http-proxy "^1.16.2" + is-glob "^3.1.0" + lodash "^4.17.2" + micromatch "^2.3.11" + +http-proxy@^1.13.0, http-proxy@^1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + +https-proxy-agent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" + dependencies: + agent-base "2" + debug "2" + extend "3" + +iconv-lite@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +icss-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" + dependencies: + postcss "^6.0.1" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + +ignore@^3.3.5: + version "3.3.7" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" + +image-size@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + +import-local@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-0.1.1.tgz#b1179572aacdc11c6a91009fb430dbcab5f668a8" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +internal-ip@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" + dependencies: + meow "^3.3.0" + +interpret@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + +invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + +ipaddr.js@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.5.2.tgz#d4b505bde9946987ccf0fc58d9010ff9607e3fa0" + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.0.2, is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" + +is-my-ip-valid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" + +is-my-json-valid@^2.12.4: + version "2.17.2" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + is-my-ip-valid "^1.0.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-plain-object@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isbinaryfile@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.14: + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.2" + istanbul-lib-hook "^1.1.0" + istanbul-lib-instrument "^1.9.2" + istanbul-lib-report "^1.1.3" + istanbul-lib-source-maps "^1.2.3" + istanbul-reports "^1.1.4" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-instrumenter-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-2.0.0.tgz#e5492900ab0bba835efa8024cb00be9b3eea2700" + dependencies: + convert-source-map "^1.3.0" + istanbul-lib-instrument "^1.1.3" + loader-utils "^0.2.16" + object-assign "^4.1.0" + +istanbul-lib-coverage@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" + +istanbul-lib-hook@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.1.3, istanbul-lib-instrument@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.1.2" + semver "^5.3.0" + +istanbul-lib-report@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" + dependencies: + istanbul-lib-coverage "^1.1.2" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.1.2" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd" + dependencies: + handlebars "^4.0.3" + +jasmine-core@~2.6.2: + version "2.6.4" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.6.4.tgz#dec926cd0a9fa287fb6db5c755fa487e74cecac5" + +jasmine-core@~2.99.0: + version "2.99.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" + +jasmine-spec-reporter@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.1.1.tgz#5a6d58ab5d61bea7309fbc279239511756b1b588" + dependencies: + colors "1.1.2" + +jasmine@^2.5.3: + version "2.99.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7" + dependencies: + exit "^0.1.2" + glob "^7.0.6" + jasmine-core "~2.99.0" + +jasminewd2@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" + +js-base64@^2.1.8, js-base64@^2.1.9: + version "2.4.3" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.4.3, js-yaml@^3.7.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.3.2, json3@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +karma-chrome-launcher@~2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.1.1.tgz#216879c68ac04d8d5140e99619ba04b59afd46cf" + dependencies: + fs-access "^1.0.0" + which "^1.2.1" + +karma-cli@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/karma-cli/-/karma-cli-1.0.1.tgz#ae6c3c58a313a1d00b45164c455b9b86ce17f960" + dependencies: + resolve "^1.1.6" + +karma-coverage-istanbul-reporter@^1.2.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.1.tgz#2b42d145ddbb4868d85d52888c495a21c61d873c" + dependencies: + istanbul-api "^1.1.14" + minimatch "^3.0.4" + +karma-jasmine-html-reporter@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz#48a8e5ef18807617ee2b5e33c1194c35b439524c" + dependencies: + karma-jasmine "^1.0.2" + +karma-jasmine@^1.0.2, karma-jasmine@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529" + +karma-source-map-support@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz#1bf81e7bb4b089627ab352ec4179e117c406a540" + dependencies: + source-map-support "^0.4.1" + +karma@~1.7.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae" + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + chokidar "^1.4.1" + colors "^1.1.0" + combine-lists "^1.0.0" + connect "^3.6.0" + core-js "^2.2.0" + di "^0.0.1" + dom-serialize "^2.2.0" + expand-braces "^0.1.1" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^3.8.0" + log4js "^0.6.31" + mime "^1.3.4" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "1.7.3" + source-map "^0.5.3" + tmp "0.0.31" + useragent "^2.1.12" + +killable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" + +kind-of@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-2.0.1.tgz#018ec7a4ce7e3a86cb9141be519d24c8faa981b5" + dependencies: + is-buffer "^1.0.2" + +kind-of@^3.0.2, kind-of@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^0.2.3: + version "0.2.7" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +less-loader@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-4.0.5.tgz#ae155a7406cac6acd293d785587fcff0f478c4dd" + dependencies: + clone "^2.1.1" + loader-utils "^1.1.0" + pify "^2.3.0" + +less@^2.7.2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/less/-/less-2.7.3.tgz#cc1260f51c900a9ec0d91fb6998139e02507b63b" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + mime "^1.2.11" + mkdirp "^0.5.0" + promise "^7.1.1" + request "2.81.0" + source-map "^0.5.3" + +license-webpack-plugin@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-1.1.1.tgz#76b2cedccc78f139fd7877e576f756cfc141b8c2" + dependencies: + ejs "^2.5.7" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@1.1.0, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@~0.2.2: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.mergewith@^4.6.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" + +lodash.tail@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +lodash@^3.8.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.11.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.5.0, lodash@~4.17.4: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + +log4js@^0.6.31: + version "0.6.38" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" + dependencies: + readable-stream "~1.0.2" + semver "~4.3.3" + +loglevel@^1.4.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + +lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + +magic-string@^0.22.3: + version "0.22.4" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.4.tgz#31039b4e40366395618c1d6cf8193c53917475ff" + dependencies: + vlq "^0.2.1" + +make-dir@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51" + dependencies: + pify "^3.0.0" + +make-error@^1.1.1: + version "1.3.4" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +math-expression-evaluator@^1.2.14: + version "1.2.17" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.16, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mississippi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^2.0.1" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-object@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" + dependencies: + for-in "^0.1.3" + is-extendable "^0.1.1" + +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +nan@^2.3.0, nan@^2.3.2: + version "2.8.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" + +ncname@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" + dependencies: + xml-char-classes "^1.0.0" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + +node-forge@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" + +node-gyp@^3.3.1: + version "3.6.2" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60" + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + minimatch "^3.0.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3 || 4" + osenv "0" + request "2" + rimraf "2" + semver "~5.3.0" + tar "^2.0.0" + which "1" + +node-libs-browser@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.0" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-modules-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/node-modules-path/-/node-modules-path-1.0.1.tgz#40096b08ce7ad0ea14680863af449c7c75a5d1c8" + +node-pre-gyp@^0.6.39: + version "0.6.39" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" + dependencies: + detect-libc "^1.0.2" + hawk "3.1.3" + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +node-sass@^4.3.0: + version "4.7.2" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.7.2.tgz#9366778ba1469eb01438a9e8592f4262bcb6794e" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + lodash.mergewith "^4.6.0" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.3.2" + node-gyp "^3.3.1" + npmlog "^4.0.0" + request "~2.79.0" + sass-graph "^2.2.4" + stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" + +"nopt@2 || 3": + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +null-check@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1, oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +obuf@^1.0.0, obuf@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.1.tgz#104124b6c602c6796881a042541d36db43a5264e" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +opn@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" + dependencies: + is-wsl "^1.1.0" + +opn@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519" + dependencies: + is-wsl "^1.1.0" + +optimist@^0.6.1, optimist@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + +original@>=0.0.5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" + dependencies: + url-parse "1.0.x" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@0, osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.0.0, p-limit@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + +pako@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" + +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +parsejson@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + +pbkdf2@^3.0.3: + version "3.0.14" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + +portfinder@^1.0.9, portfinder@~1.0.12: + version "1.0.13" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" + dependencies: + async "^1.5.2" + debug "^2.2.0" + mkdirp "0.5.x" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-custom-properties@^6.1.0: + version "6.3.1" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-6.3.1.tgz#5c52abde313d7ec9368c4abf67d27a656cba8b39" + dependencies: + balanced-match "^1.0.0" + postcss "^6.0.18" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + +postcss-loader@^2.0.8: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.0.tgz#038c2d6d59753fef4667827fd3ae03f5dc5e6a7a" + dependencies: + loader-utils "^1.1.0" + postcss "^6.0.0" + postcss-load-config "^1.2.0" + schema-utils "^0.4.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-modules-extract-imports@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-scope@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-url@^7.1.2: + version "7.3.0" + resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-7.3.0.tgz#cf2f45e06743cf43cfea25309f81cbc003dc783f" + dependencies: + mime "^1.4.1" + minimatch "^3.0.4" + mkdirp "^0.5.0" + postcss "^6.0.1" + xxhashjs "^0.2.1" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: + version "5.2.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.18: + version "6.0.19" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.19.tgz#76a78386f670b9d9494a655bf23ac012effd1555" + dependencies: + chalk "^2.3.1" + source-map "^0.6.1" + supports-color "^5.2.0" + +prepend-http@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +protractor@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.1.2.tgz#9b221741709a4c62d5cd53c6aadd54a71137e95f" + dependencies: + "@types/node" "^6.0.46" + "@types/q" "^0.0.32" + "@types/selenium-webdriver" "~2.53.39" + blocking-proxy "0.0.5" + chalk "^1.1.3" + glob "^7.0.3" + jasmine "^2.5.3" + jasminewd2 "^2.1.0" + optimist "~0.6.0" + q "1.4.1" + saucelabs "~1.3.0" + selenium-webdriver "3.0.1" + source-map-support "~0.4.0" + webdriver-js-extender "^1.0.0" + webdriver-manager "^12.0.6" + +proxy-addr@~2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.2.tgz#6571504f47bb988ec8180253f85dd7e14952bdec" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.5.2" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +pump@^2.0.0, pump@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" + dependencies: + duplexify "^3.5.3" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + +q@^1.1.2, q@^1.4.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + +qjobs@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" + +qs@6.5.1, qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +querystringify@0.0.x: + version "0.0.4" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" + +querystringify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + +raw-loader@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" + +rc@^1.1.7: + version "1.2.5" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +readable-stream@1.0, readable-stream@~1.0.2: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +reflect-metadata@^0.1.2: + version "0.1.12" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.12.tgz#311bf0c6b63cd782f228a81abe146a2bfa9c56f2" + +regenerate@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +renderkid@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" + dependencies: + css-select "^1.1.0" + dom-converter "~0.1" + htmlparser2 "~3.3.0" + strip-ansi "^3.0.0" + utila "~0.3" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@2, request@^2.78.0: + version "2.83.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + +request@2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@~2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + dependencies: + aproba "^1.1.1" + +rxjs@^5.5.2, rxjs@^5.5.6: + version "5.5.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02" + dependencies: + symbol-observable "1.0.1" + +safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sass-graph@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + scss-tokenizer "^0.2.3" + yargs "^7.0.0" + +sass-loader@^6.0.3: + version "6.0.6" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-6.0.6.tgz#e9d5e6c1f155faa32a4b26d7a9b7107c225e40f9" + dependencies: + async "^2.1.5" + clone-deep "^0.3.0" + loader-utils "^1.0.1" + lodash.tail "^4.1.1" + pify "^3.0.0" + +saucelabs@~1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" + dependencies: + https-proxy-agent "^1.0.0" + +sax@0.5.x: + version "0.5.8" + resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" + +sax@0.6.x: + version "0.6.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" + +sax@>=0.6.0, sax@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +schema-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" + dependencies: + ajv "^5.0.0" + +schema-utils@^0.4.0, schema-utils@^0.4.2: + version "0.4.5" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + +scss-tokenizer@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" + dependencies: + js-base64 "^2.1.8" + source-map "^0.4.2" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + +selenium-webdriver@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" + dependencies: + adm-zip "^0.4.7" + rimraf "^2.5.4" + tmp "0.0.30" + xml2js "^0.4.17" + +selenium-webdriver@^2.53.2: + version "2.53.3" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" + dependencies: + adm-zip "0.4.4" + rimraf "^2.2.8" + tmp "0.0.24" + ws "^1.0.1" + xml2js "0.4.4" + +selfsigned@^1.9.1: + version "1.10.2" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.2.tgz#b4449580d99929b65b10a48389301a6592088758" + dependencies: + node-forge "0.7.1" + +semver-dsl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/semver-dsl/-/semver-dsl-1.0.1.tgz#d3678de5555e8a61f629eed025366ae5f27340a0" + dependencies: + semver "^5.3.0" + +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +semver@~4.3.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +semver@~5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" + +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +send@0.16.1: + version "0.16.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" + dependencies: + debug "2.6.9" + depd "~1.1.1" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serialize-javascript@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" + +serve-index@^1.7.2: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.1.tgz#4c57d53404a761d8f2e7c1e8a18a47dbf278a719" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.1" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.10" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-clone@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-0.1.2.tgz#5909e874ba77106d73ac414cfec1ffca87d97060" + dependencies: + is-extendable "^0.1.1" + kind-of "^2.0.1" + lazy-cache "^0.2.3" + mixin-object "^2.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +silent-error@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/silent-error/-/silent-error-1.1.0.tgz#2209706f1c850a9f1d10d0d840918b46f26e1bc9" + dependencies: + debug "^2.2.0" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + +socket.io-adapter@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" + dependencies: + debug "2.3.3" + socket.io-parser "2.3.1" + +socket.io-client@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.2.1" + debug "2.3.3" + engine.io-client "1.8.3" + has-binary "0.1.7" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.5" + socket.io-parser "2.3.1" + to-array "0.1.4" + +socket.io-parser@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" + dependencies: + component-emitter "1.1.2" + debug "2.2.0" + isarray "0.0.1" + json3 "3.3.2" + +socket.io@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" + dependencies: + debug "2.3.3" + engine.io "1.8.3" + has-binary "0.1.7" + object-assign "4.1.0" + socket.io-adapter "0.5.0" + socket.io-client "1.7.3" + socket.io-parser "2.3.1" + +sockjs-client@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" + dependencies: + debug "^2.6.6" + eventsource "0.1.6" + faye-websocket "~0.11.0" + inherits "^2.0.1" + json3 "^3.3.2" + url-parse "^1.1.8" + +sockjs@0.3.18: + version "0.3.18" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.18.tgz#d9b289316ca7df77595ef299e075f0f937eb4207" + dependencies: + faye-websocket "^0.10.0" + uuid "^2.0.2" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-list-map@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" + +source-map-loader@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.3.tgz#d4b0c8cd47d54edce3e6bfa0f523f452b5b0e521" + dependencies: + async "^2.5.0" + loader-utils "~0.2.2" + source-map "~0.6.1" + +source-map-support@^0.4.0, source-map-support@^0.4.1, source-map-support@^0.4.2, source-map-support@~0.4.0: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map@0.1.x: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.4.2, source-map@^0.4.4, source-map@~0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +spdy-transport@^2.0.18: + version "2.0.20" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.0.20.tgz#735e72054c486b2354fe89e702256004a39ace4d" + dependencies: + debug "^2.6.8" + detect-node "^2.0.3" + hpack.js "^2.1.6" + obuf "^1.1.1" + readable-stream "^2.2.9" + safe-buffer "^5.0.1" + wbuf "^1.7.2" + +spdy@^3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" + dependencies: + debug "^2.6.8" + handle-thing "^1.2.5" + http-deceiver "^1.2.7" + safe-buffer "^5.0.1" + select-hose "^2.0.0" + spdy-transport "^2.0.18" + +sprintf-js@^1.0.3: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +ssri@^5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.2.4.tgz#9985e14041e65fc397af96542be35724ac11da52" + dependencies: + safe-buffer "^5.1.1" + +"statuses@>= 1.3.1 < 2": + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stdout-stream@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" + dependencies: + readable-stream "^2.0.1" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.3" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^1.0.0, string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +stringstream@~0.0.4, stringstream@~0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +style-loader@^0.13.1: + version "0.13.2" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.2.tgz#74533384cf698c7104c7951150b49717adc2f3bb" + dependencies: + loader-utils "^1.0.2" + +stylus-loader@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.1.tgz#77f4b34fd030d25b2617bcf5513db5b0730c4089" + dependencies: + loader-utils "^1.0.2" + lodash.clonedeep "^4.5.0" + when "~3.6.x" + +stylus@^0.54.5: + version "0.54.5" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" + dependencies: + css-parse "1.7.x" + debug "*" + glob "7.0.x" + mkdirp "0.5.x" + sax "0.5.x" + source-map "0.1.x" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2, supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.0.0, supports-color@^4.2.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + +supports-color@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a" + dependencies: + has-flag "^3.0.0" + +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + +tapable@^0.2.7: + version "0.2.8" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar-pack@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.0.0, tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@X.X.X: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +thunky@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" + +time-stamp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" + +timers-browserify@^2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" + dependencies: + setimmediate "^1.0.4" + +tmp@0.0.24: + version "0.0.24" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" + +tmp@0.0.30: + version "0.0.30" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" + dependencies: + os-tmpdir "~1.0.1" + +tmp@0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +tmp@0.0.x: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +toposort@^1.0.0: + version "1.0.6" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec" + +tough-cookie@~2.3.0, tough-cookie@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" + dependencies: + punycode "^1.4.1" + +tree-kill@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +"true-case-path@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" + dependencies: + glob "^6.0.4" + +ts-node@~3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-3.2.2.tgz#bbd28e38af4aaa3e96076c466e1b220197c1a3ce" + dependencies: + arrify "^1.0.0" + chalk "^2.0.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.0" + tsconfig "^6.0.0" + v8flags "^3.0.0" + yn "^2.0.0" + +tsconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032" + dependencies: + strip-bom "^3.0.0" + strip-json-comments "^2.0.0" + +tsickle@^0.26.0: + version "0.26.0" + resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.26.0.tgz#40b30a2dd6abcb33b182e37596674bd1cfe4039c" + dependencies: + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map "^0.5.6" + source-map-support "^0.4.2" + +tslib@^1.7.1, tslib@^1.8.1: + version "1.9.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" + +tslint@~5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.7.0.tgz#c25e0d0c92fa1201c2bc30e844e08e682b4f3552" + dependencies: + babel-code-frame "^6.22.0" + colors "^1.1.2" + commander "^2.9.0" + diff "^3.2.0" + glob "^7.1.1" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.7.1" + tsutils "^2.8.1" + +tsutils@^2.8.1: + version "2.21.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.21.1.tgz#5b23c263233300ed7442b4217855cbc7547c296a" + dependencies: + tslib "^1.8.1" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-is@~1.6.15: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +typescript@~2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" + +typescript@~2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" + +uglify-es@^3.3.4: + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + dependencies: + commander "~2.13.0" + source-map "~0.6.1" + +uglify-js@3.3.x: + version "3.3.11" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.11.tgz#e9d058b20715138bb4e8e5cae2ea581686bdaae3" + dependencies: + commander "~2.14.1" + source-map "~0.6.1" + +uglify-js@^2.6, uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +uglifyjs-webpack-plugin@^1.1.5: + version "1.2.0" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.0.tgz#f706fa4c655000a086b4a97c7d835ed0f6e9b0ef" + dependencies: + cacache "^10.0.1" + find-cache-dir "^1.0.0" + schema-utils "^0.4.2" + serialize-javascript "^1.4.0" + source-map "^0.6.1" + uglify-es "^3.3.4" + webpack-sources "^1.1.0" + worker-farm "^1.5.2" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + dependencies: + imurmurhash "^0.1.4" + +universalify@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +url-loader@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" + dependencies: + loader-utils "^1.0.2" + mime "^1.4.1" + schema-utils "^0.3.0" + +url-parse@1.0.x: + version "1.0.5" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" + dependencies: + querystringify "0.0.x" + requires-port "1.0.x" + +url-parse@^1.1.8: + version "1.2.0" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986" + dependencies: + querystringify "~1.0.0" + requires-port "~1.0.0" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +useragent@^2.1.12: + version "2.3.0" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" + dependencies: + lru-cache "4.1.x" + tmp "0.0.x" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utila@~0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +uuid@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0, uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + +v8flags@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.0.1.tgz#dce8fc379c17d9f2c9e9ed78d89ce00052b1b76b" + dependencies: + homedir-polyfill "^1.0.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vlq@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + +watchpack@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" + dependencies: + async "^2.1.2" + chokidar "^1.7.0" + graceful-fs "^4.1.2" + +wbuf@^1.1.0, wbuf@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.2.tgz#d697b99f1f59512df2751be42769c1580b5801fe" + dependencies: + minimalistic-assert "^1.0.0" + +webdriver-js-extender@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" + dependencies: + "@types/selenium-webdriver" "^2.53.35" + selenium-webdriver "^2.53.2" + +webdriver-manager@^12.0.6: + version "12.0.6" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.0.6.tgz#3df1a481977010b4cbf8c9d85c7a577828c0e70b" + dependencies: + adm-zip "^0.4.7" + chalk "^1.1.1" + del "^2.2.0" + glob "^7.0.3" + ini "^1.3.4" + minimist "^1.2.0" + q "^1.4.1" + request "^2.78.0" + rimraf "^2.5.2" + semver "^5.3.0" + xml2js "^0.4.17" + +webpack-core@^0.6.8: + version "0.6.9" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" + dependencies: + source-list-map "~0.1.7" + source-map "~0.4.1" + +webpack-dev-middleware@^1.11.0, webpack-dev-middleware@~1.12.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" + dependencies: + memory-fs "~0.4.1" + mime "^1.5.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + time-stamp "^2.0.0" + +webpack-dev-server@~2.9.3: + version "2.9.7" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.7.tgz#100ad6a14775478924d417ca6dcfb9d52a98faed" + dependencies: + ansi-html "0.0.7" + array-includes "^3.0.3" + bonjour "^3.5.0" + chokidar "^1.6.0" + compression "^1.5.2" + connect-history-api-fallback "^1.3.0" + debug "^3.1.0" + del "^3.0.0" + express "^4.16.2" + html-entities "^1.2.0" + http-proxy-middleware "~0.17.4" + import-local "^0.1.1" + internal-ip "1.2.0" + ip "^1.1.5" + killable "^1.0.0" + loglevel "^1.4.1" + opn "^5.1.0" + portfinder "^1.0.9" + selfsigned "^1.9.1" + serve-index "^1.7.2" + sockjs "0.3.18" + sockjs-client "1.1.4" + spdy "^3.4.1" + strip-ansi "^3.0.1" + supports-color "^4.2.1" + webpack-dev-middleware "^1.11.0" + yargs "^6.6.0" + +webpack-merge@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.1.tgz#f1197a0a973e69c6fbeeb6d658219aa8c0c13555" + dependencies: + lodash "^4.17.4" + +webpack-sources@^1.0.0, webpack-sources@^1.0.1, webpack-sources@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack-subresource-integrity@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz#8fac8a7e8eb59fc6a16768a85c9d94ee7f9d0edb" + dependencies: + webpack-core "^0.6.8" + +webpack@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.10.0.tgz#5291b875078cf2abf42bdd23afe3f8f96c17d725" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +websocket-driver@>=0.5.1: + version "0.7.0" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" + dependencies: + http-parser-js ">=0.4.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + +when@~3.6.x: + version "3.6.4" + resolved "https://registry.yarnpkg.com/when/-/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@1, which@^1.2.1, which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +worker-farm@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +ws@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +ws@^1.0.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +wtf-8@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + +xml-char-classes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" + +xml2js@0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d" + dependencies: + sax "0.6.x" + xmlbuilder ">=1.0.0" + +xml2js@^0.4.17: + version "0.4.19" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" + dependencies: + sax ">=0.6.0" + xmlbuilder "~9.0.1" + +xmlbuilder@>=1.0.0, xmlbuilder@~9.0.1: + version "9.0.7" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + +xmlhttprequest-ssl@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +xxhashjs@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + dependencies: + cuint "^0.2.2" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + +zone.js@^0.8.14: + version "0.8.20" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.20.tgz#a218c48db09464b19ff6fc8f0d4bb5b1046e185d" From 36a56b756b38c7d2771857277a84789d3983c6e5 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 7 Mar 2018 20:14:15 +0100 Subject: [PATCH 211/724] style: fix linting issues --- .../build_ng_packagr/package.json | 3 +- .../build_ng_packagr/src/build/index.ts | 10 ++- .../build_ng_packagr/src/build/index_spec.ts | 2 +- packages/schematics/angular/library/index.ts | 70 +++++++++++++------ .../schematics/angular/library/index_spec.ts | 31 ++++---- 5 files changed, 79 insertions(+), 37 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index bd65f49af5..26dc5e8d8d 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -12,6 +12,7 @@ "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", "rxjs": "0.0.0", - "ng-packagr": "^2.0.0" + "resolve": "0.0.0", + "ng-packagr": "0.0.0" } } diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index.ts b/packages/angular_devkit/build_ng_packagr/src/build/index.ts index c5c6d647f1..9c11aee2c2 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index.ts @@ -1,3 +1,11 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; import { getSystemPath } from '@angular-devkit/core'; import * as ngPackagr from 'ng-packagr'; @@ -35,7 +43,7 @@ export class NgPackagrBuilder implements Builder { .forProject(packageJsonPath) .build() .then(() => obs.complete()) - .catch((e: any) => obs.error(e)); + .catch((e) => obs.error(e)); }); } diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts index fd3e6378fa..c58dd03333 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts @@ -34,7 +34,7 @@ describe('NgPackagr Target', () => { build: { builder: `${relativeBuilderPath}:build`, options: { - project: './package.json' + project: './package.json', }, }, }, diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 249ea865aa..b08c5a6c98 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -5,14 +5,12 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import * as path from 'path'; import { strings } from '@angular-devkit/core'; import { - VirtualTree, Rule, - Tree, SchematicContext, SchematicsException, + Tree, apply, branchAndMerge, chain, @@ -22,22 +20,49 @@ import { template, url, } from '@angular-devkit/schematics'; +import * as path from 'path'; import { Schema as GenerateLibraryOptions } from './schema'; -function updateJsonFile(host: Tree, path: string, callback: (a: any) => any): Tree { - const sourceText = host.read(path)!.toString('utf-8'); - const json = JSON.parse(sourceText); - callback(json); - host.overwrite(path, JSON.stringify(json, null, 2)); +type PackageJsonPartialType = { + scripts: { + [key: string]: string; + }, + devDependencies: { + [key: string]: string; + }, +}; + +type TsConfigPartialType = { + compilerOptions: { + baseUrl: string, + paths: { + [key: string]: string[]; + }, + }, +}; + +interface UpdateJsonFn { + (obj: T): T | void; +} + +function updateJsonFile(host: Tree, path: string, callback: UpdateJsonFn): Tree { + const source = host.read(path); + if (source) { + const sourceText = source.toString('utf-8'); + const json = JSON.parse(sourceText); + callback(json); + host.overwrite(path, JSON.stringify(json, null, 2)); + } + return host; } function updateTsConfig(npmPackageName: string, entryFilePath: string) { return (host: Tree) => { - if (!host.exists('tsconfig.json')) return host; + if (!host.exists('tsconfig.json')) { return host; } - return updateJsonFile(host, 'tsconfig.json', (tsconfig) => { + return updateJsonFile(host, 'tsconfig.json', (tsconfig: TsConfigPartialType) => { tsconfig.compilerOptions.baseUrl = '.'; if (!tsconfig.compilerOptions.paths) { tsconfig.compilerOptions.paths = {}; @@ -53,9 +78,9 @@ function updateTsConfig(npmPackageName: string, entryFilePath: string) { function addDependenciesAndScriptsToPackageJson(name: string, sourceDir: string) { return (host: Tree) => { - if (!host.exists('package.json')) return host; + if (!host.exists('package.json')) { return host; } - return updateJsonFile(host, 'package.json', (json) => { + return updateJsonFile(host, 'package.json', (json: PackageJsonPartialType) => { if (!json['devDependencies']) { json['devDependencies'] = {}; } @@ -68,7 +93,7 @@ function addDependenciesAndScriptsToPackageJson(name: string, sourceDir: string) 'tslib': '^1.7.1', 'typescript': '>=2.4.2', // de-structure last keeps existing user dependencies - ...json.devDependencies + ...json.devDependencies, }; // Add package.json script @@ -84,28 +109,33 @@ export default function (options: GenerateLibraryOptions): Rule { if (!options.name) { throw new SchematicsException(`name option is required.`); } - options.entryFile = options.entryFile ? options.entryFile : 'public_api'; - if (options.entryFile.endsWith('.ts')) { - options.entryFile = options.entryFile.substring(0, options.entryFile.length - 3); + const name = options.name; + let entryFile = options.entryFile ? options.entryFile : 'public_api'; + if (entryFile.endsWith('.ts')) { + entryFile = entryFile.substring(0, entryFile.length - 3); } const sourceDir = path.join(options.baseDir, options.name); - const entryFilePath = path.join(sourceDir, options.entryFile!) + '.ts'; + const entryFilePath = path.join(sourceDir, entryFile) + '.ts'; return (host: Tree, context: SchematicContext) => { const templateSource = apply(url('./files'), [ template({ ...strings, ...options, + ...{ + entryFile, + name, + }, }), - move(sourceDir) + move(sourceDir), ]); return chain([ branchAndMerge(chain([ mergeWith(templateSource), ])), - options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(options.name!, sourceDir), - options.skipTsConfig ? noop() : updateTsConfig(options.name!, entryFilePath) + options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(name, sourceDir), + options.skipTsConfig ? noop() : updateTsConfig(name, entryFilePath), ])(host, context); }; } diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index e3e34320d6..2df836778c 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -5,13 +5,15 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { HostTree, VirtualTree, Tree } from '@angular-devkit/schematics'; +import { normalize } from '@angular-devkit/core'; +import { HostTree, Tree, VirtualTree } from '@angular-devkit/schematics'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; +import { + SimpleMemoryHost, + stringToFileBuffer } from '../../../angular_devkit/core/src/virtual-fs/host'; import { getFileContent } from '../../angular/utility/test'; import { Schema as GenerateLibrarySchema } from './schema'; -import { SimpleMemoryHost, stringToFileBuffer, fileBufferToString } from '../../../angular_devkit/core/src/virtual-fs/host'; -import { normalize } from '@angular-devkit/core'; function getJsonFileContent(tree: Tree, path: string) { return JSON.parse(getFileContent(tree, path)); @@ -49,7 +51,7 @@ describe('Library Schematic', () => { it('should use default value for sourceDir and entryFile', () => { const tree = schematicRunner.runSchematic('library', { - name: 'foobar' + name: 'foobar', }); expect(tree.files.length).toEqual(2); expect(tree.files[1]).toEqual('/lib/foobar/public_api.ts'); @@ -62,8 +64,8 @@ describe('Library Schematic', () => { mockTree.create('tsconfig.json', JSON.stringify({ compilerOptions: { target: 'es2015', - module: 'es2015' - } + module: 'es2015', + }, })); }); @@ -83,9 +85,9 @@ describe('Library Schematic', () => { module: 'es2015', paths: { 'unrelated': ['./something/else.ts'], - 'foo': ['libs/*'] - } - } + 'foo': ['libs/*'], + }, + }, })); const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); @@ -98,7 +100,7 @@ describe('Library Schematic', () => { it(`should not modify the file when --skipTsConfig`, () => { const tree = schematicRunner.runSchematic('library', { name: 'foo', - skipTsConfig: true + skipTsConfig: true, }, mockTree); const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); @@ -113,8 +115,8 @@ describe('Library Schematic', () => { memoryfs = new SimpleMemoryHost(); memoryfs.write(normalize('/package.json'), stringToFileBuffer(JSON.stringify({ devDependencies: { - typescript: '~2.5.0' - } + typescript: '~2.5.0', + }, }))); mockTree = new HostTree(memoryfs); }); @@ -131,7 +133,8 @@ describe('Library Schematic', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.scripts['libs:foo:build']).toEqual('ng-packagr -p my-libs/foo/package.json'); + expect(packageJson.scripts['libs:foo:build']) + .toEqual('ng-packagr -p my-libs/foo/package.json'); }); it(`should not override existing users dependencies`, () => { @@ -144,7 +147,7 @@ describe('Library Schematic', () => { it(`should not modify the file when --skipPackageJson`, () => { const tree = schematicRunner.runSchematic('library', { name: 'foo', - skipPackageJson: true + skipPackageJson: true, }, mockTree); const packageJson = getJsonFileContent(tree, 'package.json'); From 01f3af7951bb471a9d4831285919a6457cb1bc9a Mon Sep 17 00:00:00 2001 From: David Date: Sat, 10 Mar 2018 07:18:59 +0100 Subject: [PATCH 212/724] fix(@schematics/angular): ensure forward slashes in library command --- packages/schematics/angular/library/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index b08c5a6c98..aaf0c169de 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -23,6 +23,10 @@ import { import * as path from 'path'; import { Schema as GenerateLibraryOptions } from './schema'; +function forwardSlashes(value: string): string { + return value.replace(/\\/g, '/'); +} + type PackageJsonPartialType = { scripts: { [key: string]: string; @@ -134,8 +138,10 @@ export default function (options: GenerateLibraryOptions): Rule { branchAndMerge(chain([ mergeWith(templateSource), ])), - options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(name, sourceDir), - options.skipTsConfig ? noop() : updateTsConfig(name, entryFilePath), + options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(name, + forwardSlashes(sourceDir)), + options.skipTsConfig ? noop() : updateTsConfig(name, + forwardSlashes(entryFilePath)), ])(host, context); }; } From 17643ba77cc04c26d3abd38b7946af24d6c2cfcb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 19:57:59 +0000 Subject: [PATCH 213/724] fix(@angular-devkit/build-webpack): add missing resolve dependency --- package-lock.json | 677 ++++++++++++++---- package.json | 1 + .../angular_devkit/build_webpack/package.json | 1 + 3 files changed, 558 insertions(+), 121 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0dc31a4774..8274824a8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -426,6 +426,43 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", @@ -1012,6 +1049,54 @@ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0.tgz", "integrity": "sha512-gulJE5dGFo6Q61V/whS6VM4WIyrlydXfCgkE+Gxe5hjrJ8rXLLZlALq7zq2RPhOc45PSwQpJkrTnc2KgD6cvmA==" }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.2.2", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -1054,6 +1139,13 @@ "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", "requires": { "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + } } }, "browserify": { @@ -1093,7 +1185,7 @@ "querystring-es3": "0.2.1", "read-only-stream": "2.0.0", "readable-stream": "2.3.3", - "resolve": "1.1.7", + "resolve": "1.5.0", "shasum": "1.0.2", "shell-quote": "1.6.1", "stream-browserify": "2.0.1", @@ -1402,6 +1494,11 @@ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz", "integrity": "sha1-EpztdOmhKApEGIC2zSvOMO9Z5sA=" }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1572,6 +1669,11 @@ "source-map": "0.5.7" } }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=" + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -1685,11 +1787,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, - "commenting": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.4.tgz", - "integrity": "sha1-0UCvMmNPy97k1xOWk0wfzawUflA=" - }, "common-tags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.5.1.tgz", @@ -1795,6 +1892,29 @@ "typedarray": "0.0.6" } }, + "configstore": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "requires": { + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.2.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "requires": { + "is-obj": "1.0.1" + } + } + } + }, "connect": { "version": "3.6.5", "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz", @@ -2099,7 +2219,7 @@ "glob2base": "0.0.12", "minimatch": "3.0.4", "mkdirp": "0.5.1", - "resolve": "1.1.7", + "resolve": "1.5.0", "safe-buffer": "5.1.1", "shell-quote": "1.6.1", "subarg": "1.0.0" @@ -2114,6 +2234,14 @@ "elliptic": "6.4.0" } }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "requires": { + "capture-stack-trace": "1.0.0" + } + }, "create-hash": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", @@ -2173,6 +2301,11 @@ "randomfill": "1.0.3" } }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" + }, "css-parse": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", @@ -2317,6 +2450,11 @@ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -2656,6 +2794,11 @@ "readable-stream": "2.3.3" } }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, "duplexify": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", @@ -4435,6 +4578,14 @@ "find-index": "0.1.1" } }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "requires": { + "ini": "1.3.5" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -4470,6 +4621,24 @@ "minimatch": "3.0.4" } }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "requires": { + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" + } + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -4976,6 +5145,11 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" + }, "import-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", @@ -5266,6 +5440,15 @@ "is-extglob": "1.0.0" } }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "requires": { + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" + } + }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -5282,6 +5465,11 @@ "xtend": "4.0.1" } }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=" + }, "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -5361,6 +5549,11 @@ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -5369,6 +5562,11 @@ "has": "1.0.1" } }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -5473,6 +5671,11 @@ "path-is-absolute": "1.0.1" } }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -5670,8 +5873,7 @@ "json-parse-better-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", - "dev": true + "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==" }, "json-schema": { "version": "0.2.3", @@ -5849,7 +6051,7 @@ "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", "requires": { - "resolve": "1.1.7" + "resolve": "1.5.0" } }, "karma-coverage-istanbul-reporter": { @@ -5922,6 +6124,14 @@ } } }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "requires": { + "package-json": "4.0.1" + } + }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", @@ -6443,6 +6653,11 @@ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" + }, "lru-cache": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", @@ -6825,7 +7040,7 @@ "inherits": "2.0.3", "parents": "1.0.1", "readable-stream": "2.3.3", - "resolve": "1.1.7", + "resolve": "1.5.0", "stream-combiner2": "1.1.1", "subarg": "1.0.0", "through2": "2.0.3", @@ -6864,11 +7079,6 @@ } } }, - "moment": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" - }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -6977,13 +7187,14 @@ "optional": true }, "ng-packagr": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-2.1.0.tgz", - "integrity": "sha512-IBrb/Q5QyRyvwynbHjKth82a25SMovm9Dh5C7PylRAkjuiXdTGTla51RGLFFAMuA59HlRuTd1FDcZUT+9idynw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-2.2.0.tgz", + "integrity": "sha512-2qpXc2Dgyt9/JlIXoVB1eZZTtKu9OTv7eEngLLxfDXQSJ4q8elYDYMGXytIXdBO2GlVP2Z1uOCNMryQnAvhR0Q==", "requires": { "@ngtools/json-schema": "1.1.0", "autoprefixer": "7.2.3", "browserslist": "2.10.0", + "chalk": "2.3.2", "commander": "2.12.2", "cpx": "1.5.0", "fs-extra": "5.0.0", @@ -6993,21 +7204,131 @@ "node-sass": "4.7.2", "node-sass-tilde-importer": "1.0.1", "postcss": "6.0.19", - "postcss-discard-comments": "2.0.4", + "postcss-clean": "1.1.0", "postcss-url": "7.3.1", + "read-pkg-up": "3.0.0", "rimraf": "2.6.2", "rollup": "0.55.5", "rollup-plugin-cleanup": "2.0.0", - "rollup-plugin-commonjs": "8.4.1", - "rollup-plugin-license": "0.5.0", + "rollup-plugin-commonjs": "8.3.0", + "rollup-plugin-license": "0.6.0", "rollup-plugin-node-resolve": "3.2.0", "rxjs": "5.5.6", "sorcery": "0.10.0", "strip-bom": "3.0.0", "stylus": "0.54.5", - "uglify-js": "3.3.13" + "uglify-js": "3.3.16", + "update-notifier": "2.3.0" }, "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.3.0" + } + }, + "commenting": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.5.tgz", + "integrity": "sha512-U7qGbcDLSNpOcV3RQRKHp7hFpy9WUmfawbkPdS4R2RhrSu4dOF85QQpx/Zjcv7uLF6tWSUKEKUIkxknPCrVjwg==" + }, + "estree-walker": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", + "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "moment": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", + "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==" + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "requires": { + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "requires": { + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "3.0.0" + } + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -7016,6 +7337,30 @@ "glob": "7.1.2" } }, + "rollup-plugin-commonjs": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz", + "integrity": "sha512-PYs3OiYgENFYEmI3vOEm5nrp3eY90YZqd5vGmQqeXmhJsAWFIrFdROCvOasqJ1HgeTvqyYo9IGXnFDyoboNcgQ==", + "requires": { + "acorn": "5.5.3", + "estree-walker": "0.5.1", + "magic-string": "0.22.4", + "resolve": "1.5.0", + "rollup-pluginutils": "2.0.1" + } + }, + "rollup-plugin-license": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.6.0.tgz", + "integrity": "sha512-Ttz65oRtNKcfV5icDkQTixc8ja64ueoXejRJoAtmjXYAWVg0qx+tu5rXmEOXWXmUXeGs0ARUVIAG0p1JK0gACQ==", + "requires": { + "commenting": "1.0.5", + "lodash": "4.17.5", + "magic-string": "0.22.4", + "mkdirp": "0.5.1", + "moment": "2.21.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -7026,19 +7371,27 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "requires": { + "has-flag": "3.0.0" + } + }, "uglify-js": { - "version": "3.3.13", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.13.tgz", - "integrity": "sha512-7rdn/bDOG1ElSTPdh7AI5TCjLv63ZD4k8BBadN3ssIkhlaQL2c0yRxmXCyOYhZK0wZTgGgUSnYQ4CGu+Jos5cA==", + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.16.tgz", + "integrity": "sha512-FMh5SRqJRGhv9BbaTffENIpDDQIoPDR8DBraunGORGhySArsXlw9++CN+BWzPBLpoI4RcSnpfGPnilTxWL3Vvg==", "requires": { - "commander": "2.14.1", + "commander": "2.15.0", "source-map": "0.6.1" }, "dependencies": { "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.0.tgz", + "integrity": "sha512-7B1ilBwtYSbetCgTY1NJFg+gVpestg0fdA1MhC1Vs4ssyfSXnCAjFr+QcQM9/RedXC0EaUx1sG8Smgw2VfgKEg==" } } } @@ -7728,6 +8081,17 @@ } } }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "requires": { + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.4.1" + } + }, "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", @@ -8018,49 +8382,13 @@ } } }, - "postcss-discard-comments": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", - "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "postcss-clean": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-clean/-/postcss-clean-1.1.0.tgz", + "integrity": "sha512-83g3GqMbCM5NL6MlbbPLJ/m2NrUepBF44MoDk4Gt04QGXeXKh9+ilQa0DzLnYnvqYHQCw83nckuEzBFr2muwbg==", "requires": { - "postcss": "5.2.18" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - } + "clean-css": "4.1.11", + "postcss": "6.0.19" } }, "postcss-import": { @@ -8071,7 +8399,7 @@ "postcss": "6.0.19", "postcss-value-parser": "3.3.0", "read-cache": "1.0.0", - "resolve": "1.1.7" + "resolve": "1.5.0" } }, "postcss-load-config": { @@ -8157,6 +8485,11 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -8475,6 +8808,17 @@ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" }, + "rc": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", + "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -8649,6 +8993,23 @@ "regjsparser": "0.1.5" } }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "requires": { + "rc": "1.2.6", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "requires": { + "rc": "1.2.6" + } + }, "regjsgen": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", @@ -8877,9 +9238,12 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "requires": { + "path-parse": "1.0.5" + } }, "resolve-cwd": { "version": "2.0.0", @@ -8942,50 +9306,6 @@ "rollup-pluginutils": "2.0.1" } }, - "rollup-plugin-commonjs": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz", - "integrity": "sha512-mg+WuD+jlwoo8bJtW3Mvx7Tz6TsIdMsdhuvCnDMoyjh0oxsVgsjB/N0X984RJCWwc5IIiqNVJhXeeITcc73++A==", - "requires": { - "acorn": "5.5.1", - "estree-walker": "0.5.1", - "magic-string": "0.22.4", - "resolve": "1.5.0", - "rollup-pluginutils": "2.0.1" - }, - "dependencies": { - "acorn": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.1.tgz", - "integrity": "sha512-D/KGiCpM/VOtTMDS+wfjywEth926WUrArrzYov4N4SI7t+3y8747dPpCmmAvrm/Z3ygqMHnyPxvYYO0yTdn/nQ==" - }, - "estree-walker": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", - "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", - "requires": { - "path-parse": "1.0.5" - } - } - } - }, - "rollup-plugin-license": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.5.0.tgz", - "integrity": "sha1-XnBzdftY0pV1JToNKOl+QYgmgvc=", - "requires": { - "commenting": "1.0.4", - "lodash": "4.17.4", - "magic-string": "0.22.4", - "mkdirp": "0.5.1", - "moment": "2.18.1" - } - }, "rollup-plugin-node-resolve": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.2.0.tgz", @@ -8993,7 +9313,7 @@ "requires": { "builtin-modules": "2.0.0", "is-module": "1.0.0", - "resolve": "1.1.7" + "resolve": "1.5.0" }, "dependencies": { "builtin-modules": { @@ -9262,6 +9582,14 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "requires": { + "semver": "5.4.1" + } + }, "semver-dsl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", @@ -10173,6 +10501,11 @@ "get-stdin": "4.0.1" } }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, "style-loader": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.20.2.tgz", @@ -10323,6 +10656,14 @@ "rimraf": "2.2.8" } }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "requires": { + "execa": "0.7.0" + } + }, "text-extensions": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", @@ -10353,6 +10694,11 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, "timers-browserify": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", @@ -10819,6 +11165,14 @@ "imurmurhash": "0.1.4" } }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "requires": { + "crypto-random-string": "1.0.0" + } + }, "universalify": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", @@ -10870,11 +11224,32 @@ } } }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" + }, "upath": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" }, + "update-notifier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "requires": { + "boxen": "1.3.0", + "chalk": "2.2.2", + "configstore": "3.1.1", + "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + } + }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", @@ -10958,6 +11333,14 @@ } } }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "1.0.4" + } + }, "use": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", @@ -12515,6 +12898,43 @@ "string-width": "1.0.2" } }, + "widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", @@ -12564,6 +12984,16 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + } + }, "ws": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz", @@ -12574,6 +13004,11 @@ "ultron": "1.1.1" } }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" + }, "xml-char-classes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", diff --git a/package.json b/package.json index a3796759e6..a1e55f7640 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,7 @@ "protractor": "^5.1.2", "raw-loader": "^0.5.1", "request": "^2.83.0", + "resolve": "^1.5.0", "rxjs": "^5.5.6", "sass-loader": "^6.0.7", "semver": "^5.3.0", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index afd65a8d2d..7a0750903c 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -39,6 +39,7 @@ "postcss-url": "^7.3.1", "raw-loader": "^0.5.1", "request": "^2.83.0", + "resolve": "^1.5.0", "rxjs": "^5.5.6", "sass-loader": "^6.0.7", "silent-error": "^1.1.0", From fbc38f99c54039be2dcacd825d9b38d5334f6576 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 20:07:13 +0000 Subject: [PATCH 214/724] fix(@schematics/angular): don't add scripts in library schematic --- packages/schematics/angular/library/index.ts | 16 ++++------------ .../schematics/angular/library/index_spec.ts | 10 +--------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index aaf0c169de..8dc8a130e1 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -79,7 +79,7 @@ function updateTsConfig(npmPackageName: string, entryFilePath: string) { }; } -function addDependenciesAndScriptsToPackageJson(name: string, sourceDir: string) { +function addDependenciesAndScriptsToPackageJson() { return (host: Tree) => { if (!host.exists('package.json')) { return host; } @@ -92,19 +92,13 @@ function addDependenciesAndScriptsToPackageJson(name: string, sourceDir: string) json.devDependencies = { '@angular/compiler': '^5.0.0', '@angular/compiler-cli': '^5.0.0', - 'ng-packagr': '^2.1.0', + 'ng-packagr': '^2.2.0', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', 'typescript': '>=2.4.2', // de-structure last keeps existing user dependencies ...json.devDependencies, }; - - // Add package.json script - if (!json.scripts) { - json.scripts = {}; - } - json.scripts[`libs:${name}:build`] = `ng-packagr -p ${sourceDir}/package.json`; }); }; } @@ -138,10 +132,8 @@ export default function (options: GenerateLibraryOptions): Rule { branchAndMerge(chain([ mergeWith(templateSource), ])), - options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(name, - forwardSlashes(sourceDir)), - options.skipTsConfig ? noop() : updateTsConfig(name, - forwardSlashes(entryFilePath)), + options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(), + options.skipTsConfig ? noop() : updateTsConfig(name, forwardSlashes(entryFilePath)), ])(host, context); }; } diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 2df836778c..37e5c5e47e 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -125,18 +125,10 @@ describe('Library Schematic', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.1.0'); + expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.2.0'); // TODO ... }); - it(`should add a script for ng-packagr`, () => { - const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); - - const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.scripts['libs:foo:build']) - .toEqual('ng-packagr -p my-libs/foo/package.json'); - }); - it(`should not override existing users dependencies`, () => { const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); From 34003c057d6bc49d310058de59d5f1a6ae2c6f35 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 19 Mar 2018 20:12:57 +0000 Subject: [PATCH 215/724] fix(@angular-devkit/build-ng-packagr): update builder Followup to comments in https://github.com/angular/devkit/pull/444 --- package.json | 2 +- .../build_ng_packagr/package.json | 10 +- .../build_ng_packagr/src/build/index.ts | 32 +- .../build_ng_packagr/src/build/index_spec.ts | 53 - .../src/build/index_spec_large.ts | 34 + .../ng-packaged/.angular-cli.json | 60 - .../ng-packaged/.editorconfig | 13 - .../build_ng_packagr/ng-packaged/README.md | 27 - .../build_ng_packagr/ng-packaged/angular.json | 18 + .../ng-packaged/e2e/app.e2e-spec.ts | 14 - .../ng-packaged/e2e/app.po.ts | 11 - .../ng-packaged/e2e/tsconfig.e2e.json | 14 - .../ng-packaged/karma.conf.js | 33 - .../build_ng_packagr/ng-packaged/package.json | 49 - .../{libs/one => projects/lib}/index.ts | 0 .../{libs/one => projects/lib}/package.json | 0 .../ng-packaged/protractor.conf.js | 28 - .../ng-packaged/src/app/app.component.css | 0 .../ng-packaged/src/app/app.component.html | 20 - .../ng-packaged/src/app/app.component.spec.ts | 27 - .../ng-packaged/src/app/app.component.ts | 10 - .../ng-packaged/src/app/app.module.ts | 18 - .../ng-packaged/src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 3 - .../src/environments/environment.ts | 8 - .../ng-packaged/src/favicon.ico | Bin 5430 -> 0 bytes .../ng-packaged/src/index.html | 14 - .../build_ng_packagr/ng-packaged/src/main.ts | 12 - .../ng-packaged/src/polyfills.ts | 66 - .../ng-packaged/src/styles.css | 1 - .../build_ng_packagr/ng-packaged/src/test.ts | 32 - .../ng-packaged/src/tsconfig.app.json | 13 - .../ng-packaged/src/tsconfig.spec.json | 20 - .../ng-packaged/src/typings.d.ts | 5 - .../build_ng_packagr/ng-packaged/tslint.json | 144 - .../build_ng_packagr/ng-packaged/yarn.lock | 6211 ----------------- 36 files changed, 80 insertions(+), 6922 deletions(-) delete mode 100644 packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts create mode 100644 packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json rename tests/@angular_devkit/build_ng_packagr/ng-packaged/{libs/one => projects/lib}/index.ts (100%) rename tests/@angular_devkit/build_ng_packagr/ng-packaged/{libs/one => projects/lib}/package.json (100%) delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.css delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/assets/.gitkeep delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/favicon.ico delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/index.html delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock diff --git a/package.json b/package.json index a1e55f7640..02dcd1eb62 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "mini-css-extract-plugin": "~0.2.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", - "ng-packagr": "^2.1.0", + "ng-packagr": "^2.2.0", "node-sass": "^4.7.2", "opn": "^5.1.0", "parse5": "^4.0.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 26dc5e8d8d..f424243e3a 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -11,8 +11,10 @@ "dependencies": { "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", - "rxjs": "0.0.0", - "resolve": "0.0.0", - "ng-packagr": "0.0.0" + "resolve": "^1.5.0", + "rxjs": "^5.5.6" + }, + "peerDependencies": { + "ng-packagr": "^2.2.0" } -} +} \ No newline at end of file diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index.ts b/packages/angular_devkit/build_ng_packagr/src/build/index.ts index 9c11aee2c2..1771f1732c 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index.ts @@ -6,15 +6,21 @@ * found in the LICENSE file at https://angular.io/license */ -import { BuildEvent, Builder, BuilderContext, Target } from '@angular-devkit/architect'; -import { getSystemPath } from '@angular-devkit/core'; +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; +import { getSystemPath, normalize, resolve } from '@angular-devkit/core'; import * as ngPackagr from 'ng-packagr'; -import { resolve as resolvePath } from 'path'; import { Observable } from 'rxjs/Observable'; -// XX: blatantly copy-pasted from 'require-project-module.ts' -const resolve = require('resolve'); +// TODO move this function to architect or somewhere else where it can be imported from. +// Blatantly copy-pasted from 'require-project-module.ts'. function requireProjectModule(root: string, moduleName: string) { + const resolve = require('resolve'); + return require(resolve.sync(moduleName, { basedir: root })); } @@ -27,22 +33,26 @@ export class NgPackagrBuilder implements Builder { constructor(public context: BuilderContext) { } - run(target: Target): Observable { - const root = getSystemPath(target.root); - const options = target.options; + run(builderConfig: BuilderConfiguration): Observable { + const root = this.context.workspace.root; + const options = builderConfig.options; if (!options.project) { throw new Error('A "project" must be specified to build a library\'s npm package.'); } return new Observable(obs => { - const projectNgPackagr = requireProjectModule(root, 'ng-packagr') as typeof ngPackagr; - const packageJsonPath = resolvePath(root, options.project); + const projectNgPackagr = requireProjectModule( + getSystemPath(root), 'ng-packagr') as typeof ngPackagr; + const packageJsonPath = getSystemPath(resolve(root, normalize(options.project))); projectNgPackagr.ngPackagr() .forProject(packageJsonPath) .build() - .then(() => obs.complete()) + .then(() => { + obs.next({ success: true }); + obs.complete(); + }) .catch((e) => obs.error(e)); }); } diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts deleted file mode 100644 index c58dd03333..0000000000 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { Architect, Workspace } from '@angular-devkit/architect'; -import { normalize } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { relative, resolve } from 'path'; -import { concatMap, tap, toArray } from 'rxjs/operators'; - - -describe('NgPackagr Target', () => { - const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any - const root = resolve(devkitRoot, 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); - const builderPath = resolve(devkitRoot, 'packages/angular_devkit/build_ng_packagr'); - const relativeBuilderPath = relative(root, builderPath); - const host = new NodeJsSyncHost(); - - const getWorkspace = (): Workspace => ({ - name: 'spec', - version: 1, - root: '', - defaultProject: 'one', - projects: { - one: { - root: 'libs/one', - projectType: 'library', - defaultTarget: 'build', - targets: { - build: { - builder: `${relativeBuilderPath}:build`, - options: { - project: './package.json', - }, - }, - }, - }, - }, - }); - - it('runs', (done) => { - const architect = new Architect(normalize(root), host); - architect.loadWorkspaceFromJson(getWorkspace()).pipe( - concatMap((architect) => architect.run(architect.getTarget())), - toArray(), - tap(events => expect(events.length).toBe(0)), - ).subscribe(done, done.fail); - }, 30000); -}); diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts new file mode 100644 index 0000000000..7a9104c9f4 --- /dev/null +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -0,0 +1,34 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect, TargetSpecifier } from '@angular-devkit/architect'; +import { experimental, join, normalize } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { concatMap, tap } from 'rxjs/operators'; + + +describe('NgPackagr Builder', () => { + it('works', (done) => { + const workspaceFile = normalize('angular.json'); + const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any + const workspaceRoot = join(devkitRoot, + 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); + + // TODO: move TestProjectHost from build-webpack to architect, or somewhere else, where it + // can be imported from. + const host = new NodeJsSyncHost(); + const workspace = new experimental.workspace.Workspace(workspaceRoot, host); + const targetSpec: TargetSpecifier = { project: 'lib', target: 'build' }; + + return workspace.loadWorkspaceFromHost(workspaceFile).pipe( + concatMap(ws => new Architect(ws).loadArchitect()), + concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json deleted file mode 100644 index 01c1363c00..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.angular-cli.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "ng-packaged" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - "styles": [ - "styles.css" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, - { - "project": "src/tsconfig.spec.json", - "exclude": "**/node_modules/**" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig b/tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig deleted file mode 100644 index 6e87a003da..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md b/tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md deleted file mode 100644 index a74c515d5d..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# NgPackaged - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.3. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json new file mode 100644 index 0000000000..b5b2d57cd4 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json @@ -0,0 +1,18 @@ +{ + "$schema": "../../../../packages/angular_devkit/core/src/workspace/workspace-schema.json", + "version": 1, + "projects": { + "lib": { + "root": "projects/lib", + "projectType": "library", + "architect": { + "build": { + "builder": "../../../../packages/angular_devkit/build_ng_packagr:build", + "options": { + "project": "projects/lib/package.json" + } + } + } + } + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts deleted file mode 100644 index 4c0e7a769f..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AppPage } from './app.po'; - -describe('ng-packaged App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to app!'); - }); -}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts deleted file mode 100644 index 82ea75ba50..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo() { - return browser.get('/'); - } - - getParagraphText() { - return element(by.css('app-root h1')).getText(); - } -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json deleted file mode 100644 index 1d9e5edf09..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/e2e/tsconfig.e2e.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/e2e", - "baseUrl": "./", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js deleted file mode 100644 index af139fada3..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/karma.conf.js +++ /dev/null @@ -1,33 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular/cli'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular/cli/plugins/karma') - ], - client:{ - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - reports: [ 'html', 'lcovonly' ], - fixWebpackSourcePaths: true - }, - angularCli: { - environment: 'dev' - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }); -}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json deleted file mode 100644 index 680686cd75..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "ng-packaged", - "version": "0.0.0", - "license": "MIT", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build --prod", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "^5.0.0", - "@angular/common": "^5.0.0", - "@angular/compiler": "^5.0.0", - "@angular/core": "^5.0.0", - "@angular/forms": "^5.0.0", - "@angular/http": "^5.0.0", - "@angular/platform-browser": "^5.0.0", - "@angular/platform-browser-dynamic": "^5.0.0", - "@angular/router": "^5.0.0", - "core-js": "^2.4.1", - "rxjs": "^5.5.2", - "zone.js": "^0.8.14" - }, - "devDependencies": { - "@angular/cli": "1.6.3", - "@angular/compiler-cli": "^5.0.0", - "@angular/language-service": "^5.0.0", - "@types/jasmine": "~2.5.53", - "@types/jasminewd2": "~2.0.2", - "@types/node": "~6.0.60", - "codelyzer": "^4.0.1", - "jasmine-core": "~2.6.2", - "jasmine-spec-reporter": "~4.1.0", - "karma": "~1.7.0", - "karma-chrome-launcher": "~2.1.1", - "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.2.1", - "karma-jasmine": "~1.1.0", - "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.1.2", - "ts-node": "~3.2.0", - "tslint": "~5.7.0", - "typescript": "~2.4.2" - } -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/index.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/index.ts similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/index.ts rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/index.ts diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/libs/one/package.json rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js deleted file mode 100644 index 7ee3b5ee86..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './e2e/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: 'e2e/tsconfig.e2e.json' - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.css b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html deleted file mode 100644 index fa2706a406..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.html +++ /dev/null @@ -1,20 +0,0 @@ - -
-

- Welcome to {{ title }}! -

- Angular Logo -
-

Here are some links to help you start:

- - diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts deleted file mode 100644 index bcbdf36b3e..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { AppComponent } from './app.component'; -describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - it(`should have as title 'app'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('app'); - })); - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); - })); -}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts deleted file mode 100644 index 7b0f672831..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'app'; -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts deleted file mode 100644 index 926975afe8..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/app/app.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; - - -import { AppComponent } from './app.component'; - - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/assets/.gitkeep b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/assets/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts deleted file mode 100644 index 3612073bc3..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts deleted file mode 100644 index b7f639aeca..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/environments/environment.ts +++ /dev/null @@ -1,8 +0,0 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. - -export const environment = { - production: false -}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/favicon.ico b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/favicon.ico deleted file mode 100644 index 8081c7ceaf2be08bf59010158c586170d9d2d517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 zcmc(je{54#6vvCoAI3i*G5%$U7!sA3wtMZ$fH6V9C`=eXGJb@R1%(I_{vnZtpD{6n z5Pl{DmxzBDbrB>}`90e12m8T*36WoeDLA&SD_hw{H^wM!cl_RWcVA!I+x87ee975; z@4kD^=bYPn&pmG@(+JZ`rqQEKxW<}RzhW}I!|ulN=fmjVi@x{p$cC`)5$a!)X&U+blKNvN5tg=uLvuLnuqRM;Yc*swiexsoh#XPNu{9F#c`G zQLe{yWA(Y6(;>y|-efAy11k<09(@Oo1B2@0`PtZSkqK&${ zgEY}`W@t{%?9u5rF?}Y7OL{338l*JY#P!%MVQY@oqnItpZ}?s z!r?*kwuR{A@jg2Chlf0^{q*>8n5Ir~YWf*wmsh7B5&EpHfd5@xVaj&gqsdui^spyL zB|kUoblGoO7G(MuKTfa9?pGH0@QP^b#!lM1yHWLh*2iq#`C1TdrnO-d#?Oh@XV2HK zKA{`eo{--^K&MW66Lgsktfvn#cCAc*(}qsfhrvOjMGLE?`dHVipu1J3Kgr%g?cNa8 z)pkmC8DGH~fG+dlrp(5^-QBeEvkOvv#q7MBVLtm2oD^$lJZx--_=K&Ttd=-krx(Bb zcEoKJda@S!%%@`P-##$>*u%T*mh+QjV@)Qa=Mk1?#zLk+M4tIt%}wagT{5J%!tXAE;r{@=bb%nNVxvI+C+$t?!VJ@0d@HIyMJTI{vEw0Ul ze(ha!e&qANbTL1ZneNl45t=#Ot??C0MHjjgY8%*mGisN|S6%g3;Hlx#fMNcL<87MW zZ>6moo1YD?P!fJ#Jb(4)_cc50X5n0KoDYfdPoL^iV`k&o{LPyaoqMqk92wVM#_O0l z09$(A-D+gVIlq4TA&{1T@BsUH`Bm=r#l$Z51J-U&F32+hfUP-iLo=jg7Xmy+WLq6_tWv&`wDlz#`&)Jp~iQf zZP)tu>}pIIJKuw+$&t}GQuqMd%Z>0?t%&BM&Wo^4P^Y z)c6h^f2R>X8*}q|bblAF?@;%?2>$y+cMQbN{X$)^R>vtNq_5AB|0N5U*d^T?X9{xQnJYeU{ zoZL#obI;~Pp95f1`%X3D$Mh*4^?O?IT~7HqlWguezmg?Ybq|7>qQ(@pPHbE9V?f|( z+0xo!#m@Np9PljsyxBY-UA*{U*la#8Wz2sO|48_-5t8%_!n?S$zlGe+NA%?vmxjS- zHE5O3ZarU=X}$7>;Okp(UWXJxI%G_J-@IH;%5#Rt$(WUX?6*Ux!IRd$dLP6+SmPn= z8zjm4jGjN772R{FGkXwcNv8GBcZI#@Y2m{RNF_w8(Z%^A*!bS*!}s6sh*NnURytky humW;*g7R+&|Ledvc- - - - - NgPackaged - - - - - - - - - diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts deleted file mode 100644 index 91ec6da5f0..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.log(err)); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts deleted file mode 100644 index d68672ffe4..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/polyfills.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - - -/** Evergreen browsers require these. **/ -// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. -import 'core-js/es7/reflect'; - - -/** - * Required to support Web Animations `@angular/platform-browser/animations`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css deleted file mode 100644 index 90d4ee0072..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/styles.css +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts deleted file mode 100644 index cd612eeb0e..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/test.ts +++ /dev/null @@ -1,32 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/dist/long-stack-trace-zone'; -import 'zone.js/dist/proxy.js'; -import 'zone.js/dist/sync-test'; -import 'zone.js/dist/jasmine-patch'; -import 'zone.js/dist/async-test'; -import 'zone.js/dist/fake-async-test'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. -declare const __karma__: any; -declare const require: any; - -// Prevent Karma from running prematurely. -__karma__.loaded = function () {}; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); -// Finally, start Karma to run the tests. -__karma__.start(); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json deleted file mode 100644 index 39ba8dbacb..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "baseUrl": "./", - "module": "es2015", - "types": [] - }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ] -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json deleted file mode 100644 index 63d89ff283..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/tsconfig.spec.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "baseUrl": "./", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts deleted file mode 100644 index ef5c7bd620..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/src/typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* SystemJS module definition */ -declare var module: NodeModule; -interface NodeModule { - id: string; -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json deleted file mode 100644 index a2e30eff29..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs", - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "typeof-compare": true, - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock b/tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock deleted file mode 100644 index 30ea25248d..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/yarn.lock +++ /dev/null @@ -1,6211 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@angular-devkit/build-optimizer@~0.0.36": - version "0.0.42" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.0.42.tgz#402b0dda4883db91e2381c3ddc55888408a7894e" - dependencies: - loader-utils "^1.1.0" - source-map "^0.5.6" - typescript "~2.6.2" - webpack-sources "^1.0.1" - -"@angular-devkit/schematics@~0.0.42": - version "0.0.52" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-0.0.52.tgz#cbd2f42778b50d6422a254ffaec05ad4ef3cb6c0" - dependencies: - "@ngtools/json-schema" "^1.1.0" - rxjs "^5.5.6" - -"@angular/animations@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-5.2.5.tgz#3e72184321c4979305619c74902b8be92d76db70" - dependencies: - tslib "^1.7.1" - -"@angular/cli@1.6.3": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-1.6.3.tgz#63120b347fc8ee206f773074d25fdd4807c189e3" - dependencies: - "@angular-devkit/build-optimizer" "~0.0.36" - "@angular-devkit/schematics" "~0.0.42" - "@ngtools/json-schema" "1.1.0" - "@ngtools/webpack" "1.9.3" - "@schematics/angular" "~0.1.11" - autoprefixer "^6.5.3" - chalk "~2.2.0" - circular-dependency-plugin "^4.2.1" - common-tags "^1.3.1" - copy-webpack-plugin "^4.1.1" - core-object "^3.1.0" - css-loader "^0.28.1" - cssnano "^3.10.0" - denodeify "^1.2.1" - ember-cli-string-utils "^1.0.0" - exports-loader "^0.6.3" - extract-text-webpack-plugin "^3.0.2" - file-loader "^1.1.5" - fs-extra "^4.0.0" - glob "^7.0.3" - html-webpack-plugin "^2.29.0" - istanbul-instrumenter-loader "^2.0.0" - karma-source-map-support "^1.2.0" - less "^2.7.2" - less-loader "^4.0.5" - license-webpack-plugin "^1.0.0" - loader-utils "1.1.0" - lodash "^4.11.1" - memory-fs "^0.4.1" - minimatch "^3.0.4" - node-modules-path "^1.0.0" - nopt "^4.0.1" - opn "~5.1.0" - portfinder "~1.0.12" - postcss-custom-properties "^6.1.0" - postcss-loader "^2.0.8" - postcss-url "^7.1.2" - raw-loader "^0.5.1" - resolve "^1.1.7" - rxjs "^5.5.2" - sass-loader "^6.0.3" - semver "^5.1.0" - silent-error "^1.0.0" - source-map-loader "^0.2.0" - source-map-support "^0.4.1" - style-loader "^0.13.1" - stylus "^0.54.5" - stylus-loader "^3.0.1" - uglifyjs-webpack-plugin "^1.1.5" - url-loader "^0.6.2" - webpack "~3.10.0" - webpack-dev-middleware "~1.12.0" - webpack-dev-server "~2.9.3" - webpack-merge "^4.1.0" - webpack-sources "^1.0.0" - webpack-subresource-integrity "^1.0.1" - zone.js "^0.8.14" - optionalDependencies: - node-sass "^4.3.0" - -"@angular/common@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.2.5.tgz#08dd636fa46077d047066b13a1aae494066f6c55" - dependencies: - tslib "^1.7.1" - -"@angular/compiler-cli@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-5.2.5.tgz#b1988bb2c0a956e7fc163acf8c7d794a07a88d08" - dependencies: - chokidar "^1.4.2" - minimist "^1.2.0" - reflect-metadata "^0.1.2" - tsickle "^0.26.0" - -"@angular/compiler@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-5.2.5.tgz#5e3b511906048a579fcd007aba72911472e5aa28" - dependencies: - tslib "^1.7.1" - -"@angular/core@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.2.5.tgz#24f9cd75c5b2728f2ddd1869777590ea7177bca9" - dependencies: - tslib "^1.7.1" - -"@angular/forms@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-5.2.5.tgz#2ad7a420c6ef6cd87a34071c5319ec83f7ed56aa" - dependencies: - tslib "^1.7.1" - -"@angular/http@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/http/-/http-5.2.5.tgz#1208256e36f0e486d96d10a733fdc8424ffa16bf" - dependencies: - tslib "^1.7.1" - -"@angular/language-service@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-5.2.5.tgz#7c3021f347dd4b28ae0a867700894f3de4930f48" - -"@angular/platform-browser-dynamic@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.5.tgz#b89df410bd953e2a6843325f9ac3c09a10eadaf0" - dependencies: - tslib "^1.7.1" - -"@angular/platform-browser@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-5.2.5.tgz#eae4af2b742fb901d84d6367cd99f9e88102151f" - dependencies: - tslib "^1.7.1" - -"@angular/router@^5.0.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-5.2.5.tgz#f8f220d5fb85fc10d60fe606b0f2a64732265142" - dependencies: - tslib "^1.7.1" - -"@ngtools/json-schema@1.1.0", "@ngtools/json-schema@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922" - -"@ngtools/webpack@1.9.3": - version "1.9.3" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-1.9.3.tgz#353e27e6f21ab35467d17b67e3096dfc5d9bf80c" - dependencies: - chalk "~2.2.0" - enhanced-resolve "^3.1.0" - loader-utils "^1.0.2" - magic-string "^0.22.3" - semver "^5.3.0" - source-map "^0.5.6" - tree-kill "^1.0.0" - webpack-sources "^1.1.0" - -"@schematics/angular@~0.1.11": - version "0.1.17" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-0.1.17.tgz#084a7cbe2de6f94a856bd08d95c9d35ef8905e2b" - dependencies: - typescript "~2.6.2" - -"@types/jasmine@*": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.6.tgz#14445b6a1613cf4e05dd61c3c3256d0e95c0421e" - -"@types/jasmine@~2.5.53": - version "2.5.54" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.5.54.tgz#a6b5f2ae2afb6e0307774e8c7c608e037d491c63" - -"@types/jasminewd2@~2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/jasminewd2/-/jasminewd2-2.0.3.tgz#0d2886b0cbdae4c0eeba55e30792f584bf040a95" - dependencies: - "@types/jasmine" "*" - -"@types/node@^6.0.46", "@types/node@~6.0.60": - version "6.0.101" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.101.tgz#0c5911cfb434af4a51c0a499931fe6423207d921" - -"@types/q@^0.0.32": - version "0.0.32" - resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" - -"@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": - version "2.53.43" - resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz#2de3d718819bc20165754c4a59afb7e9833f6707" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - -accepts@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" - dependencies: - mime-types "~2.1.11" - negotiator "0.6.1" - -accepts@~1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" - dependencies: - mime-types "~2.1.16" - negotiator "0.6.1" - -acorn-dynamic-import@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" - dependencies: - acorn "^4.0.3" - -acorn@^4.0.3: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - -acorn@^5.0.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" - -adm-zip@0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" - -adm-zip@^0.4.7: - version "0.4.7" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" - -after@0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" - -agent-base@2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7" - dependencies: - extend "~3.0.0" - semver "~5.0.1" - -ajv-keywords@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" - -ajv-keywords@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -ajv@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.1.1.tgz#978d597fbc2b7d0e5a5c3ddeb149a682f2abfa0e" - dependencies: - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-html@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.1.0, ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -app-root-path@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - dependencies: - default-require-extensions "^1.0.0" - -aproba@^1.0.3, aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - -are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - -array-flatten@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" - -array-includes@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" - -array-slice@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -arraybuffer.slice@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" - -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async-foreach@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" - -async@^1.4.0, async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@^2.1.2, async@^2.1.4, async@^2.1.5, async@^2.4.1, async@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -autoprefixer@^6.3.1, autoprefixer@^6.5.3: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - -aws4@^1.2.1, aws4@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - -backo2@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - -balanced-match@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base64-arraybuffer@0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" - -base64-js@^1.0.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" - -base64id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -better-assert@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" - dependencies: - callsite "1.0.0" - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - -binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - -blob@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -blocking-proxy@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.5.tgz#462905e0dcfbea970f41aa37223dda9c07b1912b" - dependencies: - minimist "^1.2.0" - -bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - -body-parser@1.18.2, body-parser@^1.16.1: - version "1.18.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.1" - http-errors "~1.6.2" - iconv-lite "0.4.19" - on-finished "~2.3.0" - qs "6.5.1" - raw-body "2.3.2" - type-is "~1.6.15" - -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" - dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" - dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" - -boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - dependencies: - hoek "4.x.x" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^0.1.2: - version "0.1.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" - dependencies: - expand-range "^0.1.0" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - dependencies: - pako "~1.0.5" - -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - -cacache@^10.0.1: - version "10.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" - dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.1" - mississippi "^2.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.2" - ssri "^5.2.4" - unique-filename "^1.1.0" - y18n "^4.0.0" - -callsite@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" - -camel-case@3.0.x: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - dependencies: - browserslist "^1.3.6" - caniuse-db "^1.0.30000529" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000809" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000809.tgz#b0b88434a598f40b546d46a4dbd839b0ff798f4d" - -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" - dependencies: - ansi-styles "^3.2.0" - escape-string-regexp "^1.0.5" - supports-color "^5.2.0" - -chalk@~2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.2.tgz#4403f5cf18f35c05f51fbdf152bf588f956cf7cb" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chokidar@^1.4.1, chokidar@^1.4.2, chokidar@^1.6.0, chokidar@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -circular-dependency-plugin@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz#f8a1a746a3f6c8e57f4dae9b54d991cd2a582f5d" - -clap@^1.0.9: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" - dependencies: - chalk "^1.1.3" - -clean-css@4.1.x: - version "4.1.9" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301" - dependencies: - source-map "0.5.x" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -clone-deep@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.3.0.tgz#348c61ae9cdbe0edfe053d91ff4cc521d790ede8" - dependencies: - for-own "^1.0.0" - is-plain-object "^2.0.1" - kind-of "^3.2.2" - shallow-clone "^0.1.2" - -clone@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" - -clone@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - dependencies: - q "^1.1.2" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -codelyzer@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-4.1.0.tgz#3117754538d8f5ffa36dff91d340573a836cf373" - dependencies: - app-root-path "^2.0.1" - css-selector-tokenizer "^0.7.0" - cssauron "^1.4.0" - semver-dsl "^1.0.1" - source-map "^0.5.6" - sprintf-js "^1.0.3" - -color-convert@^1.3.0, color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" - dependencies: - color-name "^1.1.1" - -color-name@^1.0.0, color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - dependencies: - color-name "^1.0.0" - -color@^0.11.0: - version "0.11.4" - resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - dependencies: - clone "^1.0.2" - color-convert "^1.3.0" - color-string "^0.3.0" - -colormin@^1.0.5: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - dependencies: - color "^0.11.0" - css-color-names "0.0.4" - has "^1.0.1" - -colors@1.1.2, colors@^1.1.0, colors@^1.1.2, colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -combine-lists@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" - dependencies: - lodash "^4.5.0" - -combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - dependencies: - delayed-stream "~1.0.0" - -commander@2.14.x, commander@^2.9.0, commander@~2.14.1: - version "2.14.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" - -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - -common-tags@^1.3.1: - version "1.7.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.7.2.tgz#24d9768c63d253a56ecff93845b44b4df1d52771" - dependencies: - babel-runtime "^6.26.0" - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - -component-bind@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" - -component-emitter@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" - -component-emitter@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - -component-inherit@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" - -compressible@~2.0.11: - version "2.0.13" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" - dependencies: - mime-db ">= 1.33.0 < 2" - -compression@^1.5.2: - version "1.7.1" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.1.tgz#eff2603efc2e22cf86f35d2eb93589f9875373db" - dependencies: - accepts "~1.3.4" - bytes "3.0.0" - compressible "~2.0.11" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.1" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -concat-stream@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -connect-history-api-fallback@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" - -connect@^3.6.0: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" - dependencies: - debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" - utils-merge "1.0.1" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - -convert-source-map@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - -copy-webpack-plugin@^4.1.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz#1e8c366211db6dc2ddee40e5a3e4fc661dd149e8" - dependencies: - cacache "^10.0.1" - find-cache-dir "^1.0.0" - globby "^7.1.1" - is-glob "^4.0.0" - loader-utils "^0.2.15" - minimatch "^3.0.4" - p-limit "^1.0.0" - serialize-javascript "^1.4.0" - -core-js@^2.2.0, core-js@^2.4.0, core-js@^2.4.1: - version "2.5.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" - -core-object@^3.1.0: - version "3.1.5" - resolved "https://registry.yarnpkg.com/core-object/-/core-object-3.1.5.tgz#fa627b87502adc98045e44678e9a8ec3b9c0d2a9" - dependencies: - chalk "^2.0.0" - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" - dependencies: - is-directory "^0.3.1" - js-yaml "^3.4.3" - minimist "^1.2.0" - object-assign "^4.1.0" - os-homedir "^1.0.1" - parse-json "^2.2.0" - require-from-string "^1.1.0" - -create-ecdh@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - ripemd160 "^2.0.0" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.6" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - dependencies: - boom "5.x.x" - -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -css-color-names@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - -css-loader@^0.28.1: - version "0.28.9" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.9.tgz#68064b85f4e271d7ce4c48a58300928e535d1c95" - dependencies: - babel-code-frame "^6.26.0" - css-selector-tokenizer "^0.7.0" - cssnano "^3.10.0" - icss-utils "^2.1.0" - loader-utils "^1.0.2" - lodash.camelcase "^4.3.0" - object-assign "^4.1.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.2.0" - postcss-modules-local-by-default "^1.2.0" - postcss-modules-scope "^1.1.0" - postcss-modules-values "^1.3.0" - postcss-value-parser "^3.3.0" - source-list-map "^2.0.0" - -css-parse@1.7.x: - version "1.7.0" - resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" - -css-select@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-selector-tokenizer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" - -css-what@2.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" - -cssauron@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" - dependencies: - through X.X.X - -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - -cssnano@^3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - dependencies: - autoprefixer "^6.3.1" - decamelize "^1.1.2" - defined "^1.0.0" - has "^1.0.1" - object-assign "^4.0.1" - postcss "^5.0.14" - postcss-calc "^5.2.0" - postcss-colormin "^2.1.8" - postcss-convert-values "^2.3.4" - postcss-discard-comments "^2.0.4" - postcss-discard-duplicates "^2.0.1" - postcss-discard-empty "^2.0.1" - postcss-discard-overridden "^0.1.1" - postcss-discard-unused "^2.2.1" - postcss-filter-plugins "^2.0.0" - postcss-merge-idents "^2.1.5" - postcss-merge-longhand "^2.0.1" - postcss-merge-rules "^2.0.3" - postcss-minify-font-values "^1.0.2" - postcss-minify-gradients "^1.0.1" - postcss-minify-params "^1.0.4" - postcss-minify-selectors "^2.0.4" - postcss-normalize-charset "^1.1.0" - postcss-normalize-url "^3.0.7" - postcss-ordered-values "^2.1.0" - postcss-reduce-idents "^2.2.2" - postcss-reduce-initial "^1.0.0" - postcss-reduce-transforms "^1.0.3" - postcss-svgo "^2.1.1" - postcss-unique-selectors "^2.0.2" - postcss-value-parser "^3.2.3" - postcss-zindex "^2.0.1" - -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - dependencies: - clap "^1.0.9" - source-map "^0.5.3" - -cuint@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - dependencies: - array-find-index "^1.0.1" - -custom-event@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" - -cyclist@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" - -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@*, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - dependencies: - ms "2.0.0" - -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.6.6, debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - -debug@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - -debug@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" - dependencies: - ms "0.7.2" - -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - -deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" - -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - dependencies: - strip-bom "^2.0.0" - -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - -del@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - dependencies: - globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -denodeify@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" - -depd@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - -depd@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - -detect-node@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" - -di@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" - -diff@^3.1.0, diff@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" - -diffie-hellman@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dir-glob@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" - dependencies: - arrify "^1.0.1" - path-type "^3.0.0" - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - -dns-packet@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - dependencies: - buffer-indexof "^1.0.0" - -dom-converter@~0.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" - dependencies: - utila "~0.3" - -dom-serialize@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" - dependencies: - custom-event "~1.0.0" - ent "~2.2.0" - extend "^3.0.0" - void-elements "^2.0.0" - -dom-serializer@0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" - dependencies: - domelementtype "~1.1.1" - entities "~1.1.1" - -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - -domelementtype@1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" - -domelementtype@~1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" - -domhandler@2.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" - dependencies: - domelementtype "1" - -domutils@1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" - dependencies: - domelementtype "1" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - dependencies: - dom-serializer "0" - domelementtype "1" - -duplexify@^3.4.2, duplexify@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.3.tgz#8b5818800df92fd0125b27ab896491912858243e" - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - -ejs@^2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a" - -electron-to-chromium@^1.2.7: - version "1.3.33" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545" - -elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -ember-cli-string-utils@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ember-cli-string-utils/-/ember-cli-string-utils-1.1.0.tgz#39b677fc2805f55173735376fcef278eaa4452a1" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -encodeurl@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - dependencies: - once "^1.4.0" - -engine.io-client@1.8.3: - version "1.8.3" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" - dependencies: - component-emitter "1.2.1" - component-inherit "0.0.3" - debug "2.3.3" - engine.io-parser "1.3.2" - has-cors "1.1.0" - indexof "0.0.1" - parsejson "0.0.3" - parseqs "0.0.5" - parseuri "0.0.5" - ws "1.1.2" - xmlhttprequest-ssl "1.5.3" - yeast "0.1.2" - -engine.io-parser@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" - dependencies: - after "0.8.2" - arraybuffer.slice "0.0.6" - base64-arraybuffer "0.1.5" - blob "0.0.4" - has-binary "0.1.7" - wtf-8 "1.0.0" - -engine.io@1.8.3: - version "1.8.3" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" - dependencies: - accepts "1.3.3" - base64id "1.0.0" - cookie "0.3.1" - debug "2.3.3" - engine.io-parser "1.3.2" - ws "1.1.2" - -enhanced-resolve@^3.1.0, enhanced-resolve@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - object-assign "^4.0.1" - tapable "^0.2.7" - -ent@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - -entities@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" - -errno@^0.1.1, errno@^0.1.3, errno@^0.1.4: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.7.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - -es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.39" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.39.tgz#fca21b67559277ca4ac1a1ed7048b107b6f76d87" - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.1" - -es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - -esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - -esrecurse@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" - dependencies: - estraverse "^4.1.0" - object-assign "^4.0.1" - -estraverse@^4.1.0, estraverse@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - -eventemitter3@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -eventsource@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - dependencies: - original ">=0.0.5" - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - -expand-braces@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" - dependencies: - array-slice "^0.2.3" - array-unique "^0.2.1" - braces "^0.1.2" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" - dependencies: - is-number "^0.1.1" - repeat-string "^0.2.2" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -exports-loader@^0.6.3: - version "0.6.4" - resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-0.6.4.tgz#d70fc6121975b35fc12830cf52754be2740fc886" - dependencies: - loader-utils "^1.0.2" - source-map "0.5.x" - -express@^4.16.2: - version "4.16.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" - dependencies: - accepts "~1.3.4" - array-flatten "1.1.1" - body-parser "1.18.2" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.1" - encodeurl "~1.0.1" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.0" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.2" - qs "6.5.1" - range-parser "~1.2.0" - safe-buffer "5.1.1" - send "0.16.1" - serve-static "1.13.1" - setprototypeof "1.1.0" - statuses "~1.3.1" - type-is "~1.6.15" - utils-merge "1.0.1" - vary "~1.1.2" - -extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extract-text-webpack-plugin@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7" - dependencies: - async "^2.4.1" - loader-utils "^1.1.0" - schema-utils "^0.3.0" - webpack-sources "^1.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - -fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - -fastparse@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" - -faye-websocket@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" - dependencies: - websocket-driver ">=0.5.1" - -faye-websocket@~0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - dependencies: - websocket-driver ">=0.5.1" - -file-loader@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.6.tgz#7b9a8f2c58f00a77fddf49e940f7ac978a3ea0e8" - dependencies: - loader-utils "^1.0.2" - schema-utils "^0.3.0" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" - dependencies: - debug "2.6.9" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" - unpipe "~1.0.0" - -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - dependencies: - commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - dependencies: - locate-path "^2.0.0" - -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - -flush-write-stream@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.2.tgz#c81b90d8746766f1a609a46809946c45dd8ae417" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.4" - -for-in@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -for-own@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -form-data@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" - dependencies: - asynckit "^0.4.0" - combined-stream "1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-access@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" - dependencies: - null-check "^1.0.0" - -fs-extra@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.39" - -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.0.2, function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -gaze@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" - dependencies: - globule "^1.0.0" - -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob@7.0.x: - version "7.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -globby@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" - dependencies: - array-union "^1.0.1" - dir-glob "^2.0.0" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -globule@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" - dependencies: - glob "~7.1.1" - lodash "~4.17.4" - minimatch "~3.0.2" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -handle-thing@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" - -handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - -har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-binary@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" - dependencies: - isarray "0.0.1" - -has-cors@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - -hash-base@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" - dependencies: - inherits "^2.0.1" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hawk@3.1.3, hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - -he@1.1.x: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -hoek@4.x.x: - version "4.2.1" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" - -homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - dependencies: - parse-passwd "^1.0.0" - -hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-comment-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" - -html-entities@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" - -html-minifier@^3.2.3: - version "3.5.9" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.9.tgz#74424014b872598d4bb0e20ac420926ec61024b6" - dependencies: - camel-case "3.0.x" - clean-css "4.1.x" - commander "2.14.x" - he "1.1.x" - ncname "1.0.x" - param-case "2.1.x" - relateurl "0.2.x" - uglify-js "3.3.x" - -html-webpack-plugin@^2.29.0: - version "2.30.1" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz#7f9c421b7ea91ec460f56527d78df484ee7537d5" - dependencies: - bluebird "^3.4.7" - html-minifier "^3.2.3" - loader-utils "^0.2.16" - lodash "^4.17.3" - pretty-error "^2.0.2" - toposort "^1.0.0" - -htmlparser2@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" - dependencies: - domelementtype "1" - domhandler "2.1" - domutils "1.1" - readable-stream "1.0" - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - -http-errors@1.6.2, http-errors@~1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - dependencies: - depd "1.1.1" - inherits "2.0.3" - setprototypeof "1.0.3" - statuses ">= 1.3.1 < 2" - -http-parser-js@>=0.4.0: - version "0.4.10" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" - -http-proxy-middleware@~0.17.4: - version "0.17.4" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" - dependencies: - http-proxy "^1.16.2" - is-glob "^3.1.0" - lodash "^4.17.2" - micromatch "^2.3.11" - -http-proxy@^1.13.0, http-proxy@^1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" - dependencies: - eventemitter3 "1.x.x" - requires-port "1.x.x" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - -https-proxy-agent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" - dependencies: - agent-base "2" - debug "2" - extend "3" - -iconv-lite@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - -icss-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" - dependencies: - postcss "^6.0.1" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - -ignore@^3.3.5: - version "3.3.7" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" - -image-size@~0.5.0: - version "0.5.5" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" - -import-local@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-0.1.1.tgz#b1179572aacdc11c6a91009fb430dbcab5f668a8" - dependencies: - pkg-dir "^2.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -in-publish@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - dependencies: - repeating "^2.0.0" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - -internal-ip@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" - dependencies: - meow "^3.3.0" - -interpret@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" - -invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - -ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - -ipaddr.js@1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.5.2.tgz#d4b505bde9946987ccf0fc58d9010ff9607e3fa0" - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.0.2, is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - dependencies: - is-extglob "^2.1.1" - -is-my-ip-valid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" - -is-my-json-valid@^2.12.4: - version "2.17.2" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - is-my-ip-valid "^1.0.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-number@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - dependencies: - path-is-inside "^1.0.1" - -is-plain-obj@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - -is-plain-object@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - dependencies: - has "^1.0.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-svg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" - dependencies: - html-comment-regex "^1.1.0" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isbinaryfile@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -istanbul-api@^1.1.14: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1" - dependencies: - async "^2.1.4" - fileset "^2.0.2" - istanbul-lib-coverage "^1.1.2" - istanbul-lib-hook "^1.1.0" - istanbul-lib-instrument "^1.9.2" - istanbul-lib-report "^1.1.3" - istanbul-lib-source-maps "^1.2.3" - istanbul-reports "^1.1.4" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-instrumenter-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-2.0.0.tgz#e5492900ab0bba835efa8024cb00be9b3eea2700" - dependencies: - convert-source-map "^1.3.0" - istanbul-lib-instrument "^1.1.3" - loader-utils "^0.2.16" - object-assign "^4.1.0" - -istanbul-lib-coverage@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" - -istanbul-lib-hook@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.1.3, istanbul-lib-instrument@^1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.2" - semver "^5.3.0" - -istanbul-lib-report@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" - dependencies: - istanbul-lib-coverage "^1.1.2" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.1.2" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd" - dependencies: - handlebars "^4.0.3" - -jasmine-core@~2.6.2: - version "2.6.4" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.6.4.tgz#dec926cd0a9fa287fb6db5c755fa487e74cecac5" - -jasmine-core@~2.99.0: - version "2.99.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" - -jasmine-spec-reporter@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.1.1.tgz#5a6d58ab5d61bea7309fbc279239511756b1b588" - dependencies: - colors "1.1.2" - -jasmine@^2.5.3: - version "2.99.0" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7" - dependencies: - exit "^0.1.2" - glob "^7.0.6" - jasmine-core "~2.99.0" - -jasminewd2@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" - -js-base64@^2.1.8, js-base64@^2.1.9: - version "2.4.3" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" - -js-tokens@^3.0.0, js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -js-yaml@^3.4.3, js-yaml@^3.7.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json-loader@^0.5.4: - version "0.5.7" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json3@3.3.2, json3@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -karma-chrome-launcher@~2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.1.1.tgz#216879c68ac04d8d5140e99619ba04b59afd46cf" - dependencies: - fs-access "^1.0.0" - which "^1.2.1" - -karma-cli@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/karma-cli/-/karma-cli-1.0.1.tgz#ae6c3c58a313a1d00b45164c455b9b86ce17f960" - dependencies: - resolve "^1.1.6" - -karma-coverage-istanbul-reporter@^1.2.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.1.tgz#2b42d145ddbb4868d85d52888c495a21c61d873c" - dependencies: - istanbul-api "^1.1.14" - minimatch "^3.0.4" - -karma-jasmine-html-reporter@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz#48a8e5ef18807617ee2b5e33c1194c35b439524c" - dependencies: - karma-jasmine "^1.0.2" - -karma-jasmine@^1.0.2, karma-jasmine@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529" - -karma-source-map-support@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz#1bf81e7bb4b089627ab352ec4179e117c406a540" - dependencies: - source-map-support "^0.4.1" - -karma@~1.7.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.1.tgz#85cc08e9e0a22d7ce9cca37c4a1be824f6a2b1ae" - dependencies: - bluebird "^3.3.0" - body-parser "^1.16.1" - chokidar "^1.4.1" - colors "^1.1.0" - combine-lists "^1.0.0" - connect "^3.6.0" - core-js "^2.2.0" - di "^0.0.1" - dom-serialize "^2.2.0" - expand-braces "^0.1.1" - glob "^7.1.1" - graceful-fs "^4.1.2" - http-proxy "^1.13.0" - isbinaryfile "^3.0.0" - lodash "^3.8.0" - log4js "^0.6.31" - mime "^1.3.4" - minimatch "^3.0.2" - optimist "^0.6.1" - qjobs "^1.1.4" - range-parser "^1.2.0" - rimraf "^2.6.0" - safe-buffer "^5.0.1" - socket.io "1.7.3" - source-map "^0.5.3" - tmp "0.0.31" - useragent "^2.1.12" - -killable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" - -kind-of@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-2.0.1.tgz#018ec7a4ce7e3a86cb9141be519d24c8faa981b5" - dependencies: - is-buffer "^1.0.2" - -kind-of@^3.0.2, kind-of@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -lazy-cache@^0.2.3: - version "0.2.7" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - -less-loader@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-4.0.5.tgz#ae155a7406cac6acd293d785587fcff0f478c4dd" - dependencies: - clone "^2.1.1" - loader-utils "^1.1.0" - pify "^2.3.0" - -less@^2.7.2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/less/-/less-2.7.3.tgz#cc1260f51c900a9ec0d91fb6998139e02507b63b" - optionalDependencies: - errno "^0.1.1" - graceful-fs "^4.1.2" - image-size "~0.5.0" - mime "^1.2.11" - mkdirp "^0.5.0" - promise "^7.1.1" - request "2.81.0" - source-map "^0.5.3" - -license-webpack-plugin@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-1.1.1.tgz#76b2cedccc78f139fd7877e576f756cfc141b8c2" - dependencies: - ejs "^2.5.7" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - -loader-runner@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" - -loader-utils@1.1.0, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@~0.2.2: - version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - -lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - -lodash.mergewith@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - -lodash.tail@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - -lodash@^3.8.0: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.0.0, lodash@^4.11.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.5.0, lodash@~4.17.4: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - -log4js@^0.6.31: - version "0.6.38" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" - dependencies: - readable-stream "~1.0.2" - semver "~4.3.3" - -loglevel@^1.4.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lower-case@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - -lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -macaddress@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" - -magic-string@^0.22.3: - version "0.22.4" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.4.tgz#31039b4e40366395618c1d6cf8193c53917475ff" - dependencies: - vlq "^0.2.1" - -make-dir@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51" - dependencies: - pify "^3.0.0" - -make-error@^1.1.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - -math-expression-evaluator@^1.2.14: - version "1.2.17" - resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - -md5.js@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - dependencies: - mimic-fn "^1.0.0" - -memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^3.3.0, meow@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - -micromatch@^2.1.5, micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - -mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.16, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - dependencies: - mime-db "~1.33.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - -mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.1.3, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - -mississippi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^2.0.1" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mixin-object@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" - dependencies: - for-in "^0.1.3" - is-extendable "^0.1.1" - -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - -ms@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - dependencies: - dns-packet "^1.3.1" - thunky "^1.0.2" - -nan@^2.3.0, nan@^2.3.2: - version "2.8.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" - -ncname@1.0.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" - dependencies: - xml-char-classes "^1.0.0" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - -no-case@^2.2.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - dependencies: - lower-case "^1.1.1" - -node-forge@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" - -node-gyp@^3.3.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60" - dependencies: - fstream "^1.0.0" - glob "^7.0.3" - graceful-fs "^4.1.2" - minimatch "^3.0.2" - mkdirp "^0.5.0" - nopt "2 || 3" - npmlog "0 || 1 || 2 || 3 || 4" - osenv "0" - request "2" - rimraf "2" - semver "~5.3.0" - tar "^2.0.0" - which "1" - -node-libs-browser@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.0" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-modules-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/node-modules-path/-/node-modules-path-1.0.1.tgz#40096b08ce7ad0ea14680863af449c7c75a5d1c8" - -node-pre-gyp@^0.6.39: - version "0.6.39" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" - dependencies: - detect-libc "^1.0.2" - hawk "3.1.3" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" - -node-sass@^4.3.0: - version "4.7.2" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.7.2.tgz#9366778ba1469eb01438a9e8592f4262bcb6794e" - dependencies: - async-foreach "^0.1.3" - chalk "^1.1.1" - cross-spawn "^3.0.0" - gaze "^1.0.0" - get-stdin "^4.0.1" - glob "^7.0.3" - in-publish "^2.0.0" - lodash.assign "^4.2.0" - lodash.clonedeep "^4.3.2" - lodash.mergewith "^4.6.0" - meow "^3.7.0" - mkdirp "^0.5.1" - nan "^2.3.2" - node-gyp "^3.3.1" - npmlog "^4.0.0" - request "~2.79.0" - sass-graph "^2.2.4" - stdout-stream "^1.4.0" - "true-case-path" "^1.0.2" - -"nopt@2 || 3": - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - -normalize-url@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - dependencies: - path-key "^2.0.0" - -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -nth-check@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" - dependencies: - boolbase "~1.0.0" - -null-check@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -oauth-sign@~0.8.1, oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-component@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" - -object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -obuf@^1.0.0, obuf@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.1.tgz#104124b6c602c6796881a042541d36db43a5264e" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - -once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -opn@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" - dependencies: - is-wsl "^1.1.0" - -opn@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519" - dependencies: - is-wsl "^1.1.0" - -optimist@^0.6.1, optimist@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -options@>=0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" - -original@>=0.0.5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" - dependencies: - url-parse "1.0.x" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - -os-homedir@^1.0.0, os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - dependencies: - lcid "^1.0.0" - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@0, osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - -p-limit@^1.0.0, p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - dependencies: - p-limit "^1.1.0" - -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - -pako@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - -parallel-transform@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" - dependencies: - cyclist "~0.2.2" - inherits "^2.0.3" - readable-stream "^2.1.5" - -param-case@2.1.x: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - dependencies: - no-case "^2.2.0" - -parse-asn1@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - -parsejson@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" - dependencies: - better-assert "~1.0.0" - -parseqs@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" - dependencies: - better-assert "~1.0.0" - -parseuri@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" - dependencies: - better-assert "~1.0.0" - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - dependencies: - pify "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - -pbkdf2@^3.0.3: - version "3.0.14" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" - -portfinder@^1.0.9, portfinder@~1.0.12: - version "1.0.13" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" - dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" - -postcss-calc@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - dependencies: - postcss "^5.0.2" - postcss-message-helpers "^2.0.0" - reduce-css-calc "^1.2.6" - -postcss-colormin@^2.1.8: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - dependencies: - colormin "^1.0.5" - postcss "^5.0.13" - postcss-value-parser "^3.2.3" - -postcss-convert-values@^2.3.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - dependencies: - postcss "^5.0.11" - postcss-value-parser "^3.1.2" - -postcss-custom-properties@^6.1.0: - version "6.3.1" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-6.3.1.tgz#5c52abde313d7ec9368c4abf67d27a656cba8b39" - dependencies: - balanced-match "^1.0.0" - postcss "^6.0.18" - -postcss-discard-comments@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" - dependencies: - postcss "^5.0.14" - -postcss-discard-duplicates@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" - dependencies: - postcss "^5.0.4" - -postcss-discard-empty@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - dependencies: - postcss "^5.0.14" - -postcss-discard-overridden@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - dependencies: - postcss "^5.0.16" - -postcss-discard-unused@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - dependencies: - postcss "^5.0.14" - uniqs "^2.0.0" - -postcss-filter-plugins@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" - dependencies: - postcss "^5.0.4" - uniqid "^4.0.0" - -postcss-load-config@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" - dependencies: - cosmiconfig "^2.1.0" - object-assign "^4.1.0" - postcss-load-options "^1.2.0" - postcss-load-plugins "^2.3.0" - -postcss-load-options@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" - dependencies: - cosmiconfig "^2.1.0" - object-assign "^4.1.0" - -postcss-load-plugins@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" - dependencies: - cosmiconfig "^2.1.1" - object-assign "^4.1.0" - -postcss-loader@^2.0.8: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.0.tgz#038c2d6d59753fef4667827fd3ae03f5dc5e6a7a" - dependencies: - loader-utils "^1.1.0" - postcss "^6.0.0" - postcss-load-config "^1.2.0" - schema-utils "^0.4.0" - -postcss-merge-idents@^2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - dependencies: - has "^1.0.1" - postcss "^5.0.10" - postcss-value-parser "^3.1.1" - -postcss-merge-longhand@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - dependencies: - postcss "^5.0.4" - -postcss-merge-rules@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" - dependencies: - browserslist "^1.5.2" - caniuse-api "^1.5.2" - postcss "^5.0.4" - postcss-selector-parser "^2.2.2" - vendors "^1.0.0" - -postcss-message-helpers@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - -postcss-minify-font-values@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - dependencies: - object-assign "^4.0.1" - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-minify-gradients@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - dependencies: - postcss "^5.0.12" - postcss-value-parser "^3.3.0" - -postcss-minify-params@^1.0.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.2" - postcss-value-parser "^3.0.2" - uniqs "^2.0.0" - -postcss-minify-selectors@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - dependencies: - alphanum-sort "^1.0.2" - has "^1.0.1" - postcss "^5.0.14" - postcss-selector-parser "^2.0.0" - -postcss-modules-extract-imports@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - dependencies: - postcss "^5.0.5" - -postcss-normalize-url@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^1.4.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - -postcss-ordered-values@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.1" - -postcss-reduce-idents@^2.2.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-reduce-initial@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - dependencies: - postcss "^5.0.4" - -postcss-reduce-transforms@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - dependencies: - has "^1.0.1" - postcss "^5.0.8" - postcss-value-parser "^3.0.1" - -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-svgo@^2.1.1: - version "2.1.6" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" - dependencies: - is-svg "^2.0.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - svgo "^0.7.0" - -postcss-unique-selectors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss-url@^7.1.2: - version "7.3.0" - resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-7.3.0.tgz#cf2f45e06743cf43cfea25309f81cbc003dc783f" - dependencies: - mime "^1.4.1" - minimatch "^3.0.4" - mkdirp "^0.5.0" - postcss "^6.0.1" - xxhashjs "^0.2.1" - -postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - -postcss-zindex@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" - dependencies: - has "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: - version "5.2.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.18: - version "6.0.19" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.19.tgz#76a78386f670b9d9494a655bf23ac012effd1555" - dependencies: - chalk "^2.3.1" - source-map "^0.6.1" - supports-color "^5.2.0" - -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -pretty-error@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" - dependencies: - renderkid "^2.0.1" - utila "~0.4" - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - dependencies: - asap "~2.0.3" - -protractor@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.1.2.tgz#9b221741709a4c62d5cd53c6aadd54a71137e95f" - dependencies: - "@types/node" "^6.0.46" - "@types/q" "^0.0.32" - "@types/selenium-webdriver" "~2.53.39" - blocking-proxy "0.0.5" - chalk "^1.1.3" - glob "^7.0.3" - jasmine "^2.5.3" - jasminewd2 "^2.1.0" - optimist "~0.6.0" - q "1.4.1" - saucelabs "~1.3.0" - selenium-webdriver "3.0.1" - source-map-support "~0.4.0" - webdriver-js-extender "^1.0.0" - webdriver-manager "^12.0.6" - -proxy-addr@~2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.2.tgz#6571504f47bb988ec8180253f85dd7e14952bdec" - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.5.2" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - -public-encrypt@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - -pump@^2.0.0, pump@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" - dependencies: - duplexify "^3.5.3" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -q@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - -q@^1.1.2, q@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - -qjobs@^1.1.4: - version "1.1.5" - resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" - -qs@6.5.1, qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - -qs@~6.3.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -querystringify@0.0.x: - version "0.0.4" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" - -querystringify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" - dependencies: - bytes "3.0.0" - http-errors "1.6.2" - iconv-lite "0.4.19" - unpipe "1.0.0" - -raw-loader@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" - -rc@^1.1.7: - version "1.2.5" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -readable-stream@1.0, readable-stream@~1.0.2: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -reduce-css-calc@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" - dependencies: - balanced-match "^0.4.2" - math-expression-evaluator "^1.2.14" - reduce-function-call "^1.0.1" - -reduce-function-call@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" - dependencies: - balanced-match "^0.4.2" - -reflect-metadata@^0.1.2: - version "0.1.12" - resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.12.tgz#311bf0c6b63cd782f228a81abe146a2bfa9c56f2" - -regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - -regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - -relateurl@0.2.x: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -renderkid@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" - dependencies: - css-select "^1.1.0" - dom-converter "~0.1" - htmlparser2 "~3.3.0" - strip-ansi "^3.0.0" - utila "~0.3" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -request@2, request@^2.78.0: - version "2.83.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - -request@2.81.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -request@~2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - qs "~6.3.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - uuid "^3.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - dependencies: - resolve-from "^3.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" - dependencies: - path-parse "^1.0.5" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" - dependencies: - hash-base "^2.0.0" - inherits "^2.0.1" - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - dependencies: - aproba "^1.1.1" - -rxjs@^5.5.2, rxjs@^5.5.6: - version "5.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02" - dependencies: - symbol-observable "1.0.1" - -safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -sass-graph@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" - dependencies: - glob "^7.0.0" - lodash "^4.0.0" - scss-tokenizer "^0.2.3" - yargs "^7.0.0" - -sass-loader@^6.0.3: - version "6.0.6" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-6.0.6.tgz#e9d5e6c1f155faa32a4b26d7a9b7107c225e40f9" - dependencies: - async "^2.1.5" - clone-deep "^0.3.0" - loader-utils "^1.0.1" - lodash.tail "^4.1.1" - pify "^3.0.0" - -saucelabs@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" - dependencies: - https-proxy-agent "^1.0.0" - -sax@0.5.x: - version "0.5.8" - resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" - -sax@0.6.x: - version "0.6.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" - -sax@>=0.6.0, sax@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -schema-utils@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" - dependencies: - ajv "^5.0.0" - -schema-utils@^0.4.0, schema-utils@^0.4.2: - version "0.4.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" - dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" - -scss-tokenizer@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" - dependencies: - js-base64 "^2.1.8" - source-map "^0.4.2" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - -selenium-webdriver@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" - dependencies: - adm-zip "^0.4.7" - rimraf "^2.5.4" - tmp "0.0.30" - xml2js "^0.4.17" - -selenium-webdriver@^2.53.2: - version "2.53.3" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" - dependencies: - adm-zip "0.4.4" - rimraf "^2.2.8" - tmp "0.0.24" - ws "^1.0.1" - xml2js "0.4.4" - -selfsigned@^1.9.1: - version "1.10.2" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.2.tgz#b4449580d99929b65b10a48389301a6592088758" - dependencies: - node-forge "0.7.1" - -semver-dsl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/semver-dsl/-/semver-dsl-1.0.1.tgz#d3678de5555e8a61f629eed025366ae5f27340a0" - dependencies: - semver "^5.3.0" - -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - -semver@~4.3.3: - version "4.3.6" - resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" - -semver@~5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" - -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - -send@0.16.1: - version "0.16.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" - dependencies: - debug "2.6.9" - depd "~1.1.1" - destroy "~1.0.4" - encodeurl "~1.0.1" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.3.1" - -serialize-javascript@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" - -serve-index@^1.7.2: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.1.tgz#4c57d53404a761d8f2e7c1e8a18a47dbf278a719" - dependencies: - encodeurl "~1.0.1" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.1" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -setprototypeof@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.10" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shallow-clone@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-0.1.2.tgz#5909e874ba77106d73ac414cfec1ffca87d97060" - dependencies: - is-extendable "^0.1.1" - kind-of "^2.0.1" - lazy-cache "^0.2.3" - mixin-object "^2.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -silent-error@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/silent-error/-/silent-error-1.1.0.tgz#2209706f1c850a9f1d10d0d840918b46f26e1bc9" - dependencies: - debug "^2.2.0" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - dependencies: - hoek "4.x.x" - -socket.io-adapter@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" - dependencies: - debug "2.3.3" - socket.io-parser "2.3.1" - -socket.io-client@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" - dependencies: - backo2 "1.0.2" - component-bind "1.0.0" - component-emitter "1.2.1" - debug "2.3.3" - engine.io-client "1.8.3" - has-binary "0.1.7" - indexof "0.0.1" - object-component "0.0.3" - parseuri "0.0.5" - socket.io-parser "2.3.1" - to-array "0.1.4" - -socket.io-parser@2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" - dependencies: - component-emitter "1.1.2" - debug "2.2.0" - isarray "0.0.1" - json3 "3.3.2" - -socket.io@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" - dependencies: - debug "2.3.3" - engine.io "1.8.3" - has-binary "0.1.7" - object-assign "4.1.0" - socket.io-adapter "0.5.0" - socket.io-client "1.7.3" - socket.io-parser "2.3.1" - -sockjs-client@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" - dependencies: - debug "^2.6.6" - eventsource "0.1.6" - faye-websocket "~0.11.0" - inherits "^2.0.1" - json3 "^3.3.2" - url-parse "^1.1.8" - -sockjs@0.3.18: - version "0.3.18" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.18.tgz#d9b289316ca7df77595ef299e075f0f937eb4207" - dependencies: - faye-websocket "^0.10.0" - uuid "^2.0.2" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - dependencies: - is-plain-obj "^1.0.0" - -source-list-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" - -source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - -source-map-loader@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.3.tgz#d4b0c8cd47d54edce3e6bfa0f523f452b5b0e521" - dependencies: - async "^2.5.0" - loader-utils "~0.2.2" - source-map "~0.6.1" - -source-map-support@^0.4.0, source-map-support@^0.4.1, source-map-support@^0.4.2, source-map-support@~0.4.0: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map@0.1.x: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - dependencies: - amdefine ">=0.0.4" - -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -source-map@^0.4.2, source-map@^0.4.4, source-map@~0.4.1: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" - dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" - -spdy-transport@^2.0.18: - version "2.0.20" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.0.20.tgz#735e72054c486b2354fe89e702256004a39ace4d" - dependencies: - debug "^2.6.8" - detect-node "^2.0.3" - hpack.js "^2.1.6" - obuf "^1.1.1" - readable-stream "^2.2.9" - safe-buffer "^5.0.1" - wbuf "^1.7.2" - -spdy@^3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" - dependencies: - debug "^2.6.8" - handle-thing "^1.2.5" - http-deceiver "^1.2.7" - safe-buffer "^5.0.1" - select-hose "^2.0.0" - spdy-transport "^2.0.18" - -sprintf-js@^1.0.3: - version "1.1.1" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -ssri@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.2.4.tgz#9985e14041e65fc397af96542be35724ac11da52" - dependencies: - safe-buffer "^5.1.1" - -"statuses@>= 1.3.1 < 2": - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - -stdout-stream@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" - dependencies: - readable-stream "^2.0.1" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-http@^2.7.2: - version "2.8.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.3" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@^1.0.0, string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -stringstream@~0.0.4, stringstream@~0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - dependencies: - is-utf8 "^0.2.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - dependencies: - get-stdin "^4.0.1" - -strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -style-loader@^0.13.1: - version "0.13.2" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.2.tgz#74533384cf698c7104c7951150b49717adc2f3bb" - dependencies: - loader-utils "^1.0.2" - -stylus-loader@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.1.tgz#77f4b34fd030d25b2617bcf5513db5b0730c4089" - dependencies: - loader-utils "^1.0.2" - lodash.clonedeep "^4.5.0" - when "~3.6.x" - -stylus@^0.54.5: - version "0.54.5" - resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" - dependencies: - css-parse "1.7.x" - debug "*" - glob "7.0.x" - mkdirp "0.5.x" - sax "0.5.x" - source-map "0.1.x" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.1.2, supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - -supports-color@^4.0.0, supports-color@^4.2.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - -supports-color@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a" - dependencies: - has-flag "^3.0.0" - -svgo@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" - dependencies: - coa "~1.0.1" - colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" - mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" - -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - -tapable@^0.2.7: - version "0.2.8" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" - -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.0.0, tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -through2@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" - -through@X.X.X: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -thunky@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" - -time-stamp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" - -timers-browserify@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" - dependencies: - setimmediate "^1.0.4" - -tmp@0.0.24: - version "0.0.24" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" - -tmp@0.0.30: - version "0.0.30" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" - dependencies: - os-tmpdir "~1.0.1" - -tmp@0.0.31: - version "0.0.31" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" - dependencies: - os-tmpdir "~1.0.1" - -tmp@0.0.x: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - dependencies: - os-tmpdir "~1.0.2" - -to-array@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - -toposort@^1.0.0: - version "1.0.6" - resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec" - -tough-cookie@~2.3.0, tough-cookie@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" - dependencies: - punycode "^1.4.1" - -tree-kill@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -"true-case-path@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" - dependencies: - glob "^6.0.4" - -ts-node@~3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-3.2.2.tgz#bbd28e38af4aaa3e96076c466e1b220197c1a3ce" - dependencies: - arrify "^1.0.0" - chalk "^2.0.0" - diff "^3.1.0" - make-error "^1.1.1" - minimist "^1.2.0" - mkdirp "^0.5.1" - source-map-support "^0.4.0" - tsconfig "^6.0.0" - v8flags "^3.0.0" - yn "^2.0.0" - -tsconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032" - dependencies: - strip-bom "^3.0.0" - strip-json-comments "^2.0.0" - -tsickle@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.26.0.tgz#40b30a2dd6abcb33b182e37596674bd1cfe4039c" - dependencies: - minimist "^1.2.0" - mkdirp "^0.5.1" - source-map "^0.5.6" - source-map-support "^0.4.2" - -tslib@^1.7.1, tslib@^1.8.1: - version "1.9.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" - -tslint@~5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.7.0.tgz#c25e0d0c92fa1201c2bc30e844e08e682b4f3552" - dependencies: - babel-code-frame "^6.22.0" - colors "^1.1.2" - commander "^2.9.0" - diff "^3.2.0" - glob "^7.1.1" - minimatch "^3.0.4" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.7.1" - tsutils "^2.8.1" - -tsutils@^2.8.1: - version "2.21.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.21.1.tgz#5b23c263233300ed7442b4217855cbc7547c296a" - dependencies: - tslib "^1.8.1" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -type-is@~1.6.15: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - -typescript@~2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" - -typescript@~2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" - -uglify-es@^3.3.4: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - dependencies: - commander "~2.13.0" - source-map "~0.6.1" - -uglify-js@3.3.x: - version "3.3.11" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.11.tgz#e9d058b20715138bb4e8e5cae2ea581686bdaae3" - dependencies: - commander "~2.14.1" - source-map "~0.6.1" - -uglify-js@^2.6, uglify-js@^2.8.29: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uglifyjs-webpack-plugin@^0.4.6: - version "0.4.6" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" - dependencies: - source-map "^0.5.6" - uglify-js "^2.8.29" - webpack-sources "^1.0.1" - -uglifyjs-webpack-plugin@^1.1.5: - version "1.2.0" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.0.tgz#f706fa4c655000a086b4a97c7d835ed0f6e9b0ef" - dependencies: - cacache "^10.0.1" - find-cache-dir "^1.0.0" - schema-utils "^0.4.2" - serialize-javascript "^1.4.0" - source-map "^0.6.1" - uglify-es "^3.3.4" - webpack-sources "^1.1.0" - worker-farm "^1.5.2" - -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -ultron@1.0.x: - version "1.0.2" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - -uniqid@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" - dependencies: - macaddress "^0.2.8" - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - -unique-filename@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" - dependencies: - imurmurhash "^0.1.4" - -universalify@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - -upper-case@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - -url-loader@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" - dependencies: - loader-utils "^1.0.2" - mime "^1.4.1" - schema-utils "^0.3.0" - -url-parse@1.0.x: - version "1.0.5" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" - dependencies: - querystringify "0.0.x" - requires-port "1.0.x" - -url-parse@^1.1.8: - version "1.2.0" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986" - dependencies: - querystringify "~1.0.0" - requires-port "~1.0.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -useragent@^2.1.12: - version "2.3.0" - resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" - dependencies: - lru-cache "4.1.x" - tmp "0.0.x" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -utila@~0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - -uuid@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" - -uuid@^3.0.0, uuid@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" - -v8flags@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.0.1.tgz#dce8fc379c17d9f2c9e9ed78d89ce00052b1b76b" - dependencies: - homedir-polyfill "^1.0.1" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - -vendors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vlq@^0.2.1: - version "0.2.3" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - -watchpack@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" - dependencies: - async "^2.1.2" - chokidar "^1.7.0" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.2.tgz#d697b99f1f59512df2751be42769c1580b5801fe" - dependencies: - minimalistic-assert "^1.0.0" - -webdriver-js-extender@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" - dependencies: - "@types/selenium-webdriver" "^2.53.35" - selenium-webdriver "^2.53.2" - -webdriver-manager@^12.0.6: - version "12.0.6" - resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.0.6.tgz#3df1a481977010b4cbf8c9d85c7a577828c0e70b" - dependencies: - adm-zip "^0.4.7" - chalk "^1.1.1" - del "^2.2.0" - glob "^7.0.3" - ini "^1.3.4" - minimist "^1.2.0" - q "^1.4.1" - request "^2.78.0" - rimraf "^2.5.2" - semver "^5.3.0" - xml2js "^0.4.17" - -webpack-core@^0.6.8: - version "0.6.9" - resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - -webpack-dev-middleware@^1.11.0, webpack-dev-middleware@~1.12.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" - dependencies: - memory-fs "~0.4.1" - mime "^1.5.0" - path-is-absolute "^1.0.0" - range-parser "^1.0.3" - time-stamp "^2.0.0" - -webpack-dev-server@~2.9.3: - version "2.9.7" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.7.tgz#100ad6a14775478924d417ca6dcfb9d52a98faed" - dependencies: - ansi-html "0.0.7" - array-includes "^3.0.3" - bonjour "^3.5.0" - chokidar "^1.6.0" - compression "^1.5.2" - connect-history-api-fallback "^1.3.0" - debug "^3.1.0" - del "^3.0.0" - express "^4.16.2" - html-entities "^1.2.0" - http-proxy-middleware "~0.17.4" - import-local "^0.1.1" - internal-ip "1.2.0" - ip "^1.1.5" - killable "^1.0.0" - loglevel "^1.4.1" - opn "^5.1.0" - portfinder "^1.0.9" - selfsigned "^1.9.1" - serve-index "^1.7.2" - sockjs "0.3.18" - sockjs-client "1.1.4" - spdy "^3.4.1" - strip-ansi "^3.0.1" - supports-color "^4.2.1" - webpack-dev-middleware "^1.11.0" - yargs "^6.6.0" - -webpack-merge@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.1.tgz#f1197a0a973e69c6fbeeb6d658219aa8c0c13555" - dependencies: - lodash "^4.17.4" - -webpack-sources@^1.0.0, webpack-sources@^1.0.1, webpack-sources@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack-subresource-integrity@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz#8fac8a7e8eb59fc6a16768a85c9d94ee7f9d0edb" - dependencies: - webpack-core "^0.6.8" - -webpack@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.10.0.tgz#5291b875078cf2abf42bdd23afe3f8f96c17d725" - dependencies: - acorn "^5.0.0" - acorn-dynamic-import "^2.0.0" - ajv "^5.1.5" - ajv-keywords "^2.0.0" - async "^2.1.2" - enhanced-resolve "^3.4.0" - escope "^3.6.0" - interpret "^1.0.0" - json-loader "^0.5.4" - json5 "^0.5.1" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - source-map "^0.5.3" - supports-color "^4.2.1" - tapable "^0.2.7" - uglifyjs-webpack-plugin "^0.4.6" - watchpack "^1.4.0" - webpack-sources "^1.0.1" - yargs "^8.0.2" - -websocket-driver@>=0.5.1: - version "0.7.0" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" - dependencies: - http-parser-js ">=0.4.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" - -when@~3.6.x: - version "3.6.4" - resolved "https://registry.yarnpkg.com/when/-/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e" - -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - -which@1, which@^1.2.1, which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - dependencies: - string-width "^1.0.2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -worker-farm@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae" - dependencies: - errno "^0.1.4" - xtend "^4.0.1" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -ws@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" - dependencies: - options ">=0.0.5" - ultron "1.0.x" - -ws@^1.0.1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" - dependencies: - options ">=0.0.5" - ultron "1.0.x" - -wtf-8@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" - -xml-char-classes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" - -xml2js@0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d" - dependencies: - sax "0.6.x" - xmlbuilder ">=1.0.0" - -xml2js@^0.4.17: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - -xmlbuilder@>=1.0.0, xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - -xmlhttprequest-ssl@1.5.3: - version "1.5.3" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" - -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -xxhashjs@^0.2.1: - version "0.2.2" - resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" - dependencies: - cuint "^0.2.2" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" - dependencies: - camelcase "^3.0.0" - -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" - dependencies: - camelcase "^3.0.0" - -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - dependencies: - camelcase "^4.1.0" - -yargs@^6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^4.2.0" - -yargs@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^5.0.0" - -yargs@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -yeast@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" - -yn@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" - -zone.js@^0.8.14: - version "0.8.20" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.20.tgz#a218c48db09464b19ff6fc8f0d4bb5b1046e185d" From 05bfb8984e558b9e5bc9eee186f9139098639410 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 19 Mar 2018 21:06:57 -0700 Subject: [PATCH 216/724] fix(@angular-devkit/schematics): fix some optimizing issue --- .../schematics/src/tree/action.ts | 106 ++++++++++-------- .../schematics/src/tree/action_spec.ts | 36 +++++- 2 files changed, 97 insertions(+), 45 deletions(-) diff --git a/packages/angular_devkit/schematics/src/tree/action.ts b/packages/angular_devkit/schematics/src/tree/action.ts index 1a0ed47421..8618862f4d 100644 --- a/packages/angular_devkit/schematics/src/tree/action.ts +++ b/packages/angular_devkit/schematics/src/tree/action.ts @@ -53,56 +53,74 @@ export class ActionList implements Iterable { optimize() { - let changed = false; - const actions = this._actions; - const deleted = new Set(); - this._actions = []; - - // Handles files we create. - for (let i = 0; i < actions.length; i++) { - const iAction = actions[i]; - if (iAction.kind == 'c') { - let path = iAction.path; - let content = iAction.content; - let toDelete = false; - deleted.delete(path); - - for (let j = i + 1; j < actions.length; j++) { - const action = actions[j]; - if (path == action.path) { - changed = true; - switch (action.kind) { - case 'c': content = action.content; actions.splice(j--, 1); break; - case 'o': content = action.content; actions.splice(j--, 1); break; - case 'r': path = action.to; actions.splice(j--, 1); break; - case 'd': toDelete = true; actions.splice(j--, 1); break; + const toCreate = new Map(); + const toRename = new Map(); + const toOverwrite = new Map(); + const toDelete = new Set(); + + for (const action of this._actions) { + switch (action.kind) { + case 'c': + toCreate.set(action.path, action.content); + break; + + case 'o': + if (toCreate.has(action.path)) { + toCreate.set(action.path, action.content); + } else { + toOverwrite.set(action.path, action.content); + } + break; + + case 'd': + toDelete.add(action.path); + break; + + case 'r': + const maybeCreate = toCreate.get(action.path); + const maybeOverwrite = toOverwrite.get(action.path); + if (maybeCreate) { + toCreate.delete(action.path); + toCreate.set(action.to, maybeCreate); + } + if (maybeOverwrite) { + toOverwrite.delete(action.path); + toOverwrite.set(action.to, maybeOverwrite); + } + + let maybeRename: Path | undefined = undefined; + for (const [from, to] of toRename.entries()) { + if (to == action.path) { + maybeRename = from; + break; } } - if (toDelete) { - break; + + if (maybeRename) { + toRename.set(maybeRename, action.to); + } + + if (!maybeCreate && !maybeOverwrite && !maybeRename) { + toRename.set(action.path, action.to); } - } - - if (!toDelete) { - this.create(path, content); - } else { - deleted.add(path); - } - } else if (deleted.has(iAction.path)) { - // DoNothing - } else { - switch (iAction.kind) { - case 'o': this.overwrite(iAction.path, iAction.content); break; - case 'r': this.rename(iAction.path, iAction.to); break; - case 'd': this.delete(iAction.path); break; - } + break; } } - // TODO: fix the optimization and remove this recursivity. - if (changed) { - this.optimize(); - } + this._actions = [ + ...[...toDelete.values()].map(x => { + return { kind: 'd', path: x } as DeleteFileAction; + }), + ...[...toRename.entries()].map(([from, to]) => { + return { kind: 'r', path: from, to } as RenameFileAction; + }), + ...[...toCreate.entries()].map(([path, content]) => { + return { kind: 'c', path, content } as CreateFileAction; + }), + ...[...toOverwrite.entries()].map(([path, content]) => { + return { kind: 'o', path, content } as OverwriteFileAction; + }), + ]; } push(action: Action) { this._actions.push(action); } diff --git a/packages/angular_devkit/schematics/src/tree/action_spec.ts b/packages/angular_devkit/schematics/src/tree/action_spec.ts index a1dd916d8f..63bc24f16e 100644 --- a/packages/angular_devkit/schematics/src/tree/action_spec.ts +++ b/packages/angular_devkit/schematics/src/tree/action_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { normalize } from '@angular-devkit/core'; -import { ActionList } from './action'; +import { Action, ActionList } from './action'; describe('Action', () => { @@ -75,5 +75,39 @@ describe('Action', () => { actions2.optimize(); expect(actions2.length).toBe(2); }); + + it('handles edge cases (2)', () => { + const actions = new ActionList; + + actions.create(normalize('/test'), new Buffer('1')); + actions.rename(normalize('/test'), normalize('/test1')); + actions.overwrite(normalize('/test1'), new Buffer('2')); + actions.rename(normalize('/test1'), normalize('/test2')); + + actions.optimize(); + expect(actions.length).toBe(1); + expect(actions.get(0)).toEqual( + jasmine.objectContaining({ kind: 'c', path: normalize('/test2') }), + ); + }); + + it('handles edge cases (3)', () => { + const actions = new ActionList; + + actions.rename(normalize('/test'), normalize('/test1')); + actions.overwrite(normalize('/test1'), new Buffer('2')); + actions.rename(normalize('/test1'), normalize('/test2')); + + actions.optimize(); + expect(actions.length).toBe(2); + expect(actions.get(0)).toEqual( + jasmine.objectContaining({ + kind: 'r', path: normalize('/test'), to: normalize('/test2'), + }), + ); + expect(actions.get(1)).toEqual( + jasmine.objectContaining({ kind: 'o', path: normalize('/test2') }), + ); + }); }); }); From b36fdd04cf48296f8a4d818b084c2ffa6ea13449 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 19 Mar 2018 17:36:56 -0400 Subject: [PATCH 217/724] refactor(@angular-devkit/build-webpack): simplify source map config --- .../models/webpack-configs/browser.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts index 86c3d41ecf..97c5679da8 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -1,7 +1,6 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import * as webpack from 'webpack'; import * as path from 'path'; const HtmlWebpackPlugin = require('html-webpack-plugin'); const SubresourceIntegrityPlugin = require('webpack-subresource-integrity'); @@ -51,23 +50,15 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } + let sourcemaps: string | false = false; if (buildOptions.sourceMap) { - // TODO: see if this is still needed with webpack 4 'mode'. // See https://webpack.js.org/configuration/devtool/ for sourcemap types. if (buildOptions.evalSourceMap && buildOptions.optimizationLevel === 0) { // Produce eval sourcemaps for development with serve, which are faster. - extraPlugins.push(new webpack.EvalSourceMapDevToolPlugin({ - moduleFilenameTemplate: '[resource-path]', - sourceRoot: 'webpack:///' - })); + sourcemaps = 'eval'; } else { // Produce full separate sourcemaps for production. - extraPlugins.push(new webpack.SourceMapDevToolPlugin({ - filename: '[file].map[query]', - moduleFilenameTemplate: '[resource-path]', - fallbackModuleFilenameTemplate: '[resource-path]?[hash]', - sourceRoot: 'webpack:///' - })); + sourcemaps = 'source-map'; } } @@ -90,6 +81,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { .map(style => style.entry); return { + devtool: sourcemaps, resolve: { mainFields: [ ...(wco.supportES2015 ? ['es2015'] : []), From 9959b48d6df1cd33b95f1bc9a97a4ebe2e20d16c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 20 Mar 2018 16:33:04 -0400 Subject: [PATCH 218/724] feat(@angular-devkit/build-webpack): support multi-tsconfig tslint --- .../build_webpack/src/tslint/index.ts | 89 +++++++++++++------ .../build_webpack/src/tslint/schema.json | 12 ++- .../test/tslint/works_spec_large.ts | 30 +++++++ 3 files changed, 100 insertions(+), 31 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/tslint/index.ts b/packages/angular_devkit/build_webpack/src/tslint/index.ts index 3658ebab9c..0e8da3c01e 100644 --- a/packages/angular_devkit/build_webpack/src/tslint/index.ts +++ b/packages/angular_devkit/build_webpack/src/tslint/index.ts @@ -26,7 +26,7 @@ import { stripBom } from '../angular-cli-files/utilities/strip-bom'; export interface TslintBuilderOptions { tslintConfig?: string; - tsConfig?: string; + tsConfig?: string | string[]; fix: boolean; typeCheck: boolean; force: boolean; @@ -58,39 +58,32 @@ export class TslintBuilder implements Builder { ? path.resolve(systemRoot, options.tslintConfig) : null; const Linter = projectTslint.Linter; - const Configuration = projectTslint.Configuration; - let program: ts.Program | undefined = undefined; + let result; if (options.tsConfig) { - program = Linter.createProgram(path.resolve(systemRoot, options.tsConfig)); - } - - const files = getFilesToLint(systemRoot, options, Linter, program); - const lintOptions = { - fix: options.fix, - formatter: options.format, - }; - - const linter = new Linter(lintOptions, program); - - let lastDirectory; - let configLoad; - for (const file of files) { - const contents = getFileContents(file, options, program); - - // Only check for a new tslint config if the path changes. - const currentDirectory = path.dirname(file); - if (currentDirectory !== lastDirectory) { - configLoad = Configuration.findConfiguration(tslintConfigPath, file); - lastDirectory = currentDirectory; - } - - if (contents && configLoad) { - linter.lint(file, contents, configLoad.results); + const tsConfigs = Array.isArray(options.tsConfig) ? options.tsConfig : [options.tsConfig]; + + for (const tsConfig of tsConfigs) { + const program = Linter.createProgram(path.resolve(systemRoot, tsConfig)); + const partial = lint(projectTslint, systemRoot, tslintConfigPath, options, program); + if (result == undefined) { + result = partial; + } else { + result.errorCount += partial.errorCount; + result.warningCount += partial.warningCount; + result.failures = result.failures.concat(partial.failures); + if (partial.fixes) { + result.fixes = result.fixes ? result.fixes.concat(partial.fixes) : partial.fixes; + } + } } + } else { + result = lint(projectTslint, systemRoot, tslintConfigPath, options); } - const result = linter.getResult(); + if (result == undefined) { + throw new Error('Invalid lint configuration. Nothing to lint.'); + } if (!options.silent) { const Formatter = projectTslint.findFormatter(options.format); @@ -130,6 +123,44 @@ export class TslintBuilder implements Builder { } } +function lint( + projectTslint: typeof tslint, + systemRoot: string, + tslintConfigPath: string | null, + options: TslintBuilderOptions, + program?: ts.Program, +) { + const Linter = projectTslint.Linter; + const Configuration = projectTslint.Configuration; + + const files = getFilesToLint(systemRoot, options, Linter, program); + const lintOptions = { + fix: options.fix, + formatter: options.format, + }; + + const linter = new Linter(lintOptions, program); + + let lastDirectory; + let configLoad; + for (const file of files) { + const contents = getFileContents(file, options, program); + + // Only check for a new tslint config if the path changes. + const currentDirectory = path.dirname(file); + if (currentDirectory !== lastDirectory) { + configLoad = Configuration.findConfiguration(tslintConfigPath, file); + lastDirectory = currentDirectory; + } + + if (contents && configLoad) { + linter.lint(file, contents, configLoad.results); + } + } + + return linter.getResult(); +} + function getFilesToLint( root: string, options: TslintBuilderOptions, diff --git a/packages/angular_devkit/build_webpack/src/tslint/schema.json b/packages/angular_devkit/build_webpack/src/tslint/schema.json index 55a09a4d9a..33f4b03e60 100644 --- a/packages/angular_devkit/build_webpack/src/tslint/schema.json +++ b/packages/angular_devkit/build_webpack/src/tslint/schema.json @@ -8,8 +8,16 @@ "description": "The name of the TSLint configuration file." }, "tsConfig": { - "type": "string", - "description": "The name of the TypeScript configuration file." + "description": "The name of the TypeScript configuration file.", + "oneOf": [ + { "type": "string" }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "fix": { "type": "boolean", diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts index 760159010e..ea6b3c9f7c 100644 --- a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts @@ -127,6 +127,36 @@ describe('Tslint Target', () => { ).subscribe(undefined, done.fail, done); }, 30000); + it('supports using one project as a string', (done) => { + const overrides: Partial = { + tsConfig: 'src/tsconfig.app.json', + }; + + runTargetSpec(host, tslintTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports using one project as an array', (done) => { + const overrides: Partial = { + tsConfig: ['src/tsconfig.app.json'], + }; + + runTargetSpec(host, tslintTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('supports using two projects', (done) => { + const overrides: Partial = { + tsConfig: ['src/tsconfig.app.json', 'src/tsconfig.spec.json'], + }; + + runTargetSpec(host, tslintTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); + it('errors when type checking is used without a project', (done) => { const overrides: Partial = { tsConfig: undefined, From 5dd7419e4aac0c5f88a726f840340a771ecfde7f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 13 Mar 2018 12:49:46 -0400 Subject: [PATCH 219/724] feat(@angular-devkit/build-webpack): support less version 3.x --- package-lock.json | 12 ++++++------ package.json | 4 ++-- packages/angular_devkit/build_webpack/package.json | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8274824a8a..0f5e4378ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6147,9 +6147,9 @@ } }, "less": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", - "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/less/-/less-3.0.1.tgz", + "integrity": "sha512-qUR4uNv88/c0mpnGOULgMLRXXSD6X0tYo4cVrokzsvn68+nuj8rskInCSe2eLAVYWGD/oAlq8P7J/FeZ/euKiw==", "requires": { "errno": "0.1.4", "graceful-fs": "4.1.11", @@ -6194,9 +6194,9 @@ } }, "less-loader": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.6.tgz", - "integrity": "sha512-WPFY3NMJGJna8kIxtgSu6AVG7K6uRPdfE2J7vpQqFWMN/RkOosV09rOVUt3wghNClWH2Pg7YumD1dHiv1Thfug==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", + "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", "requires": { "clone": "2.1.1", "loader-utils": "1.1.0", diff --git a/package.json b/package.json index 02dcd1eb62..d1e6522493 100644 --- a/package.json +++ b/package.json @@ -108,8 +108,8 @@ "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-source-map-support": "^1.2.0", - "less": "^2.7.3", - "less-loader": "^4.0.6", + "less": "^3.0.1", + "less-loader": "^4.1.0", "license-webpack-plugin": "^1.2.3", "loader-utils": "^1.1.0", "lodash": "^4.17.4", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 7a0750903c..037be8e922 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -22,8 +22,8 @@ "glob": "^7.0.3", "html-webpack-plugin": "^3.0.6", "karma-source-map-support": "^1.2.0", - "less": "^2.7.3", - "less-loader": "^4.0.6", + "less": "^3.0.1", + "less-loader": "^4.1.0", "license-webpack-plugin": "^1.2.3", "lodash": "^4.17.4", "memory-fs": "^0.4.1", From 082c6ffaebbd8d98e1161b6663e09c95f77d611f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 20 Mar 2018 17:20:28 -0400 Subject: [PATCH 220/724] refactor(@angular-devkit/build-webpack): update webpack sri plugin --- package-lock.json | 6 +++--- package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f5e4378ca..130d5d850c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12850,9 +12850,9 @@ } }, "webpack-subresource-integrity": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz", - "integrity": "sha1-j6yKfo61n8ahZ2ioXJ2U7n+dDts=", + "version": "1.1.0-rc.4", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.4.tgz", + "integrity": "sha1-xcTj1pD50vZKlVDgeodn+Xlqpdg=", "requires": { "webpack-core": "0.6.9" } diff --git a/package.json b/package.json index d1e6522493..d7d7c458ba 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "webpack-dev-server": "^3.0.1-beta.0", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", - "webpack-subresource-integrity": "^1.0.3", + "webpack-subresource-integrity": "^1.1.0-rc.4", "zone.js": "^0.8.19" }, "devDependencies": { diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 037be8e922..aa50469e2f 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -56,7 +56,7 @@ "webpack-dev-server": "^3.0.1-beta.0", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", - "webpack-subresource-integrity": "^1.0.3" + "webpack-subresource-integrity": "^1.1.0-rc.4" }, "peerDependencies": { "@angular-devkit/architect": "0.0.0", From ad9a30c2ea287d5166c1d997a5ddc8d4a8862d1d Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Thu, 15 Mar 2018 13:01:15 -0700 Subject: [PATCH 221/724] feat(@angular-devkit/schematics): generate tree-shakeable services by default Change the 'service' schematic for Angular to generate a tree-shakeable service by default. This greatly simplifies the schematic since it no longer needs to add a provider to @NgModule. --- .../__name@dasherize__.service.ts | 8 +- packages/schematics/angular/service/index.ts | 90 +++++++++---------- .../schematics/angular/service/index_spec.ts | 19 ++-- .../schematics/angular/utility/ast-utils.ts | 32 +++++++ 4 files changed, 89 insertions(+), 60 deletions(-) diff --git a/packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts b/packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts index f685263951..d517596e3b 100644 --- a/packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts +++ b/packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts @@ -1,8 +1,10 @@ -import { Injectable } from '@angular/core'; +import { Injectable } from '@angular/core';<% if (providedIn) { %> +import { <%= providedIn %> } from '<%= providedInPath %>';<% } %> -@Injectable() +@Injectable({ + providedIn: <%= providedIn || "'root'" %>, +}) export class <%= classify(name) %>Service { constructor() { } - } diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index 7c6299a421..0f7a96ed2b 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -5,15 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { Path, normalize, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, SchematicsException, Tree, apply, - branchAndMerge, - chain, filter, mergeWith, move, @@ -22,61 +20,61 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import { addProviderToModule } from '../utility/ast-utils'; -import { InsertChange } from '../utility/change'; +import { getFirstNgModuleName } from '../utility/ast-utils'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { Schema as ServiceOptions } from './schema'; +function getModuleNameFromPath(host: Tree, modulePath: Path) { + if (!host.exists(modulePath)) { + throw new SchematicsException(`File ${modulePath} does not exist.`); + } -function addProviderToNgModule(options: ServiceOptions): Rule { - return (host: Tree) => { - if (!options.module) { - return host; - } - - const modulePath = options.module; - if (!host.exists(options.module)) { - throw new Error('Specified module does not exist'); - } - - const text = host.read(modulePath); - if (text === null) { - throw new SchematicsException(`File ${modulePath} does not exist.`); - } - const sourceText = text.toString('utf-8'); + const text = host.read(modulePath); + if (text === null) { + throw new SchematicsException(`File ${modulePath} cannot be read.`); + } + const sourceText = text.toString('utf-8'); + const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); + return getFirstNgModuleName(source); +} - const servicePath = `/${options.sourceDir}/${options.path}/` - + (options.flat ? '' : strings.dasherize(options.name) + '/') - + strings.dasherize(options.name) - + '.service'; - const relativePath = buildRelativePath(modulePath, servicePath); - const changes = addProviderToModule(source, modulePath, - strings.classify(`${options.name}Service`), - relativePath); - const recorder = host.beginUpdate(modulePath); - for (const change of changes) { - if (change instanceof InsertChange) { - recorder.insertLeft(change.pos, change.toAdd); - } - } - host.commitUpdate(recorder); +function stripTsExtension(path: string): string { + if (!path.endsWith('.ts')) { + throw new SchematicsException(`File ${path} is not a Typescript file.`); + } - return host; - }; + return path.substr(0, path.length - 3); } export default function (options: ServiceOptions): Rule { options.path = options.path ? normalize(options.path) : options.path; const sourceDir = options.sourceDir; - if (!sourceDir) { + if (sourceDir === undefined) { throw new SchematicsException(`sourceDir option is required.`); } return (host: Tree, context: SchematicContext) => { + let providedByModule = ''; + let providedInPath = ''; + if (options.module) { - options.module = findModuleFromOptions(host, options); + const modulePath = findModuleFromOptions(host, options); + if (!modulePath || !host.exists(modulePath)) { + throw new Error('Specified module does not exist'); + } + providedByModule = getModuleNameFromPath(host, modulePath) || ''; + + if (!providedByModule) { + throw new SchematicsException(`module option did not point to an @NgModule.`); + } + + const servicePath = `/${options.sourceDir}/${options.path}/` + + (options.flat ? '' : strings.dasherize(options.name) + '/') + + strings.dasherize(options.name) + + '.service'; + + providedInPath = stripTsExtension(buildRelativePath(servicePath, modulePath)); } const templateSource = apply(url('./files'), [ @@ -85,16 +83,12 @@ export default function (options: ServiceOptions): Rule { ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, + providedIn: providedByModule, + providedInPath: providedInPath, }), move(sourceDir), ]); - return chain([ - branchAndMerge(chain([ - filter(path => path.endsWith('.module.ts') && !path.endsWith('-routing.module.ts')), - addProviderToNgModule(options), - mergeWith(templateSource), - ])), - ])(host, context); + return mergeWith(templateSource)(host, context); }; } diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 6afe612e47..d3b90f800e 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -8,11 +8,11 @@ import { Tree, VirtualTree } from '@angular-devkit/schematics'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { createAppModule, getFileContent } from '../utility/test'; +import { createAppModule } from '../utility/test'; import { Schema as ServiceOptions } from './schema'; -describe('Pipe Schematic', () => { +describe('Service Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', path.join(__dirname, '../collection.json'), @@ -42,20 +42,21 @@ describe('Pipe Schematic', () => { expect(files.indexOf('/src/app/foo/foo.service.ts')).toBeGreaterThanOrEqual(0); }); - it('should not be provided by default', () => { - const options = { ...defaultOptions }; + it('service should be tree-shakeable', () => { + const options = { ...defaultOptions}; const tree = schematicRunner.runSchematic('service', options, appTree); - const content = getFileContent(tree, '/src/app/app.module.ts'); - expect(content).not.toMatch(/import { FooService } from '.\/foo\/foo.service'/); + const content = tree.readContent('/src/app/foo/foo.service.ts'); + expect(content).toMatch(/providedIn: 'root',/); }); - it('should import into a specified module', () => { + it('should import a specified module', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('service', options, appTree); - const content = getFileContent(tree, '/src/app/app.module.ts'); - expect(content).toMatch(/import { FooService } from '.\/foo\/foo.service'/); + const content = tree.readContent('/src/app/foo/foo.service.ts'); + expect(content).toMatch(/import { AppModule } from '..\/app.module'/); + expect(content).toMatch(/providedIn: AppModule,/); }); it('should fail if specified module does not exist', () => { diff --git a/packages/schematics/angular/utility/ast-utils.ts b/packages/schematics/angular/utility/ast-utils.ts index aa95071612..253c9692dc 100644 --- a/packages/schematics/angular/utility/ast-utils.ts +++ b/packages/schematics/angular/utility/ast-utils.ts @@ -233,6 +233,38 @@ export function getDecoratorMetadata(source: ts.SourceFile, identifier: string, .map(expr => expr.arguments[0] as ts.ObjectLiteralExpression); } +function findClassDeclarationParent(node: ts.Node): ts.ClassDeclaration|undefined { + if (ts.isClassDeclaration(node)) { + return node; + } + + return node.parent && findClassDeclarationParent(node.parent); +} + +/** + * Given a source file with @NgModule class(es), find the name of the first @NgModule class. + * + * @param source source file containing one or more @NgModule + * @returns the name of the first @NgModule, or `undefined` if none is found + */ +export function getFirstNgModuleName(source: ts.SourceFile): string|undefined { + // First, find the @NgModule decorators. + const ngModulesMetadata = getDecoratorMetadata(source, 'NgModule', '@angular/core'); + if (ngModulesMetadata.length === 0) { + return undefined; + } + + // Then walk parent pointers up the AST, looking for the ClassDeclaration parent of the NgModule + // metadata. + const moduleClass = findClassDeclarationParent(ngModulesMetadata[0]); + if (!moduleClass || !moduleClass.name) { + return undefined; + } + + // Get the class name of the module ClassDeclaration. + return moduleClass.name.text; +} + export function addSymbolToNgModuleMetadata( source: ts.SourceFile, ngModulePath: string, From 7c956fd4a9c0924f4157e4856717dc83206bf46a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sat, 17 Mar 2018 16:37:47 -0700 Subject: [PATCH 222/724] fix(@angular-devkit/architect-cli): architect CLI should have executable rights --- bin/architect | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/architect diff --git a/bin/architect b/bin/architect old mode 100644 new mode 100755 From be0c47efa34bfd85dbb160b2590d29b054f1cf1f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sat, 17 Mar 2018 17:02:14 -0700 Subject: [PATCH 223/724] fix(@angular-devkit/core): rename Host.stats to Host.stat (singular) which is more correct And fits with the rest of the fs methods. --- .../build_webpack/test/utils/test-project-host.ts | 6 +++--- packages/angular_devkit/core/node/host.ts | 12 ++++++------ .../core/src/virtual-fs/host/interface.ts | 4 ++-- .../core/src/virtual-fs/host/memory.ts | 2 +- .../core/src/virtual-fs/host/scoped.ts | 6 +++--- .../angular_devkit/core/src/virtual-fs/host/sync.ts | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts index 2a1b1c1a9d..0e49b49704 100644 --- a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts +++ b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts @@ -63,9 +63,9 @@ export class TestProjectHost extends NodeJsSyncHost { return super.isFile(resolve(this._root, path)); } - // Some hosts may not support stats. - stats(path: Path): Observable> | null { - return super.stats(resolve(this._root, path)); + // Some hosts may not support stat. + stat(path: Path): Observable> | null { + return super.stat(resolve(this._root, path)); } // Some hosts may not support watching. diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 8c6ff0d864..7fb508b6b3 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -170,8 +170,8 @@ export class NodeJsAsyncHost implements virtualFs.Host { ); } - // Some hosts may not support stats. - stats(path: Path): Observable> | null { + // Some hosts may not support stat. + stat(path: Path): Observable> | null { return _callFs(fs.stat, getSystemPath(path)); } @@ -280,15 +280,15 @@ export class NodeJsSyncHost implements virtualFs.Host { isDirectory(path: Path): Observable { // tslint:disable-next-line:non-null-operator - return this.stats(path) !.pipe(map(stat => stat.isDirectory())); + return this.stat(path) !.pipe(map(stat => stat.isDirectory())); } isFile(path: Path): Observable { // tslint:disable-next-line:non-null-operator - return this.stats(path) !.pipe(map(stat => stat.isFile())); + return this.stat(path) !.pipe(map(stat => stat.isFile())); } - // Some hosts may not support stats. - stats(path: Path): Observable> | null { + // Some hosts may not support stat. + stat(path: Path): Observable> | null { return observableOf(fs.statSync(getSystemPath(path))); } diff --git a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts index 9d9d5372b9..7ca74cf309 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts @@ -60,8 +60,8 @@ export interface Host { isDirectory(path: Path): Observable; isFile(path: Path): Observable; - // Some hosts may not support stats. - stats(path: Path): Observable> | null; + // Some hosts may not support stat. + stat(path: Path): Observable> | null; // Some hosts may not support watching. watch(path: Path, options?: HostWatchOptions): Observable | null; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index b6da90dfd0..6bb0e9b482 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -214,7 +214,7 @@ export class SimpleMemoryHost implements Host<{}> { return observableOf(this._cache.has(this._toAbsolute(path))); } - stats(_path: Path): Observable> | null { + stat(_path: Path): Observable> | null { return null; } diff --git a/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts b/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts index 94c84503c6..e476d98513 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts @@ -48,9 +48,9 @@ export class ScopedHost implements Host { return this._delegate.isFile(join(this._root, path)); } - // Some hosts may not support stats. - stats(path: Path): Observable> | null { - return this._delegate.stats(join(this._root, path)); + // Some hosts may not support stat. + stat(path: Path): Observable> | null { + return this._delegate.stat(join(this._root, path)); } // Some hosts may not support watching. diff --git a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts index c5a126bf94..e89e6b0281 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts @@ -90,9 +90,9 @@ export class SyncDelegateHost { return this._doSyncCall(this._delegate.isFile(path)); } - // Some hosts may not support stats. + // Some hosts may not support stat. stats(path: Path): Stats | null { - const result: Observable> | null = this._delegate.stats(path); + const result: Observable> | null = this._delegate.stat(path); if (result) { return this._doSyncCall(result); From 306198728a981d7efd6f4c9a36f36025bcfb8633 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sat, 17 Mar 2018 17:03:28 -0700 Subject: [PATCH 224/724] fix(@angular-devkit/core): default for Stats<> generic --- packages/angular_devkit/core/src/virtual-fs/host/interface.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts index 7ca74cf309..7916daa798 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts @@ -24,7 +24,7 @@ export const enum HostWatchEventType { Renamed = 3, // Applied to the original file path. } -export type Stats = T & { +export type Stats = T & { isFile(): boolean; isDirectory(): boolean; From fc3257d0f40b03ff8e657e064dcf46f8fe226cc9 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sat, 17 Mar 2018 22:21:49 -0700 Subject: [PATCH 225/724] fix(@angular-devkit/core): add stats to memory host --- .../core/src/virtual-fs/host/memory.ts | 220 +++++++++++++----- .../core/src/virtual-fs/host/memory_spec.ts | 1 + .../core/src/virtual-fs/host/test.ts | 2 +- .../core/src/virtual-fs/host/test_spec.ts | 2 - 4 files changed, 169 insertions(+), 56 deletions(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index 6bb0e9b482..fcc6fc95dd 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -7,9 +7,6 @@ */ import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; -import { empty } from 'rxjs/observable/empty'; -import { of as observableOf } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; import { FileAlreadyExistException, FileDoesNotExistException, @@ -37,27 +34,49 @@ import { Stats, } from './interface'; +export interface SimpleMemoryHostStats { + readonly content: FileBuffer | null; +} export class SimpleMemoryHost implements Host<{}> { - private _cache = new Map(); + private _cache = new Map>(); private _watchers = new Map][]>(); - protected _toAbsolute(path: Path) { - return isAbsolute(path) ? path : normalize('/' + path); + protected _newDirStats() { + return { + isFile() { return false; }, + isDirectory() { return true; }, + size: 0, + + atime: new Date(), + ctime: new Date(), + mtime: new Date(), + birthtime: new Date(), + + content: null, + }; } + protected _newFileStats(content: FileBuffer, oldStats?: Stats) { + return { + isFile() { return true; }, + isDirectory() { return false; }, + size: content.byteLength, - protected _isDir(path: Path) { - if (path === '/') { - return true; - } + atime: oldStats ? oldStats.atime : new Date(), + ctime: new Date(), + mtime: new Date(), + birthtime: oldStats ? oldStats.birthtime : new Date(), - for (const p of this._cache.keys()) { - if (p.startsWith(path + NormalizedSep)) { - return true; - } - } + content, + }; + } - return false; + constructor() { + this._cache.set(normalize('/'), this._newDirStats()); + } + + protected _toAbsolute(path: Path) { + return isAbsolute(path) ? path : normalize('/' + path); } protected _updateWatchers(path: Path, type: HostWatchEventType) { @@ -109,33 +128,53 @@ export class SimpleMemoryHost implements Host<{}> { return { synchronous: true }; } - write(path: Path, content: FileBuffer): Observable { + /** + * List of protected methods that give direct access outside the observables to the cache + * and internal states. + */ + protected _write(path: Path, content: FileBuffer): void { path = this._toAbsolute(path); - if (this._isDir(path)) { - return _throw(new PathIsDirectoryException(path)); + const old = this._cache.get(path); + if (old && old.isDirectory()) { + throw new PathIsDirectoryException(path); } - const existed = this._cache.has(path); - this._cache.set(path, content); - this._updateWatchers(path, existed ? HostWatchEventType.Changed : HostWatchEventType.Created); + // Update all directories. If we find a file we know it's an invalid write. + const fragments = split(path); + let curr: Path = normalize('/'); + for (const fr of fragments) { + curr = join(curr, fr); + const maybeStats = this._cache.get(fr); + if (maybeStats) { + if (maybeStats.isFile()) { + throw new PathIsFileException(curr); + } + } else { + this._cache.set(curr, this._newDirStats()); + } + } - return empty(); + // Create the stats. + const stats: Stats = this._newFileStats(content, old); + this._cache.set(path, stats); + this._updateWatchers(path, old ? HostWatchEventType.Changed : HostWatchEventType.Created); } - read(path: Path): Observable { + _read(path: Path): FileBuffer { path = this._toAbsolute(path); - if (this._isDir(path)) { - return _throw(new PathIsDirectoryException(path)); - } - const maybeBuffer = this._cache.get(path); - if (!maybeBuffer) { - return _throw(new FileDoesNotExistException(path)); + const maybeStats = this._cache.get(path); + if (!maybeStats) { + throw new FileDoesNotExistException(path); + } else if (maybeStats.isDirectory()) { + throw new PathIsDirectoryException(path); + } else if (!maybeStats.content) { + throw new PathIsDirectoryException(path); } else { - return observableOf(maybeBuffer); + return maybeStats.content; } } - delete(path: Path): Observable { + _delete(path: Path): void { path = this._toAbsolute(path); - if (this._isDir(path)) { + if (this._isDirectory(path)) { for (const [cachePath, _] of this._cache.entries()) { if (path.startsWith(cachePath + NormalizedSep)) { this._cache.delete(cachePath); @@ -145,22 +184,22 @@ export class SimpleMemoryHost implements Host<{}> { this._cache.delete(path); } this._updateWatchers(path, HostWatchEventType.Deleted); - - return empty(); } - rename(from: Path, to: Path): Observable { + _rename(from: Path, to: Path): void { from = this._toAbsolute(from); to = this._toAbsolute(to); if (!this._cache.has(from)) { - return _throw(new FileDoesNotExistException(from)); + throw new FileDoesNotExistException(from); } else if (this._cache.has(to)) { - return _throw(new FileAlreadyExistException(from)); + throw new FileAlreadyExistException(to); } - if (this._isDir(from)) { + + if (this._isDirectory(from)) { for (const path of this._cache.keys()) { if (path.startsWith(from + NormalizedSep)) { const content = this._cache.get(path); if (content) { + // We don't need to clone or extract the content, since we're moving files. this._cache.set(join(to, NormalizedSep, path.slice(from.length)), content); } } @@ -174,15 +213,14 @@ export class SimpleMemoryHost implements Host<{}> { } this._updateWatchers(from, HostWatchEventType.Renamed); - - return empty(); } - list(path: Path): Observable { + _list(path: Path): PathFragment[] { path = this._toAbsolute(path); - if (this._cache.has(path)) { - return _throw(new PathIsFileException(path)); + if (this._isFile(path)) { + throw new PathIsFileException(path); } + const fragments = split(path); const result = new Set(); if (path !== NormalizedRoot) { @@ -193,29 +231,105 @@ export class SimpleMemoryHost implements Host<{}> { } } else { for (const p of this._cache.keys()) { - if (p.startsWith(NormalizedSep)) { + if (p.startsWith(NormalizedSep) && p !== NormalizedRoot) { result.add(split(p)[1]); } } } - return observableOf([...result]); + return [...result]; } - exists(path: Path): Observable { - path = this._toAbsolute(path); + _exists(path: Path): boolean { + return !!this._cache.get(this._toAbsolute(path)); + } + _isDirectory(path: Path): boolean { + const maybeStats = this._cache.get(this._toAbsolute(path)); + + return maybeStats ? maybeStats.isDirectory() : false; + } + _isFile(path: Path): boolean { + const maybeStats = this._cache.get(this._toAbsolute(path)); + + return maybeStats ? maybeStats.isFile() : false; + } + + _stat(path: Path): Stats { + const maybeStats = this._cache.get(this._toAbsolute(path)); + + if (!maybeStats) { + throw new FileDoesNotExistException(path); + } else { + return maybeStats; + } + } + + write(path: Path, content: FileBuffer): Observable { + return new Observable(obs => { + this._write(path, content); + obs.next(); + obs.complete(); + }); + } + + read(path: Path): Observable { + return new Observable(obs => { + const content = this._read(path); + obs.next(content); + obs.complete(); + }); + } + + delete(path: Path): Observable { + return new Observable(obs => { + this._delete(path); + obs.next(); + obs.complete(); + }); + } + + rename(from: Path, to: Path): Observable { + return new Observable(obs => { + this._rename(from, to); + obs.next(); + obs.complete(); + }); + } - return observableOf(this._cache.has(path) || this._isDir(path)); + list(path: Path): Observable { + return new Observable(obs => { + obs.next(this._list(path)); + obs.complete(); + }); } + + exists(path: Path): Observable { + return new Observable(obs => { + obs.next(this._exists(path)); + obs.complete(); + }); + } + isDirectory(path: Path): Observable { - return observableOf(this._isDir(this._toAbsolute(path))); + return new Observable(obs => { + obs.next(this._isDirectory(path)); + obs.complete(); + }); } + isFile(path: Path): Observable { - return observableOf(this._cache.has(this._toAbsolute(path))); + return new Observable(obs => { + obs.next(this._isFile(path)); + obs.complete(); + }); } - stat(_path: Path): Observable> | null { - return null; + // Some hosts may not support stat. + stat(path: Path): Observable> { + return new Observable>(obs => { + obs.next(this._stat(path)); + obs.complete(); + }); } watch(path: Path, options?: HostWatchOptions): Observable | null { diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts index eebd3cf899..849829666d 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory_spec.ts @@ -93,6 +93,7 @@ describe('SimpleMemoryHost', () => { .toEqual([fragment('file1'), fragment('file2'), fragment('sub1')]); expect(host.list(normalize('/'))) .toEqual([fragment('sub'), fragment('file4')]); + expect(host.list(normalize('/inexistent'))).toEqual([]); }); it('supports isFile / isDirectory', () => { diff --git a/packages/angular_devkit/core/src/virtual-fs/host/test.ts b/packages/angular_devkit/core/src/virtual-fs/host/test.ts index 331a64fbe0..a24b4eb549 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/test.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/test.ts @@ -17,7 +17,7 @@ export class TestHost extends SimpleMemoryHost { super(); for (const filePath of Object.getOwnPropertyNames(map)) { - this.write(normalize(filePath), stringToFileBuffer(map[filePath])); + this._write(normalize(filePath), stringToFileBuffer(map[filePath])); } } diff --git a/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts index f7c10305cc..dc8556054a 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/test_spec.ts @@ -5,8 +5,6 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -// tslint:disable:no-implicit-dependencies -// tslint:disable:non-null-operator import { TestHost } from './test'; From bb5cedd21628cf8f0918911e9cd6d116717f1d05 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 02:09:16 -0700 Subject: [PATCH 226/724] feat(@angular-devkit/core): streamline sync host with regular host --- .../build_webpack/test/utils/test-project-host.ts | 2 +- packages/angular_devkit/core/src/virtual-fs/host/sync.ts | 4 ++-- packages/schematics/angular/library/index_spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts index 0e49b49704..ed546811b2 100644 --- a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts +++ b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts @@ -64,7 +64,7 @@ export class TestProjectHost extends NodeJsSyncHost { } // Some hosts may not support stat. - stat(path: Path): Observable> | null { + stat(path: Path): Observable> { return super.stat(resolve(this._root, path)); } diff --git a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts index e89e6b0281..8cd0b5cd45 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts @@ -25,7 +25,7 @@ export class SynchronousDelegateExpectedException extends BaseException { /** * Implement a synchronous-only host interface (remove the Observable parts). */ -export class SyncDelegateHost { +export class SyncDelegateHost { constructor(protected _delegate: Host) { if (!_delegate.capabilities.synchronous) { throw new SynchronousDelegateExpectedException(); @@ -91,7 +91,7 @@ export class SyncDelegateHost { } // Some hosts may not support stat. - stats(path: Path): Stats | null { + stat(path: Path): Stats | null { const result: Observable> | null = this._delegate.stat(path); if (result) { diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 37e5c5e47e..10d6584016 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -117,7 +117,7 @@ describe('Library Schematic', () => { devDependencies: { typescript: '~2.5.0', }, - }))); + }))).subscribe(); mockTree = new HostTree(memoryfs); }); From 636c91dd01c85f4f667495e431e30e2863b778c3 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 02:09:46 -0700 Subject: [PATCH 227/724] feat(@angular-devkit/core): NodeJsSyncHost should behave properly WRT observables --- packages/angular_devkit/core/node/host.ts | 59 ++++++++++++------- .../schematics/src/sink/dryrun_spec.ts | 2 +- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 7fb508b6b3..046aa9a92e 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -9,7 +9,6 @@ import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; import { empty } from 'rxjs/observable/empty'; import { from as observableFrom } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; import { concat } from 'rxjs/operators/concat'; import { concatMap } from 'rxjs/operators/concatMap'; import { ignoreElements } from 'rxjs/operators/ignoreElements'; @@ -224,24 +223,30 @@ export class NodeJsSyncHost implements virtualFs.Host { } write(path: Path, content: virtualFs.FileBuffer): Observable { - // Create folders if necessary. - const _createDir = (path: Path) => { - if (fs.existsSync(getSystemPath(path))) { - return; - } + return new Observable(obs => { + // Create folders if necessary. + const _createDir = (path: Path) => { + if (fs.existsSync(getSystemPath(path))) { + return; + } + _createDir(dirname(path)); + fs.mkdirSync(getSystemPath(path)); + }; _createDir(dirname(path)); - fs.mkdirSync(getSystemPath(path)); - }; - _createDir(dirname(path)); - fs.writeFileSync(getSystemPath(path), new Uint8Array(content)); + fs.writeFileSync(getSystemPath(path), new Uint8Array(content)); - return empty(); + obs.next(); + obs.complete(); + }); } read(path: Path): Observable { - const buffer = fs.readFileSync(getSystemPath(path)); + return new Observable(obs => { + const buffer = fs.readFileSync(getSystemPath(path)); - return observableOf(new Uint8Array(buffer).buffer as virtualFs.FileBuffer); + obs.next(new Uint8Array(buffer).buffer as virtualFs.FileBuffer); + obs.complete(); + }); } delete(path: Path): Observable { @@ -263,19 +268,26 @@ export class NodeJsSyncHost implements virtualFs.Host { } rename(from: Path, to: Path): Observable { - fs.renameSync(getSystemPath(from), getSystemPath(to)); - - return empty(); + return new Observable(obs => { + fs.renameSync(getSystemPath(from), getSystemPath(to)); + obs.next(); + obs.complete(); + }); } list(path: Path): Observable { - return observableOf(fs.readdirSync(getSystemPath(path))).pipe( - map(names => names.map(name => fragment(name))), - ); + return new Observable(obs => { + const names = fs.readdirSync(getSystemPath(path)); + obs.next(names.map(name => fragment(name))); + obs.complete(); + }); } exists(path: Path): Observable { - return observableOf(fs.existsSync(getSystemPath(path))); + return new Observable(obs => { + obs.next(fs.existsSync(getSystemPath(path))); + obs.complete(); + }); } isDirectory(path: Path): Observable { @@ -288,8 +300,11 @@ export class NodeJsSyncHost implements virtualFs.Host { } // Some hosts may not support stat. - stat(path: Path): Observable> | null { - return observableOf(fs.statSync(getSystemPath(path))); + stat(path: Path): Observable> { + return new Observable(obs => { + obs.next(fs.statSync(getSystemPath(path))); + obs.complete(); + }); } // Some hosts may not support watching. diff --git a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts index 129992c640..34db778167 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts @@ -62,7 +62,7 @@ describe('DryRunSink', () => { // Need to create this file on the filesystem, otherwise the commit phase will fail. const outputHost = new virtualFs.SimpleMemoryHost(); - outputHost.write(normalize('/hello'), virtualFs.stringToFileBuffer('')); + outputHost.write(normalize('/hello'), virtualFs.stringToFileBuffer('')).subscribe(); const sink = new DryRunSink(outputHost); sink.reporter.pipe(toArray()) From e5c9b7b315708d295091160a9e04c43bff68103f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 02:10:29 -0700 Subject: [PATCH 228/724] feat(@angular-devkit/build-webpack): use a Host for webpacks input file system --- .../build_webpack/src/browser/index.ts | 41 +++-- .../utils/webpack-file-system-host-adapter.ts | 155 ++++++++++++++++++ 2 files changed, 181 insertions(+), 15 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 47755bc847..7e0f56edef 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -12,10 +12,12 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, normalize, resolve } from '@angular-devkit/core'; +import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; -import { concat, concatMap } from 'rxjs/operators'; +import { concat as concatObservable } from 'rxjs/observable/concat'; +import { empty } from 'rxjs/observable/empty'; +import { ignoreElements, switchMap } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import * as webpack from 'webpack'; import { @@ -33,6 +35,7 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; +import { WebpackFileSystemHostAdapter } from '../utils/webpack-file-system-host-adapter'; const webpackMerge = require('webpack-merge'); @@ -128,12 +131,11 @@ export class BrowserBuilder implements Builder { const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); - // TODO: verify using of(null) to kickstart things is a pattern. - return of(null).pipe( - concatMap(() => options.deleteOutputPath + return concatObservable( + options.deleteOutputPath ? this._deleteOutputDir(root, normalize(options.outputPath)) - : of(null)), - concatMap(() => new Observable(obs => { + : empty(), + new Observable(obs => { // Ensure Build Optimizer is only used with AOT. if (options.buildOptimizer && !options.aot) { throw new Error('The `--build-optimizer` option cannot be used without `--aot`.'); @@ -150,6 +152,12 @@ export class BrowserBuilder implements Builder { return; } const webpackCompiler = webpack(webpackConfig); + + // TODO: fix webpack typings. + // tslint:disable-next-line:no-any + (webpackCompiler as any).inputFileSystem = new WebpackFileSystemHostAdapter( + this.context.host as virtualFs.Host, + ); const statsConfig = getWebpackStatsConfig(options.verbose); const callback: webpack.compiler.CompilerCallback = (err, stats) => { @@ -204,7 +212,7 @@ export class BrowserBuilder implements Builder { } throw err; } - })), + }), ); } @@ -277,18 +285,21 @@ export class BrowserBuilder implements Builder { return webpackMerge(webpackConfigs); } - private _deleteOutputDir(root: Path, outputPath: Path) { + private _deleteOutputDir(root: Path, outputPath: Path): Observable { const resolvedOutputPath = resolve(root, outputPath); if (resolvedOutputPath === root) { throw new Error('Output path MUST not be project root directory!'); } return this.context.host.exists(resolvedOutputPath).pipe( - concatMap(exists => exists - // TODO: remove this concat once host ops emit an event. - ? this.context.host.delete(resolvedOutputPath).pipe(concat(of(null))) - // ? of(null) - : of(null)), + switchMap(exists => { + if (exists) { + return this.context.host.delete(resolvedOutputPath); + } else { + return empty(); + } + }), + ignoreElements(), ); } } diff --git a/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts b/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts new file mode 100644 index 0000000000..d8368e231c --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts @@ -0,0 +1,155 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { FileDoesNotExistException, JsonObject, normalize, virtualFs } from '@angular-devkit/core'; +import { Callback, InputFileSystem } from '@ngtools/webpack/src/webpack'; +import { Stats } from 'fs'; +import { Observable } from 'rxjs/Observable'; +import { of } from 'rxjs/observable/of'; +import { map, mergeMap, switchMap } from 'rxjs/operators'; + + +export class WebpackFileSystemHostAdapter implements InputFileSystem { + protected _syncHost: virtualFs.SyncDelegateHost | null = null; + + constructor(protected _host: virtualFs.Host) {} + + private _doHostCall(o: Observable, callback: Callback) { + const token = Symbol(); + let value: T | typeof token = token; + let error = false; + + try { + o.subscribe({ + error(err) { + error = true; + callback(err); + }, + next(v) { + value = v; + }, + complete() { + if (value !== token) { + callback(null, value); + } else { + callback(new Error('Unknown error happened.')); + } + }, + }); + } catch (err) { + // In some occasions, the error handler above will be called, then an exception will be + // thrown (by design in observable constructors in RxJS 5). Don't call the callback + // twice. + if (!error) { + callback(err); + } + } + } + + stat(path: string, callback: Callback): void { + const p = normalize('/' + path); + const result = this._host.stat(p); + + if (result === null) { + const o = this._host.exists(p).pipe( + switchMap(exists => { + if (!exists) { + throw new FileDoesNotExistException(p); + } + + return this._host.isDirectory(p).pipe( + mergeMap(isDirectory => { + return (isDirectory ? of(0) : this._host.read(p).pipe( + map(content => content.byteLength), + )).pipe( + map(size => [isDirectory, size]), + ); + }), + ); + }), + map(([isDirectory, size]) => { + return { + isFile() { return !isDirectory; }, + isDirectory() { return isDirectory; }, + size, + atime: new Date(), + mtime: new Date(), + ctime: new Date(), + birthtime: new Date(), + }; + }), + ); + + this._doHostCall(o, callback); + } else { + this._doHostCall(result, callback); + } + } + + readdir(path: string, callback: Callback): void { + return this._doHostCall(this._host.list(normalize('/' + path)), callback); + } + + readFile(path: string, callback: Callback): void { + const o = this._host.read(normalize('/' + path)).pipe( + map(content => new Buffer(content)), + ); + + return this._doHostCall(o, callback); + } + + readJson(path: string, callback: Callback): void { + const o = this._host.read(normalize('/' + path)).pipe( + map(content => JSON.parse(virtualFs.fileBufferToString(content))), + ); + + return this._doHostCall(o, callback); + } + + readlink(path: string, callback: Callback): void { + const err: NodeJS.ErrnoException = new Error('Not a symlink.'); + err.code = 'EINVAL'; + callback(err); + } + + statSync(path: string): Stats { + if (!this._syncHost) { + this._syncHost = new virtualFs.SyncDelegateHost(this._host); + } + + const result = this._syncHost.stat(normalize('/' + path)); + if (result) { + return result; + } else { + return {} as Stats; + } + } + readdirSync(path: string): string[] { + if (!this._syncHost) { + this._syncHost = new virtualFs.SyncDelegateHost(this._host); + } + + return this._syncHost.list(normalize('/' + path)); + } + readFileSync(path: string): string { + if (!this._syncHost) { + this._syncHost = new virtualFs.SyncDelegateHost(this._host); + } + + return virtualFs.fileBufferToString(this._syncHost.read(normalize('/' + path))); + } + readJsonSync(path: string): string { + return JSON.parse(this.readFileSync(path)); + } + readlinkSync(path: string): string { + const err: NodeJS.ErrnoException = new Error('Not a symlink.'); + err.code = 'EINVAL'; + throw err; + } + + purge(_changes?: string[] | string): void {} +} From 461e63fd95e44b99e25d10fed67fb95d5efe276c Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 02:11:04 -0700 Subject: [PATCH 229/724] ci: untie tsconfig a bit, but tighten tslint to cover --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 957e53c2d2..fec41267a5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,8 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "noUnusedParameters": true, - "noUnusedLocals": true, + "noUnusedParameters": false, // The linter is used for these. + "noUnusedLocals": false, // The linter is used for these. "outDir": "./dist", "rootDir": ".", "skipDefaultLibCheck": true, From da95ebf0cf48495f4147de2cdbf820d1f279413e Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 15:38:42 -0700 Subject: [PATCH 230/724] feat(@ngtools/webpack): move the webpack plugin to devkit repo --- .monorepo.json | 7 + README.md | 6 + packages/ngtools/webpack/README.md | 57 + packages/ngtools/webpack/package.json | 36 + .../webpack/src/angular_compiler_plugin.ts | 1072 +++++++++++++++++ packages/ngtools/webpack/src/benchmark.ts | 16 + packages/ngtools/webpack/src/compiler_host.ts | 310 +++++ .../ngtools/webpack/src/entry_resolver.ts | 161 +++ .../webpack/src/extract_i18n_plugin.ts | 184 +++ .../ngtools/webpack/src/gather_diagnostics.ts | 83 ++ packages/ngtools/webpack/src/index.ts | 20 + packages/ngtools/webpack/src/lazy_routes.ts | 86 ++ packages/ngtools/webpack/src/loader.ts | 91 ++ packages/ngtools/webpack/src/ngtools_api.ts | 84 ++ packages/ngtools/webpack/src/paths-plugin.ts | 129 ++ packages/ngtools/webpack/src/refactor.ts | 117 ++ .../ngtools/webpack/src/resource_loader.ts | 132 ++ .../webpack/src/transformers/ast_helpers.ts | 91 ++ .../webpack/src/transformers/elide_imports.ts | 103 ++ .../transformers/export_lazy_module_map.ts | 83 ++ .../export_lazy_module_map_spec.ts | 76 ++ .../src/transformers/export_ngfactory.ts | 68 ++ .../src/transformers/export_ngfactory_spec.ts | 57 + .../ngtools/webpack/src/transformers/index.ts | 12 + .../webpack/src/transformers/insert_import.ts | 126 ++ .../webpack/src/transformers/interfaces.ts | 39 + .../src/transformers/make_transform.ts | 148 +++ .../multiple_transformers_spec.ts | 86 ++ .../src/transformers/register_locale_data.ts | 91 ++ .../transformers/register_locale_data_spec.ts | 70 ++ .../src/transformers/remove_decorators.ts | 86 ++ .../transformers/remove_decorators_spec.ts | 244 ++++ .../src/transformers/replace_bootstrap.ts | 97 ++ .../transformers/replace_bootstrap_spec.ts | 115 ++ .../src/transformers/replace_resources.ts | 153 +++ .../transformers/replace_resources_spec.ts | 118 ++ .../transformers/replace_server_bootstrap.ts | 135 +++ .../replace_server_bootstrap_spec.ts | 215 ++++ packages/ngtools/webpack/src/type_checker.ts | 142 +++ .../webpack/src/type_checker_bootstrap.js | 2 + .../webpack/src/type_checker_worker.ts | 53 + .../src/virtual_file_system_decorator.ts | 121 ++ packages/ngtools/webpack/src/webpack.ts | 61 + packages/ngtools/webpack/tsconfig.json | 9 + 44 files changed, 5192 insertions(+) create mode 100644 packages/ngtools/webpack/README.md create mode 100644 packages/ngtools/webpack/package.json create mode 100644 packages/ngtools/webpack/src/angular_compiler_plugin.ts create mode 100644 packages/ngtools/webpack/src/benchmark.ts create mode 100644 packages/ngtools/webpack/src/compiler_host.ts create mode 100644 packages/ngtools/webpack/src/entry_resolver.ts create mode 100644 packages/ngtools/webpack/src/extract_i18n_plugin.ts create mode 100644 packages/ngtools/webpack/src/gather_diagnostics.ts create mode 100644 packages/ngtools/webpack/src/index.ts create mode 100644 packages/ngtools/webpack/src/lazy_routes.ts create mode 100644 packages/ngtools/webpack/src/loader.ts create mode 100644 packages/ngtools/webpack/src/ngtools_api.ts create mode 100644 packages/ngtools/webpack/src/paths-plugin.ts create mode 100644 packages/ngtools/webpack/src/refactor.ts create mode 100644 packages/ngtools/webpack/src/resource_loader.ts create mode 100644 packages/ngtools/webpack/src/transformers/ast_helpers.ts create mode 100644 packages/ngtools/webpack/src/transformers/elide_imports.ts create mode 100644 packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts create mode 100644 packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/export_ngfactory.ts create mode 100644 packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/index.ts create mode 100644 packages/ngtools/webpack/src/transformers/insert_import.ts create mode 100644 packages/ngtools/webpack/src/transformers/interfaces.ts create mode 100644 packages/ngtools/webpack/src/transformers/make_transform.ts create mode 100644 packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/register_locale_data.ts create mode 100644 packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/remove_decorators.ts create mode 100644 packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/replace_bootstrap.ts create mode 100644 packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/replace_resources.ts create mode 100644 packages/ngtools/webpack/src/transformers/replace_resources_spec.ts create mode 100644 packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts create mode 100644 packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts create mode 100644 packages/ngtools/webpack/src/type_checker.ts create mode 100644 packages/ngtools/webpack/src/type_checker_bootstrap.js create mode 100644 packages/ngtools/webpack/src/type_checker_worker.ts create mode 100644 packages/ngtools/webpack/src/virtual_file_system_decorator.ts create mode 100644 packages/ngtools/webpack/src/webpack.ts create mode 100644 packages/ngtools/webpack/tsconfig.json diff --git a/.monorepo.json b/.monorepo.json index 5f89e377d6..8205a57927 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -132,6 +132,13 @@ "hash": "ebdb3ec1ec15ef5c91a7f46f93df6137", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, + "@ngtools/webpack": { + "name": "Webpack Angular Plugin", + "version": "6.0.0", + "section": "Misc", + "hash": "", + "snapshotRepo": "angular/ngtools-webpack-builds" + }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", diff --git a/README.md b/README.md index 13e16ef081..aaf19c4b1f 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,12 @@ This is a monorepo which contains many packages: **Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) **Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | +#### Misc + +| Project | Package | Version | Links | +|---|---|---|---| +**Webpack Angular Plugin** | [`@ngtools/webpack`](http://npmjs.com/packages/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](http://npmjs.com/packages/@ngtools/webpack) | + #### Schematics | Project | Package | Version | Links | diff --git a/packages/ngtools/webpack/README.md b/packages/ngtools/webpack/README.md new file mode 100644 index 0000000000..de62be1d00 --- /dev/null +++ b/packages/ngtools/webpack/README.md @@ -0,0 +1,57 @@ +# Angular Ahead-of-Time Webpack Plugin + +Webpack 4.0 plugin that AoT compiles your Angular components and modules. + +## Usage + +In your webpack config, add the following plugin and loader. + +Angular version 5 and up, use `AngularCompilerPlugin`: + +```typescript +import {AngularCompilerPlugin} from '@ngtools/webpack' + +exports = { /* ... */ + module: { + rules: [ + { + test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, + loader: '@ngtools/webpack' + } + ] + }, + + plugins: [ + new AngularCompilerPlugin({ + tsConfigPath: 'path/to/tsconfig.json', + entryModule: 'path/to/app.module#AppModule', + sourceMap: true + }) + ] +} +``` + +The loader works with webpack plugin to compile your TypeScript. It's important to include both, and to not include any other TypeScript compiler loader. + +## Options + +* `tsConfigPath`. The path to the `tsconfig.json` file. This is required. In your `tsconfig.json`, you can pass options to the Angular Compiler with `angularCompilerOptions`. +* `basePath`. Optional. The root to use by the compiler to resolve file paths. By default, use the `tsConfigPath` root. +* `entryModule`. Optional if specified in `angularCompilerOptions`. The path and classname of the main application module. This follows the format `path/to/file#ClassName`. +* `mainPath`. Optional if `entryModule` is specified. The `main.ts` file containing the bootstrap code. The plugin will use AST to determine the `entryModule`. +* `skipCodeGeneration`. Optional, defaults to false. Disable code generation and do not refactor the code to bootstrap. This replaces `templateUrl: "string"` with `template: require("string")` (and similar for styles) to allow for webpack to properly link the resources. +* `sourceMap`. Optional. Include sourcemaps. +* `compilerOptions`. Optional. Override options in `tsconfig.json`. + +## Features +The benefits and ability of using [`@ngtools/webpack`](https://www.npmjs.com/~ngtools) standalone from the Angular CLI as presented in [Stephen Fluin's Angular CLI talk](https://youtu.be/uBRK6cTr4Vk?t=6m45s) at Angular Connect 2016: + +* Compiles SCSS/LESS +* TypeScript transpilation +* Bundles JavaScript, CSS +* Asset optimization +* Virtual filesystem for assets + * For serving local assets and compile versions. +* Live-reload via websockets +* Code splitting + * Recognizing the use of `loadChildren` in the router, and bundling those modules separately so that any dependencies of those modules are not going to be loaded as part of your main bundle. These separate bundles will be pulled out of the critical path of your application, making your total application bundle much smaller and loading it much more performant. diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json new file mode 100644 index 0000000000..6e82ce38dc --- /dev/null +++ b/packages/ngtools/webpack/package.json @@ -0,0 +1,36 @@ +{ + "name": "@ngtools/webpack", + "version": "6.0.0-beta.6", + "description": "Webpack plugin that AoT compiles your Angular components and modules.", + "main": "./src/index.js", + "typings": "src/index.d.ts", + "license": "MIT", + "keywords": [ + "angular", + "webpack", + "plugin", + "aot" + ], + "repository": { + "type": "git", + "url": "https://github.com/angular/angular-cli.git" + }, + "author": "angular", + "bugs": { + "url": "https://github.com/angular/angular-cli/issues" + }, + "homepage": "https://github.com/angular/angular-cli/tree/master/packages/@ngtools/webpack", + "engines": { + "node": ">= 8.9.0", + "npm": ">= 5.5.1" + }, + "dependencies": { + "tree-kill": "^1.0.0", + "chalk": "~2.2.0", + "semver": "^5.3.0", + "webpack-sources": "^1.1.0" + }, + "peerDependencies": { + "webpack": "^4.0.0" + } +} diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts new file mode 100644 index 0000000000..00d1450390 --- /dev/null +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -0,0 +1,1072 @@ +// @ignoreDep typescript +import * as fs from 'fs'; +import { fork, ForkOptions, ChildProcess } from 'child_process'; +import * as path from 'path'; +import * as ts from 'typescript'; + +const ContextElementDependency = require('webpack/lib/dependencies/ContextElementDependency'); +const treeKill = require('tree-kill'); + +import { WebpackResourceLoader } from './resource_loader'; +import { WebpackCompilerHost } from './compiler_host'; +import { resolveWithPaths } from './paths-plugin'; +import { findLazyRoutes, LazyRouteMap } from './lazy_routes'; +import { + VirtualFileSystemDecorator, + VirtualWatchFileSystemDecorator +} from './virtual_file_system_decorator'; +import { resolveEntryModuleFromMain } from './entry_resolver'; +import { + replaceBootstrap, + replaceServerBootstrap, + exportNgFactory, + exportLazyModuleMap, + removeDecorators, + registerLocaleData, + findResources, + replaceResources, +} from './transformers'; +import { time, timeEnd } from './benchmark'; +import { InitMessage, UpdateMessage, AUTO_START_ARG } from './type_checker'; +import { gatherDiagnostics, hasErrors } from './gather_diagnostics'; +import { + CompilerCliIsSupported, + __NGTOOLS_PRIVATE_API_2, + VERSION, + DEFAULT_ERROR_CODE, + UNKNOWN_ERROR_CODE, + SOURCE, + Program, + CompilerOptions, + CompilerHost, + Diagnostic, + EmitFlags, + createProgram, + createCompilerHost, + formatDiagnostics, + readConfiguration, +} from './ngtools_api'; +import { collectDeepNodes } from './transformers/ast_helpers'; + + +/** + * Option Constants + */ +export interface AngularCompilerPluginOptions { + sourceMap?: boolean; + tsConfigPath: string; + basePath?: string; + entryModule?: string; + mainPath?: string; + skipCodeGeneration?: boolean; + hostReplacementPaths?: { [path: string]: string }; + forkTypeChecker?: boolean; + // TODO: remove singleFileIncludes for 2.0, this is just to support old projects that did not + // include 'polyfills.ts' in `tsconfig.spec.json'. + singleFileIncludes?: string[]; + i18nInFile?: string; + i18nInFormat?: string; + i18nOutFile?: string; + i18nOutFormat?: string; + locale?: string; + missingTranslation?: string; + platform?: PLATFORM; + nameLazyFiles?: boolean; + + // added to the list of lazy routes + additionalLazyModules?: { [module: string]: string }; + + // Use tsconfig to include path globs. + compilerOptions?: ts.CompilerOptions; +} + +export enum PLATFORM { + Browser, + Server +} + +export class AngularCompilerPlugin { + private _options: AngularCompilerPluginOptions; + + // TS compilation. + private _compilerOptions: CompilerOptions; + private _rootNames: string[]; + private _singleFileIncludes: string[] = []; + private _program: (ts.Program | Program); + private _compilerHost: WebpackCompilerHost & CompilerHost; + private _moduleResolutionCache: ts.ModuleResolutionCache; + private _resourceLoader: WebpackResourceLoader; + // Contains `moduleImportPath#exportName` => `fullModulePath`. + private _lazyRoutes: LazyRouteMap = Object.create(null); + private _tsConfigPath: string; + private _entryModule: string | null; + private _mainPath: string | undefined; + private _basePath: string; + private _transformers: ts.TransformerFactory[] = []; + private _platform: PLATFORM; + private _JitMode = false; + private _emitSkipped = true; + private _changedFileExtensions = new Set(['ts', 'html', 'css']); + + // Webpack plugin. + private _firstRun = true; + private _donePromise: Promise | null; + private _normalizedLocale: string | null; + private _warnings: (string | Error)[] = []; + private _errors: (string | Error)[] = []; + + // TypeChecker process. + private _forkTypeChecker = true; + private _typeCheckerProcess: ChildProcess; + private _forkedTypeCheckerInitialized = false; + + private get _ngCompilerSupportsNewApi() { + if (this._JitMode) { + return false; + } else { + return !!(this._program as Program).listLazyRoutes; + } + } + + constructor(options: AngularCompilerPluginOptions) { + CompilerCliIsSupported(); + this._options = Object.assign({}, options); + this._setupOptions(this._options); + } + + get options() { return this._options; } + get done() { return this._donePromise; } + get entryModule() { + if (!this._entryModule) { + return undefined; + } + const splitted = this._entryModule.split(/(#[a-zA-Z_]([\w]+))$/); + const path = splitted[0]; + const className = !!splitted[1] ? splitted[1].substring(1) : 'default'; + return { path, className }; + } + + static isSupported() { + return VERSION && parseInt(VERSION.major) >= 5; + } + + private _setupOptions(options: AngularCompilerPluginOptions) { + time('AngularCompilerPlugin._setupOptions'); + // Fill in the missing options. + if (!options.hasOwnProperty('tsConfigPath')) { + throw new Error('Must specify "tsConfigPath" in the configuration of @ngtools/webpack.'); + } + // TS represents paths internally with '/' and expects the tsconfig path to be in this format + this._tsConfigPath = options.tsConfigPath.replace(/\\/g, '/'); + + // Check the base path. + const maybeBasePath = path.resolve(process.cwd(), this._tsConfigPath); + let basePath = maybeBasePath; + if (fs.statSync(maybeBasePath).isFile()) { + basePath = path.dirname(basePath); + } + if (options.hasOwnProperty('basePath')) { + basePath = path.resolve(process.cwd(), options.basePath); + } + + if (options.singleFileIncludes !== undefined) { + this._singleFileIncludes.push(...options.singleFileIncludes); + } + + // Parse the tsconfig contents. + const config = readConfiguration(this._tsConfigPath); + if (config.errors && config.errors.length) { + throw new Error(formatDiagnostics(config.errors)); + } + + this._rootNames = config.rootNames.concat(...this._singleFileIncludes); + this._compilerOptions = { ...config.options, ...options.compilerOptions }; + this._basePath = config.options.basePath; + + // Overwrite outDir so we can find generated files next to their .ts origin in compilerHost. + this._compilerOptions.outDir = ''; + this._compilerOptions.suppressOutputPathCheck = true; + + // Default plugin sourceMap to compiler options setting. + if (!options.hasOwnProperty('sourceMap')) { + options.sourceMap = this._compilerOptions.sourceMap || false; + } + + // Force the right sourcemap options. + if (options.sourceMap) { + this._compilerOptions.sourceMap = true; + this._compilerOptions.inlineSources = true; + this._compilerOptions.inlineSourceMap = false; + this._compilerOptions.mapRoot = undefined; + // We will set the source to the full path of the file in the loader, so we don't + // need sourceRoot here. + this._compilerOptions.sourceRoot = undefined; + } else { + this._compilerOptions.sourceMap = false; + this._compilerOptions.sourceRoot = undefined; + this._compilerOptions.inlineSources = undefined; + this._compilerOptions.inlineSourceMap = undefined; + this._compilerOptions.mapRoot = undefined; + this._compilerOptions.sourceRoot = undefined; + } + + // We want to allow emitting with errors so that imports can be added + // to the webpack dependency tree and rebuilds triggered by file edits. + this._compilerOptions.noEmitOnError = false; + + // Set JIT (no code generation) or AOT mode. + if (options.skipCodeGeneration !== undefined) { + this._JitMode = options.skipCodeGeneration; + } + + // Process i18n options. + if (options.i18nInFile !== undefined) { + this._compilerOptions.i18nInFile = options.i18nInFile; + } + if (options.i18nInFormat !== undefined) { + this._compilerOptions.i18nInFormat = options.i18nInFormat; + } + if (options.i18nOutFile !== undefined) { + this._compilerOptions.i18nOutFile = options.i18nOutFile; + } + if (options.i18nOutFormat !== undefined) { + this._compilerOptions.i18nOutFormat = options.i18nOutFormat; + } + if (options.locale !== undefined) { + this._compilerOptions.i18nInLocale = options.locale; + this._compilerOptions.i18nOutLocale = options.locale; + this._normalizedLocale = this._validateLocale(options.locale); + } + if (options.missingTranslation !== undefined) { + this._compilerOptions.i18nInMissingTranslations = + options.missingTranslation as 'error' | 'warning' | 'ignore'; + } + + // Process forked type checker options. + if (options.forkTypeChecker !== undefined) { + this._forkTypeChecker = options.forkTypeChecker; + } + + // Create the webpack compiler host. + const webpackCompilerHost = new WebpackCompilerHost(this._compilerOptions, this._basePath); + webpackCompilerHost.enableCaching(); + + // Create and set a new WebpackResourceLoader. + this._resourceLoader = new WebpackResourceLoader(); + webpackCompilerHost.setResourceLoader(this._resourceLoader); + + // Use the WebpackCompilerHost with a resource loader to create an AngularCompilerHost. + this._compilerHost = createCompilerHost({ + options: this._compilerOptions, + tsHost: webpackCompilerHost + }) as CompilerHost & WebpackCompilerHost; + + // Override some files in the FileSystem with paths from the actual file system. + if (this._options.hostReplacementPaths) { + for (const filePath of Object.keys(this._options.hostReplacementPaths)) { + const replacementFilePath = this._options.hostReplacementPaths[filePath]; + const content = this._compilerHost.readFile(replacementFilePath); + this._compilerHost.writeFile(filePath, content, false); + } + } + + // Resolve mainPath if provided. + if (options.mainPath) { + this._mainPath = this._compilerHost.resolve(options.mainPath); + } + + // Use entryModule if available in options, otherwise resolve it from mainPath after program + // creation. + if (this._options.entryModule) { + this._entryModule = this._options.entryModule; + } else if (this._compilerOptions.entryModule) { + this._entryModule = path.resolve(this._basePath, + this._compilerOptions.entryModule as string); // temporary cast for type issue + } + + // Set platform. + this._platform = options.platform || PLATFORM.Browser; + + // Make transformers. + this._makeTransformers(); + + timeEnd('AngularCompilerPlugin._setupOptions'); + } + + private _getTsProgram() { + return this._JitMode ? this._program as ts.Program : (this._program as Program).getTsProgram(); + } + + private _getChangedTsFiles() { + return this._compilerHost.getChangedFilePaths() + .filter(k => k.endsWith('.ts') && !k.endsWith('.d.ts')) + .filter(k => this._compilerHost.fileExists(k)); + } + + updateChangedFileExtensions(extension: string) { + if (extension) { + this._changedFileExtensions.add(extension); + } + } + + private _getChangedCompilationFiles() { + return this._compilerHost.getChangedFilePaths() + .filter(k => { + for (const ext of this._changedFileExtensions) { + if (k.endsWith(ext)) { + return true; + } + } + return false; + }); + } + + private _createOrUpdateProgram() { + return Promise.resolve() + .then(() => { + // Get the root files from the ts config. + // When a new root name (like a lazy route) is added, it won't be available from + // following imports on the existing files, so we need to get the new list of root files. + const config = readConfiguration(this._tsConfigPath); + this._rootNames = config.rootNames.concat(...this._singleFileIncludes); + + // Update the forked type checker with all changed compilation files. + // This includes templates, that also need to be reloaded on the type checker. + if (this._forkTypeChecker && this._typeCheckerProcess && !this._firstRun) { + this._updateForkedTypeChecker(this._rootNames, this._getChangedCompilationFiles()); + } + + // Use an identity function as all our paths are absolute already. + this._moduleResolutionCache = ts.createModuleResolutionCache(this._basePath, x => x); + + if (this._JitMode) { + // Create the TypeScript program. + time('AngularCompilerPlugin._createOrUpdateProgram.ts.createProgram'); + this._program = ts.createProgram( + this._rootNames, + this._compilerOptions, + this._compilerHost, + this._program as ts.Program + ); + timeEnd('AngularCompilerPlugin._createOrUpdateProgram.ts.createProgram'); + + return Promise.resolve(); + } else { + time('AngularCompilerPlugin._createOrUpdateProgram.ng.createProgram'); + // Create the Angular program. + this._program = createProgram({ + rootNames: this._rootNames, + options: this._compilerOptions, + host: this._compilerHost, + oldProgram: this._program as Program + }); + timeEnd('AngularCompilerPlugin._createOrUpdateProgram.ng.createProgram'); + + time('AngularCompilerPlugin._createOrUpdateProgram.ng.loadNgStructureAsync'); + return this._program.loadNgStructureAsync() + .then(() => { + timeEnd('AngularCompilerPlugin._createOrUpdateProgram.ng.loadNgStructureAsync'); + }); + } + }) + .then(() => { + // If there's still no entryModule try to resolve from mainPath. + if (!this._entryModule && this._mainPath) { + time('AngularCompilerPlugin._make.resolveEntryModuleFromMain'); + this._entryModule = resolveEntryModuleFromMain( + this._mainPath, this._compilerHost, this._getTsProgram()); + timeEnd('AngularCompilerPlugin._make.resolveEntryModuleFromMain'); + } + }); + } + + private _getLazyRoutesFromNgtools() { + try { + time('AngularCompilerPlugin._getLazyRoutesFromNgtools'); + const result = __NGTOOLS_PRIVATE_API_2.listLazyRoutes({ + program: this._getTsProgram(), + host: this._compilerHost, + angularCompilerOptions: Object.assign({}, this._compilerOptions, { + // genDir seems to still be needed in @angular\compiler-cli\src\compiler_host.js:226. + genDir: '' + }), + entryModule: this._entryModule + }); + timeEnd('AngularCompilerPlugin._getLazyRoutesFromNgtools'); + return result; + } catch (err) { + // We silence the error that the @angular/router could not be found. In that case, there is + // basically no route supported by the app itself. + if (err.message.startsWith('Could not resolve module @angular/router')) { + return {}; + } else { + throw err; + } + } + } + + private _findLazyRoutesInAst(changedFilePaths: string[]): LazyRouteMap { + time('AngularCompilerPlugin._findLazyRoutesInAst'); + const result: LazyRouteMap = Object.create(null); + for (const filePath of changedFilePaths) { + const fileLazyRoutes = findLazyRoutes(filePath, this._compilerHost, undefined, + this._compilerOptions); + for (const routeKey of Object.keys(fileLazyRoutes)) { + const route = fileLazyRoutes[routeKey]; + result[routeKey] = route; + } + } + timeEnd('AngularCompilerPlugin._findLazyRoutesInAst'); + return result; + } + + private _listLazyRoutesFromProgram(): LazyRouteMap { + const ngProgram = this._program as Program; + if (!ngProgram.listLazyRoutes) { + throw new Error('_listLazyRoutesFromProgram was called with an old program.'); + } + + const lazyRoutes = ngProgram.listLazyRoutes(); + + return lazyRoutes.reduce( + (acc, curr) => { + const ref = curr.route; + if (ref in acc && acc[ref] !== curr.referencedModule.filePath) { + throw new Error( + + `Duplicated path in loadChildren detected: "${ref}" is used in 2 loadChildren, ` + + `but they point to different modules "(${acc[ref]} and ` + + `"${curr.referencedModule.filePath}"). Webpack cannot distinguish on context and ` + + 'would fail to load the proper one.' + ); + } + acc[ref] = curr.referencedModule.filePath; + return acc; + }, + {} as LazyRouteMap + ); + } + + // Process the lazy routes discovered, adding then to _lazyRoutes. + // TODO: find a way to remove lazy routes that don't exist anymore. + // This will require a registry of known references to a lazy route, removing it when no + // module references it anymore. + private _processLazyRoutes(discoveredLazyRoutes: { [route: string]: string; }) { + Object.keys(discoveredLazyRoutes) + .forEach(lazyRouteKey => { + const [lazyRouteModule, moduleName] = lazyRouteKey.split('#'); + + if (!lazyRouteModule) { + return; + } + + const lazyRouteTSFile = discoveredLazyRoutes[lazyRouteKey].replace(/\\/g, '/'); + let modulePath: string, moduleKey: string; + + if (this._JitMode) { + modulePath = lazyRouteTSFile; + moduleKey = `${lazyRouteModule}${moduleName ? '#' + moduleName : ''}`; + } else { + modulePath = lazyRouteTSFile.replace(/(\.d)?\.ts$/, `.ngfactory.js`); + const factoryModuleName = moduleName ? `#${moduleName}NgFactory` : ''; + moduleKey = `${lazyRouteModule}.ngfactory${factoryModuleName}`; + } + + if (moduleKey in this._lazyRoutes) { + if (this._lazyRoutes[moduleKey] !== modulePath) { + // Found a duplicate, this is an error. + this._warnings.push( + new Error(`Duplicated path in loadChildren detected during a rebuild. ` + + `We will take the latest version detected and override it to save rebuild time. ` + + `You should perform a full build to validate that your routes don't overlap.`) + ); + } + } else { + // Found a new route, add it to the map. + this._lazyRoutes[moduleKey] = modulePath; + } + }); + } + + private _createForkedTypeChecker() { + // Bootstrap type checker is using local CLI. + const g: any = global; + const typeCheckerFile: string = g['angularCliIsLocal'] + ? './type_checker_bootstrap.js' + : './type_checker_worker.js'; + + const debugArgRegex = /--inspect(?:-brk|-port)?|--debug(?:-brk|-port)/; + + const execArgv = process.execArgv.filter((arg) => { + // Remove debug args. + // Workaround for https://github.com/nodejs/node/issues/9435 + return !debugArgRegex.test(arg); + }); + // Signal the process to start listening for messages + // Solves https://github.com/angular/angular-cli/issues/9071 + const forkArgs = [AUTO_START_ARG]; + const forkOptions: ForkOptions = { execArgv }; + + this._typeCheckerProcess = fork( + path.resolve(__dirname, typeCheckerFile), + forkArgs, + forkOptions); + + // Handle child process exit. + this._typeCheckerProcess.once('exit', (_, signal) => { + this._typeCheckerProcess = undefined; + + // If process exited not because of SIGTERM (see _killForkedTypeChecker), than something + // went wrong and it should fallback to type checking on the main thread. + if (signal !== 'SIGTERM') { + this._forkTypeChecker = false; + const msg = 'AngularCompilerPlugin: Forked Type Checker exited unexpectedly. ' + + 'Falling back to type checking on main thread.'; + this._warnings.push(msg); + } + }); + } + + private _killForkedTypeChecker() { + if (this._typeCheckerProcess && this._typeCheckerProcess.pid) { + treeKill(this._typeCheckerProcess.pid, 'SIGTERM'); + this._typeCheckerProcess = undefined; + } + } + + private _updateForkedTypeChecker(rootNames: string[], changedCompilationFiles: string[]) { + if (!this._forkedTypeCheckerInitialized) { + this._typeCheckerProcess.send(new InitMessage(this._compilerOptions, this._basePath, + this._JitMode, this._rootNames)); + this._forkedTypeCheckerInitialized = true; + } + this._typeCheckerProcess.send(new UpdateMessage(rootNames, changedCompilationFiles)); + } + + // Registration hook for webpack plugin. + apply(compiler: any) { + // Decorate inputFileSystem to serve contents of CompilerHost. + // Use decorated inputFileSystem in watchFileSystem. + compiler.hooks.environment.tap('angular-compiler', () => { + compiler.inputFileSystem = new VirtualFileSystemDecorator( + compiler.inputFileSystem, this._compilerHost); + compiler.watchFileSystem = new VirtualWatchFileSystemDecorator(compiler.inputFileSystem); + }); + + // Add lazy modules to the context module for @angular/core + compiler.hooks.contextModuleFactory.tap('angular-compiler', (cmf: any) => { + const angularCorePackagePath = require.resolve('@angular/core/package.json'); + + // APFv6 does not have single FESM anymore. Instead of verifying if we're pointing to + // FESMs, we resolve the `@angular/core` path and verify that the path for the + // module starts with it. + + // This may be slower but it will be compatible with both APF5, 6 and potential future + // versions (until the dynamic import appears outside of core I suppose). + // We resolve any symbolic links in order to get the real path that would be used in webpack. + const angularCoreDirname = fs.realpathSync(path.dirname(angularCorePackagePath)); + + cmf.hooks.afterResolve.tapAsync('angular-compiler', + (result: any, callback: (err?: any, request?: any) => void) => { + if (!result) { + return callback(); + } + + // Alter only request from Angular. + if (!result.resource.startsWith(angularCoreDirname)) { + return callback(null, result); + } + + this.done!.then(() => { + // This folder does not exist, but we need to give webpack a resource. + // TODO: check if we can't just leave it as is (angularCoreModuleDir). + result.resource = path.join(this._basePath, '$$_lazy_route_resource'); + result.dependencies.forEach((d: any) => d.critical = false); + result.resolveDependencies = (_fs: any, resourceOrOptions: any, recursiveOrCallback: any, + _regExp: RegExp, cb: any) => { + const dependencies = Object.keys(this._lazyRoutes) + .map((key) => { + const modulePath = this._lazyRoutes[key]; + const importPath = key.split('#')[0]; + if (modulePath !== null) { + const name = importPath.replace(/(\.ngfactory)?\.(js|ts)$/, ''); + return new ContextElementDependency(modulePath, name); + } else { + return null; + } + }) + .filter(x => !!x); + if (typeof cb !== 'function' && typeof recursiveOrCallback === 'function') { + // Webpack 4 only has 3 parameters + cb = recursiveOrCallback; + if (this._options.nameLazyFiles) { + resourceOrOptions.chunkName = '[request]'; + } + } + cb(null, dependencies); + }; + return callback(null, result); + }, () => callback(null)) + .catch(err => callback(err)); + }); + }); + + // Create and destroy forked type checker on watch mode. + compiler.hooks.watchRun.tapAsync('angular-compiler', (_compiler: any, callback: any) => { + if (this._forkTypeChecker && !this._typeCheckerProcess) { + this._createForkedTypeChecker(); + } + callback(); + }); + compiler.hooks.watchClose.tap('angular-compiler', () => this._killForkedTypeChecker()); + + // Remake the plugin on each compilation. + compiler.hooks.make.tapAsync( + 'angular-compiler', + (compilation: any, cb: any) => this._make(compilation, cb), + ); + compiler.hooks.invalid.tap('angular-compiler', () => this._firstRun = false); + compiler.hooks.afterEmit.tapAsync('angular-compiler', (compilation: any, cb: any) => { + compilation._ngToolsWebpackPluginInstance = null; + cb(); + }); + compiler.hooks.done.tap('angular-compiler', () => { + this._donePromise = null; + }); + + compiler.hooks.afterResolvers.tap('angular-compiler', (compiler: any) => { + compiler.hooks.normalModuleFactory.tap('angular-compiler', (nmf: any) => { + // Virtual file system. + // TODO: consider if it's better to remove this plugin and instead make it wait on the + // VirtualFileSystemDecorator. + // Wait for the plugin to be done when requesting `.ts` files directly (entry points), or + // when the issuer is a `.ts` or `.ngfactory.js` file. + nmf.hooks.beforeResolve.tapAsync('angular-compiler', (request: any, callback: any) => { + if (this.done && (request.request.endsWith('.ts') + || (request.context.issuer && /\.ts|ngfactory\.js$/.test(request.context.issuer)))) { + this.done.then(() => callback(null, request), () => callback(null, request)); + } else { + callback(null, request); + } + }); + }); + }); + + compiler.hooks.normalModuleFactory.tap('angular-compiler', (nmf: any) => { + nmf.hooks.beforeResolve.tapAsync('angular-compiler', (request: any, callback: any) => { + resolveWithPaths( + request, + callback, + this._compilerOptions, + this._compilerHost, + this._moduleResolutionCache, + ); + }); + }); + } + + private _make(compilation: any, cb: (err?: any, request?: any) => void) { + time('AngularCompilerPlugin._make'); + this._emitSkipped = true; + if (compilation._ngToolsWebpackPluginInstance) { + return cb(new Error('An @ngtools/webpack plugin already exist for this compilation.')); + } + + // Set a private variable for this plugin instance. + compilation._ngToolsWebpackPluginInstance = this; + + // Update the resource loader with the new webpack compilation. + this._resourceLoader.update(compilation); + + this._donePromise = Promise.resolve() + .then(() => this._update()) + .then(() => { + this.pushCompilationErrors(compilation); + timeEnd('AngularCompilerPlugin._make'); + cb(); + }, (err: any) => { + compilation.errors.push(err); + this.pushCompilationErrors(compilation); + timeEnd('AngularCompilerPlugin._make'); + cb(); + }); + } + + private pushCompilationErrors(compilation: any) { + compilation.errors.push(...this._errors); + compilation.warnings.push(...this._warnings); + this._errors = []; + this._warnings = []; + } + + private _makeTransformers() { + + const isAppPath = (fileName: string) => + !fileName.endsWith('.ngfactory.ts') && !fileName.endsWith('.ngstyle.ts'); + const isMainPath = (fileName: string) => fileName === this._mainPath; + const getEntryModule = () => this.entryModule; + const getLazyRoutes = () => this._lazyRoutes; + const getTypeChecker = () => this._getTsProgram().getTypeChecker(); + + if (this._JitMode) { + // Replace resources in JIT. + this._transformers.push(replaceResources(isAppPath)); + } else { + // Remove unneeded angular decorators. + this._transformers.push(removeDecorators(isAppPath, getTypeChecker)); + } + + if (this._platform === PLATFORM.Browser) { + // If we have a locale, auto import the locale data file. + // This transform must go before replaceBootstrap because it looks for the entry module + // import, which will be replaced. + if (this._normalizedLocale) { + this._transformers.push(registerLocaleData(isAppPath, getEntryModule, + this._normalizedLocale)); + } + + if (!this._JitMode) { + // Replace bootstrap in browser AOT. + this._transformers.push(replaceBootstrap(isAppPath, getEntryModule, getTypeChecker)); + } + } else if (this._platform === PLATFORM.Server) { + this._transformers.push(exportLazyModuleMap(isMainPath, getLazyRoutes)); + if (!this._JitMode) { + this._transformers.push( + exportNgFactory(isMainPath, getEntryModule), + replaceServerBootstrap(isMainPath, getEntryModule, getTypeChecker)); + } + } + } + + private _update() { + time('AngularCompilerPlugin._update'); + // We only want to update on TS and template changes, but all kinds of files are on this + // list, like package.json and .ngsummary.json files. + let changedFiles = this._getChangedCompilationFiles(); + + // If nothing we care about changed and it isn't the first run, don't do anything. + if (changedFiles.length === 0 && !this._firstRun) { + return Promise.resolve(); + } + + return Promise.resolve() + // Make a new program and load the Angular structure. + .then(() => this._createOrUpdateProgram()) + .then(() => { + if (this.entryModule) { + // Try to find lazy routes if we have an entry module. + // We need to run the `listLazyRoutes` the first time because it also navigates libraries + // and other things that we might miss using the (faster) findLazyRoutesInAst. + // Lazy routes modules will be read with compilerHost and added to the changed files. + const changedTsFiles = this._getChangedTsFiles(); + if (this._ngCompilerSupportsNewApi) { + this._processLazyRoutes(this._listLazyRoutesFromProgram()); + } else if (this._firstRun) { + this._processLazyRoutes(this._getLazyRoutesFromNgtools()); + } else if (changedTsFiles.length > 0) { + this._processLazyRoutes(this._findLazyRoutesInAst(changedTsFiles)); + } + if (this._options.additionalLazyModules) { + this._processLazyRoutes(this._options.additionalLazyModules); + } + } + }) + .then(() => { + // Emit and report errors. + + // We now have the final list of changed TS files. + // Go through each changed file and add transforms as needed. + const sourceFiles = this._getChangedTsFiles() + .map((fileName) => this._getTsProgram().getSourceFile(fileName)) + // At this point we shouldn't need to filter out undefined files, because any ts file + // that changed should be emitted. + // But due to hostReplacementPaths there can be files (the environment files) + // that changed but aren't part of the compilation, specially on `ng test`. + // So we ignore missing source files files here. + // hostReplacementPaths needs to be fixed anyway to take care of the following issue. + // https://github.com/angular/angular-cli/issues/7305#issuecomment-332150230 + .filter((x) => !!x); + + // Emit files. + time('AngularCompilerPlugin._update._emit'); + const { emitResult, diagnostics } = this._emit(sourceFiles); + timeEnd('AngularCompilerPlugin._update._emit'); + + // Report diagnostics. + const errors = diagnostics + .filter((diag) => diag.category === ts.DiagnosticCategory.Error); + const warnings = diagnostics + .filter((diag) => diag.category === ts.DiagnosticCategory.Warning); + + if (errors.length > 0) { + const message = formatDiagnostics(errors); + this._errors.push(new Error(message)); + } + + if (warnings.length > 0) { + const message = formatDiagnostics(warnings); + this._warnings.push(message); + } + + this._emitSkipped = !emitResult || emitResult.emitSkipped; + + // Reset changed files on successful compilation. + if (!this._emitSkipped && this._errors.length === 0) { + this._compilerHost.resetChangedFileTracker(); + } + timeEnd('AngularCompilerPlugin._update'); + }); + } + + writeI18nOutFile() { + function _recursiveMkDir(p: string): Promise { + if (fs.existsSync(p)) { + return Promise.resolve(); + } else { + return _recursiveMkDir(path.dirname(p)) + .then(() => fs.mkdirSync(p)); + } + } + + // Write the extracted messages to disk. + const i18nOutFilePath = path.resolve(this._basePath, this._compilerOptions.i18nOutFile); + const i18nOutFileContent = this._compilerHost.readFile(i18nOutFilePath); + if (i18nOutFileContent) { + _recursiveMkDir(path.dirname(i18nOutFilePath)) + .then(() => fs.writeFileSync(i18nOutFilePath, i18nOutFileContent)); + } + } + + getCompiledFile(fileName: string) { + const outputFile = fileName.replace(/.ts$/, '.js'); + let outputText: string; + let sourceMap: string; + let errorDependencies: string[] = []; + + if (this._emitSkipped) { + if (this._compilerHost.fileExists(outputFile, false)) { + // If the compilation didn't emit files this time, try to return the cached files from the + // last compilation and let the compilation errors show what's wrong. + outputText = this._compilerHost.readFile(outputFile); + sourceMap = this._compilerHost.readFile(outputFile + '.map'); + } else { + // There's nothing we can serve. Return an empty string to prevent lenghty webpack errors, + // add the rebuild warning if it's not there yet. + // We also need to all changed files as dependencies of this file, so that all of them + // will be watched and trigger a rebuild next time. + outputText = ''; + errorDependencies = this._getChangedCompilationFiles() + // These paths are used by the loader so we must denormalize them. + .map((p) => this._compilerHost.denormalizePath(p)); + } + } else { + // Check if the TS input file and the JS output file exist. + if ((fileName.endsWith('.ts') && !this._compilerHost.fileExists(fileName, false)) + || !this._compilerHost.fileExists(outputFile, false)) { + let msg = `${fileName} is missing from the TypeScript compilation. ` + + `Please make sure it is in your tsconfig via the 'files' or 'include' property.`; + + if (/(\\|\/)node_modules(\\|\/)/.test(fileName)) { + msg += '\nThe missing file seems to be part of a third party library. ' + + 'TS files in published libraries are often a sign of a badly packaged library. ' + + 'Please open an issue in the library repository to alert its author and ask them ' + + 'to package the library using the Angular Package Format (https://goo.gl/jB3GVv).'; + } + + throw new Error(msg); + } + + outputText = this._compilerHost.readFile(outputFile); + sourceMap = this._compilerHost.readFile(outputFile + '.map'); + } + return { outputText, sourceMap, errorDependencies }; + } + + getDependencies(fileName: string): string[] { + const resolvedFileName = this._compilerHost.resolve(fileName); + const sourceFile = this._compilerHost.getSourceFile(resolvedFileName, ts.ScriptTarget.Latest); + if (!sourceFile) { + return []; + } + + const options = this._compilerOptions; + const host = this._compilerHost; + const cache = this._moduleResolutionCache; + + const esImports = collectDeepNodes(sourceFile, + ts.SyntaxKind.ImportDeclaration) + .map(decl => { + const moduleName = (decl.moduleSpecifier as ts.StringLiteral).text; + const resolved = ts.resolveModuleName(moduleName, resolvedFileName, options, host, cache); + + if (resolved.resolvedModule) { + return resolved.resolvedModule.resolvedFileName; + } else { + return null; + } + }) + .filter(x => x); + + const resourceImports = findResources(sourceFile) + .map((resourceReplacement) => resourceReplacement.resourcePaths) + .reduce((prev, curr) => prev.concat(curr), []) + .map((resourcePath) => path.resolve(path.dirname(resolvedFileName), resourcePath)); + + // These paths are meant to be used by the loader so we must denormalize them. + const uniqueDependencies = new Set([ + ...esImports, + ...resourceImports, + ...this.getResourceDependencies(resolvedFileName) + ].map((p) => this._compilerHost.denormalizePath(p))); + + return [...uniqueDependencies]; + } + + getResourceDependencies(fileName: string): string[] { + return this._resourceLoader.getResourceDependencies(fileName); + } + + // This code mostly comes from `performCompilation` in `@angular/compiler-cli`. + // It skips the program creation because we need to use `loadNgStructureAsync()`, + // and uses CustomTransformers. + private _emit(sourceFiles: ts.SourceFile[]) { + time('AngularCompilerPlugin._emit'); + const program = this._program; + const allDiagnostics: Array = []; + + let emitResult: ts.EmitResult | undefined; + try { + if (this._JitMode) { + const tsProgram = program as ts.Program; + + if (this._firstRun) { + // Check parameter diagnostics. + time('AngularCompilerPlugin._emit.ts.getOptionsDiagnostics'); + allDiagnostics.push(...tsProgram.getOptionsDiagnostics()); + timeEnd('AngularCompilerPlugin._emit.ts.getOptionsDiagnostics'); + } + + if (this._firstRun || !this._forkTypeChecker) { + allDiagnostics.push(...gatherDiagnostics(this._program, this._JitMode, + 'AngularCompilerPlugin._emit.ts')); + } + + if (!hasErrors(allDiagnostics)) { + sourceFiles.forEach((sf) => { + const timeLabel = `AngularCompilerPlugin._emit.ts+${sf.fileName}+.emit`; + time(timeLabel); + emitResult = tsProgram.emit(sf, undefined, undefined, undefined, + { before: this._transformers } + ); + allDiagnostics.push(...emitResult.diagnostics); + timeEnd(timeLabel); + }); + } + } else { + const angularProgram = program as Program; + + // Check Angular structural diagnostics. + time('AngularCompilerPlugin._emit.ng.getNgStructuralDiagnostics'); + allDiagnostics.push(...angularProgram.getNgStructuralDiagnostics()); + timeEnd('AngularCompilerPlugin._emit.ng.getNgStructuralDiagnostics'); + + if (this._firstRun) { + // Check TypeScript parameter diagnostics. + time('AngularCompilerPlugin._emit.ng.getTsOptionDiagnostics'); + allDiagnostics.push(...angularProgram.getTsOptionDiagnostics()); + timeEnd('AngularCompilerPlugin._emit.ng.getTsOptionDiagnostics'); + + // Check Angular parameter diagnostics. + time('AngularCompilerPlugin._emit.ng.getNgOptionDiagnostics'); + allDiagnostics.push(...angularProgram.getNgOptionDiagnostics()); + timeEnd('AngularCompilerPlugin._emit.ng.getNgOptionDiagnostics'); + } + + if (this._firstRun || !this._forkTypeChecker) { + allDiagnostics.push(...gatherDiagnostics(this._program, this._JitMode, + 'AngularCompilerPlugin._emit.ng')); + } + + if (!hasErrors(allDiagnostics)) { + time('AngularCompilerPlugin._emit.ng.emit'); + const extractI18n = !!this._compilerOptions.i18nOutFile; + const emitFlags = extractI18n ? EmitFlags.I18nBundle : EmitFlags.Default; + emitResult = angularProgram.emit({ + emitFlags, customTransformers: { + beforeTs: this._transformers + } + }); + allDiagnostics.push(...emitResult.diagnostics); + if (extractI18n) { + this.writeI18nOutFile(); + } + timeEnd('AngularCompilerPlugin._emit.ng.emit'); + } + } + } catch (e) { + time('AngularCompilerPlugin._emit.catch'); + // This function is available in the import below, but this way we avoid the dependency. + // import { isSyntaxError } from '@angular/compiler'; + function isSyntaxError(error: Error): boolean { + return (error as any)['ngSyntaxError']; + } + + let errMsg: string; + let code: number; + if (isSyntaxError(e)) { + // don't report the stack for syntax errors as they are well known errors. + errMsg = e.message; + code = DEFAULT_ERROR_CODE; + } else { + errMsg = e.stack; + // It is not a syntax error we might have a program with unknown state, discard it. + this._program = undefined; + code = UNKNOWN_ERROR_CODE; + } + allDiagnostics.push( + { category: ts.DiagnosticCategory.Error, messageText: errMsg, code, source: SOURCE }); + timeEnd('AngularCompilerPlugin._emit.catch'); + } + timeEnd('AngularCompilerPlugin._emit'); + return { program, emitResult, diagnostics: allDiagnostics }; + } + + private _validateLocale(locale: string): string | null { + // Get the path of the common module. + const commonPath = path.dirname(require.resolve('@angular/common/package.json')); + // Check if the locale file exists + if (!fs.existsSync(path.resolve(commonPath, 'locales', `${locale}.js`))) { + // Check for an alternative locale (if the locale id was badly formatted). + const locales = fs.readdirSync(path.resolve(commonPath, 'locales')) + .filter(file => file.endsWith('.js')) + .map(file => file.replace('.js', '')); + + let newLocale; + const normalizedLocale = locale.toLowerCase().replace(/_/g, '-'); + for (const l of locales) { + if (l.toLowerCase() === normalizedLocale) { + newLocale = l; + break; + } + } + + if (newLocale) { + locale = newLocale; + } else { + // Check for a parent locale + const parentLocale = normalizedLocale.split('-')[0]; + if (locales.indexOf(parentLocale) !== -1) { + locale = parentLocale; + } else { + this._warnings.push(`AngularCompilerPlugin: Unable to load the locale data file ` + + `"@angular/common/locales/${locale}", ` + + `please check that "${locale}" is a valid locale id. + If needed, you can use "registerLocaleData" manually.`); + return null; + } + } + } + + return locale; + } +} diff --git a/packages/ngtools/webpack/src/benchmark.ts b/packages/ngtools/webpack/src/benchmark.ts new file mode 100644 index 0000000000..58fc744306 --- /dev/null +++ b/packages/ngtools/webpack/src/benchmark.ts @@ -0,0 +1,16 @@ +// Internal benchmark reporting flag. +// Use with CLI --no-progress flag for best results. +// This should be false for commited code. +const _benchmark = false; + +export function time(label: string) { + if (_benchmark) { + console.time(label); + } +} + +export function timeEnd(label: string) { + if (_benchmark) { + console.timeEnd(label); + } +} diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts new file mode 100644 index 0000000000..b6ba80e959 --- /dev/null +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -0,0 +1,310 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; +import {basename, dirname, join, sep} from 'path'; +import * as fs from 'fs'; +import {WebpackResourceLoader} from './resource_loader'; + + +export interface OnErrorFn { + (message: string): void; +} + + +const dev = Math.floor(Math.random() * 10000); + + +export class VirtualStats implements fs.Stats { + protected _ctime = new Date(); + protected _mtime = new Date(); + protected _atime = new Date(); + protected _btime = new Date(); + protected _dev = dev; + protected _ino = Math.floor(Math.random() * 100000); + protected _mode = parseInt('777', 8); // RWX for everyone. + protected _uid = Number(process.env['UID']) || 0; + protected _gid = Number(process.env['GID']) || 0; + + constructor(protected _path: string) {} + + isFile() { return false; } + isDirectory() { return false; } + isBlockDevice() { return false; } + isCharacterDevice() { return false; } + isSymbolicLink() { return false; } + isFIFO() { return false; } + isSocket() { return false; } + + get dev() { return this._dev; } + get ino() { return this._ino; } + get mode() { return this._mode; } + get nlink() { return 1; } // Default to 1 hard link. + get uid() { return this._uid; } + get gid() { return this._gid; } + get rdev() { return 0; } + get size() { return 0; } + get blksize() { return 512; } + get blocks() { return Math.ceil(this.size / this.blksize); } + get atime() { return this._atime; } + get atimeMs() { return this._atime.getTime(); } + get mtime() { return this._mtime; } + get mtimeMs() { return this._mtime.getTime(); } + get ctime() { return this._ctime; } + get ctimeMs() { return this._ctime.getTime(); } + get birthtime() { return this._btime; } + get birthtimeMs() { return this._btime.getTime(); } +} + +export class VirtualDirStats extends VirtualStats { + constructor(_fileName: string) { + super(_fileName); + } + + isDirectory() { return true; } + + get size() { return 1024; } +} + +export class VirtualFileStats extends VirtualStats { + private _sourceFile: ts.SourceFile | null; + constructor(_fileName: string, private _content: string) { + super(_fileName); + } + + get content() { return this._content; } + set content(v: string) { + this._content = v; + this._mtime = new Date(); + this._sourceFile = null; + } + setSourceFile(sourceFile: ts.SourceFile) { + this._sourceFile = sourceFile; + } + getSourceFile(languageVersion: ts.ScriptTarget, setParentNodes: boolean) { + if (!this._sourceFile) { + this._sourceFile = ts.createSourceFile( + this._path, + this._content, + languageVersion, + setParentNodes); + } + + return this._sourceFile; + } + + isFile() { return true; } + + get size() { return this._content.length; } +} + + +export class WebpackCompilerHost implements ts.CompilerHost { + private _delegate: ts.CompilerHost; + private _files: {[path: string]: VirtualFileStats | null} = Object.create(null); + private _directories: {[path: string]: VirtualDirStats | null} = Object.create(null); + + private _changedFiles: {[path: string]: boolean} = Object.create(null); + private _changedDirs: {[path: string]: boolean} = Object.create(null); + + private _basePath: string; + private _setParentNodes: boolean; + + private _cache = false; + private _resourceLoader?: WebpackResourceLoader | undefined; + + constructor(private _options: ts.CompilerOptions, basePath: string) { + this._setParentNodes = true; + this._delegate = ts.createCompilerHost(this._options, this._setParentNodes); + this._basePath = this._normalizePath(basePath); + } + + private _normalizePath(path: string) { + return path.replace(/\\/g, '/'); + } + + denormalizePath(path: string) { + return path.replace(/\//g, sep); + } + + resolve(path: string) { + path = this._normalizePath(path); + if (path[0] == '.') { + return this._normalizePath(join(this.getCurrentDirectory(), path)); + } else if (path[0] == '/' || path.match(/^\w:\//)) { + return path; + } else { + return this._normalizePath(join(this._basePath, path)); + } + } + + private _setFileContent(fileName: string, content: string) { + this._files[fileName] = new VirtualFileStats(fileName, content); + + let p = dirname(fileName); + while (p && !this._directories[p]) { + this._directories[p] = new VirtualDirStats(p); + this._changedDirs[p] = true; + p = dirname(p); + } + + this._changedFiles[fileName] = true; + } + + get dirty() { + return Object.keys(this._changedFiles).length > 0; + } + + enableCaching() { + this._cache = true; + } + + resetChangedFileTracker() { + this._changedFiles = Object.create(null); + this._changedDirs = Object.create(null); + } + + getChangedFilePaths(): string[] { + return Object.keys(this._changedFiles); + } + + getNgFactoryPaths(): string[] { + return Object.keys(this._files) + .filter(fileName => fileName.endsWith('.ngfactory.js') || fileName.endsWith('.ngstyle.js')) + // These paths are used by the virtual file system decorator so we must denormalize them. + .map((path) => this.denormalizePath(path)); + } + + invalidate(fileName: string): void { + fileName = this.resolve(fileName); + if (fileName in this._files) { + this._files[fileName] = null; + } + this._changedFiles[fileName] = true; + } + + fileExists(fileName: string, delegate = true): boolean { + fileName = this.resolve(fileName); + return this._files[fileName] != null || (delegate && this._delegate.fileExists(fileName)); + } + + readFile(fileName: string): string { + fileName = this.resolve(fileName); + + const stats = this._files[fileName]; + if (stats == null) { + const result = this._delegate.readFile(fileName); + if (result !== undefined && this._cache) { + this._setFileContent(fileName, result); + return result; + } else { + return result; + } + } + return stats.content; + } + + // Does not delegate, use with `fileExists/directoryExists()`. + stat(path: string): VirtualStats { + path = this.resolve(path); + return this._files[path] || this._directories[path]; + } + + directoryExists(directoryName: string, delegate = true): boolean { + directoryName = this.resolve(directoryName); + return (this._directories[directoryName] != null) + || (delegate + && this._delegate.directoryExists != undefined + && this._delegate.directoryExists(directoryName)); + } + + getFiles(path: string): string[] { + path = this.resolve(path); + return Object.keys(this._files) + .filter(fileName => dirname(fileName) == path) + .map(path => basename(path)); + } + + getDirectories(path: string): string[] { + path = this.resolve(path); + const subdirs = Object.keys(this._directories) + .filter(fileName => dirname(fileName) == path) + .map(path => basename(path)); + + let delegated: string[]; + try { + delegated = this._delegate.getDirectories(path); + } catch (e) { + delegated = []; + } + return delegated.concat(subdirs); + } + + getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, _onError?: OnErrorFn) { + fileName = this.resolve(fileName); + + const stats = this._files[fileName]; + if (stats == null) { + const content = this.readFile(fileName); + + if (!this._cache) { + return ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes); + } else if (!this._files[fileName]) { + // If cache is turned on and the file exists, the readFile call will have populated stats. + // Empty stats at this point mean the file doesn't exist at and so we should return + // undefined. + return undefined; + } + } + + return this._files[fileName]!.getSourceFile(languageVersion, this._setParentNodes); + } + + getCancellationToken() { + return this._delegate.getCancellationToken!(); + } + + getDefaultLibFileName(options: ts.CompilerOptions) { + return this._delegate.getDefaultLibFileName(options); + } + + // This is due to typescript CompilerHost interface being weird on writeFile. This shuts down + // typings in WebStorm. + get writeFile() { + return (fileName: string, data: string, _writeByteOrderMark: boolean, + _onError?: (message: string) => void, _sourceFiles?: ts.SourceFile[]): void => { + + fileName = this.resolve(fileName); + this._setFileContent(fileName, data); + }; + } + + getCurrentDirectory(): string { + return this._basePath !== null ? this._basePath : this._delegate.getCurrentDirectory(); + } + + getCanonicalFileName(fileName: string): string { + fileName = this.resolve(fileName); + return this._delegate.getCanonicalFileName(fileName); + } + + useCaseSensitiveFileNames(): boolean { + return this._delegate.useCaseSensitiveFileNames(); + } + + getNewLine(): string { + return this._delegate.getNewLine(); + } + + setResourceLoader(resourceLoader: WebpackResourceLoader) { + this._resourceLoader = resourceLoader; + } + + readResource(fileName: string) { + if (this._resourceLoader) { + // These paths are meant to be used by the loader so we must denormalize them. + const denormalizedFileName = this.denormalizePath(fileName); + return this._resourceLoader.get(denormalizedFileName); + } else { + return this.readFile(fileName); + } + } +} diff --git a/packages/ngtools/webpack/src/entry_resolver.ts b/packages/ngtools/webpack/src/entry_resolver.ts new file mode 100644 index 0000000000..4d496154ff --- /dev/null +++ b/packages/ngtools/webpack/src/entry_resolver.ts @@ -0,0 +1,161 @@ +// @ignoreDep typescript +import * as fs from 'fs'; +import {join} from 'path'; +import * as ts from 'typescript'; + +import {TypeScriptFileRefactor} from './refactor'; + + +function _recursiveSymbolExportLookup(refactor: TypeScriptFileRefactor, + symbolName: string, + host: ts.CompilerHost, + program: ts.Program): string | null { + // Check this file. + const hasSymbol = refactor.findAstNodes(null, ts.SyntaxKind.ClassDeclaration) + .some((cd: ts.ClassDeclaration) => { + return cd.name != undefined && cd.name.text == symbolName; + }); + if (hasSymbol) { + return refactor.fileName; + } + + // We found the bootstrap variable, now we just need to get where it's imported. + const exports = refactor.findAstNodes(null, ts.SyntaxKind.ExportDeclaration) + .map(node => node as ts.ExportDeclaration); + + for (const decl of exports) { + if (!decl.moduleSpecifier || decl.moduleSpecifier.kind !== ts.SyntaxKind.StringLiteral) { + continue; + } + + const modulePath = (decl.moduleSpecifier as ts.StringLiteral).text; + const resolvedModule = ts.resolveModuleName( + modulePath, refactor.fileName, program.getCompilerOptions(), host); + if (!resolvedModule.resolvedModule || !resolvedModule.resolvedModule.resolvedFileName) { + return null; + } + + const module = resolvedModule.resolvedModule.resolvedFileName; + if (!decl.exportClause) { + const moduleRefactor = new TypeScriptFileRefactor(module, host, program); + const maybeModule = _recursiveSymbolExportLookup(moduleRefactor, symbolName, host, program); + if (maybeModule) { + return maybeModule; + } + continue; + } + + const binding = decl.exportClause as ts.NamedExports; + for (const specifier of binding.elements) { + if (specifier.name.text == symbolName) { + // If it's a directory, load its index and recursively lookup. + if (fs.statSync(module).isDirectory()) { + const indexModule = join(module, 'index.ts'); + if (fs.existsSync(indexModule)) { + const indexRefactor = new TypeScriptFileRefactor(indexModule, host, program); + const maybeModule = _recursiveSymbolExportLookup( + indexRefactor, symbolName, host, program); + if (maybeModule) { + return maybeModule; + } + } + } + + // Create the source and verify that the symbol is at least a class. + const source = new TypeScriptFileRefactor(module, host, program); + const hasSymbol = source.findAstNodes(null, ts.SyntaxKind.ClassDeclaration) + .some((cd: ts.ClassDeclaration) => { + return cd.name != undefined && cd.name.text == symbolName; + }); + + if (hasSymbol) { + return module; + } + } + } + } + + return null; +} + +function _symbolImportLookup(refactor: TypeScriptFileRefactor, + symbolName: string, + host: ts.CompilerHost, + program: ts.Program): string | null { + // We found the bootstrap variable, now we just need to get where it's imported. + const imports = refactor.findAstNodes(null, ts.SyntaxKind.ImportDeclaration) + .map(node => node as ts.ImportDeclaration); + + for (const decl of imports) { + if (!decl.importClause || !decl.moduleSpecifier) { + continue; + } + if (decl.moduleSpecifier.kind !== ts.SyntaxKind.StringLiteral) { + continue; + } + + const resolvedModule = ts.resolveModuleName( + (decl.moduleSpecifier as ts.StringLiteral).text, + refactor.fileName, program.getCompilerOptions(), host); + if (!resolvedModule.resolvedModule || !resolvedModule.resolvedModule.resolvedFileName) { + continue; + } + + const module = resolvedModule.resolvedModule.resolvedFileName; + if (decl.importClause.namedBindings + && decl.importClause.namedBindings.kind == ts.SyntaxKind.NamespaceImport) { + const binding = decl.importClause.namedBindings as ts.NamespaceImport; + if (binding.name.text == symbolName) { + // This is a default export. + return module; + } + } else if (decl.importClause.namedBindings + && decl.importClause.namedBindings.kind == ts.SyntaxKind.NamedImports) { + const binding = decl.importClause.namedBindings as ts.NamedImports; + for (const specifier of binding.elements) { + if (specifier.name.text == symbolName) { + // Create the source and recursively lookup the import. + const source = new TypeScriptFileRefactor(module, host, program); + const maybeModule = _recursiveSymbolExportLookup(source, symbolName, host, program); + if (maybeModule) { + return maybeModule; + } + } + } + } + } + return null; +} + + +export function resolveEntryModuleFromMain(mainPath: string, + host: ts.CompilerHost, + program: ts.Program): string | null { + const source = new TypeScriptFileRefactor(mainPath, host, program); + + const bootstrap = source.findAstNodes(source.sourceFile, ts.SyntaxKind.CallExpression, true) + .map(node => node as ts.CallExpression) + .filter(call => { + const access = call.expression as ts.PropertyAccessExpression; + return access.kind == ts.SyntaxKind.PropertyAccessExpression + && access.name.kind == ts.SyntaxKind.Identifier + && (access.name.text == 'bootstrapModule' + || access.name.text == 'bootstrapModuleFactory'); + }) + .map(node => node.arguments[0] as ts.Identifier) + .filter(node => node.kind == ts.SyntaxKind.Identifier); + + if (bootstrap.length != 1) { + return null; + } + const bootstrapSymbolName = bootstrap[0].text; + const module = _symbolImportLookup(source, bootstrapSymbolName, host, program); + if (module) { + return `${module.replace(/\.ts$/, '')}#${bootstrapSymbolName}`; + } + + // shrug... something bad happened and we couldn't find the import statement. + throw new Error('Tried to find bootstrap code, but could not. Specify either ' + + 'statically analyzable bootstrap code or pass in an entryModule ' + + 'to the plugins options.'); +} diff --git a/packages/ngtools/webpack/src/extract_i18n_plugin.ts b/packages/ngtools/webpack/src/extract_i18n_plugin.ts new file mode 100644 index 0000000000..8d70c553aa --- /dev/null +++ b/packages/ngtools/webpack/src/extract_i18n_plugin.ts @@ -0,0 +1,184 @@ +import * as ts from 'typescript'; +import * as path from 'path'; +import * as fs from 'fs'; + +import {__NGTOOLS_PRIVATE_API_2, VERSION} from './ngtools_api'; +import {Tapable} from './webpack'; +import {WebpackResourceLoader} from './resource_loader'; + +export interface ExtractI18nPluginOptions { + tsConfigPath: string; + basePath?: string; + genDir?: string; + i18nFormat?: string; + locale?: string; + outFile?: string; + exclude?: string[]; +} + +export class ExtractI18nPlugin implements Tapable { + private _resourceLoader: WebpackResourceLoader; + + private _tsConfigPath: string; + private _basePath: string; + private _rootFilePath: string[]; + private _compilerOptions: any = null; + private _angularCompilerOptions: any = null; + // private _compilerHost: WebpackCompilerHost; + private _compilerHost: ts.CompilerHost; + private _program: ts.Program; + + private _i18nFormat?: string; + private _locale?: string; + private _outFile?: string; + + constructor(options: ExtractI18nPluginOptions) { + this._setupOptions(options); + } + + private _setupOptions(options: ExtractI18nPluginOptions) { + if (!options.hasOwnProperty('tsConfigPath')) { + throw new Error('Must specify "tsConfigPath" in the configuration of @ngtools/webpack.'); + } + // TS represents paths internally with '/' and expects the tsconfig path to be in this format + this._tsConfigPath = options.tsConfigPath.replace(/\\/g, '/'); + + // Check the base path. + const maybeBasePath = path.resolve(process.cwd(), this._tsConfigPath); + let basePath = maybeBasePath; + if (fs.statSync(maybeBasePath).isFile()) { + basePath = path.dirname(basePath); + } + if (options.hasOwnProperty('basePath')) { + basePath = path.resolve(process.cwd(), options.basePath); + } + + let tsConfigJson: any = null; + try { + tsConfigJson = JSON.parse(fs.readFileSync(this._tsConfigPath, 'utf8')); + } catch (err) { + throw new Error(`An error happened while parsing ${this._tsConfigPath} JSON: ${err}.`); + } + const tsConfig = ts.parseJsonConfigFileContent( + tsConfigJson, ts.sys, basePath, undefined, this._tsConfigPath); + + let fileNames = tsConfig.fileNames; + if (options.hasOwnProperty('exclude')) { + let exclude: string[] = typeof options.exclude == 'string' + ? [options.exclude as string] : (options.exclude as string[]); + + exclude.forEach((pattern: string) => { + const basePathPattern = '(' + basePath.replace(/\\/g, '/') + .replace(/[\-\[\]\/{}()+?.\\^$|*]/g, '\\$&') + ')?'; + pattern = pattern + // Replace windows path separators with forward slashes. + .replace(/\\/g, '/') + // Escape characters that are used normally in regexes, except stars. + .replace(/[\-\[\]{}()+?.\\^$|]/g, '\\$&') + // Two stars replacement. + .replace(/\*\*/g, '(?:.*)') + // One star replacement. + .replace(/\*/g, '(?:[^/]*)') + // Escape characters from the basePath and make sure it's forward slashes. + .replace(/^/, basePathPattern); + + const re = new RegExp('^' + pattern + '$'); + fileNames = fileNames.filter(x => !x.replace(/\\/g, '/').match(re)); + }); + } else { + fileNames = fileNames.filter(fileName => !/\.spec\.ts$/.test(fileName)); + } + this._rootFilePath = fileNames; + + // By default messages will be generated in basePath + let genDir = basePath; + + if (options.hasOwnProperty('genDir')) { + genDir = path.resolve(process.cwd(), options.genDir); + } + + this._compilerOptions = tsConfig.options; + this._angularCompilerOptions = Object.assign( + // kept for compatibility with Angular this._make(compilation, cb) + ); + + compiler.hooks.afterEmit.tapAsync('extract-i8n', (compilation: any, cb: any) => { + compilation._ngToolsWebpackXi18nPluginInstance = null; + cb(); + }); + } + + private _make(compilation: any, cb: (err?: any, request?: any) => void) { + if (compilation._ngToolsWebpackXi18nPluginInstance) { + return cb(new Error('An @ngtools/webpack xi18n plugin already exist for ' + + 'this compilation.')); + } + if (!compilation._ngToolsWebpackPluginInstance) { + return cb(new Error('An @ngtools/webpack aot plugin does not exists ' + + 'for this compilation')); + } + + compilation._ngToolsWebpackXi18nPluginInstance = this; + + this._resourceLoader.update(compilation); + + Promise.resolve() + .then(() => { + return __NGTOOLS_PRIVATE_API_2.extractI18n({ + basePath: this._basePath, + compilerOptions: this._compilerOptions, + program: this._program, + host: this._compilerHost, + angularCompilerOptions: this._angularCompilerOptions, + i18nFormat: this._i18nFormat || '', + locale: this._locale, + outFile: this._outFile, + + readResource: (path: string) => this._resourceLoader.get(path) + }); + }) + .then(() => cb(), (err: any) => { + compilation.errors.push(err); + cb(err); + }); + + } +} diff --git a/packages/ngtools/webpack/src/gather_diagnostics.ts b/packages/ngtools/webpack/src/gather_diagnostics.ts new file mode 100644 index 0000000000..34515af4f2 --- /dev/null +++ b/packages/ngtools/webpack/src/gather_diagnostics.ts @@ -0,0 +1,83 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; + +import { time, timeEnd } from './benchmark'; +import { Program, Diagnostic, Diagnostics } from './ngtools_api'; + + +export class CancellationToken implements ts.CancellationToken { + private _isCancelled = false; + + requestCancellation() { + this._isCancelled = true; + } + + isCancellationRequested() { + return this._isCancelled; + } + + throwIfCancellationRequested() { + if (this.isCancellationRequested()) { + throw new ts.OperationCanceledException(); + } + } +} + +export function hasErrors(diags: Diagnostics) { + return diags.some(d => d.category === ts.DiagnosticCategory.Error); +} + +export function gatherDiagnostics( + program: ts.Program | Program, + jitMode: boolean, + benchmarkLabel: string, + cancellationToken?: CancellationToken, +): Diagnostics { + const allDiagnostics: Array = []; + let checkOtherDiagnostics = true; + + function checkDiagnostics(diags: Diagnostics | undefined) { + if (diags) { + allDiagnostics.push(...diags); + return !hasErrors(diags); + } + return true; + } + + if (jitMode) { + const tsProgram = program as ts.Program; + // Check syntactic diagnostics. + time(`${benchmarkLabel}.gatherDiagnostics.ts.getSyntacticDiagnostics`); + checkOtherDiagnostics = checkOtherDiagnostics && + checkDiagnostics(tsProgram.getSyntacticDiagnostics(undefined, cancellationToken)); + timeEnd(`${benchmarkLabel}.gatherDiagnostics.ts.getSyntacticDiagnostics`); + + // Check semantic diagnostics. + time(`${benchmarkLabel}.gatherDiagnostics.ts.getSemanticDiagnostics`); + checkOtherDiagnostics = checkOtherDiagnostics && + checkDiagnostics(tsProgram.getSemanticDiagnostics(undefined, cancellationToken)); + timeEnd(`${benchmarkLabel}.gatherDiagnostics.ts.getSemanticDiagnostics`); + } else { + const angularProgram = program as Program; + + // Check TypeScript syntactic diagnostics. + time(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSyntacticDiagnostics`); + checkOtherDiagnostics = checkOtherDiagnostics && + checkDiagnostics(angularProgram.getTsSyntacticDiagnostics(undefined, cancellationToken)); + timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSyntacticDiagnostics`); + + // Check TypeScript semantic and Angular structure diagnostics. + time(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSemanticDiagnostics`); + checkOtherDiagnostics = checkOtherDiagnostics && + checkDiagnostics(angularProgram.getTsSemanticDiagnostics(undefined, cancellationToken)); + timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSemanticDiagnostics`); + + // Check Angular semantic diagnostics + time(`${benchmarkLabel}.gatherDiagnostics.ng.getNgSemanticDiagnostics`); + checkOtherDiagnostics = checkOtherDiagnostics && + checkDiagnostics(angularProgram.getNgSemanticDiagnostics(undefined, cancellationToken)); + timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getNgSemanticDiagnostics`); + } + + return allDiagnostics; +} diff --git a/packages/ngtools/webpack/src/index.ts b/packages/ngtools/webpack/src/index.ts new file mode 100644 index 0000000000..90c84882b0 --- /dev/null +++ b/packages/ngtools/webpack/src/index.ts @@ -0,0 +1,20 @@ +// @ignoreDep typescript +import { gte } from 'semver'; + +// Test if typescript is available. This is a hack. We should be using peerDependencies instead +// but can't until we split global and local packages. +// See https://github.com/angular/angular-cli/issues/8107#issuecomment-338185872 +try { + const version = require('typescript').version; + if (!gte(version, '2.4.2')) { + throw new Error(); + } +} catch (e) { + throw new Error('Could not find local "typescript" package.' + + 'The "@ngtools/webpack" package requires a local "typescript@^2.4.2" package to be installed.' + + e); +} + +export * from './angular_compiler_plugin'; +export * from './extract_i18n_plugin'; +export { ngcLoader as default } from './loader'; diff --git a/packages/ngtools/webpack/src/lazy_routes.ts b/packages/ngtools/webpack/src/lazy_routes.ts new file mode 100644 index 0000000000..72a69c25b7 --- /dev/null +++ b/packages/ngtools/webpack/src/lazy_routes.ts @@ -0,0 +1,86 @@ +import {dirname, join} from 'path'; +import * as ts from 'typescript'; +import { findAstNodes, resolve } from './refactor'; + + +function _getContentOfKeyLiteral(_source: ts.SourceFile, node: ts.Node): string | null { + if (node.kind == ts.SyntaxKind.Identifier) { + return (node as ts.Identifier).text; + } else if (node.kind == ts.SyntaxKind.StringLiteral) { + return (node as ts.StringLiteral).text; + } else { + return null; + } +} + + +export interface LazyRouteMap { + [path: string]: string | null; +} + + +export function findLazyRoutes( + filePath: string, + host: ts.CompilerHost, + program?: ts.Program, + compilerOptions?: ts.CompilerOptions +): LazyRouteMap { + if (!compilerOptions && program) { + compilerOptions = program.getCompilerOptions(); + } + const fileName = resolve(filePath, host, compilerOptions).replace(/\\/g, '/'); + let sourceFile: ts.SourceFile; + if (program) { + sourceFile = program.getSourceFile(fileName); + } + if (!sourceFile) { + sourceFile = ts.createSourceFile( + fileName, + host.readFile(fileName), + ts.ScriptTarget.Latest, + true, + ); + } + if (!sourceFile) { + throw new Error(`Source file not found: '${fileName}'.`); + } + + return findAstNodes(null, sourceFile, ts.SyntaxKind.ObjectLiteralExpression, true) + // Get all their property assignments. + .map((node: ts.ObjectLiteralExpression) => { + return findAstNodes(node, sourceFile, ts.SyntaxKind.PropertyAssignment, false); + }) + // Take all `loadChildren` elements. + .reduce((acc: ts.PropertyAssignment[], props: ts.PropertyAssignment[]) => { + return acc.concat(props.filter(literal => { + return _getContentOfKeyLiteral(sourceFile, literal.name) == 'loadChildren'; + })); + }, []) + // Get only string values. + .filter((node: ts.PropertyAssignment) => node.initializer.kind == ts.SyntaxKind.StringLiteral) + // Get the string value. + .map((node: ts.PropertyAssignment) => (node.initializer as ts.StringLiteral).text) + // Map those to either [path, absoluteModulePath], or [path, null] if the module pointing to + // does not exist. + .map((routePath: string) => { + const moduleName = routePath.split('#')[0]; + const compOptions = program ? program.getCompilerOptions() : compilerOptions; + const resolvedModuleName: ts.ResolvedModuleWithFailedLookupLocations = moduleName[0] == '.' + ? ({ + resolvedModule: { resolvedFileName: join(dirname(filePath), moduleName) + '.ts' } + } as any) + : ts.resolveModuleName(moduleName, filePath, compOptions, host); + if (resolvedModuleName.resolvedModule + && resolvedModuleName.resolvedModule.resolvedFileName + && host.fileExists(resolvedModuleName.resolvedModule.resolvedFileName)) { + return [routePath, resolvedModuleName.resolvedModule.resolvedFileName]; + } else { + return [routePath, null]; + } + }) + // Reduce to the LazyRouteMap map. + .reduce((acc: LazyRouteMap, [routePath, resolvedModuleName]: [string, string | null]) => { + acc[routePath] = resolvedModuleName; + return acc; + }, {}); +} diff --git a/packages/ngtools/webpack/src/loader.ts b/packages/ngtools/webpack/src/loader.ts new file mode 100644 index 0000000000..7d25897504 --- /dev/null +++ b/packages/ngtools/webpack/src/loader.ts @@ -0,0 +1,91 @@ +import * as path from 'path'; +import { loader } from 'webpack'; +import { AngularCompilerPlugin } from './angular_compiler_plugin'; +import { time, timeEnd } from './benchmark'; + + +const sourceMappingUrlRe = /^\/\/# sourceMappingURL=[^\r\n]*/gm; + +export function ngcLoader(this: loader.LoaderContext) { + const cb = this.async(); + const sourceFileName: string = this.resourcePath; + const timeLabel = `ngcLoader+${sourceFileName}+`; + time(timeLabel); + + const plugin = this._compilation._ngToolsWebpackPluginInstance; + if (!plugin) { + throw new Error('The AngularCompilerPlugin was not found. ' + + 'The @ngtools/webpack loader requires the plugin.'); + } + + // We must verify that the plugin is an instance of the right class. + // Throw an error if it isn't, that often means multiple @ngtools/webpack installs. + if (!(plugin instanceof AngularCompilerPlugin)) { + throw new Error('Angular Compiler was detected but it was an instance of the wrong class.\n' + + 'This likely means you have several @ngtools/webpack packages installed. ' + + 'You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.' + ); + } + + time(timeLabel + '.ngcLoader.AngularCompilerPlugin'); + plugin.done + .then(() => { + timeEnd(timeLabel + '.ngcLoader.AngularCompilerPlugin'); + const result = plugin.getCompiledFile(sourceFileName); + + if (result.sourceMap) { + // Process sourcemaps for Webpack. + // Remove the sourceMappingURL. + result.outputText = result.outputText.replace(sourceMappingUrlRe, ''); + // Set the map source to use the full path of the file. + const sourceMap = JSON.parse(result.sourceMap); + sourceMap.sources = sourceMap.sources.map((fileName: string) => { + return path.join(path.dirname(sourceFileName), fileName); + }); + result.sourceMap = sourceMap; + } + + // Manually add the dependencies for TS files. + // Type only imports will be stripped out by compilation so we need to add them as + // as dependencies. + // Component resources files (html and css templates) also need to be added manually for + // AOT, so that this file is reloaded when they change. + if (sourceFileName.endsWith('.ts')) { + result.errorDependencies.forEach(dep => this.addDependency(dep)); + const dependencies = plugin.getDependencies(sourceFileName); + dependencies.forEach(dep => { + plugin.updateChangedFileExtensions(path.extname(dep)); + this.addDependency(dep); + }); + } + + // NgFactory files depend on the component template, but we can't know what that file + // is (if any). So we add all the dependencies that the original component file has + // to the factory as well, which includes html and css templates, and the component + // itself (for inline html/templates templates). + const ngFactoryRe = /\.ngfactory.js$/; + if (ngFactoryRe.test(sourceFileName)) { + const originalFile = sourceFileName.replace(ngFactoryRe, '.ts'); + this.addDependency(originalFile); + const origDependencies = plugin.getDependencies(originalFile); + origDependencies.forEach(dep => this.addDependency(dep)); + } + + // NgStyle files depend on the style file they represent. + // E.g. `some-style.less.shim.ngstyle.js` depends on `some-style.less`. + // Those files can in turn depend on others, so we have to add them all. + const ngStyleRe = /(?:\.shim)?\.ngstyle\.js$/; + if (ngStyleRe.test(sourceFileName)) { + const styleFile = sourceFileName.replace(ngStyleRe, ''); + const styleDependencies = plugin.getResourceDependencies(styleFile); + styleDependencies.forEach(dep => this.addDependency(dep)); + } + + timeEnd(timeLabel); + cb(null, result.outputText, result.sourceMap as any); + }) + .catch(err => { + timeEnd(timeLabel); + cb(err); + }); +} diff --git a/packages/ngtools/webpack/src/ngtools_api.ts b/packages/ngtools/webpack/src/ngtools_api.ts new file mode 100644 index 0000000000..b70e87ca63 --- /dev/null +++ b/packages/ngtools/webpack/src/ngtools_api.ts @@ -0,0 +1,84 @@ +// @ignoreDep @angular/compiler-cli +// @ignoreDep typescript +/** + * This is a copy of types in @compiler-cli/src/ngtools_api.d.ts file, + * together with safe imports for private apis for cases where @angular/compiler-cli isn't + * available or is below version 5. + */ +import * as path from 'path'; +import * as ts from 'typescript'; +import * as ngc from '@angular/compiler-cli'; +import * as ngtools from '@angular/compiler-cli/ngtools2'; + +export const DEFAULT_ERROR_CODE = 100; +export const UNKNOWN_ERROR_CODE = 500; +export const SOURCE = 'angular' as 'angular'; + +export type CompilerOptions = ngc.CompilerOptions; +export type CompilerHost = ngtools.CompilerHost; +export type Program = ngtools.Program; +export type Diagnostic = ngtools.Diagnostic; +export type Diagnostics = ReadonlyArray; + +// Manually check for Compiler CLI availability and supported version. +// This is needed because @ngtools/webpack does not depend directly on @angular/compiler-cli, since +// it is installed as part of global Angular CLI installs and compiler-cli is not of its +// dependencies. +export function CompilerCliIsSupported() { + let version; + + // Check that Angular is available. + try { + version = (require('@angular/compiler-cli') as typeof ngc).VERSION; + } catch (e) { + throw new Error('The "@angular/compiler-cli" package was not properly installed. Error: ' + e); + } + + // Check that Angular is also not part of this module's node_modules (it should be the project's). + const compilerCliPath = require.resolve('@angular/compiler-cli'); + if (compilerCliPath.startsWith(path.dirname(__dirname))) { + throw new Error('The @ngtools/webpack plugin now relies on the project @angular/compiler-cli. ' + + 'Please clean your node_modules and reinstall.'); + } + + // Throw if we're less than 5.x + if (Number(version.major) < 5) { + throw new Error('Version of @angular/compiler-cli needs to be 5.0.0 or greater. ' + + `Current version is "${version.full}".`); + } +} + +// These imports do not exist on a global install for Angular CLI, so we cannot use a static ES6 +// import. +let compilerCli: typeof ngc; +try { + compilerCli = require('@angular/compiler-cli'); +} catch { + // Don't throw an error if the private API does not exist. + // Instead, the `CompilerCliIsSupported` method should return throw and indicate the + // plugin cannot be used. +} + +export const VERSION: typeof ngc.VERSION = compilerCli && compilerCli.VERSION; +export const __NGTOOLS_PRIVATE_API_2: typeof ngc.__NGTOOLS_PRIVATE_API_2 = + compilerCli && compilerCli.__NGTOOLS_PRIVATE_API_2; +export const readConfiguration: typeof ngc.readConfiguration = + compilerCli && compilerCli.readConfiguration; + +// These imports do not exist on Angular versions lower than 5, so we cannot use a static ES6 +// import. +let ngtools2: typeof ngtools; +try { + ngtools2 = require('@angular/compiler-cli/ngtools2'); +} catch { + // Don't throw an error if the private API does not exist. + // Instead, the `AngularCompilerPlugin.isSupported` method should return false and indicate the + // plugin cannot be used. +} + +export const createProgram: typeof ngtools.createProgram = ngtools2 && ngtools2.createProgram; +export const createCompilerHost: typeof ngtools.createCompilerHost = + ngtools2 && ngtools2.createCompilerHost; +export const formatDiagnostics: typeof ngtools.formatDiagnostics = + ngtools2 && ngtools2.formatDiagnostics; +export const EmitFlags: typeof ngtools.EmitFlags = ngtools2 && ngtools2.EmitFlags; diff --git a/packages/ngtools/webpack/src/paths-plugin.ts b/packages/ngtools/webpack/src/paths-plugin.ts new file mode 100644 index 0000000000..0d2e4d5ecb --- /dev/null +++ b/packages/ngtools/webpack/src/paths-plugin.ts @@ -0,0 +1,129 @@ +// @ignoreDep typescript +import * as path from 'path'; +import * as ts from 'typescript'; +import { + Callback, + NormalModuleFactoryRequest, +} from './webpack'; + + +export function resolveWithPaths( + request: NormalModuleFactoryRequest, + callback: Callback, + compilerOptions: ts.CompilerOptions, + host: ts.CompilerHost, + cache?: ts.ModuleResolutionCache, +) { + if (!request || !request.request || !compilerOptions.paths) { + callback(null, request); + return; + } + + // Only work on Javascript/TypeScript issuers. + if (!request.contextInfo.issuer || !request.contextInfo.issuer.match(/\.[jt]s$/)) { + callback(null, request); + return; + } + + const originalRequest = request.request.trim(); + + // Relative requests are not mapped + if (originalRequest.startsWith('.') || originalRequest.startsWith('/')) { + callback(null, request); + return; + } + + // check if any path mapping rules are relevant + const pathMapOptions = []; + for (const pattern in compilerOptions.paths) { + // can only contain zero or one + const starIndex = pattern.indexOf('*'); + if (starIndex === -1) { + if (pattern === originalRequest) { + pathMapOptions.push({ + partial: '', + potentials: compilerOptions.paths[pattern] + }); + } + } else if (starIndex === 0 && pattern.length === 1) { + pathMapOptions.push({ + partial: originalRequest, + potentials: compilerOptions.paths[pattern], + }); + } else if (starIndex === pattern.length - 1) { + if (originalRequest.startsWith(pattern.slice(0, -1))) { + pathMapOptions.push({ + partial: originalRequest.slice(pattern.length - 1), + potentials: compilerOptions.paths[pattern] + }); + } + } else { + const [prefix, suffix] = pattern.split('*'); + if (originalRequest.startsWith(prefix) && originalRequest.endsWith(suffix)) { + pathMapOptions.push({ + partial: originalRequest.slice(prefix.length).slice(0, -suffix.length), + potentials: compilerOptions.paths[pattern] + }); + } + } + } + + if (pathMapOptions.length === 0) { + callback(null, request); + return; + } + + if (pathMapOptions.length === 1 && pathMapOptions[0].potentials.length === 1) { + const onlyPotential = pathMapOptions[0].potentials[0]; + let replacement; + const starIndex = onlyPotential.indexOf('*'); + if (starIndex === -1) { + replacement = onlyPotential; + } else if (starIndex === onlyPotential.length - 1) { + replacement = onlyPotential.slice(0, -1) + pathMapOptions[0].partial; + } else { + const [prefix, suffix] = onlyPotential.split('*'); + replacement = prefix + pathMapOptions[0].partial + suffix; + } + + request.request = path.resolve(compilerOptions.baseUrl, replacement); + callback(null, request); + return; + } + + const moduleResolver = ts.resolveModuleName( + originalRequest, + request.contextInfo.issuer, + compilerOptions, + host, + cache + ); + + const moduleFilePath = moduleResolver.resolvedModule + && moduleResolver.resolvedModule.resolvedFileName; + + // If there is no result, let webpack try to resolve + if (!moduleFilePath) { + callback(null, request); + return; + } + + // If TypeScript gives us a `.d.ts`, it is probably a node module + if (moduleFilePath.endsWith('.d.ts')) { + // If in a package, let webpack resolve the package + const packageRootPath = path.join(path.dirname(moduleFilePath), 'package.json'); + if (!host.fileExists(packageRootPath)) { + // Otherwise, if there is a file with a .js extension use that + const jsFilePath = moduleFilePath.slice(0, -5) + '.js'; + if (host.fileExists(jsFilePath)) { + request.request = jsFilePath; + } + } + + callback(null, request); + return; + } + + request.request = moduleFilePath; + callback(null, request); +} diff --git a/packages/ngtools/webpack/src/refactor.ts b/packages/ngtools/webpack/src/refactor.ts new file mode 100644 index 0000000000..b9df7f4987 --- /dev/null +++ b/packages/ngtools/webpack/src/refactor.ts @@ -0,0 +1,117 @@ +// @ignoreDep typescript +import * as path from 'path'; +import * as ts from 'typescript'; + + +/** + * Find all nodes from the AST in the subtree of node of SyntaxKind kind. + * @param node The root node to check, or null if the whole tree should be searched. + * @param sourceFile The source file where the node is. + * @param kind The kind of nodes to find. + * @param recursive Whether to go in matched nodes to keep matching. + * @param max The maximum number of items to return. + * @return all nodes of kind, or [] if none is found + */ +// TODO: replace this with collectDeepNodes and add limits to collectDeepNodes +export function findAstNodes( + node: ts.Node | null, + sourceFile: ts.SourceFile, + kind: ts.SyntaxKind, + recursive = false, + max = Infinity +): T[] { + // TODO: refactor operations that only need `refactor.findAstNodes()` to use this instead. + if (max == 0) { + return []; + } + if (!node) { + node = sourceFile; + } + + let arr: T[] = []; + if (node.kind === kind) { + // If we're not recursively looking for children, stop here. + if (!recursive) { + return [node as T]; + } + + arr.push(node as T); + max--; + } + + if (max > 0) { + for (const child of node.getChildren(sourceFile)) { + findAstNodes(child, sourceFile, kind, recursive, max) + .forEach((node: ts.Node) => { + if (max > 0) { + arr.push(node as T); + } + max--; + }); + + if (max <= 0) { + break; + } + } + } + return arr; +} + +export function resolve( + filePath: string, + _host: ts.CompilerHost, + compilerOptions: ts.CompilerOptions +): string { + if (path.isAbsolute(filePath)) { + return filePath; + } + const basePath = compilerOptions.baseUrl || compilerOptions.rootDir; + if (!basePath) { + throw new Error(`Trying to resolve '${filePath}' without a basePath.`); + } + return path.join(basePath, filePath); +} + + +export class TypeScriptFileRefactor { + private _fileName: string; + private _sourceFile: ts.SourceFile; + + get fileName() { return this._fileName; } + get sourceFile() { return this._sourceFile; } + + constructor(fileName: string, + _host: ts.CompilerHost, + _program?: ts.Program, + source?: string | null) { + fileName = resolve(fileName, _host, _program!.getCompilerOptions()).replace(/\\/g, '/'); + this._fileName = fileName; + if (_program) { + if (source) { + this._sourceFile = ts.createSourceFile(fileName, source, ts.ScriptTarget.Latest, true); + } else { + this._sourceFile = _program.getSourceFile(fileName); + } + } + if (!this._sourceFile) { + this._sourceFile = ts.createSourceFile(fileName, source || _host.readFile(fileName), + ts.ScriptTarget.Latest, true); + } + } + + /** + * Find all nodes from the AST in the subtree of node of SyntaxKind kind. + * @param node The root node to check, or null if the whole tree should be searched. + * @param kind The kind of nodes to find. + * @param recursive Whether to go in matched nodes to keep matching. + * @param max The maximum number of items to return. + * @return all nodes of kind, or [] if none is found + */ + findAstNodes(node: ts.Node | null, + kind: ts.SyntaxKind, + recursive = false, + max = Infinity): ts.Node[] { + return findAstNodes(node, this._sourceFile, kind, recursive, max); + } + +} diff --git a/packages/ngtools/webpack/src/resource_loader.ts b/packages/ngtools/webpack/src/resource_loader.ts new file mode 100644 index 0000000000..bcc2ddc755 --- /dev/null +++ b/packages/ngtools/webpack/src/resource_loader.ts @@ -0,0 +1,132 @@ +import * as vm from 'vm'; +import * as path from 'path'; +import { RawSource } from 'webpack-sources'; + +const NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin'); +const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin'); +const LoaderTargetPlugin = require('webpack/lib/LoaderTargetPlugin'); +const SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin'); + + +interface CompilationOutput { + outputName: string; + source: string; +} + +export class WebpackResourceLoader { + private _parentCompilation: any; + private _context: string; + private _resourceDependencies = new Map(); + private _cachedResources = new Map(); + + constructor() {} + + update(parentCompilation: any) { + this._parentCompilation = parentCompilation; + this._context = parentCompilation.context; + } + + getResourceDependencies(filePath: string) { + return this._resourceDependencies.get(filePath) || []; + } + + private _compile(filePath: string): Promise { + + if (!this._parentCompilation) { + throw new Error('WebpackResourceLoader cannot be used without parentCompilation'); + } + + // Simple sanity check. + if (filePath.match(/\.[jt]s$/)) { + return Promise.reject('Cannot use a JavaScript or TypeScript file for styleUrl.'); + } + + const outputOptions = { filename: filePath }; + const relativePath = path.relative(this._context || '', filePath); + const childCompiler = this._parentCompilation.createChildCompiler(relativePath, outputOptions); + childCompiler.context = this._context; + + new NodeTemplatePlugin(outputOptions).apply(childCompiler); + new NodeTargetPlugin().apply(childCompiler); + new SingleEntryPlugin(this._context, filePath).apply(childCompiler); + new LoaderTargetPlugin('node').apply(childCompiler); + + childCompiler.hooks.thisCompilation.tap('ngtools-webpack', (compilation: any) => { + compilation.hooks.additionalAssets.tapAsync('ngtools-webpack', + (callback: (err?: Error) => void) => { + if (this._cachedResources.has(compilation.fullHash)) { + callback(); + return; + } + + const asset = compilation.assets[filePath]; + if (asset) { + this._evaluate({ outputName: filePath, source: asset.source() }) + .then(output => { + compilation.assets[filePath] = new RawSource(output); + callback(); + }) + .catch(err => callback(err)); + } else { + callback(); + } + }); + }); + + // Compile and return a promise + return new Promise((resolve, reject) => { + childCompiler.compile((err: Error, childCompilation: any) => { + // Resolve / reject the promise + if (childCompilation && childCompilation.errors && childCompilation.errors.length) { + const errorDetails = childCompilation.errors.map(function (error: any) { + return error.message + (error.error ? ':\n' + error.error : ''); + }).join('\n'); + reject(new Error('Child compilation failed:\n' + errorDetails)); + } else if (err) { + reject(err); + } else { + Object.keys(childCompilation.assets).forEach(assetName => { + if (assetName !== filePath && this._parentCompilation.assets[assetName] == undefined) { + this._parentCompilation.assets[assetName] = childCompilation.assets[assetName]; + } + }); + + // Save the dependencies for this resource. + this._resourceDependencies.set(filePath, childCompilation.fileDependencies); + + const compilationHash = childCompilation.fullHash; + if (this._cachedResources.has(compilationHash)) { + resolve({ + outputName: filePath, + source: this._cachedResources.get(compilationHash), + }); + } else { + const source = childCompilation.assets[filePath].source(); + this._cachedResources.set(compilationHash, source); + resolve({ outputName: filePath, source }); + } + } + }); + }); + } + + private _evaluate({ outputName, source }: CompilationOutput): Promise { + try { + // Evaluate code + const evaluatedSource = vm.runInNewContext(source, undefined, { filename: outputName }); + + if (typeof evaluatedSource == 'string') { + return Promise.resolve(evaluatedSource); + } + + return Promise.reject('The loader "' + outputName + '" didn\'t return a string.'); + } catch (e) { + return Promise.reject(e); + } + } + + get(filePath: string): Promise { + return this._compile(filePath) + .then((result: CompilationOutput) => result.source); + } +} diff --git a/packages/ngtools/webpack/src/transformers/ast_helpers.ts b/packages/ngtools/webpack/src/transformers/ast_helpers.ts new file mode 100644 index 0000000000..a55cd835ac --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/ast_helpers.ts @@ -0,0 +1,91 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; +import { WebpackCompilerHost } from '../compiler_host'; + + +// Find all nodes from the AST in the subtree of node of SyntaxKind kind. +export function collectDeepNodes(node: ts.Node, kind: ts.SyntaxKind): T[] { + const nodes: T[] = []; + const helper = (child: ts.Node) => { + if (child.kind === kind) { + nodes.push(child as T); + } + ts.forEachChild(child, helper); + }; + ts.forEachChild(node, helper); + + return nodes; +} + +export function getFirstNode(sourceFile: ts.SourceFile): ts.Node | null { + if (sourceFile.statements.length > 0) { + return sourceFile.statements[0] || null; + } + return null; +} + +export function getLastNode(sourceFile: ts.SourceFile): ts.Node | null { + if (sourceFile.statements.length > 0) { + return sourceFile.statements[sourceFile.statements.length - 1] || null; + } + return null; +} + + +// Test transform helpers. +const basePath = '/project/src/'; +const fileName = basePath + 'test-file.ts'; + +export function createTypescriptContext(content: string) { + // Set compiler options. + const compilerOptions: ts.CompilerOptions = { + noEmitOnError: false, + allowJs: true, + newLine: ts.NewLineKind.LineFeed, + target: ts.ScriptTarget.ESNext, + skipLibCheck: true, + sourceMap: false, + importHelpers: true + }; + + // Create compiler host. + const compilerHost = new WebpackCompilerHost(compilerOptions, basePath); + + // Add a dummy file to host content. + compilerHost.writeFile(fileName, content, false); + + // Create the TypeScript program. + const program = ts.createProgram([fileName], compilerOptions, compilerHost); + return { compilerHost, program }; +} + +export function transformTypescript( + content: string | undefined, + transformers: ts.TransformerFactory[], + program?: ts.Program, + compilerHost?: WebpackCompilerHost +) { + + // Use given context or create a new one. + if (content !== undefined) { + const typescriptContext = createTypescriptContext(content); + program = typescriptContext.program; + compilerHost = typescriptContext.compilerHost; + } else if (!program || !compilerHost) { + throw new Error('transformTypescript needs either `content` or a `program` and `compilerHost'); + } + + // Emit. + const { emitSkipped, diagnostics } = program.emit( + undefined, undefined, undefined, undefined, { before: transformers } + ); + + // Log diagnostics if emit wasn't successfull. + if (emitSkipped) { + console.log(diagnostics); + return null; + } + + // Return the transpiled js. + return compilerHost.readFile(fileName.replace(/\.ts$/, '.js')); +} diff --git a/packages/ngtools/webpack/src/transformers/elide_imports.ts b/packages/ngtools/webpack/src/transformers/elide_imports.ts new file mode 100644 index 0000000000..7dbe888d32 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/elide_imports.ts @@ -0,0 +1,103 @@ +import * as ts from 'typescript'; +import { RemoveNodeOperation, TransformOperation } from './interfaces'; + + +// Remove imports for which all identifiers have been removed. +// Needs type checker, and works even if it's not the first transformer. +// Works by removing imports for symbols whose identifiers have all been removed. +// Doesn't use the `symbol.declarations` because that previous transforms might have removed nodes +// but the type checker doesn't know. +// See https://github.com/Microsoft/TypeScript/issues/17552 for more information. +export function elideImports( + sourceFile: ts.SourceFile, + removedNodes: ts.Node[], + getTypeChecker: () => ts.TypeChecker, +): TransformOperation[] { + const ops: TransformOperation[] = []; + + if (removedNodes.length === 0) { + return []; + } + + const typeChecker = getTypeChecker(); + + // Collect all imports and used identifiers + const specialCaseNames = new Set(); + const usedSymbols = new Set(); + const imports = new Array(); + ts.forEachChild(sourceFile, function visit(node) { + // Skip removed nodes + if (removedNodes.includes(node)) { + return; + } + + // Record import and skip + if (ts.isImportDeclaration(node)) { + imports.push(node); + return; + } + + if (ts.isIdentifier(node)) { + usedSymbols.add(typeChecker.getSymbolAtLocation(node)); + } else if (ts.isExportSpecifier(node)) { + // Export specifiers return the non-local symbol from the above + // so check the name string instead + specialCaseNames.add((node.propertyName || node.name).text); + return; + } else if (ts.isShorthandPropertyAssignment(node)) { + // Shorthand property assignments return the object property's symbol not the import's + specialCaseNames.add(node.name.text); + } + + ts.forEachChild(node, visit); + }); + + if (imports.length === 0) { + return []; + } + + const isUnused = (node: ts.Identifier) => { + if (specialCaseNames.has(node.text)) { + return false; + } + + const symbol = typeChecker.getSymbolAtLocation(node); + + return symbol && !usedSymbols.has(symbol); + }; + + for (const node of imports) { + if (!node.importClause) { + // "import 'abc';" + continue; + } + + if (node.importClause.name) { + // "import XYZ from 'abc';" + if (isUnused(node.importClause.name)) { + ops.push(new RemoveNodeOperation(sourceFile, node)); + } + } else if (ts.isNamespaceImport(node.importClause.namedBindings)) { + // "import * as XYZ from 'abc';" + if (isUnused(node.importClause.namedBindings.name)) { + ops.push(new RemoveNodeOperation(sourceFile, node)); + } + } else if (ts.isNamedImports(node.importClause.namedBindings)) { + // "import { XYZ, ... } from 'abc';" + const specifierOps = []; + for (const specifier of node.importClause.namedBindings.elements) { + if (isUnused(specifier.propertyName || specifier.name)) { + specifierOps.push(new RemoveNodeOperation(sourceFile, specifier)); + } + } + + if (specifierOps.length === node.importClause.namedBindings.elements.length) { + ops.push(new RemoveNodeOperation(sourceFile, node)); + } else { + ops.push(...specifierOps); + } + } + } + + return ops; +} diff --git a/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts b/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts new file mode 100644 index 0000000000..d6ddf92ad7 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts @@ -0,0 +1,83 @@ +// @ignoreDep typescript +import * as path from 'path'; +import * as ts from 'typescript'; + +import { LazyRouteMap } from '../lazy_routes'; +import { getLastNode, getFirstNode } from './ast_helpers'; +import { StandardTransform, TransformOperation, AddNodeOperation } from './interfaces'; +import { makeTransform } from './make_transform'; + +export function exportLazyModuleMap( + shouldTransform: (fileName: string) => boolean, + lazyRoutesCb: () => LazyRouteMap, +): ts.TransformerFactory { + + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + const lazyRoutes = lazyRoutesCb(); + + if (!shouldTransform(sourceFile.fileName)) { + return ops; + } + + const dirName = path.normalize(path.dirname(sourceFile.fileName)); + + const modules = Object.keys(lazyRoutes) + .map((loadChildrenString) => { + const [, moduleName] = loadChildrenString.split('#'); + const modulePath = lazyRoutes[loadChildrenString]; + + return { + modulePath, + moduleName, + loadChildrenString + }; + }); + + modules.forEach((module, index) => { + const relativePath = path.relative(dirName, module.modulePath!).replace(/\\/g, '/'); + // Create the new namespace import node. + const namespaceImport = ts.createNamespaceImport(ts.createIdentifier(`__lazy_${index}__`)); + const importClause = ts.createImportClause(undefined, namespaceImport); + const newImport = ts.createImportDeclaration(undefined, undefined, importClause, + ts.createLiteral(relativePath)); + + ops.push(new AddNodeOperation( + sourceFile, + getFirstNode(sourceFile), + newImport + )); + }); + + const lazyModuleObjectLiteral = ts.createObjectLiteral( + modules.map((mod, idx) => { + let [modulePath, moduleName] = mod.loadChildrenString.split('#'); + if (modulePath.match(/\.ngfactory/)) { + modulePath = modulePath.replace('.ngfactory', ''); + moduleName = moduleName.replace('NgFactory', ''); + } + + return ts.createPropertyAssignment( + ts.createLiteral(`${modulePath}#${moduleName}`), + ts.createPropertyAccess(ts.createIdentifier(`__lazy_${idx}__`), mod.moduleName)); + }) + ); + + const lazyModuleVariableStmt = ts.createVariableStatement( + [ts.createToken(ts.SyntaxKind.ExportKeyword)], + [ts.createVariableDeclaration('LAZY_MODULE_MAP', undefined, lazyModuleObjectLiteral)] + ); + + ops.push(new AddNodeOperation( + sourceFile, + getLastNode(sourceFile), + undefined, + lazyModuleVariableStmt + )); + + return ops; + }; + + return makeTransform(standardTransform); +} diff --git a/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts b/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts new file mode 100644 index 0000000000..4663e302fb --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts @@ -0,0 +1,76 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { transformTypescript } from './ast_helpers'; +import { exportLazyModuleMap } from './export_lazy_module_map'; + +describe('@ngtools/webpack transformers', () => { + describe('export_lazy_module_map', () => { + it('should create module map for JIT', () => { + const input = stripIndent` + export { AppModule } from './app/app.module'; + `; + // tslint:disable:max-line-length + const output = stripIndent` + import * as __lazy_0__ from "app/lazy/lazy.module.ts"; + import * as __lazy_1__ from "app/lazy2/lazy2.module.ts"; + export { AppModule } from './app/app.module'; + export var LAZY_MODULE_MAP = { "./lazy/lazy.module#LazyModule": __lazy_0__.LazyModule, "./lazy2/lazy2.module#LazyModule2": __lazy_1__.LazyModule2 }; + `; + // tslint:enable:max-line-length + + const transformer = exportLazyModuleMap( + () => true, + () => ({ + './lazy/lazy.module#LazyModule': '/project/src/app/lazy/lazy.module.ts', + './lazy2/lazy2.module#LazyModule2': '/project/src/app/lazy2/lazy2.module.ts', + }), + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should create module map for AOT', () => { + const input = stripIndent` + export { AppModule } from './app/app.module'; + `; + // tslint:disable:max-line-length + const expected = stripIndent` + import * as __lazy_0__ from "app/lazy/lazy.module.ngfactory.ts"; + import * as __lazy_1__ from "app/lazy2/lazy2.module.ngfactory.ts"; + export { AppModule } from './app/app.module'; + export var LAZY_MODULE_MAP = { "./lazy/lazy.module#LazyModule": __lazy_0__.LazyModuleNgFactory, "./lazy2/lazy2.module#LazyModule2": __lazy_1__.LazyModule2NgFactory }; + `; + // tslint:enable:max-line-length + + const transformer = exportLazyModuleMap( + () => true, + () => ({ + './lazy/lazy.module.ngfactory#LazyModuleNgFactory': + '/project/src/app/lazy/lazy.module.ngfactory.ts', + './lazy2/lazy2.module.ngfactory#LazyModule2NgFactory': + '/project/src/app/lazy2/lazy2.module.ngfactory.ts', + }), + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${expected}`); + }); + }); + + it('should not do anything if shouldTransform returns false', () => { + const input = stripIndent` + export { AppModule } from './app/app.module'; + `; + + const transformer = exportLazyModuleMap( + () => false, + () => ({ + './lazy/lazy.module#LazyModule': '/project/src/app/lazy/lazy.module.ts', + './lazy2/lazy2.module#LazyModule2': '/project/src/app/lazy2/lazy2.module.ts', + }), + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${input}`); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/export_ngfactory.ts b/packages/ngtools/webpack/src/transformers/export_ngfactory.ts new file mode 100644 index 0000000000..95aa544dd3 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/export_ngfactory.ts @@ -0,0 +1,68 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; +import { relative, dirname } from 'path'; + +import { collectDeepNodes, getFirstNode } from './ast_helpers'; +import { StandardTransform, TransformOperation, AddNodeOperation } from './interfaces'; +import { makeTransform } from './make_transform'; + +export function exportNgFactory( + shouldTransform: (fileName: string) => boolean, + getEntryModule: () => { path: string, className: string }, +): ts.TransformerFactory { + + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + const entryModule = getEntryModule(); + + if (!shouldTransform(sourceFile.fileName) || !entryModule) { + return ops; + } + + // Find all identifiers using the entry module class name. + const entryModuleIdentifiers = collectDeepNodes(sourceFile, + ts.SyntaxKind.Identifier) + .filter(identifier => identifier.text === entryModule.className); + + if (entryModuleIdentifiers.length === 0) { + return []; + } + + const relativeEntryModulePath = relative(dirname(sourceFile.fileName), entryModule.path); + const normalizedEntryModulePath = `./${relativeEntryModulePath}`.replace(/\\/g, '/'); + + // Get the module path from the import. + entryModuleIdentifiers.forEach((entryModuleIdentifier) => { + if (entryModuleIdentifier.parent.kind !== ts.SyntaxKind.ExportSpecifier) { + return; + } + + const exportSpec = entryModuleIdentifier.parent as ts.ExportSpecifier; + const moduleSpecifier = exportSpec.parent.parent.moduleSpecifier; + + if (moduleSpecifier.kind !== ts.SyntaxKind.StringLiteral) { + return; + } + + // Add the transform operations. + const factoryClassName = entryModule.className + 'NgFactory'; + const factoryModulePath = normalizedEntryModulePath + '.ngfactory'; + + const namedExports = ts.createNamedExports([ts.createExportSpecifier(undefined, + ts.createIdentifier(factoryClassName))]); + const newImport = ts.createExportDeclaration(undefined, undefined, namedExports, + ts.createLiteral(factoryModulePath)); + + ops.push(new AddNodeOperation( + sourceFile, + getFirstNode(sourceFile), + newImport + )); + }); + + return ops; + }; + + return makeTransform(standardTransform); +} diff --git a/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts b/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts new file mode 100644 index 0000000000..324e41bbb4 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts @@ -0,0 +1,57 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { transformTypescript } from './ast_helpers'; +import { exportNgFactory } from './export_ngfactory'; + +describe('@ngtools/webpack transformers', () => { + describe('export_ngfactory', () => { + it('should export the ngfactory', () => { + const input = stripIndent` + export { AppModule } from './app/app.module'; + `; + const output = stripIndent` + export { AppModuleNgFactory } from "./app/app.module.ngfactory"; + export { AppModule } from './app/app.module'; + `; + + const transformer = exportNgFactory( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should export the ngfactory when there is a barrel file', () => { + const input = stripIndent` + export { AppModule } from './app'; + `; + const output = stripIndent` + export { AppModuleNgFactory } from "./app/app.module.ngfactory"; + export { AppModule } from './app'; + `; + + const transformer = exportNgFactory( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not do anything if shouldTransform returns false', () => { + const input = stripIndent` + export { AppModule } from './app/app.module'; + `; + + const transformer = exportNgFactory( + () => false, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${input}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/index.ts b/packages/ngtools/webpack/src/transformers/index.ts new file mode 100644 index 0000000000..e523cc7782 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/index.ts @@ -0,0 +1,12 @@ +export * from './interfaces'; +export * from './ast_helpers'; +export * from './make_transform'; +export * from './insert_import'; +export * from './elide_imports'; +export * from './replace_bootstrap'; +export * from './replace_server_bootstrap'; +export * from './export_ngfactory'; +export * from './export_lazy_module_map'; +export * from './register_locale_data'; +export * from './replace_resources'; +export * from './remove_decorators'; diff --git a/packages/ngtools/webpack/src/transformers/insert_import.ts b/packages/ngtools/webpack/src/transformers/insert_import.ts new file mode 100644 index 0000000000..9b63d521f8 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/insert_import.ts @@ -0,0 +1,126 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; + +import { collectDeepNodes, getFirstNode } from './ast_helpers'; +import { AddNodeOperation, TransformOperation } from './interfaces'; + + +export function insertStarImport( + sourceFile: ts.SourceFile, + identifier: ts.Identifier, + modulePath: string, + target?: ts.Node, + before = false, +): TransformOperation[] { + const ops: TransformOperation[] = []; + const allImports = collectDeepNodes(sourceFile, ts.SyntaxKind.ImportDeclaration); + + // We don't need to verify if the symbol is already imported, star imports should be unique. + + // Create the new import node. + const namespaceImport = ts.createNamespaceImport(identifier); + const importClause = ts.createImportClause(undefined, namespaceImport); + const newImport = ts.createImportDeclaration(undefined, undefined, importClause, + ts.createLiteral(modulePath)); + + if (target) { + ops.push(new AddNodeOperation( + sourceFile, + target, + before ? newImport : undefined, + before ? undefined : newImport + )); + } else if (allImports.length > 0) { + // Find the last import and insert after. + ops.push(new AddNodeOperation( + sourceFile, + allImports[allImports.length - 1], + undefined, + newImport + )); + } else { + // Insert before the first node. + ops.push(new AddNodeOperation( + sourceFile, + getFirstNode(sourceFile), + newImport + )); + } + + return ops; +} + + +export function insertImport( + sourceFile: ts.SourceFile, + symbolName: string, + modulePath: string +): TransformOperation[] { + const ops: TransformOperation[] = []; + // Find all imports. + const allImports = collectDeepNodes(sourceFile, ts.SyntaxKind.ImportDeclaration); + const maybeImports = allImports + .filter((node: ts.ImportDeclaration) => { + // Filter all imports that do not match the modulePath. + return node.moduleSpecifier.kind == ts.SyntaxKind.StringLiteral + && (node.moduleSpecifier as ts.StringLiteral).text == modulePath; + }) + .filter((node: ts.ImportDeclaration) => { + // Filter out import statements that are either `import 'XYZ'` or `import * as X from 'XYZ'`. + const clause = node.importClause as ts.ImportClause; + if (!clause || clause.name || !clause.namedBindings) { + return false; + } + return clause.namedBindings.kind == ts.SyntaxKind.NamedImports; + }) + .map((node: ts.ImportDeclaration) => { + // Return the `{ ... }` list of the named import. + return (node.importClause as ts.ImportClause).namedBindings as ts.NamedImports; + }); + + if (maybeImports.length) { + // There's an `import {A, B, C} from 'modulePath'`. + // Find if it's in either imports. If so, just return; nothing to do. + const hasImportAlready = maybeImports.some((node: ts.NamedImports) => { + return node.elements.some((element: ts.ImportSpecifier) => { + return element.name.text == symbolName; + }); + }); + if (hasImportAlready) { + return ops; + } + + // Just pick the first one and insert at the end of its identifier list. + ops.push(new AddNodeOperation( + sourceFile, + maybeImports[0].elements[maybeImports[0].elements.length - 1], + undefined, + ts.createImportSpecifier(undefined, ts.createIdentifier(symbolName)) + )); + } else { + // Create the new import node. + const namedImports = ts.createNamedImports([ts.createImportSpecifier(undefined, + ts.createIdentifier(symbolName))]); + const importClause = ts.createImportClause(undefined, namedImports); + const newImport = ts.createImportDeclaration(undefined, undefined, importClause, + ts.createLiteral(modulePath)); + + if (allImports.length > 0) { + // Find the last import and insert after. + ops.push(new AddNodeOperation( + sourceFile, + allImports[allImports.length - 1], + undefined, + newImport + )); + } else { + // Insert before the first node. + ops.push(new AddNodeOperation( + sourceFile, + getFirstNode(sourceFile), + newImport + )); + } + } + return ops; +} diff --git a/packages/ngtools/webpack/src/transformers/interfaces.ts b/packages/ngtools/webpack/src/transformers/interfaces.ts new file mode 100644 index 0000000000..5bf6440cdd --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/interfaces.ts @@ -0,0 +1,39 @@ +import * as ts from 'typescript'; + +export enum OPERATION_KIND { + Remove, + Add, + Replace +} + +export interface StandardTransform { + (sourceFile: ts.SourceFile): TransformOperation[]; +} + +export abstract class TransformOperation { + constructor( + public kind: OPERATION_KIND, + public sourceFile: ts.SourceFile, + public target: ts.Node + ) { } +} + +export class RemoveNodeOperation extends TransformOperation { + constructor(sourceFile: ts.SourceFile, target: ts.Node) { + super(OPERATION_KIND.Remove, sourceFile, target); + } +} + +export class AddNodeOperation extends TransformOperation { + constructor(sourceFile: ts.SourceFile, target: ts.Node, + public before?: ts.Node, public after?: ts.Node) { + super(OPERATION_KIND.Add, sourceFile, target); + } +} + +export class ReplaceNodeOperation extends TransformOperation { + kind: OPERATION_KIND.Replace; + constructor(sourceFile: ts.SourceFile, target: ts.Node, public replacement: ts.Node) { + super(OPERATION_KIND.Replace, sourceFile, target); + } +} diff --git a/packages/ngtools/webpack/src/transformers/make_transform.ts b/packages/ngtools/webpack/src/transformers/make_transform.ts new file mode 100644 index 0000000000..b657d2346d --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/make_transform.ts @@ -0,0 +1,148 @@ +import * as ts from 'typescript'; +import { satisfies } from 'semver'; + +import { + OPERATION_KIND, + StandardTransform, + TransformOperation, + RemoveNodeOperation, + AddNodeOperation, + ReplaceNodeOperation, +} from './interfaces'; +import { elideImports } from './elide_imports'; + + +// Typescript below 2.5.0 needs a workaround. +const visitEachChild = satisfies(ts.version, '^2.5.0') + ? ts.visitEachChild + : visitEachChildWorkaround; + +export function makeTransform( + standardTransform: StandardTransform, + getTypeChecker?: () => ts.TypeChecker, +): ts.TransformerFactory { + + return (context: ts.TransformationContext): ts.Transformer => { + const transformer: ts.Transformer = (sf: ts.SourceFile) => { + + const ops: TransformOperation[] = standardTransform(sf); + const removeOps = ops + .filter((op) => op.kind === OPERATION_KIND.Remove) as RemoveNodeOperation[]; + const addOps = ops.filter((op) => op.kind === OPERATION_KIND.Add) as AddNodeOperation[]; + const replaceOps = ops + .filter((op) => op.kind === OPERATION_KIND.Replace) as ReplaceNodeOperation[]; + + // If nodes are removed, elide the imports as well. + // Mainly a workaround for https://github.com/Microsoft/TypeScript/issues/17552. + // WARNING: this assumes that replaceOps DO NOT reuse any of the nodes they are replacing. + // This is currently true for transforms that use replaceOps (replace_bootstrap and + // replace_resources), but may not be true for new transforms. + if (getTypeChecker && removeOps.length + replaceOps.length > 0) { + const removedNodes = removeOps.concat(replaceOps).map((op) => op.target); + removeOps.push(...elideImports(sf, removedNodes, getTypeChecker)); + } + + const visitor: ts.Visitor = (node) => { + let modified = false; + let modifiedNodes = [node]; + // Check if node should be dropped. + if (removeOps.find((op) => op.target === node)) { + modifiedNodes = []; + modified = true; + } + + // Check if node should be replaced (only replaces with first op found). + const replace = replaceOps.find((op) => op.target === node); + if (replace) { + modifiedNodes = [replace.replacement]; + modified = true; + } + + // Check if node should be added to. + const add = addOps.filter((op) => op.target === node); + if (add.length > 0) { + modifiedNodes = [ + ...add.filter((op) => op.before).map(((op) => op.before)), + ...modifiedNodes, + ...add.filter((op) => op.after).map(((op) => op.after)) + ]; + modified = true; + } + + // If we changed anything, return modified nodes without visiting further. + if (modified) { + return modifiedNodes; + } else { + // Otherwise return node as is and visit children. + return visitEachChild(node, visitor, context); + } + }; + + // Don't visit the sourcefile at all if we don't have ops for it. + if (ops.length === 0) { + return sf; + } + + const result = ts.visitNode(sf, visitor); + + // If we removed any decorators, we need to clean up the decorator arrays. + if (removeOps.some((op) => op.target.kind === ts.SyntaxKind.Decorator)) { + cleanupDecorators(result); + } + + return result; + }; + + return transformer; + }; +} + +/** + * This is a version of `ts.visitEachChild` that works that calls our version + * of `updateSourceFileNode`, so that typescript doesn't lose type information + * for property decorators. + * See https://github.com/Microsoft/TypeScript/issues/17384 (fixed by + * https://github.com/Microsoft/TypeScript/pull/20314 and released in TS 2.7.0) and + * https://github.com/Microsoft/TypeScript/issues/17551 (fixed by + * https://github.com/Microsoft/TypeScript/pull/18051 and released on TS 2.5.0). + * + * @param sf + * @param statements + */ +function visitEachChildWorkaround(node: ts.Node, visitor: ts.Visitor, + context: ts.TransformationContext) { + + if (node.kind === ts.SyntaxKind.SourceFile) { + const sf = node as ts.SourceFile; + const statements = ts.visitLexicalEnvironment(sf.statements, visitor, context); + + if (statements === sf.statements) { + return sf; + } + // Note: Need to clone the original file (and not use `ts.updateSourceFileNode`) + // as otherwise TS fails when resolving types for decorators. + const sfClone = ts.getMutableClone(sf); + sfClone.statements = statements; + return sfClone; + } + + return ts.visitEachChild(node, visitor, context); +} + + +// 1) If TS sees an empty decorator array, it will still emit a `__decorate` call. +// This seems to be a TS bug. +// 2) Also ensure nodes with modified decorators have parents +// built in TS transformers assume certain nodes have parents (fixed in TS 2.7+) +function cleanupDecorators(node: ts.Node) { + if (node.decorators) { + if (node.decorators.length == 0) { + node.decorators = undefined; + } else if (node.parent == undefined) { + const originalNode = ts.getParseTreeNode(node); + node.parent = originalNode.parent; + } + } + + ts.forEachChild(node, node => cleanupDecorators(node)); +} diff --git a/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts b/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts new file mode 100644 index 0000000000..62e7757a92 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts @@ -0,0 +1,86 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { createTypescriptContext, transformTypescript } from './ast_helpers'; +import { replaceBootstrap } from './replace_bootstrap'; +import { exportNgFactory } from './export_ngfactory'; +import { exportLazyModuleMap } from './export_lazy_module_map'; +import { removeDecorators } from './remove_decorators'; + + +describe('@ngtools/webpack transformers', () => { + describe('multiple_transformers', () => { + it('should apply multiple transformers on the same file', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + import { Component } from '@angular/core'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + class AppComponent { + title = 'app'; + } + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import * as __lazy_0__ from "app/lazy/lazy.module.ngfactory.ts"; + import * as __lazy_1__ from "app/lazy2/lazy2.module.ngfactory.ts"; + + import { enableProdMode } from '@angular/core'; + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + import * as __NgCli_bootstrap_2 from "@angular/platform-browser"; + + class AppComponent { + constructor() { this.title = 'app'; } + } + + if (environment.production) { + enableProdMode(); + } + __NgCli_bootstrap_2.platformBrowser().bootstrapModuleFactory(__NgCli_bootstrap_1.AppModuleNgFactory); + + export var LAZY_MODULE_MAP = { "./lazy/lazy.module#LazyModule": __lazy_0__.LazyModuleNgFactory, "./lazy2/lazy2.module#LazyModule2": __lazy_1__.LazyModule2NgFactory }; + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + + const shouldTransform = () => true; + const getEntryModule = () => + ({ path: '/project/src/app/app.module', className: 'AppModule' }); + const getTypeChecker = () => program.getTypeChecker(); + + + const transformers = [ + replaceBootstrap(shouldTransform, getEntryModule, getTypeChecker), + exportNgFactory(shouldTransform, getEntryModule), + exportLazyModuleMap(shouldTransform, + () => ({ + './lazy/lazy.module.ngfactory#LazyModuleNgFactory': + '/project/src/app/lazy/lazy.module.ngfactory.ts', + './lazy2/lazy2.module.ngfactory#LazyModule2NgFactory': + '/project/src/app/lazy2/lazy2.module.ngfactory.ts', + })), + removeDecorators(shouldTransform, getTypeChecker), + ]; + + const result = transformTypescript(undefined, transformers, program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/register_locale_data.ts b/packages/ngtools/webpack/src/transformers/register_locale_data.ts new file mode 100644 index 0000000000..efc1aa655d --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/register_locale_data.ts @@ -0,0 +1,91 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; + +import { collectDeepNodes, getFirstNode } from './ast_helpers'; +import { StandardTransform, AddNodeOperation, TransformOperation } from './interfaces'; +import { insertStarImport } from './insert_import'; +import { makeTransform } from './make_transform'; + + +export function registerLocaleData( + shouldTransform: (fileName: string) => boolean, + getEntryModule: () => { path: string, className: string }, + locale: string +): ts.TransformerFactory { + + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + const entryModule = getEntryModule(); + + if (!shouldTransform(sourceFile.fileName) || !entryModule || !locale) { + return ops; + } + + // Find all identifiers using the entry module class name. + const entryModuleIdentifiers = collectDeepNodes(sourceFile, + ts.SyntaxKind.Identifier) + .filter(identifier => identifier.text === entryModule.className); + + if (entryModuleIdentifiers.length === 0) { + return []; + } + + // Find the bootstrap call + entryModuleIdentifiers.forEach(entryModuleIdentifier => { + // Figure out if it's a `platformBrowserDynamic().bootstrapModule(AppModule)` call. + if (!( + entryModuleIdentifier.parent + && entryModuleIdentifier.parent.kind === ts.SyntaxKind.CallExpression + )) { + return; + } + + const callExpr = entryModuleIdentifier.parent as ts.CallExpression; + + if (callExpr.expression.kind !== ts.SyntaxKind.PropertyAccessExpression) { + return; + } + + const propAccessExpr = callExpr.expression as ts.PropertyAccessExpression; + + if (propAccessExpr.name.text !== 'bootstrapModule' + || propAccessExpr.expression.kind !== ts.SyntaxKind.CallExpression) { + return; + } + + const firstNode = getFirstNode(sourceFile); + + // Create the import node for the locale. + const localeNamespaceId = ts.createUniqueName('__NgCli_locale_'); + ops.push(...insertStarImport( + sourceFile, localeNamespaceId, `@angular/common/locales/${locale}`, firstNode, true + )); + + // Create the import node for the registerLocaleData function. + const regIdentifier = ts.createIdentifier(`registerLocaleData`); + const regNamespaceId = ts.createUniqueName('__NgCli_locale_'); + ops.push( + ...insertStarImport(sourceFile, regNamespaceId, '@angular/common', firstNode, true) + ); + + // Create the register function call + const registerFunctionCall = ts.createCall( + ts.createPropertyAccess(regNamespaceId, regIdentifier), + undefined, + [ts.createPropertyAccess(localeNamespaceId, 'default')], + ); + const registerFunctionStatement = ts.createStatement(registerFunctionCall); + + ops.push(new AddNodeOperation( + sourceFile, + firstNode, + registerFunctionStatement, + )); + }); + + return ops; + }; + + return makeTransform(standardTransform); +} diff --git a/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts b/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts new file mode 100644 index 0000000000..c086e24271 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts @@ -0,0 +1,70 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { transformTypescript } from './ast_helpers'; +import { registerLocaleData } from './register_locale_data'; + +describe('@ngtools/webpack transformers', () => { + describe('register_locale_data', () => { + it('should add locale imports', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + const output = stripIndent` + import * as __NgCli_locale_1 from "@angular/common/locales/fr"; + import * as __NgCli_locale_2 from "@angular/common"; + __NgCli_locale_2.registerLocaleData(__NgCli_locale_1.default); + + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + + const transformer = registerLocaleData( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + 'fr' + ); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not add locale imports when there is no entry module', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + + const transformer = registerLocaleData(() => true, () => undefined, 'fr'); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${input}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators.ts b/packages/ngtools/webpack/src/transformers/remove_decorators.ts new file mode 100644 index 0000000000..64f186592f --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/remove_decorators.ts @@ -0,0 +1,86 @@ +import * as ts from 'typescript'; + +import { collectDeepNodes } from './ast_helpers'; +import { StandardTransform, TransformOperation, RemoveNodeOperation } from './interfaces'; +import { makeTransform } from './make_transform'; + + +export function removeDecorators( + shouldTransform: (fileName: string) => boolean, + getTypeChecker: () => ts.TypeChecker, +): ts.TransformerFactory { + + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + if (!shouldTransform(sourceFile.fileName)) { + return ops; + } + + collectDeepNodes(sourceFile, ts.SyntaxKind.Decorator) + .filter((decorator) => shouldRemove(decorator, getTypeChecker())) + .forEach((decorator) => { + // Remove the decorator node. + ops.push(new RemoveNodeOperation(sourceFile, decorator)); + }); + + return ops; + }; + + return makeTransform(standardTransform, getTypeChecker); +} + +function shouldRemove(decorator: ts.Decorator, typeChecker: ts.TypeChecker): boolean { + const origin = getDecoratorOrigin(decorator, typeChecker); + + return origin && origin.module === '@angular/core'; +} + +// Decorator helpers. +interface DecoratorOrigin { + name: string; + module: string; +} + +function getDecoratorOrigin( + decorator: ts.Decorator, + typeChecker: ts.TypeChecker +): DecoratorOrigin | null { + if (!ts.isCallExpression(decorator.expression)) { + return null; + } + + let identifier: ts.Node; + let name: string; + if (ts.isPropertyAccessExpression(decorator.expression.expression)) { + identifier = decorator.expression.expression.expression; + name = decorator.expression.expression.name.text; + } else if (ts.isIdentifier(decorator.expression.expression)) { + identifier = decorator.expression.expression; + } else { + return null; + } + + // NOTE: resolver.getReferencedImportDeclaration would work as well but is internal + const symbol = typeChecker.getSymbolAtLocation(identifier); + if (symbol && symbol.declarations && symbol.declarations.length > 0) { + const declaration = symbol.declarations[0]; + let module: string; + if (ts.isImportSpecifier(declaration)) { + name = (declaration.propertyName || declaration.name).text; + module = (declaration.parent.parent.parent.moduleSpecifier as ts.StringLiteral).text; + } else if (ts.isNamespaceImport(declaration)) { + // Use the name from the decorator namespace property access + module = (declaration.parent.parent.moduleSpecifier as ts.StringLiteral).text; + } else if (ts.isImportClause(declaration)) { + name = declaration.name.text; + module = (declaration.parent.moduleSpecifier as ts.StringLiteral).text; + } else { + return null; + } + + return { name, module }; + } + + return null; +} diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts new file mode 100644 index 0000000000..ab21882728 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts @@ -0,0 +1,244 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { createTypescriptContext, transformTypescript } from './ast_helpers'; +import { removeDecorators } from './remove_decorators'; + +describe('@ngtools/webpack transformers', () => { + describe('decorator_remover', () => { + it('should remove Angular decorators', () => { + const input = stripIndent` + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = stripIndent` + export class AppComponent { + constructor() { + this.title = 'app'; + } + } + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not remove non-Angular decorators', () => { + const input = stripIndent` + import { Component } from 'another-lib'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = ` + import * as tslib_1 from "tslib"; + import { Component } from 'another-lib'; + let AppComponent = class AppComponent { + constructor() { + this.title = 'app'; + } + }; + AppComponent = tslib_1.__decorate([ + Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + ], AppComponent); + export { AppComponent }; + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should keep other decorators on class member', () => { + const input = stripIndent` + import { Component, HostListener } from '@angular/core'; + import { AnotherDecorator } from 'another-lib'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + title = 'app'; + + @HostListener('document:keydown.escape') + @AnotherDecorator() + onEscape() { + console.log('run'); + } + } + `; + const output = stripIndent` + import * as tslib_1 from "tslib"; + import { AnotherDecorator } from 'another-lib'; + + export class AppComponent { + constructor() { + this.title = 'app'; + } + + onEscape() { + console.log('run'); + } + } + tslib_1.__decorate([ + AnotherDecorator() + ], AppComponent.prototype, "onEscape", null); + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should keep other decorators on class declaration', () => { + const input = stripIndent` + import { Component } from '@angular/core'; + import { AnotherDecorator } from 'another-lib'; + + @AnotherDecorator() + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = stripIndent` + import * as tslib_1 from "tslib"; + import { AnotherDecorator } from 'another-lib'; + + let AppComponent = class AppComponent { + constructor() { + this.title = 'app'; + } + }; + AppComponent = tslib_1.__decorate([ + AnotherDecorator() + ], AppComponent); + export { AppComponent }; + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should remove imports for identifiers within the decorator', () => { + const input = stripIndent` + import { Component } from '@angular/core'; + import { ChangeDetectionStrategy } from '@angular/core'; + + @Component({ + selector: 'app-root', + changeDetection: ChangeDetectionStrategy.OnPush, + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = stripIndent` + export class AppComponent { + constructor() { + this.title = 'app'; + } + } + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not remove imports from types that are still used', () => { + const input = stripIndent` + import { Component, ChangeDetectionStrategy, EventEmitter } from '@angular/core'; + import { abc } from 'xyz'; + + @Component({ + selector: 'app-root', + changeDetection: ChangeDetectionStrategy.OnPush, + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] + }) + export class AppComponent { + notify: EventEmitter = new EventEmitter(); + title = 'app'; + example = { abc }; + } + + export { ChangeDetectionStrategy }; + `; + const output = stripIndent` + import { ChangeDetectionStrategy, EventEmitter } from '@angular/core'; + import { abc } from 'xyz'; + + export class AppComponent { + constructor() { + this.notify = new EventEmitter(); + this.title = 'app'; + this.example = { abc }; + } + } + + export { ChangeDetectionStrategy }; + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts b/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts new file mode 100644 index 0000000000..1740925f61 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts @@ -0,0 +1,97 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; +import { relative, dirname } from 'path'; + +import { collectDeepNodes } from './ast_helpers'; +import { insertStarImport } from './insert_import'; +import { StandardTransform, ReplaceNodeOperation, TransformOperation } from './interfaces'; +import { makeTransform } from './make_transform'; + + +export function replaceBootstrap( + shouldTransform: (fileName: string) => boolean, + getEntryModule: () => { path: string, className: string }, + getTypeChecker: () => ts.TypeChecker, +): ts.TransformerFactory { + + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + const entryModule = getEntryModule(); + + if (!shouldTransform(sourceFile.fileName) || !entryModule) { + return ops; + } + + // Find all identifiers. + const entryModuleIdentifiers = collectDeepNodes(sourceFile, + ts.SyntaxKind.Identifier) + .filter(identifier => identifier.text === entryModule.className); + + if (entryModuleIdentifiers.length === 0) { + return []; + } + + const relativeEntryModulePath = relative(dirname(sourceFile.fileName), entryModule.path); + const normalizedEntryModulePath = `./${relativeEntryModulePath}`.replace(/\\/g, '/'); + + // Find the bootstrap calls. + entryModuleIdentifiers.forEach(entryModuleIdentifier => { + // Figure out if it's a `platformBrowserDynamic().bootstrapModule(AppModule)` call. + if (!( + entryModuleIdentifier.parent + && entryModuleIdentifier.parent.kind === ts.SyntaxKind.CallExpression + )) { + return; + } + + const callExpr = entryModuleIdentifier.parent as ts.CallExpression; + + if (callExpr.expression.kind !== ts.SyntaxKind.PropertyAccessExpression) { + return; + } + + const propAccessExpr = callExpr.expression as ts.PropertyAccessExpression; + + if (propAccessExpr.name.text !== 'bootstrapModule' + || propAccessExpr.expression.kind !== ts.SyntaxKind.CallExpression) { + return; + } + + const bootstrapModuleIdentifier = propAccessExpr.name; + const innerCallExpr = propAccessExpr.expression as ts.CallExpression; + + if (!( + innerCallExpr.expression.kind === ts.SyntaxKind.Identifier + && (innerCallExpr.expression as ts.Identifier).text === 'platformBrowserDynamic' + )) { + return; + } + + const platformBrowserDynamicIdentifier = innerCallExpr.expression as ts.Identifier; + + const idPlatformBrowser = ts.createUniqueName('__NgCli_bootstrap_'); + const idNgFactory = ts.createUniqueName('__NgCli_bootstrap_'); + + // Add the transform operations. + const factoryClassName = entryModule.className + 'NgFactory'; + const factoryModulePath = normalizedEntryModulePath + '.ngfactory'; + ops.push( + // Replace the entry module import. + ...insertStarImport(sourceFile, idNgFactory, factoryModulePath), + new ReplaceNodeOperation(sourceFile, entryModuleIdentifier, + ts.createPropertyAccess(idNgFactory, ts.createIdentifier(factoryClassName))), + // Replace the platformBrowserDynamic import. + ...insertStarImport(sourceFile, idPlatformBrowser, '@angular/platform-browser'), + new ReplaceNodeOperation(sourceFile, platformBrowserDynamicIdentifier, + ts.createPropertyAccess(idPlatformBrowser, 'platformBrowser')), + new ReplaceNodeOperation(sourceFile, bootstrapModuleIdentifier, + ts.createIdentifier('bootstrapModuleFactory')), + ); + }); + + return ops; + }; + + return makeTransform(standardTransform, getTypeChecker); +} diff --git a/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts b/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts new file mode 100644 index 0000000000..ce4143e024 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts @@ -0,0 +1,115 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { createTypescriptContext, transformTypescript } from './ast_helpers'; +import { replaceBootstrap } from './replace_bootstrap'; + +describe('@ngtools/webpack transformers', () => { + describe('replace_bootstrap', () => { + it('should replace bootstrap', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import { enableProdMode } from '@angular/core'; + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + import * as __NgCli_bootstrap_2 from "@angular/platform-browser"; + + if (environment.production) { + enableProdMode(); + } + __NgCli_bootstrap_2.platformBrowser().bootstrapModuleFactory(__NgCli_bootstrap_1.AppModuleNgFactory); + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceBootstrap( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should replace bootstrap when barrel files are used', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import { enableProdMode } from '@angular/core'; + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + import * as __NgCli_bootstrap_2 from "@angular/platform-browser"; + + if (environment.production) { + enableProdMode(); + } + __NgCli_bootstrap_2.platformBrowser().bootstrapModuleFactory(__NgCli_bootstrap_1.AppModuleNgFactory); + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceBootstrap( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not replace bootstrap when there is no entry module', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformBrowserDynamic().bootstrapModule(AppModule); + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceBootstrap( + () => true, + () => undefined, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${input}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/replace_resources.ts b/packages/ngtools/webpack/src/transformers/replace_resources.ts new file mode 100644 index 0000000000..875ee46485 --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/replace_resources.ts @@ -0,0 +1,153 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; + +import { collectDeepNodes, getFirstNode } from './ast_helpers'; +import { makeTransform } from './make_transform'; +import { + StandardTransform, + AddNodeOperation, + ReplaceNodeOperation, + TransformOperation +} from './interfaces'; + + +export function replaceResources( + shouldTransform: (fileName: string) => boolean +): ts.TransformerFactory { + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + if (!shouldTransform(sourceFile.fileName)) { + return ops; + } + + const replacements = findResources(sourceFile); + + if (replacements.length > 0) { + + // Add the replacement operations. + ops.push(...(replacements.map((rep) => rep.replaceNodeOperation))); + + // If we added a require call, we need to also add typings for it. + // The typings need to be compatible with node typings, but also work by themselves. + + // interface NodeRequire {(id: string): any;} + const nodeRequireInterface = ts.createInterfaceDeclaration([], [], 'NodeRequire', [], [], [ + ts.createCallSignature([], [ + ts.createParameter([], [], undefined, 'id', undefined, + ts.createKeywordTypeNode(ts.SyntaxKind.StringKeyword) + ) + ], ts.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword)) + ]); + + // declare var require: NodeRequire; + const varRequire = ts.createVariableStatement( + [ts.createToken(ts.SyntaxKind.DeclareKeyword)], + [ts.createVariableDeclaration('require', ts.createTypeReferenceNode('NodeRequire', []))] + ); + + ops.push(new AddNodeOperation(sourceFile, getFirstNode(sourceFile), nodeRequireInterface)); + ops.push(new AddNodeOperation(sourceFile, getFirstNode(sourceFile), varRequire)); + } + + return ops; + }; + + return makeTransform(standardTransform); +} + +export interface ResourceReplacement { + resourcePaths: string[]; + replaceNodeOperation: ReplaceNodeOperation; +} + +export function findResources(sourceFile: ts.SourceFile): ResourceReplacement[] { + const replacements: ResourceReplacement[] = []; + + // Find all object literals. + collectDeepNodes(sourceFile, ts.SyntaxKind.ObjectLiteralExpression) + // Get all their property assignments. + .map(node => collectDeepNodes(node, ts.SyntaxKind.PropertyAssignment)) + // Flatten into a single array (from an array of array). + .reduce((prev, curr) => curr ? prev.concat(curr) : prev, []) + // We only want property assignments for the templateUrl/styleUrls keys. + .filter((node: ts.PropertyAssignment) => { + const key = _getContentOfKeyLiteral(node.name); + if (!key) { + // key is an expression, can't do anything. + return false; + } + return key == 'templateUrl' || key == 'styleUrls'; + }) + // Replace templateUrl/styleUrls key with template/styles, and and paths with require('path'). + .forEach((node: ts.PropertyAssignment) => { + const key = _getContentOfKeyLiteral(node.name); + + if (key == 'templateUrl') { + const resourcePath = _getResourceRequest(node.initializer, sourceFile); + const requireCall = _createRequireCall(resourcePath); + const propAssign = ts.createPropertyAssignment('template', requireCall); + replacements.push({ + resourcePaths: [resourcePath], + replaceNodeOperation: new ReplaceNodeOperation(sourceFile, node, propAssign) + }); + } else if (key == 'styleUrls') { + const arr = collectDeepNodes(node, + ts.SyntaxKind.ArrayLiteralExpression); + if (!arr || arr.length == 0 || arr[0].elements.length == 0) { + return; + } + + const stylePaths = arr[0].elements.map((element: ts.Expression) => { + return _getResourceRequest(element, sourceFile); + }); + + const requireArray = ts.createArrayLiteral( + stylePaths.map((path) => _createRequireCall(path)) + ); + + const propAssign = ts.createPropertyAssignment('styles', requireArray); + replacements.push({ + resourcePaths: stylePaths, + replaceNodeOperation: new ReplaceNodeOperation(sourceFile, node, propAssign) + }); + } + }); + + return replacements; + +} + +function _getContentOfKeyLiteral(node?: ts.Node): string | null { + if (!node) { + return null; + } else if (node.kind == ts.SyntaxKind.Identifier) { + return (node as ts.Identifier).text; + } else if (node.kind == ts.SyntaxKind.StringLiteral) { + return (node as ts.StringLiteral).text; + } else { + return null; + } +} + +function _getResourceRequest(element: ts.Expression, sourceFile: ts.SourceFile) { + if ( + element.kind === ts.SyntaxKind.StringLiteral || + element.kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral + ) { + const url = (element as ts.StringLiteral).text; + // If the URL does not start with ./ or ../, prepends ./ to it. + return `${/^\.?\.\//.test(url) ? '' : './'}${url}`; + } else { + // if not string, just use expression directly + return element.getFullText(sourceFile); + } +} + +function _createRequireCall(path: string) { + return ts.createCall( + ts.createIdentifier('require'), + [], + [ts.createLiteral(path)] + ); +} diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts new file mode 100644 index 0000000000..d3c454e00d --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts @@ -0,0 +1,118 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { transformTypescript } from './ast_helpers'; +import { replaceResources } from './replace_resources'; + +describe('@ngtools/webpack transformers', () => { + describe('replace_resources', () => { + it('should replace resources', () => { + const input = stripIndent` + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css', './app.component.2.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = stripIndent` + import * as tslib_1 from "tslib"; + import { Component } from '@angular/core'; + let AppComponent = class AppComponent { + constructor() { + this.title = 'app'; + } + }; + AppComponent = tslib_1.__decorate([ + Component({ + selector: 'app-root', + template: require("./app.component.html"), + styles: [require("./app.component.css"), require("./app.component.2.css")] + }) + ], AppComponent); + export { AppComponent }; + `; + + const transformer = replaceResources(() => true); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should replace resources with backticks', () => { + const input = stripIndent` + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: \`./app.component.html\`, + styleUrls: [\`./app.component.css\`, \`./app.component.2.css\`] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = stripIndent` + import * as tslib_1 from "tslib"; + import { Component } from '@angular/core'; + let AppComponent = class AppComponent { + constructor() { + this.title = 'app'; + } + }; + AppComponent = tslib_1.__decorate([ + Component({ + selector: 'app-root', + template: require("./app.component.html"), + styles: [require("./app.component.css"), require("./app.component.2.css")] + }) + ], AppComponent); + export { AppComponent }; + `; + + const transformer = replaceResources(() => true); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not replace resources if shouldTransform returns false', () => { + const input = stripIndent` + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css', './app.component.2.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = ` + import * as tslib_1 from "tslib"; + import { Component } from '@angular/core'; + let AppComponent = class AppComponent { + constructor() { + this.title = 'app'; + } + }; + AppComponent = tslib_1.__decorate([ + Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css', './app.component.2.css'] + }) + ], AppComponent); + export { AppComponent }; + `; + + const transformer = replaceResources(() => false); + const result = transformTypescript(input, [transformer]); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts new file mode 100644 index 0000000000..a38ee8982c --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts @@ -0,0 +1,135 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; +import { relative, dirname } from 'path'; + +import { collectDeepNodes } from './ast_helpers'; +import { insertStarImport } from './insert_import'; +import { StandardTransform, ReplaceNodeOperation, TransformOperation } from './interfaces'; +import { makeTransform } from './make_transform'; + +export function replaceServerBootstrap( + shouldTransform: (fileName: string) => boolean, + getEntryModule: () => { path: string, className: string }, + getTypeChecker: () => ts.TypeChecker, +): ts.TransformerFactory { + + const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { + const ops: TransformOperation[] = []; + + const entryModule = getEntryModule(); + + if (!shouldTransform(sourceFile.fileName) || !entryModule) { + return ops; + } + + // Find all identifiers. + const entryModuleIdentifiers = collectDeepNodes(sourceFile, + ts.SyntaxKind.Identifier) + .filter(identifier => identifier.text === entryModule.className); + + if (entryModuleIdentifiers.length === 0) { + return []; + } + + const relativeEntryModulePath = relative(dirname(sourceFile.fileName), entryModule.path); + const normalizedEntryModulePath = `./${relativeEntryModulePath}`.replace(/\\/g, '/'); + const factoryClassName = entryModule.className + 'NgFactory'; + const factoryModulePath = normalizedEntryModulePath + '.ngfactory'; + + // Find the bootstrap calls. + entryModuleIdentifiers.forEach(entryModuleIdentifier => { + if (!entryModuleIdentifier.parent) { + return; + } + + if (entryModuleIdentifier.parent.kind !== ts.SyntaxKind.CallExpression && + entryModuleIdentifier.parent.kind !== ts.SyntaxKind.PropertyAssignment) { + return; + } + + if (entryModuleIdentifier.parent.kind === ts.SyntaxKind.CallExpression) { + // Figure out if it's a `platformDynamicServer().bootstrapModule(AppModule)` call. + + const callExpr = entryModuleIdentifier.parent as ts.CallExpression; + + if (callExpr.expression.kind === ts.SyntaxKind.PropertyAccessExpression) { + + const propAccessExpr = callExpr.expression as ts.PropertyAccessExpression; + + if (!(propAccessExpr.name.text === 'bootstrapModule' + && propAccessExpr.expression.kind === ts.SyntaxKind.CallExpression)) { + return; + } + + const bootstrapModuleIdentifier = propAccessExpr.name; + const innerCallExpr = propAccessExpr.expression as ts.CallExpression; + + if (!( + innerCallExpr.expression.kind === ts.SyntaxKind.Identifier + && (innerCallExpr.expression as ts.Identifier).text === 'platformDynamicServer' + )) { + return; + } + + const platformDynamicServerIdentifier = innerCallExpr.expression as ts.Identifier; + + const idPlatformServer = ts.createUniqueName('__NgCli_bootstrap_'); + const idNgFactory = ts.createUniqueName('__NgCli_bootstrap_'); + + // Add the transform operations. + ops.push( + // Replace the entry module import. + ...insertStarImport(sourceFile, idNgFactory, factoryModulePath), + new ReplaceNodeOperation(sourceFile, entryModuleIdentifier, + ts.createPropertyAccess(idNgFactory, ts.createIdentifier(factoryClassName))), + // Replace the platformBrowserDynamic import. + ...insertStarImport(sourceFile, idPlatformServer, '@angular/platform-server'), + new ReplaceNodeOperation(sourceFile, platformDynamicServerIdentifier, + ts.createPropertyAccess(idPlatformServer, 'platformServer')), + new ReplaceNodeOperation(sourceFile, bootstrapModuleIdentifier, + ts.createIdentifier('bootstrapModuleFactory')), + ); + } else if (callExpr.expression.kind === ts.SyntaxKind.Identifier) { + // Figure out if it is renderModule + + const identifierExpr = callExpr.expression as ts.Identifier; + + if (identifierExpr.text !== 'renderModule') { + return; + } + + const renderModuleIdentifier = identifierExpr as ts.Identifier; + + const idPlatformServer = ts.createUniqueName('__NgCli_bootstrap_'); + const idNgFactory = ts.createUniqueName('__NgCli_bootstrap_'); + + ops.push( + // Replace the entry module import. + ...insertStarImport(sourceFile, idNgFactory, factoryModulePath), + new ReplaceNodeOperation(sourceFile, entryModuleIdentifier, + ts.createPropertyAccess(idNgFactory, ts.createIdentifier(factoryClassName))), + // Replace the renderModule import. + ...insertStarImport(sourceFile, idPlatformServer, '@angular/platform-server'), + new ReplaceNodeOperation(sourceFile, renderModuleIdentifier, + ts.createPropertyAccess(idPlatformServer, 'renderModuleFactory')), + ); + } + } else if (entryModuleIdentifier.parent.kind === ts.SyntaxKind.PropertyAssignment) { + // This is for things that accept a module as a property in a config object + // .ie the express engine + + const idNgFactory = ts.createUniqueName('__NgCli_bootstrap_'); + + ops.push( + ...insertStarImport(sourceFile, idNgFactory, factoryModulePath), + new ReplaceNodeOperation(sourceFile, entryModuleIdentifier, + ts.createPropertyAccess(idNgFactory, ts.createIdentifier(factoryClassName))) + ); + } + }); + + return ops; + }; + + return makeTransform(standardTransform, getTypeChecker); +} diff --git a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts new file mode 100644 index 0000000000..5ca49b0e2a --- /dev/null +++ b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts @@ -0,0 +1,215 @@ +import { oneLine, stripIndent } from 'common-tags'; +import { createTypescriptContext, transformTypescript } from './ast_helpers'; +import { replaceServerBootstrap } from './replace_server_bootstrap'; + +describe('@ngtools/webpack transformers', () => { + describe('replace_server_bootstrap', () => { + it('should replace bootstrap', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformDynamicServer } from '@angular/platform-server'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformDynamicServer().bootstrapModule(AppModule); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import { enableProdMode } from '@angular/core'; + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + import * as __NgCli_bootstrap_2 from "@angular/platform-server"; + + if (environment.production) { + enableProdMode(); + } + __NgCli_bootstrap_2.platformServer().bootstrapModuleFactory(__NgCli_bootstrap_1.AppModuleNgFactory); + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceServerBootstrap( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should replace renderModule', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { renderModule } from '@angular/platform-server'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + renderModule(AppModule, { + document: '', + url: '/' + }); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import { enableProdMode } from '@angular/core'; + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + import * as __NgCli_bootstrap_2 from "@angular/platform-server"; + + if (environment.production) { + enableProdMode(); + } + __NgCli_bootstrap_2.renderModuleFactory(__NgCli_bootstrap_1.AppModuleNgFactory, { + document: '', + url: '/' + }); + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceServerBootstrap( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should replace when the module is used in a config object', () => { + const input = stripIndent` + import * as express from 'express'; + + import { enableProdMode } from '@angular/core'; + import { ngExpressEngine } from '@nguniversal/express-engine'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + const server = express(); + server.engine('html', ngExpressEngine({ + bootstrap: AppModule + })); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import * as express from 'express'; + + import { enableProdMode } from '@angular/core'; + import { ngExpressEngine } from '@nguniversal/express-engine'; + + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + + if (environment.production) { + enableProdMode(); + } + + const server = express(); + server.engine('html', ngExpressEngine({ + bootstrap: __NgCli_bootstrap_1.AppModuleNgFactory + })); + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceServerBootstrap( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should replace bootstrap when barrel files are used', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformDynamicServer } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformDynamicServer().bootstrapModule(AppModule); + `; + + // tslint:disable:max-line-length + const output = stripIndent` + import { enableProdMode } from '@angular/core'; + import { environment } from './environments/environment'; + + import * as __NgCli_bootstrap_1 from "./app/app.module.ngfactory"; + import * as __NgCli_bootstrap_2 from "@angular/platform-server"; + + if (environment.production) { + enableProdMode(); + } + __NgCli_bootstrap_2.platformServer().bootstrapModuleFactory(__NgCli_bootstrap_1.AppModuleNgFactory); + `; + // tslint:enable:max-line-length + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceServerBootstrap( + () => true, + () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${output}`); + }); + + it('should not replace bootstrap when there is no entry module', () => { + const input = stripIndent` + import { enableProdMode } from '@angular/core'; + import { platformDynamicServer } from '@angular/platform-browser-dynamic'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + platformDynamicServer().bootstrapModule(AppModule); + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = replaceServerBootstrap( + () => true, + () => undefined, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(oneLine`${result}`).toEqual(oneLine`${input}`); + }); + }); +}); diff --git a/packages/ngtools/webpack/src/type_checker.ts b/packages/ngtools/webpack/src/type_checker.ts new file mode 100644 index 0000000000..e14b8a55b8 --- /dev/null +++ b/packages/ngtools/webpack/src/type_checker.ts @@ -0,0 +1,142 @@ +// @ignoreDep typescript +import * as ts from 'typescript'; +import chalk from 'chalk'; +import { + Program, + CompilerOptions, + CompilerHost, + createProgram, + createCompilerHost, + formatDiagnostics, +} from './ngtools_api'; +import { WebpackCompilerHost } from './compiler_host'; +import { time, timeEnd } from './benchmark'; +import { CancellationToken, gatherDiagnostics } from './gather_diagnostics'; + + +// This file should run in a child process with the AUTO_START_ARG argument + +// Force basic color support on terminals with no color support. +// Chalk typings don't have the correct constructor parameters. +const chalkCtx = new (chalk.constructor as any)(chalk.supportsColor ? {} : { level: 1 }); +const { bold, red, yellow } = chalkCtx; + + +export enum MESSAGE_KIND { + Init, + Update +} + +export abstract class TypeCheckerMessage { + constructor(public kind: MESSAGE_KIND) { } +} + +export class InitMessage extends TypeCheckerMessage { + constructor( + public compilerOptions: ts.CompilerOptions, + public basePath: string, + public jitMode: boolean, + public rootNames: string[], + ) { + super(MESSAGE_KIND.Init); + } +} + +export class UpdateMessage extends TypeCheckerMessage { + constructor(public rootNames: string[], public changedCompilationFiles: string[]) { + super(MESSAGE_KIND.Update); + } +} + +export const AUTO_START_ARG = '9d93e901-158a-4cf9-ba1b-2f0582ffcfeb'; + +export class TypeChecker { + private _program: ts.Program | Program; + private _compilerHost: WebpackCompilerHost & CompilerHost; + + constructor( + private _compilerOptions: CompilerOptions, + _basePath: string, + private _JitMode: boolean, + private _rootNames: string[], + ) { + time('TypeChecker.constructor'); + const compilerHost = new WebpackCompilerHost(_compilerOptions, _basePath); + compilerHost.enableCaching(); + // We don't set a async resource loader on the compiler host because we only support + // html templates, which are the only ones that can throw errors, and those can be loaded + // synchronously. + // If we need to also report errors on styles then we'll need to ask the main thread + // for these resources. + this._compilerHost = createCompilerHost({ + options: this._compilerOptions, + tsHost: compilerHost + }) as CompilerHost & WebpackCompilerHost; + timeEnd('TypeChecker.constructor'); + } + + private _update(rootNames: string[], changedCompilationFiles: string[]) { + time('TypeChecker._update'); + this._rootNames = rootNames; + changedCompilationFiles.forEach((fileName) => { + this._compilerHost.invalidate(fileName); + }); + timeEnd('TypeChecker._update'); + } + + private _createOrUpdateProgram() { + if (this._JitMode) { + // Create the TypeScript program. + time('TypeChecker._createOrUpdateProgram.ts.createProgram'); + this._program = ts.createProgram( + this._rootNames, + this._compilerOptions, + this._compilerHost, + this._program as ts.Program + ) as ts.Program; + timeEnd('TypeChecker._createOrUpdateProgram.ts.createProgram'); + } else { + time('TypeChecker._createOrUpdateProgram.ng.createProgram'); + // Create the Angular program. + this._program = createProgram({ + rootNames: this._rootNames, + options: this._compilerOptions, + host: this._compilerHost, + oldProgram: this._program as Program + }) as Program; + timeEnd('TypeChecker._createOrUpdateProgram.ng.createProgram'); + } + } + + private _diagnose(cancellationToken: CancellationToken) { + const allDiagnostics = gatherDiagnostics( + this._program, this._JitMode, 'TypeChecker', cancellationToken); + + // Report diagnostics. + if (!cancellationToken.isCancellationRequested()) { + const errors = allDiagnostics.filter((d) => d.category === ts.DiagnosticCategory.Error); + const warnings = allDiagnostics.filter((d) => d.category === ts.DiagnosticCategory.Warning); + + if (errors.length > 0) { + const message = formatDiagnostics(errors); + console.error(bold(red('ERROR in ' + message))); + } else { + // Reset the changed file tracker only if there are no errors. + this._compilerHost.resetChangedFileTracker(); + } + + if (warnings.length > 0) { + const message = formatDiagnostics(warnings); + console.log(bold(yellow('WARNING in ' + message))); + } + } + } + + public update(rootNames: string[], changedCompilationFiles: string[], + cancellationToken: CancellationToken) { + this._update(rootNames, changedCompilationFiles); + this._createOrUpdateProgram(); + this._diagnose(cancellationToken); + } +} + diff --git a/packages/ngtools/webpack/src/type_checker_bootstrap.js b/packages/ngtools/webpack/src/type_checker_bootstrap.js new file mode 100644 index 0000000000..9326a42d9b --- /dev/null +++ b/packages/ngtools/webpack/src/type_checker_bootstrap.js @@ -0,0 +1,2 @@ +require('../../../../lib/bootstrap-local'); +require('./type_checker_worker.ts'); diff --git a/packages/ngtools/webpack/src/type_checker_worker.ts b/packages/ngtools/webpack/src/type_checker_worker.ts new file mode 100644 index 0000000000..ce1cafba57 --- /dev/null +++ b/packages/ngtools/webpack/src/type_checker_worker.ts @@ -0,0 +1,53 @@ +import * as process from 'process'; + +import { time, timeEnd } from './benchmark'; +import { CancellationToken } from './gather_diagnostics'; + +import { + AUTO_START_ARG, + TypeCheckerMessage, + InitMessage, + MESSAGE_KIND, + UpdateMessage, + TypeChecker +} from './type_checker'; + +let typeChecker: TypeChecker; +let lastCancellationToken: CancellationToken; + +// only listen to messages if started from the AngularCompilerPlugin +if (process.argv.indexOf(AUTO_START_ARG) >= 0) { + process.on('message', (message: TypeCheckerMessage) => { + time('TypeChecker.message'); + switch (message.kind) { + case MESSAGE_KIND.Init: + const initMessage = message as InitMessage; + typeChecker = new TypeChecker( + initMessage.compilerOptions, + initMessage.basePath, + initMessage.jitMode, + initMessage.rootNames, + ); + break; + case MESSAGE_KIND.Update: + if (!typeChecker) { + throw new Error('TypeChecker: update message received before initialization'); + } + if (lastCancellationToken) { + // This cancellation token doesn't seem to do much, messages don't seem to be processed + // before the diagnostics finish. + lastCancellationToken.requestCancellation(); + } + const updateMessage = message as UpdateMessage; + lastCancellationToken = new CancellationToken(); + typeChecker.update(updateMessage.rootNames, updateMessage.changedCompilationFiles, + lastCancellationToken); + break; + default: + throw new Error(`TypeChecker: Unexpected message received: ${message}.`); + } + timeEnd('TypeChecker.message'); + }); +} + + diff --git a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts new file mode 100644 index 0000000000..7cf5d3d88b --- /dev/null +++ b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts @@ -0,0 +1,121 @@ +import { Stats } from 'fs'; + +import { InputFileSystem, NodeWatchFileSystemInterface, Callback } from './webpack'; +import { WebpackCompilerHost } from './compiler_host'; + +export const NodeWatchFileSystem: NodeWatchFileSystemInterface = require( + 'webpack/lib/node/NodeWatchFileSystem'); + +export class VirtualFileSystemDecorator implements InputFileSystem { + constructor( + private _inputFileSystem: InputFileSystem, + private _webpackCompilerHost: WebpackCompilerHost + ) { } + + // We only need to intercept calls to individual files that are present in WebpackCompilerHost. + private _readFileSync(path: string): string | null { + if (this._webpackCompilerHost.fileExists(path, false)) { + return this._webpackCompilerHost.readFile(path); + } + + return null; + } + + private _statSync(path: string): Stats | null { + if (this._webpackCompilerHost.fileExists(path, false)) { + return this._webpackCompilerHost.stat(path); + } + + return null; + } + + getVirtualFilesPaths() { + return this._webpackCompilerHost.getNgFactoryPaths(); + } + + stat(path: string, callback: Callback): void { + const result = this._statSync(path); + if (result) { + callback(null, result); + } else { + this._inputFileSystem.stat(path, callback); + } + } + + readdir(path: string, callback: Callback): void { + this._inputFileSystem.readdir(path, callback); + } + + readFile(path: string, callback: Callback): void { + const result = this._readFileSync(path); + if (result) { + callback(null, result); + } else { + this._inputFileSystem.readFile(path, callback); + } + } + + readJson(path: string, callback: Callback): void { + this._inputFileSystem.readJson(path, callback); + } + + readlink(path: string, callback: Callback): void { + this._inputFileSystem.readlink(path, callback); + } + + statSync(path: string): Stats { + const result = this._statSync(path); + return result || this._inputFileSystem.statSync(path); + } + + readdirSync(path: string): string[] { + return this._inputFileSystem.readdirSync(path); + } + + readFileSync(path: string): string { + const result = this._readFileSync(path); + return result || this._inputFileSystem.readFileSync(path); + } + + readJsonSync(path: string): string { + return this._inputFileSystem.readJsonSync(path); + } + + readlinkSync(path: string): string { + return this._inputFileSystem.readlinkSync(path); + } + + purge(changes?: string[] | string): void { + if (typeof changes === 'string') { + this._webpackCompilerHost.invalidate(changes); + } else if (Array.isArray(changes)) { + changes.forEach((fileName: string) => this._webpackCompilerHost.invalidate(fileName)); + } + if (this._inputFileSystem.purge) { + this._inputFileSystem.purge(changes); + } + } +} + +export class VirtualWatchFileSystemDecorator extends NodeWatchFileSystem { + constructor(private _virtualInputFileSystem: VirtualFileSystemDecorator) { + super(_virtualInputFileSystem); + } + + watch(files: any, dirs: any, missing: any, startTime: any, options: any, callback: any, + callbackUndelayed: any) { + const newCallback = (err: any, filesModified: any, contextModified: any, missingModified: any, + fileTimestamps: { [k: string]: number }, contextTimestamps: { [k: string]: number }) => { + // Update fileTimestamps with timestamps from virtual files. + const virtualFilesStats = this._virtualInputFileSystem.getVirtualFilesPaths() + .map((fileName) => ({ + path: fileName, + mtime: +this._virtualInputFileSystem.statSync(fileName).mtime + })); + virtualFilesStats.forEach(stats => fileTimestamps[stats.path] = +stats.mtime); + callback(err, filesModified, contextModified, missingModified, fileTimestamps, + contextTimestamps); + }; + return super.watch(files, dirs, missing, startTime, options, newCallback, callbackUndelayed); + } +} diff --git a/packages/ngtools/webpack/src/webpack.ts b/packages/ngtools/webpack/src/webpack.ts new file mode 100644 index 0000000000..51751fa087 --- /dev/null +++ b/packages/ngtools/webpack/src/webpack.ts @@ -0,0 +1,61 @@ +import { Stats } from 'fs'; + +// Declarations for (some) Webpack types. Only what's needed. + +export interface Request { + request?: Request; + relativePath: string; +} + +export interface Callback { + (err?: Error | null, result?: T): void; +} + +export interface ResolverCallback { + (request: Request, callback: Callback): void; +} + +export interface Tapable { + apply(plugin: ResolverPlugin): void; +} + +export interface ResolverPlugin extends Tapable { + plugin(source: string, cb: ResolverCallback): void; + doResolve(target: string, req: Request, desc: string, callback: Callback): void; + join(relativePath: string, innerRequest: Request): Request; +} + +export interface LoaderCallback { + (err: Error | null, source?: string, sourceMap?: string): void; +} + +export interface NormalModuleFactory { + plugin(event: string, + callback: (data: NormalModuleFactoryRequest, callback: Callback) => void): any; +} + +export interface NormalModuleFactoryRequest { + request: string; + contextInfo: { issuer: string }; +} + +export interface InputFileSystem { + stat(path: string, callback: Callback): void; + readdir(path: string, callback: Callback): void; + readFile(path: string, callback: Callback): void; + readJson(path: string, callback: Callback): void; + readlink(path: string, callback: Callback): void; + statSync(path: string): Stats; + readdirSync(path: string): string[]; + readFileSync(path: string): string; + readJsonSync(path: string): string; + readlinkSync(path: string): string; + purge(changes?: string[] | string): void; +} + +export interface NodeWatchFileSystemInterface { + inputFileSystem: InputFileSystem; + new(inputFileSystem: InputFileSystem): NodeWatchFileSystemInterface; + watch(files: any, dirs: any, missing: any, startTime: any, options: any, callback: any, + callbackUndelayed: any): any; +} diff --git a/packages/ngtools/webpack/tsconfig.json b/packages/ngtools/webpack/tsconfig.json new file mode 100644 index 0000000000..46fb29b75b --- /dev/null +++ b/packages/ngtools/webpack/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.json", + + "compilerOptions": { + "outDir": "../../../dist/@ngtools/webpack", + "rootDir": ".", + "baseUrl": "" + } +} From f6aa4da78c663602183482c00cd59b30cb9f9342 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 17:34:37 -0700 Subject: [PATCH 231/724] build: fix all lint errors for @ngtools/webpack --- packages/ngtools/webpack/package.json | 1 + .../webpack/src/angular_compiler_plugin.ts | 196 ++++++++++-------- packages/ngtools/webpack/src/benchmark.ts | 7 + packages/ngtools/webpack/src/compiler_host.ts | 94 ++++++--- .../ngtools/webpack/src/entry_resolver.ts | 15 +- .../webpack/src/extract_i18n_plugin.ts | 29 ++- .../ngtools/webpack/src/gather_diagnostics.ts | 39 ++-- packages/ngtools/webpack/src/index.ts | 8 +- packages/ngtools/webpack/src/lazy_routes.ts | 42 ++-- packages/ngtools/webpack/src/loader.ts | 19 +- packages/ngtools/webpack/src/ngtools_api.ts | 36 ++-- packages/ngtools/webpack/src/paths-plugin.ts | 25 ++- packages/ngtools/webpack/src/refactor.ts | 45 +++- .../ngtools/webpack/src/resource_loader.ts | 13 +- .../webpack/src/transformers/ast_helpers.ts | 18 +- .../webpack/src/transformers/elide_imports.ts | 22 +- .../transformers/export_lazy_module_map.ts | 45 ++-- .../export_lazy_module_map_spec.ts | 25 ++- .../src/transformers/export_ngfactory.ts | 15 +- .../src/transformers/export_ngfactory_spec.ts | 25 ++- .../ngtools/webpack/src/transformers/index.ts | 7 + .../webpack/src/transformers/insert_import.ts | 53 +++-- .../webpack/src/transformers/interfaces.ts | 13 +- .../src/transformers/make_transform.ts | 23 +- .../multiple_transformers_spec.ts | 19 +- .../src/transformers/register_locale_data.ts | 23 +- .../transformers/register_locale_data_spec.ts | 21 +- .../src/transformers/remove_decorators.ts | 12 +- .../transformers/remove_decorators_spec.ts | 43 ++-- .../src/transformers/replace_bootstrap.ts | 15 +- .../transformers/replace_bootstrap_spec.ts | 25 ++- .../src/transformers/replace_resources.ts | 42 ++-- .../transformers/replace_resources_spec.ts | 25 ++- .../transformers/replace_server_bootstrap.ts | 15 +- .../replace_server_bootstrap_spec.ts | 37 ++-- packages/ngtools/webpack/src/type_checker.ts | 35 ++-- .../webpack/src/type_checker_worker.ts | 15 +- .../src/virtual_file_system_decorator.ts | 50 +++-- packages/ngtools/webpack/src/webpack.ts | 25 ++- 39 files changed, 803 insertions(+), 414 deletions(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 6e82ce38dc..1328a004bb 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -31,6 +31,7 @@ "webpack-sources": "^1.1.0" }, "peerDependencies": { + "typescript": "~2.5.0 | ~2.6.0 | ~2.7.0", "webpack": "^4.0.0" } } diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 00d1450390..2be532576b 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -1,52 +1,61 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// TODO: fix webpack typings. +// tslint:disable-next-line:no-global-tslint-disable +// tslint:disable:no-any +import { ChildProcess, ForkOptions, fork } from 'child_process'; import * as fs from 'fs'; -import { fork, ForkOptions, ChildProcess } from 'child_process'; import * as path from 'path'; import * as ts from 'typescript'; - -const ContextElementDependency = require('webpack/lib/dependencies/ContextElementDependency'); -const treeKill = require('tree-kill'); - -import { WebpackResourceLoader } from './resource_loader'; +import { time, timeEnd } from './benchmark'; import { WebpackCompilerHost } from './compiler_host'; -import { resolveWithPaths } from './paths-plugin'; -import { findLazyRoutes, LazyRouteMap } from './lazy_routes'; -import { - VirtualFileSystemDecorator, - VirtualWatchFileSystemDecorator -} from './virtual_file_system_decorator'; import { resolveEntryModuleFromMain } from './entry_resolver'; -import { - replaceBootstrap, - replaceServerBootstrap, - exportNgFactory, - exportLazyModuleMap, - removeDecorators, - registerLocaleData, - findResources, - replaceResources, -} from './transformers'; -import { time, timeEnd } from './benchmark'; -import { InitMessage, UpdateMessage, AUTO_START_ARG } from './type_checker'; import { gatherDiagnostics, hasErrors } from './gather_diagnostics'; +import { LazyRouteMap, findLazyRoutes } from './lazy_routes'; import { CompilerCliIsSupported, - __NGTOOLS_PRIVATE_API_2, - VERSION, - DEFAULT_ERROR_CODE, - UNKNOWN_ERROR_CODE, - SOURCE, - Program, - CompilerOptions, CompilerHost, + CompilerOptions, + DEFAULT_ERROR_CODE, Diagnostic, EmitFlags, - createProgram, + Program, + SOURCE, + UNKNOWN_ERROR_CODE, + VERSION, + __NGTOOLS_PRIVATE_API_2, createCompilerHost, + createProgram, formatDiagnostics, readConfiguration, } from './ngtools_api'; +import { resolveWithPaths } from './paths-plugin'; +import { WebpackResourceLoader } from './resource_loader'; +import { + exportLazyModuleMap, + exportNgFactory, + findResources, + registerLocaleData, + removeDecorators, + replaceBootstrap, + replaceResources, + replaceServerBootstrap, +} from './transformers'; import { collectDeepNodes } from './transformers/ast_helpers'; +import { AUTO_START_ARG, InitMessage, UpdateMessage } from './type_checker'; +import { + VirtualFileSystemDecorator, + VirtualWatchFileSystemDecorator, +} from './virtual_file_system_decorator'; + + +const ContextElementDependency = require('webpack/lib/dependencies/ContextElementDependency'); +const treeKill = require('tree-kill'); /** @@ -82,7 +91,7 @@ export interface AngularCompilerPluginOptions { export enum PLATFORM { Browser, - Server + Server, } export class AngularCompilerPlugin { @@ -117,7 +126,7 @@ export class AngularCompilerPlugin { // TypeChecker process. private _forkTypeChecker = true; - private _typeCheckerProcess: ChildProcess; + private _typeCheckerProcess: ChildProcess | null; private _forkedTypeCheckerInitialized = false; private get _ngCompilerSupportsNewApi() { @@ -138,11 +147,12 @@ export class AngularCompilerPlugin { get done() { return this._donePromise; } get entryModule() { if (!this._entryModule) { - return undefined; + return null; } const splitted = this._entryModule.split(/(#[a-zA-Z_]([\w]+))$/); const path = splitted[0]; const className = !!splitted[1] ? splitted[1].substring(1) : 'default'; + return { path, className }; } @@ -165,7 +175,7 @@ export class AngularCompilerPlugin { if (fs.statSync(maybeBasePath).isFile()) { basePath = path.dirname(basePath); } - if (options.hasOwnProperty('basePath')) { + if (options.basePath !== undefined) { basePath = path.resolve(process.cwd(), options.basePath); } @@ -181,7 +191,7 @@ export class AngularCompilerPlugin { this._rootNames = config.rootNames.concat(...this._singleFileIncludes); this._compilerOptions = { ...config.options, ...options.compilerOptions }; - this._basePath = config.options.basePath; + this._basePath = config.options.basePath || ''; // Overwrite outDir so we can find generated files next to their .ts origin in compilerHost. this._compilerOptions.outDir = ''; @@ -258,7 +268,7 @@ export class AngularCompilerPlugin { // Use the WebpackCompilerHost with a resource loader to create an AngularCompilerHost. this._compilerHost = createCompilerHost({ options: this._compilerOptions, - tsHost: webpackCompilerHost + tsHost: webpackCompilerHost, }) as CompilerHost & WebpackCompilerHost; // Override some files in the FileSystem with paths from the actual file system. @@ -266,7 +276,9 @@ export class AngularCompilerPlugin { for (const filePath of Object.keys(this._options.hostReplacementPaths)) { const replacementFilePath = this._options.hostReplacementPaths[filePath]; const content = this._compilerHost.readFile(replacementFilePath); - this._compilerHost.writeFile(filePath, content, false); + if (content) { + this._compilerHost.writeFile(filePath, content, false); + } } } @@ -317,6 +329,7 @@ export class AngularCompilerPlugin { return true; } } + return false; }); } @@ -346,7 +359,7 @@ export class AngularCompilerPlugin { this._rootNames, this._compilerOptions, this._compilerHost, - this._program as ts.Program + this._program as ts.Program, ); timeEnd('AngularCompilerPlugin._createOrUpdateProgram.ts.createProgram'); @@ -358,11 +371,12 @@ export class AngularCompilerPlugin { rootNames: this._rootNames, options: this._compilerOptions, host: this._compilerHost, - oldProgram: this._program as Program + oldProgram: this._program as Program, }); timeEnd('AngularCompilerPlugin._createOrUpdateProgram.ng.createProgram'); time('AngularCompilerPlugin._createOrUpdateProgram.ng.loadNgStructureAsync'); + return this._program.loadNgStructureAsync() .then(() => { timeEnd('AngularCompilerPlugin._createOrUpdateProgram.ng.loadNgStructureAsync'); @@ -388,11 +402,12 @@ export class AngularCompilerPlugin { host: this._compilerHost, angularCompilerOptions: Object.assign({}, this._compilerOptions, { // genDir seems to still be needed in @angular\compiler-cli\src\compiler_host.js:226. - genDir: '' + genDir: '', }), - entryModule: this._entryModule + entryModule: this._entryModule, }); timeEnd('AngularCompilerPlugin._getLazyRoutesFromNgtools'); + return result; } catch (err) { // We silence the error that the @angular/router could not be found. In that case, there is @@ -417,6 +432,7 @@ export class AngularCompilerPlugin { } } timeEnd('AngularCompilerPlugin._findLazyRoutesInAst'); + return result; } @@ -436,13 +452,14 @@ export class AngularCompilerPlugin { + `Duplicated path in loadChildren detected: "${ref}" is used in 2 loadChildren, ` + `but they point to different modules "(${acc[ref]} and ` + `"${curr.referencedModule.filePath}"). Webpack cannot distinguish on context and ` - + 'would fail to load the proper one.' + + 'would fail to load the proper one.', ); } acc[ref] = curr.referencedModule.filePath; + return acc; }, - {} as LazyRouteMap + {} as LazyRouteMap, ); } @@ -477,7 +494,7 @@ export class AngularCompilerPlugin { this._warnings.push( new Error(`Duplicated path in loadChildren detected during a rebuild. ` + `We will take the latest version detected and override it to save rebuild time. ` - + `You should perform a full build to validate that your routes don't overlap.`) + + `You should perform a full build to validate that your routes don't overlap.`), ); } } else { @@ -489,7 +506,7 @@ export class AngularCompilerPlugin { private _createForkedTypeChecker() { // Bootstrap type checker is using local CLI. - const g: any = global; + const g: any = global; // tslint:disable-line:no-any const typeCheckerFile: string = g['angularCliIsLocal'] ? './type_checker_bootstrap.js' : './type_checker_worker.js'; @@ -513,7 +530,7 @@ export class AngularCompilerPlugin { // Handle child process exit. this._typeCheckerProcess.once('exit', (_, signal) => { - this._typeCheckerProcess = undefined; + this._typeCheckerProcess = null; // If process exited not because of SIGTERM (see _killForkedTypeChecker), than something // went wrong and it should fallback to type checking on the main thread. @@ -529,20 +546,23 @@ export class AngularCompilerPlugin { private _killForkedTypeChecker() { if (this._typeCheckerProcess && this._typeCheckerProcess.pid) { treeKill(this._typeCheckerProcess.pid, 'SIGTERM'); - this._typeCheckerProcess = undefined; + this._typeCheckerProcess = null; } } private _updateForkedTypeChecker(rootNames: string[], changedCompilationFiles: string[]) { - if (!this._forkedTypeCheckerInitialized) { - this._typeCheckerProcess.send(new InitMessage(this._compilerOptions, this._basePath, - this._JitMode, this._rootNames)); - this._forkedTypeCheckerInitialized = true; + if (this._typeCheckerProcess) { + if (!this._forkedTypeCheckerInitialized) { + this._typeCheckerProcess.send(new InitMessage(this._compilerOptions, this._basePath, + this._JitMode, this._rootNames)); + this._forkedTypeCheckerInitialized = true; + } + this._typeCheckerProcess.send(new UpdateMessage(rootNames, changedCompilationFiles)); } - this._typeCheckerProcess.send(new UpdateMessage(rootNames, changedCompilationFiles)); } // Registration hook for webpack plugin. + // tslint:disable-next-line:no-any apply(compiler: any) { // Decorate inputFileSystem to serve contents of CompilerHost. // Use decorated inputFileSystem in watchFileSystem. @@ -566,29 +586,34 @@ export class AngularCompilerPlugin { const angularCoreDirname = fs.realpathSync(path.dirname(angularCorePackagePath)); cmf.hooks.afterResolve.tapAsync('angular-compiler', - (result: any, callback: (err?: any, request?: any) => void) => { + // tslint:disable-next-line:no-any + (result: any, callback: (err?: Error, request?: any) => void) => { if (!result) { return callback(); } // Alter only request from Angular. if (!result.resource.startsWith(angularCoreDirname)) { - return callback(null, result); + return callback(undefined, result); + } + if (!this.done) { + return callback(undefined, result); } - this.done!.then(() => { + this.done.then(() => { // This folder does not exist, but we need to give webpack a resource. // TODO: check if we can't just leave it as is (angularCoreModuleDir). result.resource = path.join(this._basePath, '$$_lazy_route_resource'); result.dependencies.forEach((d: any) => d.critical = false); result.resolveDependencies = (_fs: any, resourceOrOptions: any, recursiveOrCallback: any, - _regExp: RegExp, cb: any) => { + _regExp: RegExp, cb: any) => { const dependencies = Object.keys(this._lazyRoutes) .map((key) => { const modulePath = this._lazyRoutes[key]; const importPath = key.split('#')[0]; if (modulePath !== null) { const name = importPath.replace(/(\.ngfactory)?\.(js|ts)$/, ''); + return new ContextElementDependency(modulePath, name); } else { return null; @@ -604,8 +629,9 @@ export class AngularCompilerPlugin { } cb(null, dependencies); }; - return callback(null, result); - }, () => callback(null)) + + return callback(undefined, result); + }, () => callback()) .catch(err => callback(err)); }); }); @@ -699,11 +725,10 @@ export class AngularCompilerPlugin { } private _makeTransformers() { - const isAppPath = (fileName: string) => !fileName.endsWith('.ngfactory.ts') && !fileName.endsWith('.ngstyle.ts'); const isMainPath = (fileName: string) => fileName === this._mainPath; - const getEntryModule = () => this.entryModule; + const getEntryModule = () => this._entryModule; const getLazyRoutes = () => this._lazyRoutes; const getTypeChecker = () => this._getTsProgram().getTypeChecker(); @@ -742,7 +767,7 @@ export class AngularCompilerPlugin { time('AngularCompilerPlugin._update'); // We only want to update on TS and template changes, but all kinds of files are on this // list, like package.json and .ngsummary.json files. - let changedFiles = this._getChangedCompilationFiles(); + const changedFiles = this._getChangedCompilationFiles(); // If nothing we care about changed and it isn't the first run, don't do anything. if (changedFiles.length === 0 && !this._firstRun) { @@ -785,7 +810,7 @@ export class AngularCompilerPlugin { // So we ignore missing source files files here. // hostReplacementPaths needs to be fixed anyway to take care of the following issue. // https://github.com/angular/angular-cli/issues/7305#issuecomment-332150230 - .filter((x) => !!x); + .filter((x) => !!x) as ts.SourceFile[]; // Emit files. time('AngularCompilerPlugin._update._emit'); @@ -829,25 +854,28 @@ export class AngularCompilerPlugin { } // Write the extracted messages to disk. - const i18nOutFilePath = path.resolve(this._basePath, this._compilerOptions.i18nOutFile); - const i18nOutFileContent = this._compilerHost.readFile(i18nOutFilePath); - if (i18nOutFileContent) { - _recursiveMkDir(path.dirname(i18nOutFilePath)) - .then(() => fs.writeFileSync(i18nOutFilePath, i18nOutFileContent)); + if (this._compilerOptions.i18nOutFile) { + const i18nOutFilePath = path.resolve(this._basePath, this._compilerOptions.i18nOutFile); + const i18nOutFileContent = this._compilerHost.readFile(i18nOutFilePath); + if (i18nOutFileContent) { + _recursiveMkDir(path.dirname(i18nOutFilePath)) + .then(() => fs.writeFileSync(i18nOutFilePath, i18nOutFileContent)); + } } } getCompiledFile(fileName: string) { const outputFile = fileName.replace(/.ts$/, '.js'); let outputText: string; - let sourceMap: string; + let sourceMap: string | undefined; let errorDependencies: string[] = []; if (this._emitSkipped) { - if (this._compilerHost.fileExists(outputFile, false)) { + const text = this._compilerHost.readFile(outputFile); + if (text) { // If the compilation didn't emit files this time, try to return the cached files from the // last compilation and let the compilation errors show what's wrong. - outputText = this._compilerHost.readFile(outputFile); + outputText = text; sourceMap = this._compilerHost.readFile(outputFile + '.map'); } else { // There's nothing we can serve. Return an empty string to prevent lenghty webpack errors, @@ -876,9 +904,10 @@ export class AngularCompilerPlugin { throw new Error(msg); } - outputText = this._compilerHost.readFile(outputFile); + outputText = this._compilerHost.readFile(outputFile) || ''; sourceMap = this._compilerHost.readFile(outputFile + '.map'); } + return { outputText, sourceMap, errorDependencies }; } @@ -916,10 +945,11 @@ export class AngularCompilerPlugin { const uniqueDependencies = new Set([ ...esImports, ...resourceImports, - ...this.getResourceDependencies(resolvedFileName) - ].map((p) => this._compilerHost.denormalizePath(p))); + ...this.getResourceDependencies(resolvedFileName), + ].map((p) => p && this._compilerHost.denormalizePath(p))); - return [...uniqueDependencies]; + return [...uniqueDependencies] + .filter(x => !!x) as string[]; } getResourceDependencies(fileName: string): string[] { @@ -956,7 +986,7 @@ export class AngularCompilerPlugin { const timeLabel = `AngularCompilerPlugin._emit.ts+${sf.fileName}+.emit`; time(timeLabel); emitResult = tsProgram.emit(sf, undefined, undefined, undefined, - { before: this._transformers } + { before: this._transformers }, ); allDiagnostics.push(...emitResult.diagnostics); timeEnd(timeLabel); @@ -993,8 +1023,8 @@ export class AngularCompilerPlugin { const emitFlags = extractI18n ? EmitFlags.I18nBundle : EmitFlags.Default; emitResult = angularProgram.emit({ emitFlags, customTransformers: { - beforeTs: this._transformers - } + beforeTs: this._transformers, + }, }); allDiagnostics.push(...emitResult.diagnostics); if (extractI18n) { @@ -1008,7 +1038,7 @@ export class AngularCompilerPlugin { // This function is available in the import below, but this way we avoid the dependency. // import { isSyntaxError } from '@angular/compiler'; function isSyntaxError(error: Error): boolean { - return (error as any)['ngSyntaxError']; + return (error as any)['ngSyntaxError']; // tslint:disable-line:no-any } let errMsg: string; @@ -1020,7 +1050,7 @@ export class AngularCompilerPlugin { } else { errMsg = e.stack; // It is not a syntax error we might have a program with unknown state, discard it. - this._program = undefined; + this._program = null; code = UNKNOWN_ERROR_CODE; } allDiagnostics.push( @@ -1028,6 +1058,7 @@ export class AngularCompilerPlugin { timeEnd('AngularCompilerPlugin._emit.catch'); } timeEnd('AngularCompilerPlugin._emit'); + return { program, emitResult, diagnostics: allDiagnostics }; } @@ -1062,6 +1093,7 @@ export class AngularCompilerPlugin { `"@angular/common/locales/${locale}", ` + `please check that "${locale}" is a valid locale id. If needed, you can use "registerLocaleData" manually.`); + return null; } } diff --git a/packages/ngtools/webpack/src/benchmark.ts b/packages/ngtools/webpack/src/benchmark.ts index 58fc744306..978dfe0126 100644 --- a/packages/ngtools/webpack/src/benchmark.ts +++ b/packages/ngtools/webpack/src/benchmark.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Internal benchmark reporting flag. // Use with CLI --no-progress flag for best results. // This should be false for commited code. diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index b6ba80e959..b9fe470abf 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -1,8 +1,14 @@ -// @ignoreDep typescript -import * as ts from 'typescript'; -import {basename, dirname, join, sep} from 'path'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as fs from 'fs'; -import {WebpackResourceLoader} from './resource_loader'; +import { basename, dirname, join, sep } from 'path'; +import * as ts from 'typescript'; +import { WebpackResourceLoader } from './resource_loader'; export interface OnErrorFn { @@ -174,42 +180,60 @@ export class WebpackCompilerHost implements ts.CompilerHost { } invalidate(fileName: string): void { - fileName = this.resolve(fileName); - if (fileName in this._files) { - this._files[fileName] = null; + const fullPath = this.resolve(fileName); + + if (fullPath in this._files) { + this._files[fullPath] = null; + } else { + for (const file in this._files) { + if (file.startsWith(fullPath + '/')) { + this._files[file] = null; + } + } + } + if (this.fileExists(fullPath)) { + this._changedFiles[fullPath] = true; } - this._changedFiles[fileName] = true; } fileExists(fileName: string, delegate = true): boolean { fileName = this.resolve(fileName); + return this._files[fileName] != null || (delegate && this._delegate.fileExists(fileName)); } - readFile(fileName: string): string { + readFile(fileName: string): string | undefined { fileName = this.resolve(fileName); const stats = this._files[fileName]; - if (stats == null) { + if (!stats) { const result = this._delegate.readFile(fileName); - if (result !== undefined && this._cache) { - this._setFileContent(fileName, result); - return result; - } else { - return result; + if (result !== undefined) { + if (this._cache) { + this._setFileContent(fileName, result); + } } + + return result; } + return stats.content; } // Does not delegate, use with `fileExists/directoryExists()`. stat(path: string): VirtualStats { path = this.resolve(path); - return this._files[path] || this._directories[path]; + const stats = this._files[path] || this._directories[path]; + if (!stats) { + throw new Error(`File not found: ${JSON.stringify(path)}`); + } + + return stats; } directoryExists(directoryName: string, delegate = true): boolean { directoryName = this.resolve(directoryName); + return (this._directories[directoryName] != null) || (delegate && this._delegate.directoryExists != undefined @@ -218,6 +242,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { getFiles(path: string): string[] { path = this.resolve(path); + return Object.keys(this._files) .filter(fileName => dirname(fileName) == path) .map(path => basename(path)); @@ -235,31 +260,35 @@ export class WebpackCompilerHost implements ts.CompilerHost { } catch (e) { delegated = []; } + return delegated.concat(subdirs); } getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, _onError?: OnErrorFn) { fileName = this.resolve(fileName); - const stats = this._files[fileName]; - if (stats == null) { + let stats = this._files[fileName]; + if (!stats) { const content = this.readFile(fileName); - if (!this._cache) { + if (!this._cache && content) { return ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes); - } else if (!this._files[fileName]) { - // If cache is turned on and the file exists, the readFile call will have populated stats. - // Empty stats at this point mean the file doesn't exist at and so we should return - // undefined. - return undefined; + } else { + stats = this._files[fileName]; + if (!stats) { + // If cache is turned on and the file exists, the readFile call will have populated stats. + // Empty stats at this point mean the file doesn't exist at and so we should return + // undefined. + return undefined; + } } } - return this._files[fileName]!.getSourceFile(languageVersion, this._setParentNodes); + return stats.getSourceFile(languageVersion, this._setParentNodes); } - getCancellationToken() { - return this._delegate.getCancellationToken!(); + get getCancellationToken() { + return this._delegate.getCancellationToken; } getDefaultLibFileName(options: ts.CompilerOptions) { @@ -269,9 +298,12 @@ export class WebpackCompilerHost implements ts.CompilerHost { // This is due to typescript CompilerHost interface being weird on writeFile. This shuts down // typings in WebStorm. get writeFile() { - return (fileName: string, data: string, _writeByteOrderMark: boolean, - _onError?: (message: string) => void, _sourceFiles?: ts.SourceFile[]): void => { - + return ( + fileName: string, + data: string, _writeByteOrderMark: boolean, + _onError?: (message: string) => void, + _sourceFiles?: ReadonlyArray, + ): void => { fileName = this.resolve(fileName); this._setFileContent(fileName, data); }; @@ -283,6 +315,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { getCanonicalFileName(fileName: string): string { fileName = this.resolve(fileName); + return this._delegate.getCanonicalFileName(fileName); } @@ -302,6 +335,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { if (this._resourceLoader) { // These paths are meant to be used by the loader so we must denormalize them. const denormalizedFileName = this.denormalizePath(fileName); + return this._resourceLoader.get(denormalizedFileName); } else { return this.readFile(fileName); diff --git a/packages/ngtools/webpack/src/entry_resolver.ts b/packages/ngtools/webpack/src/entry_resolver.ts index 4d496154ff..b844f96c5b 100644 --- a/packages/ngtools/webpack/src/entry_resolver.ts +++ b/packages/ngtools/webpack/src/entry_resolver.ts @@ -1,9 +1,14 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as fs from 'fs'; -import {join} from 'path'; +import { join } from 'path'; import * as ts from 'typescript'; - -import {TypeScriptFileRefactor} from './refactor'; +import { TypeScriptFileRefactor } from './refactor'; function _recursiveSymbolExportLookup(refactor: TypeScriptFileRefactor, @@ -124,6 +129,7 @@ function _symbolImportLookup(refactor: TypeScriptFileRefactor, } } } + return null; } @@ -137,6 +143,7 @@ export function resolveEntryModuleFromMain(mainPath: string, .map(node => node as ts.CallExpression) .filter(call => { const access = call.expression as ts.PropertyAccessExpression; + return access.kind == ts.SyntaxKind.PropertyAccessExpression && access.name.kind == ts.SyntaxKind.Identifier && (access.name.text == 'bootstrapModule' diff --git a/packages/ngtools/webpack/src/extract_i18n_plugin.ts b/packages/ngtools/webpack/src/extract_i18n_plugin.ts index 8d70c553aa..ddcd53b5a0 100644 --- a/packages/ngtools/webpack/src/extract_i18n_plugin.ts +++ b/packages/ngtools/webpack/src/extract_i18n_plugin.ts @@ -1,10 +1,19 @@ -import * as ts from 'typescript'; -import * as path from 'path'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// TODO: fix typings. +// tslint:disable-next-line:no-global-tslint-disable +// tslint:disable:no-any import * as fs from 'fs'; - -import {__NGTOOLS_PRIVATE_API_2, VERSION} from './ngtools_api'; -import {Tapable} from './webpack'; -import {WebpackResourceLoader} from './resource_loader'; +import * as path from 'path'; +import * as ts from 'typescript'; +import { VERSION, __NGTOOLS_PRIVATE_API_2 } from './ngtools_api'; +import { WebpackResourceLoader } from './resource_loader'; +import { Tapable } from './webpack'; export interface ExtractI18nPluginOptions { tsConfigPath: string; @@ -64,7 +73,7 @@ export class ExtractI18nPlugin implements Tapable { let fileNames = tsConfig.fileNames; if (options.hasOwnProperty('exclude')) { - let exclude: string[] = typeof options.exclude == 'string' + const exclude: string[] = typeof options.exclude == 'string' ? [options.exclude as string] : (options.exclude as string[]); exclude.forEach((pattern: string) => { @@ -103,7 +112,7 @@ export class ExtractI18nPlugin implements Tapable { { genDir }, this._compilerOptions, tsConfig.raw['angularCompilerOptions'], - { basePath, outDir: genDir } + { basePath, outDir: genDir }, ); this._basePath = basePath; @@ -137,7 +146,7 @@ export class ExtractI18nPlugin implements Tapable { apply(compiler: any) { compiler.hooks.make.tapAsync( 'extract-i8n', - (compilation: any, cb: any) => this._make(compilation, cb) + (compilation: any, cb: any) => this._make(compilation, cb), ); compiler.hooks.afterEmit.tapAsync('extract-i8n', (compilation: any, cb: any) => { @@ -172,7 +181,7 @@ export class ExtractI18nPlugin implements Tapable { locale: this._locale, outFile: this._outFile, - readResource: (path: string) => this._resourceLoader.get(path) + readResource: (path: string) => this._resourceLoader.get(path), }); }) .then(() => cb(), (err: any) => { diff --git a/packages/ngtools/webpack/src/gather_diagnostics.ts b/packages/ngtools/webpack/src/gather_diagnostics.ts index 34515af4f2..4bed8671d9 100644 --- a/packages/ngtools/webpack/src/gather_diagnostics.ts +++ b/packages/ngtools/webpack/src/gather_diagnostics.ts @@ -1,8 +1,13 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; - import { time, timeEnd } from './benchmark'; -import { Program, Diagnostic, Diagnostics } from './ngtools_api'; +import { Diagnostic, Diagnostics, Program } from './ngtools_api'; export class CancellationToken implements ts.CancellationToken { @@ -36,46 +41,44 @@ export function gatherDiagnostics( const allDiagnostics: Array = []; let checkOtherDiagnostics = true; - function checkDiagnostics(diags: Diagnostics | undefined) { - if (diags) { - allDiagnostics.push(...diags); - return !hasErrors(diags); + function checkDiagnostics(fn: T) { + if (checkOtherDiagnostics) { + const diags = fn(undefined, cancellationToken); + if (diags) { + allDiagnostics.push(...diags); + + checkOtherDiagnostics = !hasErrors(diags); + } } - return true; } if (jitMode) { const tsProgram = program as ts.Program; // Check syntactic diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ts.getSyntacticDiagnostics`); - checkOtherDiagnostics = checkOtherDiagnostics && - checkDiagnostics(tsProgram.getSyntacticDiagnostics(undefined, cancellationToken)); + checkDiagnostics(tsProgram.getSyntacticDiagnostics); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ts.getSyntacticDiagnostics`); // Check semantic diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ts.getSemanticDiagnostics`); - checkOtherDiagnostics = checkOtherDiagnostics && - checkDiagnostics(tsProgram.getSemanticDiagnostics(undefined, cancellationToken)); + checkDiagnostics(tsProgram.getSemanticDiagnostics); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ts.getSemanticDiagnostics`); } else { const angularProgram = program as Program; // Check TypeScript syntactic diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSyntacticDiagnostics`); - checkOtherDiagnostics = checkOtherDiagnostics && - checkDiagnostics(angularProgram.getTsSyntacticDiagnostics(undefined, cancellationToken)); + checkDiagnostics(angularProgram.getTsSyntacticDiagnostics); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSyntacticDiagnostics`); // Check TypeScript semantic and Angular structure diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSemanticDiagnostics`); - checkOtherDiagnostics = checkOtherDiagnostics && - checkDiagnostics(angularProgram.getTsSemanticDiagnostics(undefined, cancellationToken)); + checkDiagnostics(angularProgram.getTsSemanticDiagnostics); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSemanticDiagnostics`); // Check Angular semantic diagnostics time(`${benchmarkLabel}.gatherDiagnostics.ng.getNgSemanticDiagnostics`); - checkOtherDiagnostics = checkOtherDiagnostics && - checkDiagnostics(angularProgram.getNgSemanticDiagnostics(undefined, cancellationToken)); + checkDiagnostics(angularProgram.getNgSemanticDiagnostics); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getNgSemanticDiagnostics`); } diff --git a/packages/ngtools/webpack/src/index.ts b/packages/ngtools/webpack/src/index.ts index 90c84882b0..ffa3449b59 100644 --- a/packages/ngtools/webpack/src/index.ts +++ b/packages/ngtools/webpack/src/index.ts @@ -1,4 +1,10 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { gte } from 'semver'; // Test if typescript is available. This is a hack. We should be using peerDependencies instead diff --git a/packages/ngtools/webpack/src/lazy_routes.ts b/packages/ngtools/webpack/src/lazy_routes.ts index 72a69c25b7..85cc0f9acd 100644 --- a/packages/ngtools/webpack/src/lazy_routes.ts +++ b/packages/ngtools/webpack/src/lazy_routes.ts @@ -1,4 +1,11 @@ -import {dirname, join} from 'path'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { dirname, join } from 'path'; import * as ts from 'typescript'; import { findAstNodes, resolve } from './refactor'; @@ -23,37 +30,41 @@ export function findLazyRoutes( filePath: string, host: ts.CompilerHost, program?: ts.Program, - compilerOptions?: ts.CompilerOptions + compilerOptions?: ts.CompilerOptions, ): LazyRouteMap { - if (!compilerOptions && program) { + if (!compilerOptions) { + if (!program) { + throw new Error('Must pass either program or compilerOptions to findLazyRoutes.'); + } compilerOptions = program.getCompilerOptions(); } const fileName = resolve(filePath, host, compilerOptions).replace(/\\/g, '/'); - let sourceFile: ts.SourceFile; + let sourceFile: ts.SourceFile | undefined; if (program) { sourceFile = program.getSourceFile(fileName); } + if (!sourceFile) { - sourceFile = ts.createSourceFile( - fileName, - host.readFile(fileName), - ts.ScriptTarget.Latest, - true, - ); + const content = host.readFile(fileName); + if (content) { + sourceFile = ts.createSourceFile(fileName, content, ts.ScriptTarget.Latest, true); + } } + if (!sourceFile) { throw new Error(`Source file not found: '${fileName}'.`); } + const sf: ts.SourceFile = sourceFile; return findAstNodes(null, sourceFile, ts.SyntaxKind.ObjectLiteralExpression, true) // Get all their property assignments. .map((node: ts.ObjectLiteralExpression) => { - return findAstNodes(node, sourceFile, ts.SyntaxKind.PropertyAssignment, false); + return findAstNodes(node, sf, ts.SyntaxKind.PropertyAssignment, false); }) // Take all `loadChildren` elements. .reduce((acc: ts.PropertyAssignment[], props: ts.PropertyAssignment[]) => { return acc.concat(props.filter(literal => { - return _getContentOfKeyLiteral(sourceFile, literal.name) == 'loadChildren'; + return _getContentOfKeyLiteral(sf, literal.name) == 'loadChildren'; })); }, []) // Get only string values. @@ -64,11 +75,11 @@ export function findLazyRoutes( // does not exist. .map((routePath: string) => { const moduleName = routePath.split('#')[0]; - const compOptions = program ? program.getCompilerOptions() : compilerOptions; + const compOptions = (program && program.getCompilerOptions()) || compilerOptions || {}; const resolvedModuleName: ts.ResolvedModuleWithFailedLookupLocations = moduleName[0] == '.' ? ({ - resolvedModule: { resolvedFileName: join(dirname(filePath), moduleName) + '.ts' } - } as any) + resolvedModule: { resolvedFileName: join(dirname(filePath), moduleName) + '.ts' }, + } as ts.ResolvedModuleWithFailedLookupLocations) : ts.resolveModuleName(moduleName, filePath, compOptions, host); if (resolvedModuleName.resolvedModule && resolvedModuleName.resolvedModule.resolvedFileName @@ -81,6 +92,7 @@ export function findLazyRoutes( // Reduce to the LazyRouteMap map. .reduce((acc: LazyRouteMap, [routePath, resolvedModuleName]: [string, string | null]) => { acc[routePath] = resolvedModuleName; + return acc; }, {}); } diff --git a/packages/ngtools/webpack/src/loader.ts b/packages/ngtools/webpack/src/loader.ts index 7d25897504..ca6afad079 100644 --- a/packages/ngtools/webpack/src/loader.ts +++ b/packages/ngtools/webpack/src/loader.ts @@ -1,3 +1,13 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// TODO: fix typings. +// tslint:disable-next-line:no-global-tslint-disable +// tslint:disable:no-any import * as path from 'path'; import { loader } from 'webpack'; import { AngularCompilerPlugin } from './angular_compiler_plugin'; @@ -10,6 +20,11 @@ export function ngcLoader(this: loader.LoaderContext) { const cb = this.async(); const sourceFileName: string = this.resourcePath; const timeLabel = `ngcLoader+${sourceFileName}+`; + + if (!cb) { + throw new Error('This loader needs to support asynchronous webpack compilations.'); + } + time(timeLabel); const plugin = this._compilation._ngToolsWebpackPluginInstance; @@ -20,10 +35,10 @@ export function ngcLoader(this: loader.LoaderContext) { // We must verify that the plugin is an instance of the right class. // Throw an error if it isn't, that often means multiple @ngtools/webpack installs. - if (!(plugin instanceof AngularCompilerPlugin)) { + if (!(plugin instanceof AngularCompilerPlugin) || !plugin.done) { throw new Error('Angular Compiler was detected but it was an instance of the wrong class.\n' + 'This likely means you have several @ngtools/webpack packages installed. ' - + 'You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.' + + 'You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.', ); } diff --git a/packages/ngtools/webpack/src/ngtools_api.ts b/packages/ngtools/webpack/src/ngtools_api.ts index b70e87ca63..6b265eb75b 100644 --- a/packages/ngtools/webpack/src/ngtools_api.ts +++ b/packages/ngtools/webpack/src/ngtools_api.ts @@ -1,14 +1,23 @@ -// @ignoreDep @angular/compiler-cli -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// We disable implicit dependenccies because those are only for typings and don't have a runtime +// equivalent. +// tslint:disable-next-line:no-global-tslint-disable +// tslint:disable:no-implicit-dependencies /** * This is a copy of types in @compiler-cli/src/ngtools_api.d.ts file, * together with safe imports for private apis for cases where @angular/compiler-cli isn't * available or is below version 5. */ -import * as path from 'path'; -import * as ts from 'typescript'; import * as ngc from '@angular/compiler-cli'; import * as ngtools from '@angular/compiler-cli/ngtools2'; +import * as path from 'path'; +import * as ts from 'typescript'; export const DEFAULT_ERROR_CODE = 100; export const UNKNOWN_ERROR_CODE = 500; @@ -50,7 +59,7 @@ export function CompilerCliIsSupported() { // These imports do not exist on a global install for Angular CLI, so we cannot use a static ES6 // import. -let compilerCli: typeof ngc; +let compilerCli: typeof ngc | null = null; try { compilerCli = require('@angular/compiler-cli'); } catch { @@ -59,15 +68,15 @@ try { // plugin cannot be used. } -export const VERSION: typeof ngc.VERSION = compilerCli && compilerCli.VERSION; -export const __NGTOOLS_PRIVATE_API_2: typeof ngc.__NGTOOLS_PRIVATE_API_2 = +export const VERSION: typeof ngc.VERSION | null = compilerCli && compilerCli.VERSION; +export const __NGTOOLS_PRIVATE_API_2: typeof ngc.__NGTOOLS_PRIVATE_API_2 | null = compilerCli && compilerCli.__NGTOOLS_PRIVATE_API_2; -export const readConfiguration: typeof ngc.readConfiguration = +export const readConfiguration: typeof ngc.readConfiguration | null = compilerCli && compilerCli.readConfiguration; // These imports do not exist on Angular versions lower than 5, so we cannot use a static ES6 // import. -let ngtools2: typeof ngtools; +let ngtools2: typeof ngtools | null = null; try { ngtools2 = require('@angular/compiler-cli/ngtools2'); } catch { @@ -76,9 +85,10 @@ try { // plugin cannot be used. } -export const createProgram: typeof ngtools.createProgram = ngtools2 && ngtools2.createProgram; -export const createCompilerHost: typeof ngtools.createCompilerHost = +export const createProgram: typeof ngtools.createProgram | null = + ngtools2 && ngtools2.createProgram; +export const createCompilerHost: typeof ngtools.createCompilerHost | null = ngtools2 && ngtools2.createCompilerHost; -export const formatDiagnostics: typeof ngtools.formatDiagnostics = +export const formatDiagnostics: typeof ngtools.formatDiagnostics | null = ngtools2 && ngtools2.formatDiagnostics; -export const EmitFlags: typeof ngtools.EmitFlags = ngtools2 && ngtools2.EmitFlags; +export const EmitFlags: typeof ngtools.EmitFlags | null = ngtools2 && ngtools2.EmitFlags; diff --git a/packages/ngtools/webpack/src/paths-plugin.ts b/packages/ngtools/webpack/src/paths-plugin.ts index 0d2e4d5ecb..846648d0ae 100644 --- a/packages/ngtools/webpack/src/paths-plugin.ts +++ b/packages/ngtools/webpack/src/paths-plugin.ts @@ -1,4 +1,10 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as path from 'path'; import * as ts from 'typescript'; import { @@ -16,12 +22,14 @@ export function resolveWithPaths( ) { if (!request || !request.request || !compilerOptions.paths) { callback(null, request); + return; } // Only work on Javascript/TypeScript issuers. if (!request.contextInfo.issuer || !request.contextInfo.issuer.match(/\.[jt]s$/)) { callback(null, request); + return; } @@ -30,6 +38,7 @@ export function resolveWithPaths( // Relative requests are not mapped if (originalRequest.startsWith('.') || originalRequest.startsWith('/')) { callback(null, request); + return; } @@ -42,7 +51,7 @@ export function resolveWithPaths( if (pattern === originalRequest) { pathMapOptions.push({ partial: '', - potentials: compilerOptions.paths[pattern] + potentials: compilerOptions.paths[pattern], }); } } else if (starIndex === 0 && pattern.length === 1) { @@ -54,7 +63,7 @@ export function resolveWithPaths( if (originalRequest.startsWith(pattern.slice(0, -1))) { pathMapOptions.push({ partial: originalRequest.slice(pattern.length - 1), - potentials: compilerOptions.paths[pattern] + potentials: compilerOptions.paths[pattern], }); } } else { @@ -62,7 +71,7 @@ export function resolveWithPaths( if (originalRequest.startsWith(prefix) && originalRequest.endsWith(suffix)) { pathMapOptions.push({ partial: originalRequest.slice(prefix.length).slice(0, -suffix.length), - potentials: compilerOptions.paths[pattern] + potentials: compilerOptions.paths[pattern], }); } } @@ -70,6 +79,7 @@ export function resolveWithPaths( if (pathMapOptions.length === 0) { callback(null, request); + return; } @@ -86,8 +96,9 @@ export function resolveWithPaths( replacement = prefix + pathMapOptions[0].partial + suffix; } - request.request = path.resolve(compilerOptions.baseUrl, replacement); + request.request = path.resolve(compilerOptions.baseUrl || '', replacement); callback(null, request); + return; } @@ -96,7 +107,7 @@ export function resolveWithPaths( request.contextInfo.issuer, compilerOptions, host, - cache + cache, ); const moduleFilePath = moduleResolver.resolvedModule @@ -105,6 +116,7 @@ export function resolveWithPaths( // If there is no result, let webpack try to resolve if (!moduleFilePath) { callback(null, request); + return; } @@ -121,6 +133,7 @@ export function resolveWithPaths( } callback(null, request); + return; } diff --git a/packages/ngtools/webpack/src/refactor.ts b/packages/ngtools/webpack/src/refactor.ts index b9df7f4987..634117268d 100644 --- a/packages/ngtools/webpack/src/refactor.ts +++ b/packages/ngtools/webpack/src/refactor.ts @@ -1,4 +1,10 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as path from 'path'; import * as ts from 'typescript'; @@ -18,7 +24,7 @@ export function findAstNodes( sourceFile: ts.SourceFile, kind: ts.SyntaxKind, recursive = false, - max = Infinity + max = Infinity, ): T[] { // TODO: refactor operations that only need `refactor.findAstNodes()` to use this instead. if (max == 0) { @@ -28,7 +34,7 @@ export function findAstNodes( node = sourceFile; } - let arr: T[] = []; + const arr: T[] = []; if (node.kind === kind) { // If we're not recursively looking for children, stop here. if (!recursive) { @@ -54,13 +60,14 @@ export function findAstNodes( } } } + return arr; } export function resolve( filePath: string, _host: ts.CompilerHost, - compilerOptions: ts.CompilerOptions + compilerOptions: ts.CompilerOptions, ): string { if (path.isAbsolute(filePath)) { return filePath; @@ -69,6 +76,7 @@ export function resolve( if (!basePath) { throw new Error(`Trying to resolve '${filePath}' without a basePath.`); } + return path.join(basePath, filePath); } @@ -84,19 +92,34 @@ export class TypeScriptFileRefactor { _host: ts.CompilerHost, _program?: ts.Program, source?: string | null) { - fileName = resolve(fileName, _host, _program!.getCompilerOptions()).replace(/\\/g, '/'); - this._fileName = fileName; + let sourceFile: ts.SourceFile | null = null; + if (_program) { + fileName = resolve(fileName, _host, _program.getCompilerOptions()).replace(/\\/g, '/'); + this._fileName = fileName; + if (source) { - this._sourceFile = ts.createSourceFile(fileName, source, ts.ScriptTarget.Latest, true); + sourceFile = ts.createSourceFile(fileName, source, ts.ScriptTarget.Latest, true); } else { - this._sourceFile = _program.getSourceFile(fileName); + sourceFile = _program.getSourceFile(fileName) || null; + } + } + if (!sourceFile) { + const maybeContent = source || _host.readFile(fileName); + if (maybeContent) { + sourceFile = ts.createSourceFile( + fileName, + maybeContent, + ts.ScriptTarget.Latest, + true, + ); } } - if (!this._sourceFile) { - this._sourceFile = ts.createSourceFile(fileName, source || _host.readFile(fileName), - ts.ScriptTarget.Latest, true); + if (!sourceFile) { + throw new Error('Must have a source file to refactor.'); } + + this._sourceFile = sourceFile; } /** diff --git a/packages/ngtools/webpack/src/resource_loader.ts b/packages/ngtools/webpack/src/resource_loader.ts index bcc2ddc755..bd0c2583f8 100644 --- a/packages/ngtools/webpack/src/resource_loader.ts +++ b/packages/ngtools/webpack/src/resource_loader.ts @@ -1,5 +1,15 @@ -import * as vm from 'vm'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// TODO: fix typings. +// tslint:disable-next-line:no-global-tslint-disable +// tslint:disable:no-any import * as path from 'path'; +import * as vm from 'vm'; import { RawSource } from 'webpack-sources'; const NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin'); @@ -56,6 +66,7 @@ export class WebpackResourceLoader { (callback: (err?: Error) => void) => { if (this._cachedResources.has(compilation.fullHash)) { callback(); + return; } diff --git a/packages/ngtools/webpack/src/transformers/ast_helpers.ts b/packages/ngtools/webpack/src/transformers/ast_helpers.ts index a55cd835ac..5290b906ec 100644 --- a/packages/ngtools/webpack/src/transformers/ast_helpers.ts +++ b/packages/ngtools/webpack/src/transformers/ast_helpers.ts @@ -1,4 +1,10 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; import { WebpackCompilerHost } from '../compiler_host'; @@ -21,6 +27,7 @@ export function getFirstNode(sourceFile: ts.SourceFile): ts.Node | null { if (sourceFile.statements.length > 0) { return sourceFile.statements[0] || null; } + return null; } @@ -28,6 +35,7 @@ export function getLastNode(sourceFile: ts.SourceFile): ts.Node | null { if (sourceFile.statements.length > 0) { return sourceFile.statements[sourceFile.statements.length - 1] || null; } + return null; } @@ -45,7 +53,7 @@ export function createTypescriptContext(content: string) { target: ts.ScriptTarget.ESNext, skipLibCheck: true, sourceMap: false, - importHelpers: true + importHelpers: true, }; // Create compiler host. @@ -56,6 +64,7 @@ export function createTypescriptContext(content: string) { // Create the TypeScript program. const program = ts.createProgram([fileName], compilerOptions, compilerHost); + return { compilerHost, program }; } @@ -63,7 +72,7 @@ export function transformTypescript( content: string | undefined, transformers: ts.TransformerFactory[], program?: ts.Program, - compilerHost?: WebpackCompilerHost + compilerHost?: WebpackCompilerHost, ) { // Use given context or create a new one. @@ -77,12 +86,13 @@ export function transformTypescript( // Emit. const { emitSkipped, diagnostics } = program.emit( - undefined, undefined, undefined, undefined, { before: transformers } + undefined, undefined, undefined, undefined, { before: transformers }, ); // Log diagnostics if emit wasn't successfull. if (emitSkipped) { console.log(diagnostics); + return null; } diff --git a/packages/ngtools/webpack/src/transformers/elide_imports.ts b/packages/ngtools/webpack/src/transformers/elide_imports.ts index 7dbe888d32..0bdd9dea6d 100644 --- a/packages/ngtools/webpack/src/transformers/elide_imports.ts +++ b/packages/ngtools/webpack/src/transformers/elide_imports.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; import { RemoveNodeOperation, TransformOperation } from './interfaces'; @@ -24,7 +31,7 @@ export function elideImports( // Collect all imports and used identifiers const specialCaseNames = new Set(); const usedSymbols = new Set(); - const imports = new Array(); + const imports = [] as ts.ImportDeclaration[]; ts.forEachChild(sourceFile, function visit(node) { // Skip removed nodes if (removedNodes.includes(node)) { @@ -34,15 +41,20 @@ export function elideImports( // Record import and skip if (ts.isImportDeclaration(node)) { imports.push(node); + return; } if (ts.isIdentifier(node)) { - usedSymbols.add(typeChecker.getSymbolAtLocation(node)); + const symbol = typeChecker.getSymbolAtLocation(node); + if (symbol) { + usedSymbols.add(symbol); + } } else if (ts.isExportSpecifier(node)) { // Export specifiers return the non-local symbol from the above // so check the name string instead specialCaseNames.add((node.propertyName || node.name).text); + return; } else if (ts.isShorthandPropertyAssignment(node)) { // Shorthand property assignments return the object property's symbol not the import's @@ -77,12 +89,14 @@ export function elideImports( if (isUnused(node.importClause.name)) { ops.push(new RemoveNodeOperation(sourceFile, node)); } - } else if (ts.isNamespaceImport(node.importClause.namedBindings)) { + } else if (node.importClause.namedBindings + && ts.isNamespaceImport(node.importClause.namedBindings)) { // "import * as XYZ from 'abc';" if (isUnused(node.importClause.namedBindings.name)) { ops.push(new RemoveNodeOperation(sourceFile, node)); } - } else if (ts.isNamedImports(node.importClause.namedBindings)) { + } else if (node.importClause.namedBindings + && ts.isNamedImports(node.importClause.namedBindings)) { // "import { XYZ, ... } from 'abc';" const specifierOps = []; for (const specifier of node.importClause.namedBindings.elements) { diff --git a/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts b/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts index d6ddf92ad7..9947b3179e 100644 --- a/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts +++ b/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts @@ -1,10 +1,15 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as path from 'path'; import * as ts from 'typescript'; - import { LazyRouteMap } from '../lazy_routes'; -import { getLastNode, getFirstNode } from './ast_helpers'; -import { StandardTransform, TransformOperation, AddNodeOperation } from './interfaces'; +import { getFirstNode, getLastNode } from './ast_helpers'; +import { AddNodeOperation, StandardTransform, TransformOperation } from './interfaces'; import { makeTransform } from './make_transform'; export function exportLazyModuleMap( @@ -31,23 +36,27 @@ export function exportLazyModuleMap( return { modulePath, moduleName, - loadChildrenString + loadChildrenString, }; }); modules.forEach((module, index) => { - const relativePath = path.relative(dirName, module.modulePath!).replace(/\\/g, '/'); + const modulePath = module.modulePath; + if (!modulePath) { + return; + } + + const relativePath = path.relative(dirName, modulePath).replace(/\\/g, '/'); // Create the new namespace import node. const namespaceImport = ts.createNamespaceImport(ts.createIdentifier(`__lazy_${index}__`)); const importClause = ts.createImportClause(undefined, namespaceImport); const newImport = ts.createImportDeclaration(undefined, undefined, importClause, ts.createLiteral(relativePath)); - ops.push(new AddNodeOperation( - sourceFile, - getFirstNode(sourceFile), - newImport - )); + const firstNode = getFirstNode(sourceFile); + if (firstNode) { + ops.push(new AddNodeOperation(sourceFile, firstNode, newImport)); + } }); const lazyModuleObjectLiteral = ts.createObjectLiteral( @@ -61,20 +70,18 @@ export function exportLazyModuleMap( return ts.createPropertyAssignment( ts.createLiteral(`${modulePath}#${moduleName}`), ts.createPropertyAccess(ts.createIdentifier(`__lazy_${idx}__`), mod.moduleName)); - }) + }), ); const lazyModuleVariableStmt = ts.createVariableStatement( [ts.createToken(ts.SyntaxKind.ExportKeyword)], - [ts.createVariableDeclaration('LAZY_MODULE_MAP', undefined, lazyModuleObjectLiteral)] + [ts.createVariableDeclaration('LAZY_MODULE_MAP', undefined, lazyModuleObjectLiteral)], ); - ops.push(new AddNodeOperation( - sourceFile, - getLastNode(sourceFile), - undefined, - lazyModuleVariableStmt - )); + const lastNode = getLastNode(sourceFile); + if (lastNode) { + ops.push(new AddNodeOperation(sourceFile, lastNode, undefined, lazyModuleVariableStmt)); + } return ops; }; diff --git a/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts b/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts index 4663e302fb..0091d4659e 100644 --- a/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts +++ b/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts @@ -1,15 +1,22 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { transformTypescript } from './ast_helpers'; import { exportLazyModuleMap } from './export_lazy_module_map'; describe('@ngtools/webpack transformers', () => { describe('export_lazy_module_map', () => { it('should create module map for JIT', () => { - const input = stripIndent` + const input = tags.stripIndent` export { AppModule } from './app/app.module'; `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import * as __lazy_0__ from "app/lazy/lazy.module.ts"; import * as __lazy_1__ from "app/lazy2/lazy2.module.ts"; export { AppModule } from './app/app.module'; @@ -26,15 +33,15 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should create module map for AOT', () => { - const input = stripIndent` + const input = tags.stripIndent` export { AppModule } from './app/app.module'; `; // tslint:disable:max-line-length - const expected = stripIndent` + const expected = tags.stripIndent` import * as __lazy_0__ from "app/lazy/lazy.module.ngfactory.ts"; import * as __lazy_1__ from "app/lazy2/lazy2.module.ngfactory.ts"; export { AppModule } from './app/app.module'; @@ -53,12 +60,12 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${expected}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${expected}`); }); }); it('should not do anything if shouldTransform returns false', () => { - const input = stripIndent` + const input = tags.stripIndent` export { AppModule } from './app/app.module'; `; @@ -71,6 +78,6 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${input}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${input}`); }); }); diff --git a/packages/ngtools/webpack/src/transformers/export_ngfactory.ts b/packages/ngtools/webpack/src/transformers/export_ngfactory.ts index 95aa544dd3..4dedd19150 100644 --- a/packages/ngtools/webpack/src/transformers/export_ngfactory.ts +++ b/packages/ngtools/webpack/src/transformers/export_ngfactory.ts @@ -1,9 +1,14 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { dirname, relative } from 'path'; import * as ts from 'typescript'; -import { relative, dirname } from 'path'; - import { collectDeepNodes, getFirstNode } from './ast_helpers'; -import { StandardTransform, TransformOperation, AddNodeOperation } from './interfaces'; +import { AddNodeOperation, StandardTransform, TransformOperation } from './interfaces'; import { makeTransform } from './make_transform'; export function exportNgFactory( @@ -57,7 +62,7 @@ export function exportNgFactory( ops.push(new AddNodeOperation( sourceFile, getFirstNode(sourceFile), - newImport + newImport, )); }); diff --git a/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts b/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts index 324e41bbb4..52dc70c098 100644 --- a/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts +++ b/packages/ngtools/webpack/src/transformers/export_ngfactory_spec.ts @@ -1,14 +1,21 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { transformTypescript } from './ast_helpers'; import { exportNgFactory } from './export_ngfactory'; describe('@ngtools/webpack transformers', () => { describe('export_ngfactory', () => { it('should export the ngfactory', () => { - const input = stripIndent` + const input = tags.stripIndent` export { AppModule } from './app/app.module'; `; - const output = stripIndent` + const output = tags.stripIndent` export { AppModuleNgFactory } from "./app/app.module.ngfactory"; export { AppModule } from './app/app.module'; `; @@ -19,14 +26,14 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should export the ngfactory when there is a barrel file', () => { - const input = stripIndent` + const input = tags.stripIndent` export { AppModule } from './app'; `; - const output = stripIndent` + const output = tags.stripIndent` export { AppModuleNgFactory } from "./app/app.module.ngfactory"; export { AppModule } from './app'; `; @@ -37,11 +44,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not do anything if shouldTransform returns false', () => { - const input = stripIndent` + const input = tags.stripIndent` export { AppModule } from './app/app.module'; `; @@ -51,7 +58,7 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${input}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${input}`); }); }); }); diff --git a/packages/ngtools/webpack/src/transformers/index.ts b/packages/ngtools/webpack/src/transformers/index.ts index e523cc7782..bb3d03dc92 100644 --- a/packages/ngtools/webpack/src/transformers/index.ts +++ b/packages/ngtools/webpack/src/transformers/index.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ export * from './interfaces'; export * from './ast_helpers'; export * from './make_transform'; diff --git a/packages/ngtools/webpack/src/transformers/insert_import.ts b/packages/ngtools/webpack/src/transformers/insert_import.ts index 9b63d521f8..e1583584f3 100644 --- a/packages/ngtools/webpack/src/transformers/insert_import.ts +++ b/packages/ngtools/webpack/src/transformers/insert_import.ts @@ -1,6 +1,11 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; - import { collectDeepNodes, getFirstNode } from './ast_helpers'; import { AddNodeOperation, TransformOperation } from './interfaces'; @@ -28,7 +33,7 @@ export function insertStarImport( sourceFile, target, before ? newImport : undefined, - before ? undefined : newImport + before ? undefined : newImport, )); } else if (allImports.length > 0) { // Find the last import and insert after. @@ -36,15 +41,19 @@ export function insertStarImport( sourceFile, allImports[allImports.length - 1], undefined, - newImport + newImport, )); } else { - // Insert before the first node. - ops.push(new AddNodeOperation( - sourceFile, - getFirstNode(sourceFile), - newImport - )); + const firstNode = getFirstNode(sourceFile); + + if (firstNode) { + // Insert before the first node. + ops.push(new AddNodeOperation( + sourceFile, + firstNode, + newImport, + )); + } } return ops; @@ -54,7 +63,7 @@ export function insertStarImport( export function insertImport( sourceFile: ts.SourceFile, symbolName: string, - modulePath: string + modulePath: string, ): TransformOperation[] { const ops: TransformOperation[] = []; // Find all imports. @@ -71,6 +80,7 @@ export function insertImport( if (!clause || clause.name || !clause.namedBindings) { return false; } + return clause.namedBindings.kind == ts.SyntaxKind.NamedImports; }) .map((node: ts.ImportDeclaration) => { @@ -95,7 +105,7 @@ export function insertImport( sourceFile, maybeImports[0].elements[maybeImports[0].elements.length - 1], undefined, - ts.createImportSpecifier(undefined, ts.createIdentifier(symbolName)) + ts.createImportSpecifier(undefined, ts.createIdentifier(symbolName)), )); } else { // Create the new import node. @@ -111,16 +121,21 @@ export function insertImport( sourceFile, allImports[allImports.length - 1], undefined, - newImport + newImport, )); } else { - // Insert before the first node. - ops.push(new AddNodeOperation( - sourceFile, - getFirstNode(sourceFile), - newImport - )); + const firstNode = getFirstNode(sourceFile); + + if (firstNode) { + // Insert before the first node. + ops.push(new AddNodeOperation( + sourceFile, + firstNode, + newImport, + )); + } } } + return ops; } diff --git a/packages/ngtools/webpack/src/transformers/interfaces.ts b/packages/ngtools/webpack/src/transformers/interfaces.ts index 5bf6440cdd..bc9b73002f 100644 --- a/packages/ngtools/webpack/src/transformers/interfaces.ts +++ b/packages/ngtools/webpack/src/transformers/interfaces.ts @@ -1,9 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; export enum OPERATION_KIND { Remove, Add, - Replace + Replace, } export interface StandardTransform { @@ -14,7 +21,7 @@ export abstract class TransformOperation { constructor( public kind: OPERATION_KIND, public sourceFile: ts.SourceFile, - public target: ts.Node + public target: ts.Node, ) { } } @@ -26,7 +33,7 @@ export class RemoveNodeOperation extends TransformOperation { export class AddNodeOperation extends TransformOperation { constructor(sourceFile: ts.SourceFile, target: ts.Node, - public before?: ts.Node, public after?: ts.Node) { + public before?: ts.Node, public after?: ts.Node) { super(OPERATION_KIND.Add, sourceFile, target); } } diff --git a/packages/ngtools/webpack/src/transformers/make_transform.ts b/packages/ngtools/webpack/src/transformers/make_transform.ts index b657d2346d..de4c1936fa 100644 --- a/packages/ngtools/webpack/src/transformers/make_transform.ts +++ b/packages/ngtools/webpack/src/transformers/make_transform.ts @@ -1,15 +1,21 @@ -import * as ts from 'typescript'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { satisfies } from 'semver'; - +import * as ts from 'typescript'; +import { elideImports } from './elide_imports'; import { + AddNodeOperation, OPERATION_KIND, - StandardTransform, - TransformOperation, RemoveNodeOperation, - AddNodeOperation, ReplaceNodeOperation, + StandardTransform, + TransformOperation, } from './interfaces'; -import { elideImports } from './elide_imports'; // Typescript below 2.5.0 needs a workaround. @@ -64,7 +70,7 @@ export function makeTransform( modifiedNodes = [ ...add.filter((op) => op.before).map(((op) => op.before)), ...modifiedNodes, - ...add.filter((op) => op.after).map(((op) => op.after)) + ...add.filter((op) => op.after).map(((op) => op.after)), ]; modified = true; } @@ -110,7 +116,7 @@ export function makeTransform( * @param statements */ function visitEachChildWorkaround(node: ts.Node, visitor: ts.Visitor, - context: ts.TransformationContext) { + context: ts.TransformationContext) { if (node.kind === ts.SyntaxKind.SourceFile) { const sf = node as ts.SourceFile; @@ -123,6 +129,7 @@ function visitEachChildWorkaround(node: ts.Node, visitor: ts.Visitor, // as otherwise TS fails when resolving types for decorators. const sfClone = ts.getMutableClone(sf); sfClone.statements = statements; + return sfClone; } diff --git a/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts b/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts index 62e7757a92..580f3851e1 100644 --- a/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts +++ b/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts @@ -1,15 +1,22 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { createTypescriptContext, transformTypescript } from './ast_helpers'; -import { replaceBootstrap } from './replace_bootstrap'; -import { exportNgFactory } from './export_ngfactory'; import { exportLazyModuleMap } from './export_lazy_module_map'; +import { exportNgFactory } from './export_ngfactory'; import { removeDecorators } from './remove_decorators'; +import { replaceBootstrap } from './replace_bootstrap'; describe('@ngtools/webpack transformers', () => { describe('multiple_transformers', () => { it('should apply multiple transformers on the same file', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { Component } from '@angular/core'; @@ -34,7 +41,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import * as __lazy_0__ from "app/lazy/lazy.module.ngfactory.ts"; import * as __lazy_1__ from "app/lazy2/lazy2.module.ngfactory.ts"; @@ -80,7 +87,7 @@ describe('@ngtools/webpack transformers', () => { const result = transformTypescript(undefined, transformers, program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); }); }); diff --git a/packages/ngtools/webpack/src/transformers/register_locale_data.ts b/packages/ngtools/webpack/src/transformers/register_locale_data.ts index efc1aa655d..b19d448352 100644 --- a/packages/ngtools/webpack/src/transformers/register_locale_data.ts +++ b/packages/ngtools/webpack/src/transformers/register_locale_data.ts @@ -1,16 +1,21 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; - import { collectDeepNodes, getFirstNode } from './ast_helpers'; -import { StandardTransform, AddNodeOperation, TransformOperation } from './interfaces'; import { insertStarImport } from './insert_import'; +import { AddNodeOperation, StandardTransform, TransformOperation } from './interfaces'; import { makeTransform } from './make_transform'; export function registerLocaleData( shouldTransform: (fileName: string) => boolean, - getEntryModule: () => { path: string, className: string }, - locale: string + getEntryModule: () => { path: string, className: string } | undefined, + locale: string, ): ts.TransformerFactory { const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { @@ -56,17 +61,21 @@ export function registerLocaleData( const firstNode = getFirstNode(sourceFile); + if (!firstNode) { + return; + } + // Create the import node for the locale. const localeNamespaceId = ts.createUniqueName('__NgCli_locale_'); ops.push(...insertStarImport( - sourceFile, localeNamespaceId, `@angular/common/locales/${locale}`, firstNode, true + sourceFile, localeNamespaceId, `@angular/common/locales/${locale}`, firstNode, true, )); // Create the import node for the registerLocaleData function. const regIdentifier = ts.createIdentifier(`registerLocaleData`); const regNamespaceId = ts.createUniqueName('__NgCli_locale_'); ops.push( - ...insertStarImport(sourceFile, regNamespaceId, '@angular/common', firstNode, true) + ...insertStarImport(sourceFile, regNamespaceId, '@angular/common', firstNode, true), ); // Create the register function call diff --git a/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts b/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts index c086e24271..949a1ea524 100644 --- a/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts +++ b/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts @@ -1,11 +1,18 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { transformTypescript } from './ast_helpers'; import { registerLocaleData } from './register_locale_data'; describe('@ngtools/webpack transformers', () => { describe('register_locale_data', () => { it('should add locale imports', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; @@ -18,7 +25,7 @@ describe('@ngtools/webpack transformers', () => { platformBrowserDynamic().bootstrapModule(AppModule); `; - const output = stripIndent` + const output = tags.stripIndent` import * as __NgCli_locale_1 from "@angular/common/locales/fr"; import * as __NgCli_locale_2 from "@angular/common"; __NgCli_locale_2.registerLocaleData(__NgCli_locale_1.default); @@ -39,15 +46,15 @@ describe('@ngtools/webpack transformers', () => { const transformer = registerLocaleData( () => true, () => ({ path: '/project/src/app/app.module', className: 'AppModule' }), - 'fr' + 'fr', ); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not add locale imports when there is no entry module', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; @@ -64,7 +71,7 @@ describe('@ngtools/webpack transformers', () => { const transformer = registerLocaleData(() => true, () => undefined, 'fr'); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${input}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${input}`); }); }); }); diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators.ts b/packages/ngtools/webpack/src/transformers/remove_decorators.ts index 64f186592f..ababcb4577 100644 --- a/packages/ngtools/webpack/src/transformers/remove_decorators.ts +++ b/packages/ngtools/webpack/src/transformers/remove_decorators.ts @@ -1,7 +1,13 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; - import { collectDeepNodes } from './ast_helpers'; -import { StandardTransform, TransformOperation, RemoveNodeOperation } from './interfaces'; +import { RemoveNodeOperation, StandardTransform, TransformOperation } from './interfaces'; import { makeTransform } from './make_transform'; @@ -44,7 +50,7 @@ interface DecoratorOrigin { function getDecoratorOrigin( decorator: ts.Decorator, - typeChecker: ts.TypeChecker + typeChecker: ts.TypeChecker, ): DecoratorOrigin | null { if (!ts.isCallExpression(decorator.expression)) { return null; diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts index ab21882728..f8ead15735 100644 --- a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts +++ b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts @@ -1,11 +1,18 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { createTypescriptContext, transformTypescript } from './ast_helpers'; import { removeDecorators } from './remove_decorators'; describe('@ngtools/webpack transformers', () => { describe('decorator_remover', () => { it('should remove Angular decorators', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from '@angular/core'; @Component({ @@ -17,7 +24,7 @@ describe('@ngtools/webpack transformers', () => { title = 'app'; } `; - const output = stripIndent` + const output = tags.stripIndent` export class AppComponent { constructor() { this.title = 'app'; @@ -32,11 +39,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not remove non-Angular decorators', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from 'another-lib'; @Component({ @@ -73,11 +80,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should keep other decorators on class member', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component, HostListener } from '@angular/core'; import { AnotherDecorator } from 'another-lib'; @@ -96,7 +103,7 @@ describe('@ngtools/webpack transformers', () => { } } `; - const output = stripIndent` + const output = tags.stripIndent` import * as tslib_1 from "tslib"; import { AnotherDecorator } from 'another-lib'; @@ -121,11 +128,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should keep other decorators on class declaration', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from '@angular/core'; import { AnotherDecorator } from 'another-lib'; @@ -139,7 +146,7 @@ describe('@ngtools/webpack transformers', () => { title = 'app'; } `; - const output = stripIndent` + const output = tags.stripIndent` import * as tslib_1 from "tslib"; import { AnotherDecorator } from 'another-lib'; @@ -161,11 +168,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should remove imports for identifiers within the decorator', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from '@angular/core'; import { ChangeDetectionStrategy } from '@angular/core'; @@ -179,7 +186,7 @@ describe('@ngtools/webpack transformers', () => { title = 'app'; } `; - const output = stripIndent` + const output = tags.stripIndent` export class AppComponent { constructor() { this.title = 'app'; @@ -194,11 +201,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not remove imports from types that are still used', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component, ChangeDetectionStrategy, EventEmitter } from '@angular/core'; import { abc } from 'xyz'; @@ -216,7 +223,7 @@ describe('@ngtools/webpack transformers', () => { export { ChangeDetectionStrategy }; `; - const output = stripIndent` + const output = tags.stripIndent` import { ChangeDetectionStrategy, EventEmitter } from '@angular/core'; import { abc } from 'xyz'; @@ -238,7 +245,7 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); }); }); diff --git a/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts b/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts index 1740925f61..1d19d9b991 100644 --- a/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts +++ b/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts @@ -1,16 +1,21 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { dirname, relative } from 'path'; import * as ts from 'typescript'; -import { relative, dirname } from 'path'; - import { collectDeepNodes } from './ast_helpers'; import { insertStarImport } from './insert_import'; -import { StandardTransform, ReplaceNodeOperation, TransformOperation } from './interfaces'; +import { ReplaceNodeOperation, StandardTransform, TransformOperation } from './interfaces'; import { makeTransform } from './make_transform'; export function replaceBootstrap( shouldTransform: (fileName: string) => boolean, - getEntryModule: () => { path: string, className: string }, + getEntryModule: () => { path: string, className: string } | undefined, getTypeChecker: () => ts.TypeChecker, ): ts.TransformerFactory { diff --git a/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts b/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts index ce4143e024..211cfd0056 100644 --- a/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts @@ -1,11 +1,18 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { createTypescriptContext, transformTypescript } from './ast_helpers'; import { replaceBootstrap } from './replace_bootstrap'; describe('@ngtools/webpack transformers', () => { describe('replace_bootstrap', () => { it('should replace bootstrap', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; @@ -20,7 +27,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; @@ -42,11 +49,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should replace bootstrap when barrel files are used', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; @@ -61,7 +68,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; @@ -83,11 +90,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not replace bootstrap when there is no entry module', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; @@ -109,7 +116,7 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${input}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${input}`); }); }); }); diff --git a/packages/ngtools/webpack/src/transformers/replace_resources.ts b/packages/ngtools/webpack/src/transformers/replace_resources.ts index 875ee46485..7caff4e16c 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources.ts @@ -1,18 +1,23 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as ts from 'typescript'; - import { collectDeepNodes, getFirstNode } from './ast_helpers'; -import { makeTransform } from './make_transform'; import { - StandardTransform, AddNodeOperation, ReplaceNodeOperation, - TransformOperation + StandardTransform, + TransformOperation, } from './interfaces'; +import { makeTransform } from './make_transform'; export function replaceResources( - shouldTransform: (fileName: string) => boolean + shouldTransform: (fileName: string) => boolean, ): ts.TransformerFactory { const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { const ops: TransformOperation[] = []; @@ -35,19 +40,22 @@ export function replaceResources( const nodeRequireInterface = ts.createInterfaceDeclaration([], [], 'NodeRequire', [], [], [ ts.createCallSignature([], [ ts.createParameter([], [], undefined, 'id', undefined, - ts.createKeywordTypeNode(ts.SyntaxKind.StringKeyword) - ) - ], ts.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword)) + ts.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + ), + ], ts.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword)), ]); // declare var require: NodeRequire; const varRequire = ts.createVariableStatement( [ts.createToken(ts.SyntaxKind.DeclareKeyword)], - [ts.createVariableDeclaration('require', ts.createTypeReferenceNode('NodeRequire', []))] + [ts.createVariableDeclaration('require', ts.createTypeReferenceNode('NodeRequire', []))], ); - ops.push(new AddNodeOperation(sourceFile, getFirstNode(sourceFile), nodeRequireInterface)); - ops.push(new AddNodeOperation(sourceFile, getFirstNode(sourceFile), varRequire)); + const firstNode = getFirstNode(sourceFile); + if (firstNode) { + ops.push(new AddNodeOperation(sourceFile, firstNode, nodeRequireInterface)); + ops.push(new AddNodeOperation(sourceFile, firstNode, varRequire)); + } } return ops; @@ -77,6 +85,7 @@ export function findResources(sourceFile: ts.SourceFile): ResourceReplacement[] // key is an expression, can't do anything. return false; } + return key == 'templateUrl' || key == 'styleUrls'; }) // Replace templateUrl/styleUrls key with template/styles, and and paths with require('path'). @@ -89,7 +98,7 @@ export function findResources(sourceFile: ts.SourceFile): ResourceReplacement[] const propAssign = ts.createPropertyAssignment('template', requireCall); replacements.push({ resourcePaths: [resourcePath], - replaceNodeOperation: new ReplaceNodeOperation(sourceFile, node, propAssign) + replaceNodeOperation: new ReplaceNodeOperation(sourceFile, node, propAssign), }); } else if (key == 'styleUrls') { const arr = collectDeepNodes(node, @@ -103,13 +112,13 @@ export function findResources(sourceFile: ts.SourceFile): ResourceReplacement[] }); const requireArray = ts.createArrayLiteral( - stylePaths.map((path) => _createRequireCall(path)) + stylePaths.map((path) => _createRequireCall(path)), ); const propAssign = ts.createPropertyAssignment('styles', requireArray); replacements.push({ resourcePaths: stylePaths, - replaceNodeOperation: new ReplaceNodeOperation(sourceFile, node, propAssign) + replaceNodeOperation: new ReplaceNodeOperation(sourceFile, node, propAssign), }); } }); @@ -136,6 +145,7 @@ function _getResourceRequest(element: ts.Expression, sourceFile: ts.SourceFile) element.kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral ) { const url = (element as ts.StringLiteral).text; + // If the URL does not start with ./ or ../, prepends ./ to it. return `${/^\.?\.\//.test(url) ? '' : './'}${url}`; } else { @@ -148,6 +158,6 @@ function _createRequireCall(path: string) { return ts.createCall( ts.createIdentifier('require'), [], - [ts.createLiteral(path)] + [ts.createLiteral(path)], ); } diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts index d3c454e00d..d8ad690ca1 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts @@ -1,11 +1,18 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { transformTypescript } from './ast_helpers'; import { replaceResources } from './replace_resources'; describe('@ngtools/webpack transformers', () => { describe('replace_resources', () => { it('should replace resources', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from '@angular/core'; @Component({ @@ -17,7 +24,7 @@ describe('@ngtools/webpack transformers', () => { title = 'app'; } `; - const output = stripIndent` + const output = tags.stripIndent` import * as tslib_1 from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { @@ -38,11 +45,11 @@ describe('@ngtools/webpack transformers', () => { const transformer = replaceResources(() => true); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should replace resources with backticks', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from '@angular/core'; @Component({ @@ -54,7 +61,7 @@ describe('@ngtools/webpack transformers', () => { title = 'app'; } `; - const output = stripIndent` + const output = tags.stripIndent` import * as tslib_1 from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { @@ -75,11 +82,11 @@ describe('@ngtools/webpack transformers', () => { const transformer = replaceResources(() => true); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not replace resources if shouldTransform returns false', () => { - const input = stripIndent` + const input = tags.stripIndent` import { Component } from '@angular/core'; @Component({ @@ -112,7 +119,7 @@ describe('@ngtools/webpack transformers', () => { const transformer = replaceResources(() => false); const result = transformTypescript(input, [transformer]); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); }); }); diff --git a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts index a38ee8982c..aba4f5604f 100644 --- a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts +++ b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts @@ -1,10 +1,15 @@ -// @ignoreDep typescript +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { dirname, relative } from 'path'; import * as ts from 'typescript'; -import { relative, dirname } from 'path'; - import { collectDeepNodes } from './ast_helpers'; import { insertStarImport } from './insert_import'; -import { StandardTransform, ReplaceNodeOperation, TransformOperation } from './interfaces'; +import { ReplaceNodeOperation, StandardTransform, TransformOperation } from './interfaces'; import { makeTransform } from './make_transform'; export function replaceServerBootstrap( @@ -123,7 +128,7 @@ export function replaceServerBootstrap( ops.push( ...insertStarImport(sourceFile, idNgFactory, factoryModulePath), new ReplaceNodeOperation(sourceFile, entryModuleIdentifier, - ts.createPropertyAccess(idNgFactory, ts.createIdentifier(factoryClassName))) + ts.createPropertyAccess(idNgFactory, ts.createIdentifier(factoryClassName))), ); } }); diff --git a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts index 5ca49b0e2a..8f15974918 100644 --- a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts @@ -1,11 +1,18 @@ -import { oneLine, stripIndent } from 'common-tags'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { createTypescriptContext, transformTypescript } from './ast_helpers'; import { replaceServerBootstrap } from './replace_server_bootstrap'; describe('@ngtools/webpack transformers', () => { describe('replace_server_bootstrap', () => { it('should replace bootstrap', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformDynamicServer } from '@angular/platform-server'; @@ -20,7 +27,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; @@ -42,11 +49,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should replace renderModule', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { renderModule } from '@angular/platform-server'; @@ -64,7 +71,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; @@ -89,11 +96,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should replace when the module is used in a config object', () => { - const input = stripIndent` + const input = tags.stripIndent` import * as express from 'express'; import { enableProdMode } from '@angular/core'; @@ -113,7 +120,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import * as express from 'express'; import { enableProdMode } from '@angular/core'; @@ -142,11 +149,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should replace bootstrap when barrel files are used', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformDynamicServer } from '@angular/platform-browser-dynamic'; @@ -161,7 +168,7 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length - const output = stripIndent` + const output = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; @@ -183,11 +190,11 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${output}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); it('should not replace bootstrap when there is no entry module', () => { - const input = stripIndent` + const input = tags.stripIndent` import { enableProdMode } from '@angular/core'; import { platformDynamicServer } from '@angular/platform-browser-dynamic'; @@ -209,7 +216,7 @@ describe('@ngtools/webpack transformers', () => { ); const result = transformTypescript(undefined, [transformer], program, compilerHost); - expect(oneLine`${result}`).toEqual(oneLine`${input}`); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${input}`); }); }); }); diff --git a/packages/ngtools/webpack/src/type_checker.ts b/packages/ngtools/webpack/src/type_checker.ts index e14b8a55b8..05c53d878e 100644 --- a/packages/ngtools/webpack/src/type_checker.ts +++ b/packages/ngtools/webpack/src/type_checker.ts @@ -1,30 +1,36 @@ -// @ignoreDep typescript -import * as ts from 'typescript'; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import chalk from 'chalk'; +import * as ts from 'typescript'; +import { time, timeEnd } from './benchmark'; +import { WebpackCompilerHost } from './compiler_host'; +import { CancellationToken, gatherDiagnostics } from './gather_diagnostics'; import { - Program, - CompilerOptions, CompilerHost, - createProgram, + CompilerOptions, + Program, createCompilerHost, + createProgram, formatDiagnostics, } from './ngtools_api'; -import { WebpackCompilerHost } from './compiler_host'; -import { time, timeEnd } from './benchmark'; -import { CancellationToken, gatherDiagnostics } from './gather_diagnostics'; // This file should run in a child process with the AUTO_START_ARG argument // Force basic color support on terminals with no color support. // Chalk typings don't have the correct constructor parameters. -const chalkCtx = new (chalk.constructor as any)(chalk.supportsColor ? {} : { level: 1 }); +const chalkCtx = new (chalk.constructor)(chalk.supportsColor ? {} : { level: 1 }); const { bold, red, yellow } = chalkCtx; export enum MESSAGE_KIND { Init, - Update + Update, } export abstract class TypeCheckerMessage { @@ -70,7 +76,7 @@ export class TypeChecker { // for these resources. this._compilerHost = createCompilerHost({ options: this._compilerOptions, - tsHost: compilerHost + tsHost: compilerHost, }) as CompilerHost & WebpackCompilerHost; timeEnd('TypeChecker.constructor'); } @@ -92,7 +98,7 @@ export class TypeChecker { this._rootNames, this._compilerOptions, this._compilerHost, - this._program as ts.Program + this._program as ts.Program, ) as ts.Program; timeEnd('TypeChecker._createOrUpdateProgram.ts.createProgram'); } else { @@ -102,7 +108,7 @@ export class TypeChecker { rootNames: this._rootNames, options: this._compilerOptions, host: this._compilerHost, - oldProgram: this._program as Program + oldProgram: this._program as Program, }) as Program; timeEnd('TypeChecker._createOrUpdateProgram.ng.createProgram'); } @@ -133,10 +139,9 @@ export class TypeChecker { } public update(rootNames: string[], changedCompilationFiles: string[], - cancellationToken: CancellationToken) { + cancellationToken: CancellationToken) { this._update(rootNames, changedCompilationFiles); this._createOrUpdateProgram(); this._diagnose(cancellationToken); } } - diff --git a/packages/ngtools/webpack/src/type_checker_worker.ts b/packages/ngtools/webpack/src/type_checker_worker.ts index ce1cafba57..7774772923 100644 --- a/packages/ngtools/webpack/src/type_checker_worker.ts +++ b/packages/ngtools/webpack/src/type_checker_worker.ts @@ -1,15 +1,20 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import * as process from 'process'; - import { time, timeEnd } from './benchmark'; import { CancellationToken } from './gather_diagnostics'; - import { AUTO_START_ARG, - TypeCheckerMessage, InitMessage, MESSAGE_KIND, + TypeChecker, + TypeCheckerMessage, UpdateMessage, - TypeChecker } from './type_checker'; let typeChecker: TypeChecker; @@ -49,5 +54,3 @@ if (process.argv.indexOf(AUTO_START_ARG) >= 0) { timeEnd('TypeChecker.message'); }); } - - diff --git a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts index 7cf5d3d88b..e7b4cb049f 100644 --- a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts +++ b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts @@ -1,7 +1,13 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Stats } from 'fs'; - -import { InputFileSystem, NodeWatchFileSystemInterface, Callback } from './webpack'; import { WebpackCompilerHost } from './compiler_host'; +import { Callback, InputFileSystem, NodeWatchFileSystemInterface } from './webpack'; export const NodeWatchFileSystem: NodeWatchFileSystemInterface = require( 'webpack/lib/node/NodeWatchFileSystem'); @@ -9,13 +15,13 @@ export const NodeWatchFileSystem: NodeWatchFileSystemInterface = require( export class VirtualFileSystemDecorator implements InputFileSystem { constructor( private _inputFileSystem: InputFileSystem, - private _webpackCompilerHost: WebpackCompilerHost + private _webpackCompilerHost: WebpackCompilerHost, ) { } // We only need to intercept calls to individual files that are present in WebpackCompilerHost. private _readFileSync(path: string): string | null { if (this._webpackCompilerHost.fileExists(path, false)) { - return this._webpackCompilerHost.readFile(path); + return this._webpackCompilerHost.readFile(path) || null; } return null; @@ -33,7 +39,7 @@ export class VirtualFileSystemDecorator implements InputFileSystem { return this._webpackCompilerHost.getNgFactoryPaths(); } - stat(path: string, callback: Callback): void { + stat(path: string, callback: Callback): void { const result = this._statSync(path); if (result) { callback(null, result); @@ -42,11 +48,11 @@ export class VirtualFileSystemDecorator implements InputFileSystem { } } - readdir(path: string, callback: Callback): void { + readdir(path: string, callback: Callback): void { this._inputFileSystem.readdir(path, callback); } - readFile(path: string, callback: Callback): void { + readFile(path: string, callback: Callback): void { const result = this._readFileSync(path); if (result) { callback(null, result); @@ -55,16 +61,17 @@ export class VirtualFileSystemDecorator implements InputFileSystem { } } - readJson(path: string, callback: Callback): void { + readJson(path: string, callback: Callback<{}>): void { this._inputFileSystem.readJson(path, callback); } - readlink(path: string, callback: Callback): void { + readlink(path: string, callback: Callback): void { this._inputFileSystem.readlink(path, callback); } statSync(path: string): Stats { const result = this._statSync(path); + return result || this._inputFileSystem.statSync(path); } @@ -74,6 +81,7 @@ export class VirtualFileSystemDecorator implements InputFileSystem { readFileSync(path: string): string { const result = this._readFileSync(path); + return result || this._inputFileSystem.readFileSync(path); } @@ -102,20 +110,34 @@ export class VirtualWatchFileSystemDecorator extends NodeWatchFileSystem { super(_virtualInputFileSystem); } - watch(files: any, dirs: any, missing: any, startTime: any, options: any, callback: any, - callbackUndelayed: any) { - const newCallback = (err: any, filesModified: any, contextModified: any, missingModified: any, - fileTimestamps: { [k: string]: number }, contextTimestamps: { [k: string]: number }) => { + watch( + files: any, // tslint:disable-line:no-any + dirs: any, // tslint:disable-line:no-any + missing: any, // tslint:disable-line:no-any + startTime: any, // tslint:disable-line:no-any + options: any, // tslint:disable-line:no-any + callback: any, // tslint:disable-line:no-any + callbackUndelayed: any, // tslint:disable-line:no-any + ) { + const newCallback = ( + err: any, // tslint:disable-line:no-any + filesModified: any, // tslint:disable-line:no-any + contextModified: any, // tslint:disable-line:no-any + missingModified: any, // tslint:disable-line:no-any + fileTimestamps: { [k: string]: number }, + contextTimestamps: { [k: string]: number }, + ) => { // Update fileTimestamps with timestamps from virtual files. const virtualFilesStats = this._virtualInputFileSystem.getVirtualFilesPaths() .map((fileName) => ({ path: fileName, - mtime: +this._virtualInputFileSystem.statSync(fileName).mtime + mtime: +this._virtualInputFileSystem.statSync(fileName).mtime, })); virtualFilesStats.forEach(stats => fileTimestamps[stats.path] = +stats.mtime); callback(err, filesModified, contextModified, missingModified, fileTimestamps, contextTimestamps); }; + return super.watch(files, dirs, missing, startTime, options, newCallback, callbackUndelayed); } } diff --git a/packages/ngtools/webpack/src/webpack.ts b/packages/ngtools/webpack/src/webpack.ts index 51751fa087..660f39edf5 100644 --- a/packages/ngtools/webpack/src/webpack.ts +++ b/packages/ngtools/webpack/src/webpack.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Stats } from 'fs'; // Declarations for (some) Webpack types. Only what's needed. @@ -21,6 +28,7 @@ export interface Tapable { export interface ResolverPlugin extends Tapable { plugin(source: string, cb: ResolverCallback): void; + // tslint:disable-next-line:no-any doResolve(target: string, req: Request, desc: string, callback: Callback): void; join(relativePath: string, innerRequest: Request): Request; } @@ -31,6 +39,7 @@ export interface LoaderCallback { export interface NormalModuleFactory { plugin(event: string, + // tslint:disable-next-line:no-any callback: (data: NormalModuleFactoryRequest, callback: Callback) => void): any; } @@ -40,15 +49,17 @@ export interface NormalModuleFactoryRequest { } export interface InputFileSystem { - stat(path: string, callback: Callback): void; - readdir(path: string, callback: Callback): void; - readFile(path: string, callback: Callback): void; + stat(path: string, callback: Callback): void; + readdir(path: string, callback: Callback): void; + readFile(path: string, callback: Callback): void; + // tslint:disable-next-line:no-any readJson(path: string, callback: Callback): void; - readlink(path: string, callback: Callback): void; + readlink(path: string, callback: Callback): void; statSync(path: string): Stats; readdirSync(path: string): string[]; readFileSync(path: string): string; - readJsonSync(path: string): string; + // tslint:disable-next-line:no-any + readJsonSync(path: string): any; readlinkSync(path: string): string; purge(changes?: string[] | string): void; } @@ -56,6 +67,8 @@ export interface InputFileSystem { export interface NodeWatchFileSystemInterface { inputFileSystem: InputFileSystem; new(inputFileSystem: InputFileSystem): NodeWatchFileSystemInterface; + // tslint:disable-next-line:no-any watch(files: any, dirs: any, missing: any, startTime: any, options: any, callback: any, - callbackUndelayed: any): any; + // tslint:disable-next-line:no-any + callbackUndelayed: any): any; } From 4e40b4304fdca5007db458b8b73b8fcc22b0920b Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 19:32:36 -0700 Subject: [PATCH 232/724] build: fix typescript errors for @ngtools/webpack --- package.json | 1 - .../webpack/src/angular_compiler_plugin.ts | 14 ++++--- packages/ngtools/webpack/src/compiler_host.ts | 2 +- .../webpack/src/extract_i18n_plugin.ts | 4 +- .../ngtools/webpack/src/gather_diagnostics.ts | 10 ++--- packages/ngtools/webpack/src/lazy_routes.ts | 6 ++- packages/ngtools/webpack/src/ngtools_api.ts | 37 +++++++++++++------ .../ngtools/webpack/src/resource_loader.ts | 8 ++-- .../webpack/src/transformers/ast_helpers.ts | 6 +-- .../src/transformers/export_ngfactory.ts | 24 +++++++----- .../src/transformers/make_transform.ts | 13 +++---- .../src/transformers/register_locale_data.ts | 8 +++- .../transformers/register_locale_data_spec.ts | 2 +- .../src/transformers/remove_decorators.ts | 22 +++++++---- .../src/transformers/replace_bootstrap.ts | 2 +- .../transformers/replace_bootstrap_spec.ts | 2 +- .../src/transformers/replace_resources.ts | 7 +--- .../transformers/replace_resources_spec.ts | 4 +- .../transformers/replace_server_bootstrap.ts | 2 +- .../replace_server_bootstrap_spec.ts | 2 +- tsconfig.json | 1 + 21 files changed, 102 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index d7d7c458ba..1c81bf2954 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "@angular/router": "^5.2.6", "@angular/service-worker": "^5.2.7", "@ngtools/json-schema": "^1.0.9", - "@ngtools/webpack": "6.0.0-beta.6", "@types/common-tags": "^1.4.0", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 2be532576b..f0aebc16c5 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -101,7 +101,7 @@ export class AngularCompilerPlugin { private _compilerOptions: CompilerOptions; private _rootNames: string[]; private _singleFileIncludes: string[] = []; - private _program: (ts.Program | Program); + private _program: (ts.Program | Program) | null; private _compilerHost: WebpackCompilerHost & CompilerHost; private _moduleResolutionCache: ts.ModuleResolutionCache; private _resourceLoader: WebpackResourceLoader; @@ -404,7 +404,9 @@ export class AngularCompilerPlugin { // genDir seems to still be needed in @angular\compiler-cli\src\compiler_host.js:226. genDir: '', }), - entryModule: this._entryModule, + // TODO: fix compiler-cli typings; entryModule should not be string, but also optional. + // tslint:disable-next-line:non-null-operator + entryModule: this._entryModule !, }); timeEnd('AngularCompilerPlugin._getLazyRoutesFromNgtools'); @@ -467,7 +469,7 @@ export class AngularCompilerPlugin { // TODO: find a way to remove lazy routes that don't exist anymore. // This will require a registry of known references to a lazy route, removing it when no // module references it anymore. - private _processLazyRoutes(discoveredLazyRoutes: { [route: string]: string; }) { + private _processLazyRoutes(discoveredLazyRoutes: LazyRouteMap) { Object.keys(discoveredLazyRoutes) .forEach(lazyRouteKey => { const [lazyRouteModule, moduleName] = lazyRouteKey.split('#'); @@ -728,7 +730,7 @@ export class AngularCompilerPlugin { const isAppPath = (fileName: string) => !fileName.endsWith('.ngfactory.ts') && !fileName.endsWith('.ngstyle.ts'); const isMainPath = (fileName: string) => fileName === this._mainPath; - const getEntryModule = () => this._entryModule; + const getEntryModule = () => this.entryModule; const getLazyRoutes = () => this._lazyRoutes; const getTypeChecker = () => this._getTsProgram().getTypeChecker(); @@ -976,7 +978,7 @@ export class AngularCompilerPlugin { timeEnd('AngularCompilerPlugin._emit.ts.getOptionsDiagnostics'); } - if (this._firstRun || !this._forkTypeChecker) { + if ((this._firstRun || !this._forkTypeChecker) && this._program) { allDiagnostics.push(...gatherDiagnostics(this._program, this._JitMode, 'AngularCompilerPlugin._emit.ts')); } @@ -1012,7 +1014,7 @@ export class AngularCompilerPlugin { timeEnd('AngularCompilerPlugin._emit.ng.getNgOptionDiagnostics'); } - if (this._firstRun || !this._forkTypeChecker) { + if ((this._firstRun || !this._forkTypeChecker) && this._program) { allDiagnostics.push(...gatherDiagnostics(this._program, this._JitMode, 'AngularCompilerPlugin._emit.ng')); } diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index b9fe470abf..aed0185cf7 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -284,7 +284,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { } } - return stats.getSourceFile(languageVersion, this._setParentNodes); + return stats && stats.getSourceFile(languageVersion, this._setParentNodes); } get getCancellationToken() { diff --git a/packages/ngtools/webpack/src/extract_i18n_plugin.ts b/packages/ngtools/webpack/src/extract_i18n_plugin.ts index ddcd53b5a0..35ada649ad 100644 --- a/packages/ngtools/webpack/src/extract_i18n_plugin.ts +++ b/packages/ngtools/webpack/src/extract_i18n_plugin.ts @@ -59,7 +59,7 @@ export class ExtractI18nPlugin implements Tapable { basePath = path.dirname(basePath); } if (options.hasOwnProperty('basePath')) { - basePath = path.resolve(process.cwd(), options.basePath); + basePath = path.resolve(process.cwd(), options.basePath || ''); } let tsConfigJson: any = null; @@ -102,7 +102,7 @@ export class ExtractI18nPlugin implements Tapable { // By default messages will be generated in basePath let genDir = basePath; - if (options.hasOwnProperty('genDir')) { + if (options.genDir) { genDir = path.resolve(process.cwd(), options.genDir); } diff --git a/packages/ngtools/webpack/src/gather_diagnostics.ts b/packages/ngtools/webpack/src/gather_diagnostics.ts index 4bed8671d9..6b6be8f745 100644 --- a/packages/ngtools/webpack/src/gather_diagnostics.ts +++ b/packages/ngtools/webpack/src/gather_diagnostics.ts @@ -56,29 +56,29 @@ export function gatherDiagnostics( const tsProgram = program as ts.Program; // Check syntactic diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ts.getSyntacticDiagnostics`); - checkDiagnostics(tsProgram.getSyntacticDiagnostics); + checkDiagnostics(tsProgram.getSyntacticDiagnostics.bind(tsProgram)); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ts.getSyntacticDiagnostics`); // Check semantic diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ts.getSemanticDiagnostics`); - checkDiagnostics(tsProgram.getSemanticDiagnostics); + checkDiagnostics(tsProgram.getSemanticDiagnostics.bind(tsProgram)); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ts.getSemanticDiagnostics`); } else { const angularProgram = program as Program; // Check TypeScript syntactic diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSyntacticDiagnostics`); - checkDiagnostics(angularProgram.getTsSyntacticDiagnostics); + checkDiagnostics(angularProgram.getTsSyntacticDiagnostics.bind(angularProgram)); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSyntacticDiagnostics`); // Check TypeScript semantic and Angular structure diagnostics. time(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSemanticDiagnostics`); - checkDiagnostics(angularProgram.getTsSemanticDiagnostics); + checkDiagnostics(angularProgram.getTsSemanticDiagnostics.bind(angularProgram)); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getTsSemanticDiagnostics`); // Check Angular semantic diagnostics time(`${benchmarkLabel}.gatherDiagnostics.ng.getNgSemanticDiagnostics`); - checkDiagnostics(angularProgram.getNgSemanticDiagnostics); + checkDiagnostics(angularProgram.getNgSemanticDiagnostics.bind(angularProgram)); timeEnd(`${benchmarkLabel}.gatherDiagnostics.ng.getNgSemanticDiagnostics`); } diff --git a/packages/ngtools/webpack/src/lazy_routes.ts b/packages/ngtools/webpack/src/lazy_routes.ts index 85cc0f9acd..dc32ebcea8 100644 --- a/packages/ngtools/webpack/src/lazy_routes.ts +++ b/packages/ngtools/webpack/src/lazy_routes.ts @@ -22,7 +22,7 @@ function _getContentOfKeyLiteral(_source: ts.SourceFile, node: ts.Node): string export interface LazyRouteMap { - [path: string]: string | null; + [path: string]: string; } @@ -91,7 +91,9 @@ export function findLazyRoutes( }) // Reduce to the LazyRouteMap map. .reduce((acc: LazyRouteMap, [routePath, resolvedModuleName]: [string, string | null]) => { - acc[routePath] = resolvedModuleName; + if (resolvedModuleName) { + acc[routePath] = resolvedModuleName; + } return acc; }, {}); diff --git a/packages/ngtools/webpack/src/ngtools_api.ts b/packages/ngtools/webpack/src/ngtools_api.ts index 6b265eb75b..3bee59dd64 100644 --- a/packages/ngtools/webpack/src/ngtools_api.ts +++ b/packages/ngtools/webpack/src/ngtools_api.ts @@ -29,6 +29,10 @@ export type Program = ngtools.Program; export type Diagnostic = ngtools.Diagnostic; export type Diagnostics = ReadonlyArray; +function _error(api: string, fn: string): never { + throw new Error('Could not find API ' + api + ', function ' + fn); +} + // Manually check for Compiler CLI availability and supported version. // This is needed because @ngtools/webpack does not depend directly on @angular/compiler-cli, since // it is installed as part of global Angular CLI installs and compiler-cli is not of its @@ -68,11 +72,19 @@ try { // plugin cannot be used. } -export const VERSION: typeof ngc.VERSION | null = compilerCli && compilerCli.VERSION; -export const __NGTOOLS_PRIVATE_API_2: typeof ngc.__NGTOOLS_PRIVATE_API_2 | null = - compilerCli && compilerCli.__NGTOOLS_PRIVATE_API_2; -export const readConfiguration: typeof ngc.readConfiguration | null = - compilerCli && compilerCli.readConfiguration; +export const VERSION: typeof ngc.VERSION = + compilerCli + && compilerCli.VERSION + || _error('compiler-cli', 'VERSION'); +export const __NGTOOLS_PRIVATE_API_2: typeof ngc.__NGTOOLS_PRIVATE_API_2 = + compilerCli + && compilerCli.__NGTOOLS_PRIVATE_API_2 + || _error('compiler-cli', '__NGTOOLS_PRIVATE_API_2'); +export const readConfiguration: typeof ngc.readConfiguration = + compilerCli + && compilerCli.readConfiguration + || _error('compiler-cli', 'readConfiguration'); + // These imports do not exist on Angular versions lower than 5, so we cannot use a static ES6 // import. @@ -85,10 +97,11 @@ try { // plugin cannot be used. } -export const createProgram: typeof ngtools.createProgram | null = - ngtools2 && ngtools2.createProgram; -export const createCompilerHost: typeof ngtools.createCompilerHost | null = - ngtools2 && ngtools2.createCompilerHost; -export const formatDiagnostics: typeof ngtools.formatDiagnostics | null = - ngtools2 && ngtools2.formatDiagnostics; -export const EmitFlags: typeof ngtools.EmitFlags | null = ngtools2 && ngtools2.EmitFlags; +export const createProgram: typeof ngtools.createProgram = + ngtools2 && ngtools2.createProgram || _error('ngtools2', 'createProgram'); +export const createCompilerHost: typeof ngtools.createCompilerHost = + ngtools2 && ngtools2.createCompilerHost || _error('ngtools2', 'createCompilerHost'); +export const formatDiagnostics: typeof ngtools.formatDiagnostics = + ngtools2 && ngtools2.formatDiagnostics || _error('ngtools2', 'formatDiagnostics'); +export const EmitFlags: typeof ngtools.EmitFlags = + ngtools2 && ngtools2.EmitFlags || _error('ngtools', 'EmitFlags'); diff --git a/packages/ngtools/webpack/src/resource_loader.ts b/packages/ngtools/webpack/src/resource_loader.ts index bd0c2583f8..ada1ffd7f7 100644 --- a/packages/ngtools/webpack/src/resource_loader.ts +++ b/packages/ngtools/webpack/src/resource_loader.ts @@ -106,11 +106,9 @@ export class WebpackResourceLoader { this._resourceDependencies.set(filePath, childCompilation.fileDependencies); const compilationHash = childCompilation.fullHash; - if (this._cachedResources.has(compilationHash)) { - resolve({ - outputName: filePath, - source: this._cachedResources.get(compilationHash), - }); + const maybeSource = this._cachedResources.get(compilationHash); + if (maybeSource) { + resolve({ outputName: filePath, source: maybeSource }); } else { const source = childCompilation.assets[filePath].source(); this._cachedResources.set(compilationHash, source); diff --git a/packages/ngtools/webpack/src/transformers/ast_helpers.ts b/packages/ngtools/webpack/src/transformers/ast_helpers.ts index 5290b906ec..83c4bfdbaf 100644 --- a/packages/ngtools/webpack/src/transformers/ast_helpers.ts +++ b/packages/ngtools/webpack/src/transformers/ast_helpers.ts @@ -23,12 +23,12 @@ export function collectDeepNodes(node: ts.Node, kind: ts.Synt return nodes; } -export function getFirstNode(sourceFile: ts.SourceFile): ts.Node | null { +export function getFirstNode(sourceFile: ts.SourceFile): ts.Node { if (sourceFile.statements.length > 0) { - return sourceFile.statements[0] || null; + return sourceFile.statements[0]; } - return null; + return sourceFile.getChildAt(0); } export function getLastNode(sourceFile: ts.SourceFile): ts.Node | null { diff --git a/packages/ngtools/webpack/src/transformers/export_ngfactory.ts b/packages/ngtools/webpack/src/transformers/export_ngfactory.ts index 4dedd19150..04a8afd1bc 100644 --- a/packages/ngtools/webpack/src/transformers/export_ngfactory.ts +++ b/packages/ngtools/webpack/src/transformers/export_ngfactory.ts @@ -13,7 +13,7 @@ import { makeTransform } from './make_transform'; export function exportNgFactory( shouldTransform: (fileName: string) => boolean, - getEntryModule: () => { path: string, className: string }, + getEntryModule: () => { path: string, className: string } | null, ): ts.TransformerFactory { const standardTransform: StandardTransform = function (sourceFile: ts.SourceFile) { @@ -39,14 +39,17 @@ export function exportNgFactory( // Get the module path from the import. entryModuleIdentifiers.forEach((entryModuleIdentifier) => { - if (entryModuleIdentifier.parent.kind !== ts.SyntaxKind.ExportSpecifier) { + if (!entryModuleIdentifier.parent + || entryModuleIdentifier.parent.kind !== ts.SyntaxKind.ExportSpecifier) { return; } const exportSpec = entryModuleIdentifier.parent as ts.ExportSpecifier; - const moduleSpecifier = exportSpec.parent.parent.moduleSpecifier; + const moduleSpecifier = exportSpec.parent + && exportSpec.parent.parent + && exportSpec.parent.parent.moduleSpecifier; - if (moduleSpecifier.kind !== ts.SyntaxKind.StringLiteral) { + if (!moduleSpecifier || moduleSpecifier.kind !== ts.SyntaxKind.StringLiteral) { return; } @@ -59,11 +62,14 @@ export function exportNgFactory( const newImport = ts.createExportDeclaration(undefined, undefined, namedExports, ts.createLiteral(factoryModulePath)); - ops.push(new AddNodeOperation( - sourceFile, - getFirstNode(sourceFile), - newImport, - )); + const firstNode = getFirstNode(sourceFile); + if (firstNode) { + ops.push(new AddNodeOperation( + sourceFile, + firstNode, + newImport, + )); + } }); return ops; diff --git a/packages/ngtools/webpack/src/transformers/make_transform.ts b/packages/ngtools/webpack/src/transformers/make_transform.ts index de4c1936fa..7c7b2a1b04 100644 --- a/packages/ngtools/webpack/src/transformers/make_transform.ts +++ b/packages/ngtools/webpack/src/transformers/make_transform.ts @@ -30,7 +30,6 @@ export function makeTransform( return (context: ts.TransformationContext): ts.Transformer => { const transformer: ts.Transformer = (sf: ts.SourceFile) => { - const ops: TransformOperation[] = standardTransform(sf); const removeOps = ops .filter((op) => op.kind === OPERATION_KIND.Remove) as RemoveNodeOperation[]; @@ -71,7 +70,7 @@ export function makeTransform( ...add.filter((op) => op.before).map(((op) => op.before)), ...modifiedNodes, ...add.filter((op) => op.after).map(((op) => op.after)), - ]; + ] as ts.Node[]; modified = true; } @@ -111,12 +110,12 @@ export function makeTransform( * https://github.com/Microsoft/TypeScript/pull/20314 and released in TS 2.7.0) and * https://github.com/Microsoft/TypeScript/issues/17551 (fixed by * https://github.com/Microsoft/TypeScript/pull/18051 and released on TS 2.5.0). - * - * @param sf - * @param statements */ -function visitEachChildWorkaround(node: ts.Node, visitor: ts.Visitor, - context: ts.TransformationContext) { +function visitEachChildWorkaround( + node: ts.Node, + visitor: ts.Visitor, + context: ts.TransformationContext, +) { if (node.kind === ts.SyntaxKind.SourceFile) { const sf = node as ts.SourceFile; diff --git a/packages/ngtools/webpack/src/transformers/register_locale_data.ts b/packages/ngtools/webpack/src/transformers/register_locale_data.ts index b19d448352..fd2aa20566 100644 --- a/packages/ngtools/webpack/src/transformers/register_locale_data.ts +++ b/packages/ngtools/webpack/src/transformers/register_locale_data.ts @@ -14,7 +14,7 @@ import { makeTransform } from './make_transform'; export function registerLocaleData( shouldTransform: (fileName: string) => boolean, - getEntryModule: () => { path: string, className: string } | undefined, + getEntryModule: () => { path: string, className: string } | null, locale: string, ): ts.TransformerFactory { @@ -68,7 +68,11 @@ export function registerLocaleData( // Create the import node for the locale. const localeNamespaceId = ts.createUniqueName('__NgCli_locale_'); ops.push(...insertStarImport( - sourceFile, localeNamespaceId, `@angular/common/locales/${locale}`, firstNode, true, + sourceFile, + localeNamespaceId, + `@angular/common/locales/${locale}`, + firstNode, + true, )); // Create the import node for the registerLocaleData function. diff --git a/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts b/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts index 949a1ea524..1310bfce3e 100644 --- a/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts +++ b/packages/ngtools/webpack/src/transformers/register_locale_data_spec.ts @@ -68,7 +68,7 @@ describe('@ngtools/webpack transformers', () => { platformBrowserDynamic().bootstrapModule(AppModule); `; - const transformer = registerLocaleData(() => true, () => undefined, 'fr'); + const transformer = registerLocaleData(() => true, () => null, 'fr'); const result = transformTypescript(input, [transformer]); expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${input}`); diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators.ts b/packages/ngtools/webpack/src/transformers/remove_decorators.ts index ababcb4577..4a0e1a8161 100644 --- a/packages/ngtools/webpack/src/transformers/remove_decorators.ts +++ b/packages/ngtools/webpack/src/transformers/remove_decorators.ts @@ -39,7 +39,7 @@ export function removeDecorators( function shouldRemove(decorator: ts.Decorator, typeChecker: ts.TypeChecker): boolean { const origin = getDecoratorOrigin(decorator, typeChecker); - return origin && origin.module === '@angular/core'; + return origin ? origin.module === '@angular/core' : false; } // Decorator helpers. @@ -57,7 +57,7 @@ function getDecoratorOrigin( } let identifier: ts.Node; - let name: string; + let name: string | undefined = undefined; if (ts.isPropertyAccessExpression(decorator.expression.expression)) { identifier = decorator.expression.expression.expression; name = decorator.expression.expression.name.text; @@ -71,21 +71,27 @@ function getDecoratorOrigin( const symbol = typeChecker.getSymbolAtLocation(identifier); if (symbol && symbol.declarations && symbol.declarations.length > 0) { const declaration = symbol.declarations[0]; - let module: string; + let module: string | undefined = undefined; if (ts.isImportSpecifier(declaration)) { name = (declaration.propertyName || declaration.name).text; - module = (declaration.parent.parent.parent.moduleSpecifier as ts.StringLiteral).text; + module = declaration.parent + && declaration.parent.parent + && declaration.parent.parent.parent + && (declaration.parent.parent.parent.moduleSpecifier as ts.StringLiteral).text + || ''; } else if (ts.isNamespaceImport(declaration)) { // Use the name from the decorator namespace property access - module = (declaration.parent.parent.moduleSpecifier as ts.StringLiteral).text; + module = declaration.parent + && declaration.parent.parent + && (declaration.parent.parent.moduleSpecifier as ts.StringLiteral).text; } else if (ts.isImportClause(declaration)) { - name = declaration.name.text; - module = (declaration.parent.moduleSpecifier as ts.StringLiteral).text; + name = declaration.name && declaration.name.text; + module = declaration.parent && (declaration.parent.moduleSpecifier as ts.StringLiteral).text; } else { return null; } - return { name, module }; + return { name: name || '', module: module || '' }; } return null; diff --git a/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts b/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts index 1d19d9b991..fc05f86b92 100644 --- a/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts +++ b/packages/ngtools/webpack/src/transformers/replace_bootstrap.ts @@ -15,7 +15,7 @@ import { makeTransform } from './make_transform'; export function replaceBootstrap( shouldTransform: (fileName: string) => boolean, - getEntryModule: () => { path: string, className: string } | undefined, + getEntryModule: () => { path: string, className: string } | null, getTypeChecker: () => ts.TypeChecker, ): ts.TransformerFactory { diff --git a/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts b/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts index 211cfd0056..c56e6d8f74 100644 --- a/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_bootstrap_spec.ts @@ -111,7 +111,7 @@ describe('@ngtools/webpack transformers', () => { const { program, compilerHost } = createTypescriptContext(input); const transformer = replaceBootstrap( () => true, - () => undefined, + () => null, () => program.getTypeChecker(), ); const result = transformTypescript(undefined, [transformer], program, compilerHost); diff --git a/packages/ngtools/webpack/src/transformers/replace_resources.ts b/packages/ngtools/webpack/src/transformers/replace_resources.ts index 7caff4e16c..28ade37e6f 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources.ts @@ -51,11 +51,8 @@ export function replaceResources( [ts.createVariableDeclaration('require', ts.createTypeReferenceNode('NodeRequire', []))], ); - const firstNode = getFirstNode(sourceFile); - if (firstNode) { - ops.push(new AddNodeOperation(sourceFile, firstNode, nodeRequireInterface)); - ops.push(new AddNodeOperation(sourceFile, firstNode, varRequire)); - } + ops.push(new AddNodeOperation(sourceFile, getFirstNode(sourceFile), nodeRequireInterface)); + ops.push(new AddNodeOperation(sourceFile, getFirstNode(sourceFile), varRequire)); } return ops; diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts index d8ad690ca1..23e3a65acf 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts @@ -49,7 +49,7 @@ describe('@ngtools/webpack transformers', () => { }); it('should replace resources with backticks', () => { - const input = tags.stripIndent` + const input = ` import { Component } from '@angular/core'; @Component({ @@ -61,7 +61,7 @@ describe('@ngtools/webpack transformers', () => { title = 'app'; } `; - const output = tags.stripIndent` + const output = ` import * as tslib_1 from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { diff --git a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts index aba4f5604f..483080bf4a 100644 --- a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts +++ b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap.ts @@ -14,7 +14,7 @@ import { makeTransform } from './make_transform'; export function replaceServerBootstrap( shouldTransform: (fileName: string) => boolean, - getEntryModule: () => { path: string, className: string }, + getEntryModule: () => { path: string, className: string } | null, getTypeChecker: () => ts.TypeChecker, ): ts.TransformerFactory { diff --git a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts index 8f15974918..1d7ebcd0b8 100644 --- a/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_server_bootstrap_spec.ts @@ -211,7 +211,7 @@ describe('@ngtools/webpack transformers', () => { const { program, compilerHost } = createTypescriptContext(input); const transformer = replaceServerBootstrap( () => true, - () => undefined, + () => null, () => program.getTypeChecker(), ); const result = transformTypescript(undefined, [transformer], program, compilerHost); diff --git a/tsconfig.json b/tsconfig.json index fec41267a5..cb69bc17ac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -45,6 +45,7 @@ "@angular-devkit/schematics/testing": [ "./packages/angular_devkit/schematics/testing/index" ], "@angular-devkit/build-optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ], "@angular-devkit/architect": [ "./packages/angular_devkit/architect/src/index" ], + "@ngtools/webpack": [ "./packages/ngtools/webpack/src/index" ], "@schematics/angular": [ "./packages/schematics/angular/index" ] } }, From ed8a480cbb91d6d172e19bdc52ce44f66fc922a8 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 18 Mar 2018 20:46:44 -0700 Subject: [PATCH 233/724] build: remove package.json dependency on @ngtools/webpack --- package-lock.json | 11 ----------- packages/angular_devkit/build_webpack/package.json | 2 +- .../src/utils/webpack-file-system-host-adapter.ts | 6 +++--- packages/ngtools/webpack/package.json | 2 +- .../build_optimizer/webpack/aio-app/package-lock.json | 11 ----------- tsconfig.json | 1 + 6 files changed, 6 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 130d5d850c..393ade1cea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,17 +103,6 @@ "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, - "@ngtools/webpack": { - "version": "6.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.0.0-beta.6.tgz", - "integrity": "sha512-Os/bJ0EwiX+E/J57Wt2qqhZEd230rlA3DRMaVZeaZV+nGmZpffEFwti7+2z2u543/8AutvAKFWBM4R0U+fN6rA==", - "requires": { - "chalk": "2.2.2", - "semver": "5.4.1", - "tree-kill": "1.2.0", - "webpack-sources": "1.1.0" - } - }, "@types/body-parser": { "version": "1.16.8", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index aa50469e2f..db382986f4 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@angular-devkit/build-optimizer": "0.0.0", - "@ngtools/webpack": "6.0.0-beta.6", + "@ngtools/webpack": "0.0.0", "autoprefixer": "^7.2.3", "cache-loader": "^1.2.2", "chalk": "~2.2.2", diff --git a/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts b/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts index d8368e231c..3380c102d6 100644 --- a/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts +++ b/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts @@ -50,7 +50,7 @@ export class WebpackFileSystemHostAdapter implements InputFileSystem { } } - stat(path: string, callback: Callback): void { + stat(path: string, callback: Callback): void { const p = normalize('/' + path); const result = this._host.stat(p); @@ -94,9 +94,9 @@ export class WebpackFileSystemHostAdapter implements InputFileSystem { return this._doHostCall(this._host.list(normalize('/' + path)), callback); } - readFile(path: string, callback: Callback): void { + readFile(path: string, callback: Callback): void { const o = this._host.read(normalize('/' + path)).pipe( - map(content => new Buffer(content)), + map(content => virtualFs.fileBufferToString(content)), ); return this._doHostCall(o, callback); diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 1328a004bb..78bbccd028 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -1,6 +1,6 @@ { "name": "@ngtools/webpack", - "version": "6.0.0-beta.6", + "version": "0.0.0", "description": "Webpack plugin that AoT compiles your Angular components and modules.", "main": "./src/index.js", "typings": "src/index.d.ts", diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json b/tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json index 802013f01c..904c7910d0 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/package-lock.json @@ -185,17 +185,6 @@ "jshashes": "1.0.7" } }, - "@ngtools/webpack": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.4.1.tgz", - "integrity": "sha1-bUmPIc0a/AJ7i3RthSSn9OkeHas=", - "requires": { - "enhanced-resolve": "3.3.0", - "loader-utils": "1.1.0", - "magic-string": "0.19.1", - "source-map": "0.5.6" - } - }, "@types/jasmine": { "version": "2.5.45", "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.5.45.tgz", diff --git a/tsconfig.json b/tsconfig.json index cb69bc17ac..405e80d6de 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,6 +46,7 @@ "@angular-devkit/build-optimizer": [ "./packages/angular_devkit/build_optimizer/src/index" ], "@angular-devkit/architect": [ "./packages/angular_devkit/architect/src/index" ], "@ngtools/webpack": [ "./packages/ngtools/webpack/src/index" ], + "@ngtools/webpack/*": [ "./packages/ngtools/webpack/*" ], "@schematics/angular": [ "./packages/schematics/angular/index" ] } }, From 991052235cbab59dce7caaddd5827bc5b553262e Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 19 Mar 2018 13:29:17 -0700 Subject: [PATCH 234/724] fix(@ngtools/webpack): fix ngtools/webpack to properly use Host<> --- .../models/webpack-configs/typescript.ts | 25 ++-- .../build_webpack/src/browser/index.ts | 11 +- .../build_webpack/src/karma/index.ts | 5 +- .../core/src/virtual-fs/host/buffer.ts | 6 +- packages/ngtools/webpack/package.json | 1 + .../webpack/src/angular_compiler_plugin.ts | 9 +- packages/ngtools/webpack/src/compiler_host.ts | 138 +++++++++++------- 7 files changed, 120 insertions(+), 75 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index 59e01fe458..bc8e556ce3 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -1,6 +1,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. - +import { virtualFs } from '@angular-devkit/core'; +import { Stats } from 'fs'; import * as path from 'path'; import { stripIndent } from 'common-tags'; import { @@ -19,7 +20,12 @@ const webpackLoader: string = g['angularCliIsLocal'] : '@ngtools/webpack'; -function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = true) { +function _createAotPlugin( + wco: WebpackConfigOptions, + options: any, + host: virtualFs.Host, + useMain = true, +) { const { appConfig, root, buildOptions } = wco; options.compilerOptions = options.compilerOptions || {}; @@ -102,22 +108,23 @@ function _createAotPlugin(wco: WebpackConfigOptions, options: any, useMain = tru additionalLazyModules, nameLazyFiles: buildOptions.namedChunks, forkTypeChecker: buildOptions.forkTypeChecker, - ...options + ...options, + host, }; return new AngularCompilerPlugin(pluginOptions); } -export function getNonAotConfig(wco: WebpackConfigOptions) { +export function getNonAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { const { appConfig, root } = wco; const tsConfigPath = path.resolve(root, appConfig.tsConfig); return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, - plugins: [_createAotPlugin(wco, { tsConfigPath, skipCodeGeneration: true })] + plugins: [_createAotPlugin(wco, { tsConfigPath, skipCodeGeneration: true }, host)] }; } -export function getAotConfig(wco: WebpackConfigOptions) { +export function getAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { const { root, buildOptions, appConfig } = wco; const tsConfigPath = path.resolve(root, appConfig.tsConfig); @@ -133,11 +140,11 @@ export function getAotConfig(wco: WebpackConfigOptions) { return { module: { rules: [{ test, use: loaders }] }, - plugins: [_createAotPlugin(wco, { tsConfigPath })] + plugins: [_createAotPlugin(wco, { tsConfigPath }, host)] }; } -export function getNonAotTestConfig(wco: WebpackConfigOptions) { +export function getNonAotTestConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { const { root, appConfig } = wco; const tsConfigPath = path.resolve(root, appConfig.tsConfig); @@ -152,6 +159,6 @@ export function getNonAotTestConfig(wco: WebpackConfigOptions) { return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, - plugins: [_createAotPlugin(wco, pluginOptions, false)] + plugins: [_createAotPlugin(wco, pluginOptions, host, false)] }; } diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 7e0f56edef..f3735ba2e4 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -35,7 +35,6 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; -import { WebpackFileSystemHostAdapter } from '../utils/webpack-file-system-host-adapter'; const webpackMerge = require('webpack-merge'); @@ -152,12 +151,6 @@ export class BrowserBuilder implements Builder { return; } const webpackCompiler = webpack(webpackConfig); - - // TODO: fix webpack typings. - // tslint:disable-next-line:no-any - (webpackCompiler as any).inputFileSystem = new WebpackFileSystemHostAdapter( - this.context.host as virtualFs.Host, - ); const statsConfig = getWebpackStatsConfig(options.verbose); const callback: webpack.compiler.CompilerCallback = (err, stats) => { @@ -277,8 +270,8 @@ export class BrowserBuilder implements Builder { if (wco.appConfig.main || wco.appConfig.polyfills) { const typescriptConfigPartial = wco.buildOptions.aot - ? getAotConfig(wco) - : getNonAotConfig(wco); + ? getAotConfig(wco, this.context.host as virtualFs.Host) + : getNonAotConfig(wco, this.context.host as virtualFs.Host); webpackConfigs.push(typescriptConfigPartial); } diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts index 0b750f19ea..6539ce8c97 100644 --- a/packages/angular_devkit/build_webpack/src/karma/index.ts +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -12,7 +12,8 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, normalize, resolve } from '@angular-devkit/core'; +import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { @@ -158,7 +159,7 @@ export class KarmaBuilder implements Builder { const webpackConfigs: {}[] = [ getCommonConfig(wco), getStylesConfig(wco), - getNonAotTestConfig(wco), + getNonAotTestConfig(wco, this.context.host as virtualFs.Host), getTestConfig(wco), ]; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts b/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts index e71788b978..dbf9d39778 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/buffer.ts @@ -46,7 +46,11 @@ export function stringToFileBuffer(str: string): FileBuffer { } export function fileBufferToString(fileBuffer: FileBuffer): string { - if (typeof TextDecoder !== 'undefined') { + if (fileBuffer.toString.length == 1) { + return (fileBuffer.toString as (enc: string) => string)('utf-8'); + } else if (typeof Buffer !== 'undefined') { + return new Buffer(fileBuffer).toString('utf-8'); + } else if (typeof TextDecoder !== 'undefined') { // Modern browsers implement TextEncode. return new TextDecoder('utf-8').decode(new Uint8Array(fileBuffer)); } else { diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 78bbccd028..437a61f598 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -31,6 +31,7 @@ "webpack-sources": "^1.1.0" }, "peerDependencies": { + "@angular-devkit/core": "0.0.0", "typescript": "~2.5.0 | ~2.6.0 | ~2.7.0", "webpack": "^4.0.0" } diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index f0aebc16c5..04fd6e1962 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -8,6 +8,7 @@ // TODO: fix webpack typings. // tslint:disable-next-line:no-global-tslint-disable // tslint:disable:no-any +import { virtualFs } from '@angular-devkit/core'; import { ChildProcess, ForkOptions, fork } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; @@ -87,6 +88,8 @@ export interface AngularCompilerPluginOptions { // Use tsconfig to include path globs. compilerOptions?: ts.CompilerOptions; + + host: virtualFs.Host; } export enum PLATFORM { @@ -258,7 +261,11 @@ export class AngularCompilerPlugin { } // Create the webpack compiler host. - const webpackCompilerHost = new WebpackCompilerHost(this._compilerOptions, this._basePath); + const webpackCompilerHost = new WebpackCompilerHost( + this._compilerOptions, + this._basePath, + this._options.host, + ); webpackCompilerHost.enableCaching(); // Create and set a new WebpackResourceLoader. diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index aed0185cf7..94c39db51b 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -5,8 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { Path, getSystemPath, join as _join, normalize, virtualFs } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; -import { basename, dirname, join, sep } from 'path'; +import { basename, dirname, join } from 'path'; import * as ts from 'typescript'; import { WebpackResourceLoader } from './resource_loader'; @@ -104,7 +106,7 @@ export class VirtualFileStats extends VirtualStats { export class WebpackCompilerHost implements ts.CompilerHost { - private _delegate: ts.CompilerHost; + private _syncHost: virtualFs.SyncDelegateHost; private _files: {[path: string]: VirtualFileStats | null} = Object.create(null); private _directories: {[path: string]: VirtualDirStats | null} = Object.create(null); @@ -117,32 +119,36 @@ export class WebpackCompilerHost implements ts.CompilerHost { private _cache = false; private _resourceLoader?: WebpackResourceLoader | undefined; - constructor(private _options: ts.CompilerOptions, basePath: string) { + constructor( + private _options: ts.CompilerOptions, + basePath: string, + private _host: virtualFs.Host = new NodeJsSyncHost(), + ) { + this._syncHost = new virtualFs.SyncDelegateHost(_host); this._setParentNodes = true; - this._delegate = ts.createCompilerHost(this._options, this._setParentNodes); this._basePath = this._normalizePath(basePath); } - private _normalizePath(path: string) { - return path.replace(/\\/g, '/'); + private _normalizePath(path: string): Path { + return normalize(path); } denormalizePath(path: string) { - return path.replace(/\//g, sep); + return getSystemPath(normalize(path)); } - resolve(path: string) { - path = this._normalizePath(path); - if (path[0] == '.') { - return this._normalizePath(join(this.getCurrentDirectory(), path)); - } else if (path[0] == '/' || path.match(/^\w:\//)) { - return path; + resolve(path: string): Path { + const p = this._normalizePath(path); + if (p[0] == '.') { + return this._normalizePath(join(this.getCurrentDirectory(), p)); + } else if (p[0] == '/' || p.match(/^\w:\//)) { + return p; } else { - return this._normalizePath(join(this._basePath, path)); + return this._normalizePath(join(this._basePath, p)); } } - private _setFileContent(fileName: string, content: string) { + private _setFileContent(fileName: Path, content: string) { this._files[fileName] = new VirtualFileStats(fileName, content); let p = dirname(fileName); @@ -176,7 +182,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { return Object.keys(this._files) .filter(fileName => fileName.endsWith('.ngfactory.js') || fileName.endsWith('.ngstyle.js')) // These paths are used by the virtual file system decorator so we must denormalize them. - .map((path) => this.denormalizePath(path)); + .map(path => this.denormalizePath(path as Path)); } invalidate(fileName: string): void { @@ -197,24 +203,29 @@ export class WebpackCompilerHost implements ts.CompilerHost { } fileExists(fileName: string, delegate = true): boolean { - fileName = this.resolve(fileName); + const p = this.resolve(fileName); - return this._files[fileName] != null || (delegate && this._delegate.fileExists(fileName)); + return this._files[p] != null + || (delegate && this._syncHost.exists(normalize(p))); } readFile(fileName: string): string | undefined { - fileName = this.resolve(fileName); + const p = this.resolve(fileName); - const stats = this._files[fileName]; + const stats = this._files[p]; if (!stats) { - const result = this._delegate.readFile(fileName); - if (result !== undefined) { - if (this._cache) { - this._setFileContent(fileName, result); + try { + const result = virtualFs.fileBufferToString(this._syncHost.read(p)); + if (result !== undefined) { + if (this._cache) { + this._setFileContent(p, result); + } } - } - return result; + return result; + } catch (e) { + return undefined; + } } return stats.content; @@ -222,41 +233,61 @@ export class WebpackCompilerHost implements ts.CompilerHost { // Does not delegate, use with `fileExists/directoryExists()`. stat(path: string): VirtualStats { - path = this.resolve(path); - const stats = this._files[path] || this._directories[path]; + const p = this.resolve(path); + const stats = this._files[p] || this._directories[p]; if (!stats) { - throw new Error(`File not found: ${JSON.stringify(path)}`); + throw new Error(`File not found: ${JSON.stringify(p)}`); } return stats; } directoryExists(directoryName: string, delegate = true): boolean { - directoryName = this.resolve(directoryName); + const p = this.resolve(directoryName); - return (this._directories[directoryName] != null) - || (delegate - && this._delegate.directoryExists != undefined - && this._delegate.directoryExists(directoryName)); + return (this._directories[p] != null) + || (delegate && this._syncHost.exists(p) && this._syncHost.isDirectory(p)); } getFiles(path: string): string[] { - path = this.resolve(path); + const p = this.resolve(path); - return Object.keys(this._files) - .filter(fileName => dirname(fileName) == path) - .map(path => basename(path)); + const subfiles = Object.keys(this._files) + .filter(fileName => dirname(fileName) == p) + .map(p => basename(p)); + + + let delegated: string[]; + try { + delegated = this._syncHost.list(p).filter((x: string) => { + try { + return this._syncHost.isFile(_join(p, x)); + } catch (e) { + return false; + } + }); + } catch (e) { + delegated = []; + } + + return delegated.concat(subfiles); } getDirectories(path: string): string[] { - path = this.resolve(path); + const p = this.resolve(path); const subdirs = Object.keys(this._directories) - .filter(fileName => dirname(fileName) == path) + .filter(fileName => dirname(fileName) == p) .map(path => basename(path)); let delegated: string[]; try { - delegated = this._delegate.getDirectories(path); + delegated = this._syncHost.list(p).filter((x: string) => { + try { + return this._syncHost.isDirectory(_join(p, x)); + } catch (e) { + return false; + } + }); } catch (e) { delegated = []; } @@ -288,11 +319,13 @@ export class WebpackCompilerHost implements ts.CompilerHost { } get getCancellationToken() { - return this._delegate.getCancellationToken; + // return this._delegate.getCancellationToken; + // TODO: consider implementing a cancellation token. + return undefined; } getDefaultLibFileName(options: ts.CompilerOptions) { - return this._delegate.getDefaultLibFileName(options); + return ts.createCompilerHost(options, false).getDefaultLibFileName(options); } // This is due to typescript CompilerHost interface being weird on writeFile. This shuts down @@ -300,31 +333,30 @@ export class WebpackCompilerHost implements ts.CompilerHost { get writeFile() { return ( fileName: string, - data: string, _writeByteOrderMark: boolean, + data: string, + _writeByteOrderMark: boolean, _onError?: (message: string) => void, _sourceFiles?: ReadonlyArray, ): void => { - fileName = this.resolve(fileName); - this._setFileContent(fileName, data); + const p = this.resolve(fileName); + this._setFileContent(p, data); }; } getCurrentDirectory(): string { - return this._basePath !== null ? this._basePath : this._delegate.getCurrentDirectory(); + return this._basePath !== null ? this._basePath : '/'; } getCanonicalFileName(fileName: string): string { - fileName = this.resolve(fileName); - - return this._delegate.getCanonicalFileName(fileName); + return this.resolve(fileName); } useCaseSensitiveFileNames(): boolean { - return this._delegate.useCaseSensitiveFileNames(); + return !process.platform.startsWith('win32'); } getNewLine(): string { - return this._delegate.getNewLine(); + return '\n'; } setResourceLoader(resourceLoader: WebpackResourceLoader) { @@ -334,7 +366,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { readResource(fileName: string) { if (this._resourceLoader) { // These paths are meant to be used by the loader so we must denormalize them. - const denormalizedFileName = this.denormalizePath(fileName); + const denormalizedFileName = this.denormalizePath(normalize(fileName)); return this._resourceLoader.get(denormalizedFileName); } else { From 0cab675312e9de126004097ed2a3faa3326da595 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 20 Mar 2018 12:05:02 -0700 Subject: [PATCH 235/724] test: fix glob option in tests --- scripts/test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/test.ts b/scripts/test.ts index 60cea47b06..cc8b5bac22 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -152,9 +152,8 @@ glob.sync('packages/**/*.spec.ts') }); export default function (args: ParsedArgs, logger: logging.Logger) { - const packageGlob = args.glob ? `**/${args.glob}/**` : '**'; const specGlob = args.large ? '*_spec_large.ts' : '*_spec.ts'; - const regex = `packages/${packageGlob}/${specGlob}`; + const regex = args.glob ? args.glob : `packages/**/${specGlob}`; if (args['code-coverage']) { runner.env.addReporter(new IstanbulReporter()); From 2ba2a26aa1a4fb9d593b677784e41bb0d0cdfcaa Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 20 Mar 2018 12:41:07 -0700 Subject: [PATCH 236/724] test: fix large tests for webpack VFS support --- .../models/webpack-configs/typescript.ts | 6 +- .../test/browser/aot_spec_large.ts | 2 +- .../test/browser/assets_spec_large.ts | 4 +- .../test/browser/base-href_spec_large.ts | 2 +- .../browser/build-optimizer_spec_large.ts | 2 +- .../browser/custom-lazy-modules_spec_large.ts | 2 +- .../test/browser/deploy-url_spec_large.ts | 6 +- .../browser/file-replacements_spec_large.ts | 2 +- .../test/browser/i18n_spec_large.ts | 6 +- .../test/browser/lazy-module_spec_large.ts | 26 ++--- .../browser/license-extraction_spec_large.ts | 6 +- .../browser/optimization-level_spec_large.ts | 4 +- .../test/browser/output-hashing_spec_large.ts | 2 +- .../test/browser/output-path_spec_large.ts | 8 +- .../test/browser/rebuild_spec_large.ts | 18 ++-- .../test/browser/scripts-array_spec_large.ts | 14 +-- .../test/browser/source-map_spec_large.ts | 8 +- .../test/browser/stats-json_spec_large.ts | 2 +- .../test/browser/styles_spec_large.ts | 99 ++++++++++++------- .../subresource-integrity_spec_large.ts | 2 +- .../test/browser/vendor-chunk_spec_large.ts | 2 +- .../test/browser/works_spec_large.ts | 14 +-- .../test/extract-i18n/works_spec_large.ts | 20 ++-- .../test/karma/code-coverage_spec_large.ts | 8 +- .../test/protractor/works_spec_large.ts | 4 +- .../test/tslint/works_spec_large.ts | 2 +- .../test/utils/run-target-spec.ts | 3 +- .../test/utils/test-project-host.ts | 69 +++---------- .../webpack/src/angular_compiler_plugin.ts | 4 +- 29 files changed, 170 insertions(+), 177 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index bc8e556ce3..c05fa22143 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -14,9 +14,9 @@ import { WebpackConfigOptions } from '../build-options'; const SilentError = require('silent-error'); -const g: any = global; -const webpackLoader: string = g['angularCliIsLocal'] - ? g.angularCliPackages['@ngtools/webpack'].main +const g: any = typeof global !== 'undefined' ? global : {}; +const webpackLoader: string = g['_DevKitIsLocal'] + ? require('lib/packages').packages['@ngtool/webpack'].main : '@ngtools/webpack'; diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts index 195ca2d57a..ec699154e7 100644 --- a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts @@ -24,7 +24,7 @@ describe('Browser Builder', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts index 0877f40a58..8c598033e6 100644 --- a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts @@ -42,11 +42,11 @@ describe('Browser Builder assets', () => { tap(() => { // Assets we expect should be there. Object.keys(matches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(matches[fileName]); }); // .gitkeep should not be there. - expect(host.asSync().exists(normalize('./dist/folder/.gitkeep'))).toBe(false); + expect(host.scopedSync().exists(normalize('./dist/folder/.gitkeep'))).toBe(false); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts index 92adfc6eb8..19be1668fe 100644 --- a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts @@ -29,7 +29,7 @@ describe('Browser Builder base href', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); - const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); expect(content).toMatch(//); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts index ebe296cfcb..0c6690c865 100644 --- a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts @@ -23,7 +23,7 @@ describe('Browser Builder build optimizer', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).not.toMatch(/\.decorators =/); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts index e887894fe1..7e0b6647aa 100644 --- a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts @@ -51,7 +51,7 @@ // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap((buildEvent) => expect(buildEvent.success).toBe(true)), // tap(() => -// expect(host.asSync().exists(join(outputPath, 'lazy.module.js'))).toBe(true)), +// expect(host.scopedSync().exists(join(outputPath, 'lazy.module.js'))).toBe(true)), // ).subscribe(undefined, done.fail, done); // }, 30000); // }); diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts index 9812ce6def..14a77c616d 100644 --- a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts @@ -24,7 +24,7 @@ describe('Browser Builder deploy url', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('deployUrl/main.js'); }), concatMap(() => runTargetSpec(host, browserTargetSpec, @@ -32,7 +32,7 @@ describe('Browser Builder deploy url', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('http://example.com/some/path/main.js'); }), ).subscribe(undefined, done.fail, done); @@ -45,7 +45,7 @@ describe('Browser Builder deploy url', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'runtime.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('deployUrl/'); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts index 6e4e4757e5..360d7099e8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts @@ -32,7 +32,7 @@ // concatMap(() => architect.run(architect.getTarget({ overrides }))), // tap(() => { // const fileName = join(outputPath, 'main.js'); -// const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); +// const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); // expect(content).toContain('production: true'); // }), // ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts index 011942d605..8b91275f72 100644 --- a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts @@ -57,7 +57,7 @@ describe('Browser Builder i18n', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(/Bonjour i18n!/); }), ).subscribe(undefined, done.fail, done); @@ -79,7 +79,7 @@ describe('Browser Builder i18n', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(/Other content/); }), ).subscribe(undefined, done.fail, done); @@ -109,7 +109,7 @@ describe('Browser Builder i18n', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(/registerLocaleData/); expect(content).toMatch(/angular_common_locales_fr/); }), diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts index b30d005685..4a25d205be 100644 --- a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts @@ -82,7 +82,9 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true)), + tap(() => { + expect(host.scopedSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true); + }), ).subscribe(undefined, done.fail, done); }, 30000); @@ -96,7 +98,7 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -112,7 +114,7 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-module.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, 'lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -124,7 +126,7 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -139,7 +141,7 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -153,10 +155,10 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '1.js'))).toBe(true)), // TODO: the chunk with common modules used to be called `common`, see why that changed. - tap(() => expect(host.asSync().exists(join(outputPath, '2.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '2.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -172,9 +174,9 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '0.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '1.js'))).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, '2.js'))).toBe(false)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '1.js'))).toBe(true)), + tap(() => expect(host.scopedSync().exists(join(outputPath, '2.js'))).toBe(false)), ).subscribe(undefined, done.fail, done); }, 30000); @@ -205,7 +207,7 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))) + tap(() => expect(host.scopedSync().exists(join(outputPath, 'lazy-lazy-module.js'))) .toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts index b2babf9cdb..6b21e39748 100644 --- a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts @@ -17,7 +17,9 @@ describe('Browser Builder license extraction', () => { beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - it('works', (done) => { + // Ignored because license works when trying manually on a project, but doesn't work here. + // TODO: fix VFS use in webpack and the test host, and reenable this test. + xit('works', (done) => { // TODO: make license extraction independent from optimization level. const overrides = { extractLicenses: true, optimizationLevel: 1 }; @@ -25,7 +27,7 @@ describe('Browser Builder license extraction', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, '3rdpartylicenses.txt'); - expect(host.asSync().exists(fileName)).toBe(true); + expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); }, 45000); diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts index d6677ca364..d16531f558 100644 --- a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts @@ -24,7 +24,7 @@ describe('Browser Builder optimization level', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); // Bundle contents should be uglified, which includes variable mangling. expect(content).not.toContain('AppComponent'); }), @@ -40,7 +40,7 @@ describe('Browser Builder optimization level', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'vendor.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); expect(content).toMatch(/class \w{constructor\(\){/); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts index eafe12bda2..790608bcaf 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts @@ -22,7 +22,7 @@ describe('Browser Builder output hashing', () => { function generateFileHashMap(): Map { const hashes = new Map(); - host.asSync().list(normalize('./dist')).forEach(name => { + host.scopedSync().list(normalize('./dist')).forEach(name => { const matches = name.match(OUTPUT_RE); if (matches) { const [, module, hash] = matches; diff --git a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts index 26fc7aeee7..a32046881e 100644 --- a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts @@ -19,15 +19,17 @@ describe('Browser Builder output path', () => { it('deletes output path', (done) => { // Write a file to the output path to later verify it was deleted. - host.asSync().write(join(outputPath, 'file.txt'), virtualFs.stringToFileBuffer('file')); + host.scopedSync().write(join(outputPath, 'file.txt'), virtualFs.stringToFileBuffer('file')); // Delete an app file to force a failed compilation. // Failed compilations still delete files, but don't output any. - host.asSync().delete(join(workspaceRoot, 'src', 'app', 'app.component.ts')); + host.delete(join(workspaceRoot, 'src', 'app', 'app.component.ts')).subscribe({ + error: done.fail, + }); runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => { expect(buildEvent.success).toBe(false); - expect(host.asSync().exists(outputPath)).toBe(false); + expect(host.scopedSync().exists(outputPath)).toBe(false); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index 578b094efb..50469a8d60 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -82,7 +82,7 @@ describe('Browser Builder', () => { switch (buildNumber) { case 1: // No lazy chunk should exist. - expect(host.asSync().exists(join(outputPath, 'lazy-module.js'))).toBe(false); + expect(host.scopedSync().exists(join(outputPath, 'lazy-module.js'))).toBe(false); // Write the lazy chunk files. Order matters when writing these, because of imports. host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles(lazyModuleImport); @@ -90,7 +90,7 @@ describe('Browser Builder', () => { case 2: // A lazy chunk should have been with the filename. - expect(host.asSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true); host.writeMultipleFiles(goldenValueFiles); break; @@ -102,7 +102,9 @@ describe('Browser Builder', () => { + /\$\$_E2E_GOLDEN_VALUE_3/.source, ); const fileName = './dist/main.js'; - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(fileName)), + ); expect(content).toMatch(re); break; @@ -204,7 +206,7 @@ describe('Browser Builder', () => { xit('rebuilds after errors in AOT', (done) => { // Save the original contents of `./src/app/app.component.ts`. const origContent = virtualFs.fileBufferToString( - host.asSync().read(normalize('src/app/app.component.ts'))); + host.scopedSync().read(normalize('src/app/app.component.ts'))); // Add a major static analysis error on a non-main file to the initial build. host.replaceInFile('./src/app/app.component.ts', `'app-root'`, `(() => 'app-root')()`); @@ -311,7 +313,7 @@ describe('Browser Builder', () => { case 4: // Check if html changes are added to factories. expect(buildEvent.success).toBe(true); - content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('HTML_REBUILD_STRING'); // Change the component css. host.appendToFile('src/app/app.component.css', 'CSS_REBUILD_STRING {color: #f00;}'); @@ -320,7 +322,7 @@ describe('Browser Builder', () => { case 5: // Check if css changes are added to factories. expect(buildEvent.success).toBe(true); - content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('CSS_REBUILD_STRING'); // Change the component css import. host.appendToFile('src/app/app.component.css', 'CSS_DEP_REBUILD_STRING {color: #f00;}'); @@ -329,7 +331,7 @@ describe('Browser Builder', () => { case 6: // Check if css import changes are added to factories. expect(buildEvent.success).toBe(true); - content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('CSS_DEP_REBUILD_STRING'); // Change the component itself. host.replaceInFile('src/app/app.component.ts', 'app-root', @@ -339,7 +341,7 @@ describe('Browser Builder', () => { case 7: // Check if component changes are added to factories. expect(buildEvent.success).toBe(true); - content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain('FACTORY_REBUILD_STRING'); break; } diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts index 5e758d080c..7db33331a1 100644 --- a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts @@ -69,7 +69,7 @@ describe('Browser Builder scripts array', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(matches[fileName]); })), ).subscribe(undefined, done.fail, done); @@ -91,7 +91,7 @@ describe('Browser Builder scripts array', () => { const scriptsBundle = host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js/); expect(scriptsBundle).toBeTruthy(); const fileName = join(outputPath, scriptsBundle as PathFragment); - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch('var number=2;'); expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js\.map/)) .toBeTruthy(); @@ -100,10 +100,10 @@ describe('Browser Builder scripts array', () => { expect(host.fileMatchExists(outputPath, /renamed-script\.[0-9a-f]{20}\.js\.map/)) .toBeTruthy(); expect(host.fileMatchExists(outputPath, /scripts\.[0-9a-f]{20}\.js/)).toBeTruthy(); - expect(host.asSync().exists(normalize('dist/lazy-script.js'))).toBe(true); - expect(host.asSync().exists(normalize('dist/lazy-script.js.map'))).toBe(true); - expect(host.asSync().exists(normalize('dist/renamed-lazy-script.js'))).toBe(true); - expect(host.asSync().exists(normalize('dist/renamed-lazy-script.js.map'))) + expect(host.scopedSync().exists(normalize('dist/lazy-script.js'))).toBe(true); + expect(host.scopedSync().exists(normalize('dist/lazy-script.js.map'))).toBe(true); + expect(host.scopedSync().exists(normalize('dist/renamed-lazy-script.js'))).toBe(true); + expect(host.scopedSync().exists(normalize('dist/renamed-lazy-script.js.map'))) .toBe(true); }), ).subscribe(undefined, done.fail, done); @@ -127,7 +127,7 @@ describe('Browser Builder scripts array', () => { + /['"]cinput-script['"]/.source, ); const fileName = './dist/scripts.js'; - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(re); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts index 52280f7f9f..912fa87d2f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts @@ -24,7 +24,7 @@ describe('Browser Builder source map', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js.map'); - expect(host.asSync().exists(fileName)).toBe(true); + expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); }, 30000); @@ -36,7 +36,7 @@ describe('Browser Builder source map', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'main.js.map'); - expect(host.asSync().exists(fileName)).toBe(false); + expect(host.scopedSync().exists(fileName)).toBe(false); }), ).subscribe(undefined, done.fail, done); }, 30000); @@ -47,9 +47,9 @@ describe('Browser Builder source map', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists(join(outputPath, 'main.js.map'))).toBe(false); + expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBe(false); const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); expect(content).toContain('eval("function webpackEmptyAsyncContext'); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts index 8230d8c77b..e92c4d85d5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts @@ -24,7 +24,7 @@ describe('Browser Builder stats json', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'stats.json'); - expect(host.asSync().exists(fileName)).toBe(true); + expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts index 7a67db8c3f..8c75ba3825 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts @@ -70,16 +70,16 @@ describe('Browser Builder styles', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), // Check css files were created. tap(() => Object.keys(cssMatches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(cssMatches[fileName]); })), // Check no js files are created. tap(() => Object.keys(jsMatches).forEach(key => - expect(host.asSync().exists(normalize(key))).toBe(false), + expect(host.scopedSync().exists(normalize(key))).toBe(false), )), // Check check index has styles in the right order. tap(() => Object.keys(cssIndexMatches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(cssIndexMatches[fileName]); })), // Also test with extractCss false. @@ -90,16 +90,16 @@ describe('Browser Builder styles', () => { // tap((buildEvent) => expect(buildEvent.success).toBe(true)), // Check js files were created. tap(() => Object.keys(jsMatches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(jsMatches[fileName]); })), // Check no css files are created. tap(() => Object.keys(cssMatches).forEach(key => - expect(host.asSync().exists(normalize(key))).toBe(false), + expect(host.scopedSync().exists(normalize(key))).toBe(false), )), // Check check index has styles in the right order. tap(() => Object.keys(jsIndexMatches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(jsIndexMatches[fileName]); })), ).subscribe(undefined, done.fail, done); @@ -175,7 +175,7 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(matches[fileName]); })), ).subscribe(undefined, done.fail, done); @@ -269,7 +269,7 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => Object.keys(matches).forEach(fileName => { - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toMatch(matches[fileName]); })), ).subscribe(undefined, done.fail, done); @@ -303,7 +303,7 @@ describe('Browser Builder styles', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); // Large image should not be inlined, and gradient should be there. expect(content).toMatch( /url\(['"]?large\.png['"]?\),\s+linear-gradient\(to bottom, #0e40fa 25%, #0654f4 75%\);/); @@ -314,16 +314,16 @@ describe('Browser Builder styles', () => { }), tap(() => { const fileName = 'dist/main.js'; - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); // Large image should not be inlined. expect(content).toMatch(/url\((?:['"]|\\')?large\.png(?:['"]|\\')?\)/); // Small image should be inlined. expect(content).toMatch(/url\(\\?['"]data:image\/svg\+xml/); }), tap(() => { - expect(host.asSync().exists(normalize('dist/small.svg'))).toBe(false); - expect(host.asSync().exists(normalize('dist/large.png'))).toBe(true); - expect(host.asSync().exists(normalize('dist/small-id.svg'))).toBe(true); + expect(host.scopedSync().exists(normalize('dist/small.svg'))).toBe(false); + expect(host.scopedSync().exists(normalize('dist/large.png'))).toBe(true); + expect(host.scopedSync().exists(normalize('dist/small-id.svg'))).toBe(true); }), // TODO: find a way to check logger/output for warnings. // if (stdout.match(/postcss-url: \.+: Can't read file '\.+', ignoring/)) { @@ -332,7 +332,8 @@ describe('Browser Builder styles', () => { ).subscribe(undefined, done.fail, done); }, 30000); - it(`supports font-awesome imports`, (done) => { + // Disables a test that relies on node_modules. + xit(`supports font-awesome imports`, (done) => { host.writeMultipleFiles({ 'src/styles.scss': ` $fa-font-path: "~font-awesome/fonts"; @@ -365,7 +366,7 @@ describe('Browser Builder styles', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain(tags.stripIndents` /* normal-comment */ /*! important-comment */ @@ -388,7 +389,7 @@ describe('Browser Builder styles', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = 'dist/styles.css'; - const content = virtualFs.fileBufferToString(host.asSync().read(normalize(fileName))); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain( '/*! important-comment */div{-webkit-box-flex:1;-ms-flex:1;flex:1}'); }), @@ -421,36 +422,50 @@ describe('Browser Builder styles', () => { // Check base paths are correctly generated. runTargetSpec(host, browserTargetSpec, { aot: true, extractCss: true }).pipe( tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); expect(styles).toContain(`url('/assets/global-img-absolute.svg')`); expect(styles).toContain(`url('global-img-relative.png')`); expect(main).toContain(`url('/assets/component-img-absolute.svg')`); expect(main).toContain(`url('component-img-relative.png')`); - expect(host.asSync().exists(normalize('dist/global-img-absolute.svg'))).toBe(false); - expect(host.asSync().exists(normalize('dist/global-img-relative.png'))).toBe(true); - expect(host.asSync().exists(normalize('dist/component-img-absolute.svg'))).toBe(false); - expect(host.asSync().exists(normalize('dist/component-img-relative.png'))).toBe(true); + expect(host.scopedSync().exists(normalize('dist/global-img-absolute.svg'))) + .toBe(false); + expect(host.scopedSync().exists(normalize('dist/global-img-relative.png'))) + .toBe(true); + expect(host.scopedSync().exists(normalize('dist/component-img-absolute.svg'))) + .toBe(false); + expect(host.scopedSync().exists(normalize('dist/component-img-relative.png'))) + .toBe(true); }), // Check urls with deploy-url scheme are used as is. concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: '/base/', deployUrl: 'http://deploy.url/' }, )), tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); - expect(styles).toContain(`url('http://deploy.url/assets/global-img-absolute.svg')`); - expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); + expect(styles) + .toContain(`url('http://deploy.url/assets/global-img-absolute.svg')`); + expect(main) + .toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); }), // Check urls with base-href scheme are used as is (with deploy-url). concatMap(() => runTargetSpec(host, browserTargetSpec, { extractCss: true, baseHref: 'http://base.url/', deployUrl: 'deploy/' }, )), tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); - expect(styles).toContain(`url('http://base.url/deploy/assets/global-img-absolute.svg')`); - expect(main).toContain(`url('http://base.url/deploy/assets/component-img-absolute.svg')`); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); + expect(styles) + .toContain(`url('http://base.url/deploy/assets/global-img-absolute.svg')`); + expect(main) + .toContain(`url('http://base.url/deploy/assets/component-img-absolute.svg')`); }), // Check urls with deploy-url and base-href scheme only use deploy-url. concatMap(() => runTargetSpec(host, browserTargetSpec, { @@ -460,8 +475,10 @@ describe('Browser Builder styles', () => { }, )), tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); expect(styles).toContain(`url('http://deploy.url/assets/global-img-absolute.svg')`); expect(main).toContain(`url('http://deploy.url/assets/component-img-absolute.svg')`); }), @@ -470,8 +487,10 @@ describe('Browser Builder styles', () => { { extractCss: true, baseHref: '/base/', deployUrl: 'deploy/' }, )), tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); expect(styles).toContain(`url('/base/deploy/assets/global-img-absolute.svg')`); expect(main).toContain(`url('/base/deploy/assets/component-img-absolute.svg')`); }), @@ -480,8 +499,10 @@ describe('Browser Builder styles', () => { { extractCss: true, baseHref: '/base/', deployUrl: '/base/' }, )), tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); expect(styles).toContain(`url('/base/assets/global-img-absolute.svg')`); expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); }), @@ -490,8 +511,10 @@ describe('Browser Builder styles', () => { { extractCss: true, baseHref: '/base/' }, )), tap(() => { - const styles = virtualFs.fileBufferToString(host.asSync().read(normalize(stylesBundle))); - const main = virtualFs.fileBufferToString(host.asSync().read(normalize(mainBundle))); + const styles = virtualFs.fileBufferToString( + host.scopedSync().read(normalize(stylesBundle)), + ); + const main = virtualFs.fileBufferToString(host.scopedSync().read(normalize(mainBundle))); expect(styles).toContain(`url('/base/assets/global-img-absolute.svg')`); expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); }), diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts index 9cb357e6a2..fb3f976bff 100644 --- a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts @@ -30,7 +30,7 @@ describe('Browser Builder subresource integrity', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'index.html'); - const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); expect(content).toMatch(/integrity="\w+-[A-Za-z0-9\/\+=]+"/); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts index 41c69f6476..bc00e5322f 100644 --- a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts @@ -24,7 +24,7 @@ describe('Browser Builder vendor chunk', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = join(outputPath, 'vendor.js'); - expect(host.asSync().exists(fileName)).toBe(true); + expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts index b8bca23248..0396ca25a5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts @@ -22,13 +22,13 @@ describe('Browser Builder', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { // Default files should be in outputPath. - expect(host.asSync().exists(join(outputPath, 'runtime.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'main.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'polyfills.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'styles.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'vendor.js'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'favicon.ico'))).toBe(true); - expect(host.asSync().exists(join(outputPath, 'index.html'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'runtime.js'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'main.js'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'polyfills.js'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'styles.js'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'vendor.js'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'favicon.ico'))).toBe(true); + expect(host.scopedSync().exists(join(outputPath, 'index.html'))).toBe(true); }), ).subscribe(undefined, done.fail, done); }, 30000); diff --git a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts index 27a51b7c89..6d35a786bb 100644 --- a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts @@ -23,8 +23,8 @@ describe('Extract i18n Target', () => { runTargetSpec(host, extractI18nTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists((extractionFile))).toBe(true); - expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + expect(host.scopedSync().exists((extractionFile))).toBe(true); + expect(virtualFs.fileBufferToString(host.scopedSync().read(extractionFile))) .toMatch(/i18n test/); }), ).subscribe(undefined, done.fail, done); @@ -51,8 +51,8 @@ describe('Extract i18n Target', () => { runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists((extractionFile))).toBe(true); - expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + expect(host.scopedSync().exists((extractionFile))).toBe(true); + expect(virtualFs.fileBufferToString(host.scopedSync().read(extractionFile))) .toContain('source-language="fr"'); }), ).subscribe(undefined, done.fail, done); @@ -67,8 +67,8 @@ describe('Extract i18n Target', () => { runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists(extractionFile)).toBe(true); - expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + expect(host.scopedSync().exists(extractionFile)).toBe(true); + expect(virtualFs.fileBufferToString(host.scopedSync().read(extractionFile))) .toMatch(/i18n test/); }), ).subscribe(undefined, done.fail, done); @@ -84,8 +84,8 @@ describe('Extract i18n Target', () => { runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists(extractionFile)).toBe(true); - expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + expect(host.scopedSync().exists(extractionFile)).toBe(true); + expect(virtualFs.fileBufferToString(host.scopedSync().read(extractionFile))) .toMatch(/i18n test/); }), ).subscribe(undefined, done.fail, done); @@ -99,8 +99,8 @@ describe('Extract i18n Target', () => { runTargetSpec(host, extractI18nTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { - expect(host.asSync().exists(extractionFile)).toBe(true); - expect(virtualFs.fileBufferToString(host.asSync().read(extractionFile))) + expect(host.scopedSync().exists(extractionFile)).toBe(true); + expect(virtualFs.fileBufferToString(host.scopedSync().read(extractionFile))) .toMatch(/i18n test/); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts index 882f8421f1..9365ca8085 100644 --- a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts @@ -26,8 +26,8 @@ describe('Karma Builder code coverage', () => { debounceTime(500), tap(buildEvent => { expect(buildEvent.success).toBe(true); - expect(host.asSync().exists(coverageFilePath)).toBe(true); - const content = virtualFs.fileBufferToString(host.asSync().read(coverageFilePath)); + expect(host.scopedSync().exists(coverageFilePath)).toBe(true); + const content = virtualFs.fileBufferToString(host.scopedSync().read(coverageFilePath)); expect(content).toContain('polyfills.ts'); expect(content).toContain('test.ts'); }), @@ -48,8 +48,8 @@ describe('Karma Builder code coverage', () => { debounceTime(500), tap(buildEvent => { expect(buildEvent.success).toBe(true); - expect(host.asSync().exists(coverageFilePath)).toBe(true); - const content = virtualFs.fileBufferToString(host.asSync().read(coverageFilePath)); + expect(host.scopedSync().exists(coverageFilePath)).toBe(true); + const content = virtualFs.fileBufferToString(host.scopedSync().read(coverageFilePath)); expect(content).not.toContain('polyfills.ts'); expect(content).not.toContain('test.ts'); }), diff --git a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts index dca2077f86..c8bfb67766 100644 --- a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts @@ -30,7 +30,7 @@ describe('Protractor Builder', () => { }, 30000); it('overrides protractor specs', (done) => { - host.asSync().rename(normalize('./e2e/app.e2e-spec.ts'), + host.scopedSync().rename(normalize('./e2e/app.e2e-spec.ts'), normalize('./e2e/renamed-app.e2e-spec.ts')); const overrides = { specs: ['./e2e/renamed-app.e2e-spec.ts'] }; @@ -41,7 +41,7 @@ describe('Protractor Builder', () => { }, 60000); it('overrides protractor suites', (done) => { - host.asSync().rename(normalize('./e2e/app.e2e-spec.ts'), + host.scopedSync().rename(normalize('./e2e/app.e2e-spec.ts'), normalize('./e2e/renamed-app.e2e-spec.ts')); // Suites block need to be added in the protractor.conf.js file to test suites diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts index ea6b3c9f7c..2b37c8991b 100644 --- a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts @@ -41,7 +41,7 @@ describe('Tslint Target', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { const fileName = normalize('src/foo.ts'); - const content = virtualFs.fileBufferToString(host.asSync().read(fileName)); + const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); expect(content).toContain(`const foo = '';`); }), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts index f35cbd5444..d7ebfc3ab5 100644 --- a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts +++ b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts @@ -8,6 +8,7 @@ import { Architect, BuildEvent, TargetSpecifier } from '@angular-devkit/architect'; import { experimental, join, logging, normalize } from '@angular-devkit/core'; +import { createConsoleLogger } from '@angular-devkit/core/node'; import { Observable } from 'rxjs/Observable'; import { concatMap } from 'rxjs/operators'; import { TestProjectHost } from '../utils/test-project-host'; @@ -31,7 +32,7 @@ export function runTargetSpec( host: TestProjectHost, targetSpec: TargetSpecifier, overrides = {}, - logger: logging.Logger = new logging.NullLogger(), + logger: logging.Logger = createConsoleLogger(), ): Observable { targetSpec = { ...targetSpec, overrides }; const workspace = new experimental.workspace.Workspace(workspaceRoot, host); diff --git a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts index ed546811b2..e55c19c1ff 100644 --- a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts +++ b/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts @@ -8,10 +8,8 @@ import { Path, - PathFragment, getSystemPath, normalize, - resolve, virtualFs, } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; @@ -28,55 +26,15 @@ interface ProcessOutput { } export class TestProjectHost extends NodeJsSyncHost { - private _syncHost: virtualFs.SyncDelegateHost; + private _scopedSyncHost: virtualFs.SyncDelegateHost; constructor(protected _root: Path) { super(); - this._syncHost = new virtualFs.SyncDelegateHost(this); + this._scopedSyncHost = new virtualFs.SyncDelegateHost(new virtualFs.ScopedHost(this, _root)); } - // When a path is relative, resolve it relative to root, otherwise use it as absolute. - write(path: Path, content: virtualFs.FileBuffer): Observable { - return super.write(resolve(this._root, path), content); - } - read(path: Path): Observable { - return super.read(resolve(this._root, path)); - } - delete(path: Path): Observable { - return super.delete(resolve(this._root, path)); - } - rename(from: Path, to: Path): Observable { - return super.rename(resolve(this._root, from), resolve(this._root, to)); - } - - list(path: Path): Observable { - return super.list(resolve(this._root, path)); - } - - exists(path: Path): Observable { - return super.exists(resolve(this._root, path)); - } - isDirectory(path: Path): Observable { - return super.isDirectory(resolve(this._root, path)); - } - isFile(path: Path): Observable { - return super.isFile(resolve(this._root, path)); - } - - // Some hosts may not support stat. - stat(path: Path): Observable> { - return super.stat(resolve(this._root, path)); - } - - // Some hosts may not support watching. - watch( - path: Path, options?: virtualFs.HostWatchOptions, - ): Observable | null { - return super.watch(resolve(this._root, path), options); - } - - asSync() { - return this._syncHost; + scopedSync() { + return this._scopedSyncHost; } initialize(): Observable { @@ -141,30 +99,33 @@ export class TestProjectHost extends NodeJsSyncHost { writeMultipleFiles(files: { [path: string]: string }): void { Object.keys(files).map(fileName => - this.asSync().write(normalize(fileName), virtualFs.stringToFileBuffer(files[fileName])), + this.scopedSync().write( + normalize(fileName), + virtualFs.stringToFileBuffer(files[fileName]), + ), ); } replaceInFile(path: string, match: RegExp | string, replacement: string) { - const content = virtualFs.fileBufferToString(this.asSync().read(normalize(path))); - this.asSync().write(normalize(path), + const content = virtualFs.fileBufferToString(this.scopedSync().read(normalize(path))); + this.scopedSync().write(normalize(path), virtualFs.stringToFileBuffer(content.replace(match, replacement))); } appendToFile(path: string, str: string) { - const content = virtualFs.fileBufferToString(this.asSync().read(normalize(path))); - this.asSync().write(normalize(path), + const content = virtualFs.fileBufferToString(this.scopedSync().read(normalize(path))); + this.scopedSync().write(normalize(path), virtualFs.stringToFileBuffer(content.concat(str))); } fileMatchExists(dir: string, regex: RegExp) { - const [fileName] = this.asSync().list(normalize(dir)).filter(name => name.match(regex)); + const [fileName] = this.scopedSync().list(normalize(dir)).filter(name => name.match(regex)); return fileName || undefined; } copyFile(from: string, to: string) { - const content = this.asSync().read(normalize(from)); - this.asSync().write(normalize(to), content); + const content = this.scopedSync().read(normalize(from)); + this.scopedSync().write(normalize(to), content); } } diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 04fd6e1962..8c8fc75bba 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -515,8 +515,8 @@ export class AngularCompilerPlugin { private _createForkedTypeChecker() { // Bootstrap type checker is using local CLI. - const g: any = global; // tslint:disable-line:no-any - const typeCheckerFile: string = g['angularCliIsLocal'] + const g: any = typeof global !== 'undefined' ? global : {}; // tslint:disable-line:no-any + const typeCheckerFile: string = g['_DevKitIsLocal'] ? './type_checker_bootstrap.js' : './type_checker_worker.js'; From d7e7b9577bbca7245169d6cc657e07a0f3af67a7 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 20 Mar 2018 12:58:24 -0700 Subject: [PATCH 237/724] test: fix ngtools/webpack local-bootstrap resolution --- .../src/angular-cli-files/models/webpack-configs/typescript.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index c05fa22143..951ca008b7 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -16,7 +16,7 @@ const SilentError = require('silent-error'); const g: any = typeof global !== 'undefined' ? global : {}; const webpackLoader: string = g['_DevKitIsLocal'] - ? require('lib/packages').packages['@ngtool/webpack'].main + ? require.resolve('@ngtools/webpack') : '@ngtools/webpack'; From 9747635513283e92b1046605a4739555444fc9f0 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 21 Mar 2018 11:54:50 -0400 Subject: [PATCH 238/724] refactor(@angular-devkit/build-webpack): update circular dep plugin --- package-lock.json | 59 ++++++++++++++++++- package.json | 2 +- .../angular_devkit/build_webpack/package.json | 2 +- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 393ade1cea..be32cd392b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1569,9 +1569,9 @@ } }, "circular-dependency-plugin": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz", - "integrity": "sha512-yEFtUNUYT4jBykEX5ZOHw+5goA3glGZr9wAXIQqoyakjz5H5TeUmScnWRc52douAhb9eYzK3s7V6bXfNnjFdzg==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.0.tgz", + "integrity": "sha512-mJzk5D+Uy/bVVk89GDfdgINMc03FaqfpHg+nx/D8l2okD48FPmB5nBlpXj6HcmBkCv5AhY5qEfvCXmszc9vXpA==" }, "class-utils": { "version": "0.3.6", @@ -7256,6 +7256,29 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "less": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", + "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", + "requires": { + "errno": "0.1.4", + "graceful-fs": "4.1.11", + "image-size": "0.5.5", + "mime": "1.6.0", + "mkdirp": "0.5.1", + "promise": "7.3.1", + "request": "2.81.0", + "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + } + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -7318,6 +7341,36 @@ "read-pkg": "3.0.0" } }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", diff --git a/package.json b/package.json index 1c81bf2954..30cacbeae0 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "cache-loader": "^1.2.2", "chalk": "~2.2.2", "chokidar": "^1.7.0", - "circular-dependency-plugin": "^4.4.0", + "circular-dependency-plugin": "^5.0.0", "clean-css": "^4.1.11", "codelyzer": "^4.0.2", "common-tags": "^1.5.1", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index db382986f4..fdb34335d5 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -14,7 +14,7 @@ "autoprefixer": "^7.2.3", "cache-loader": "^1.2.2", "chalk": "~2.2.2", - "circular-dependency-plugin": "^4.4.0", + "circular-dependency-plugin": "^5.0.0", "clean-css": "^4.1.11", "common-tags": "^1.5.1", "copy-webpack-plugin": "^4.5.0", From db54bd1a160bf20d057d172440610ffb11f68af1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 17:08:35 +0000 Subject: [PATCH 239/724] refactor: rename optimizationLevel to optimize --- .../src/angular-cli-files/models/build-options.ts | 2 +- .../src/angular-cli-files/models/webpack-configs/browser.ts | 4 ++-- .../src/angular-cli-files/models/webpack-configs/common.ts | 2 +- packages/angular_devkit/build_webpack/src/browser/index.ts | 2 +- .../angular_devkit/build_webpack/src/browser/schema.json | 6 +++--- .../angular_devkit/build_webpack/src/dev-server/index.ts | 6 +++--- .../angular_devkit/build_webpack/src/extract-i18n/index.ts | 2 +- .../test/browser/license-extraction_spec_large.ts | 2 +- .../test/browser/optimization-level_spec_large.ts | 4 ++-- .../build_webpack/test/browser/scripts-array_spec_large.ts | 2 +- .../build_webpack/test/browser/styles_spec_large.ts | 6 +++--- .../angular_devkit/core/src/workspace/workspace_spec.ts | 2 +- .../angular/application/files/__dot__angular.json | 2 +- .../build_webpack/hello-world-app/.angular.json | 2 +- tests/@angular_devkit/core/workspace/angular-workspace.json | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts index f49c496e1c..533c6545bd 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts @@ -2,7 +2,7 @@ // TODO: cleanup this file, it's copied as is from Angular CLI. export interface BuildOptions { - optimizationLevel: number; + optimization: boolean; environment?: string; outputPath: string; aot?: boolean; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts index 97c5679da8..0beaec16ae 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -39,7 +39,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { chunksSortMode: packageChunkSort(appConfig), excludeChunks: lazyChunks, xhtml: true, - minify: buildOptions.optimizationLevel === 1 ? { + minify: buildOptions.optimization ? { caseSensitive: true, collapseWhitespace: true, keepClosingSlash: true @@ -53,7 +53,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { let sourcemaps: string | false = false; if (buildOptions.sourceMap) { // See https://webpack.js.org/configuration/devtool/ for sourcemap types. - if (buildOptions.evalSourceMap && buildOptions.optimizationLevel === 0) { + if (buildOptions.evalSourceMap && !buildOptions.optimization) { // Produce eval sourcemaps for development with serve, which are faster. sourcemaps = 'eval'; } else { diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts index fe222b6bbe..abb5a2964d 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts @@ -217,7 +217,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } catch (e) { } return { - mode: buildOptions.optimizationLevel === 0 ? 'development' : 'production', + mode: buildOptions.optimization ? 'production': 'development', devtool: false, resolve: { extensions: ['.ts', '.js'], diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index f3735ba2e4..223da881ca 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -81,7 +81,7 @@ export interface BrowserBuilderOptions { // A couple of options have different names. sourceMap: boolean; // previously 'sourcemaps'. evalSourceMap: boolean; // previously 'evalSourcemaps'. - optimizationLevel: number; // previously 'target'. + optimization: boolean; // previously 'target'. i18nLocale?: string; // previously 'locale'. i18nMissingTranslation?: string; // previously 'missingTranslation'. diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 49bb10d41b..d4dde8fd2d 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -63,10 +63,10 @@ }, "additionalProperties": false }, - "optimizationLevel": { - "type": "number", + "optimization": { + "type": "boolean", "description": "Defines the optimization level of the build.", - "default": 0 + "default": false }, "environment": { "type": "string", diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index 6a49956b81..50ec1d725d 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -149,7 +149,7 @@ export class DevServerBuilder implements Builder { }); } - if (browserOptions.optimizationLevel > 0) { + if (browserOptions.optimization) { this.context.logger.error(tags.stripIndents` **************************************************************************************** This is a simple server for use in testing or debugging Angular applications locally. @@ -241,13 +241,13 @@ export class DevServerBuilder implements Builder { htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], }, stats: browserOptions.verbose ? getWebpackStatsConfig(browserOptions.verbose) : false, - compress: browserOptions.optimizationLevel > 0, + compress: browserOptions.optimization, watchOptions: { poll: browserOptions.poll, }, https: options.ssl, overlay: { - errors: browserOptions.optimizationLevel === 0, + errors: !browserOptions.optimization, warnings: false, }, contentBase: false, diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts index f58204f97e..bf0390b87e 100644 --- a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts @@ -66,7 +66,7 @@ export class ExtractI18nBuilder implements Builder { // Extracting i18n uses the browser target webpack config with some specific options. const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, { ...browserOptions, - optimizationLevel: 0, + optimization: false, i18nLocale: options.i18nLocale, i18nOutFormat: options.i18nFormat, i18nOutFile: outFile, diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts index 6b21e39748..4c3efaf9fc 100644 --- a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts @@ -21,7 +21,7 @@ describe('Browser Builder license extraction', () => { // TODO: fix VFS use in webpack and the test host, and reenable this test. xit('works', (done) => { // TODO: make license extraction independent from optimization level. - const overrides = { extractLicenses: true, optimizationLevel: 1 }; + const overrides = { extractLicenses: true, optimization: true }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts index d16531f558..7a8fb76717 100644 --- a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts @@ -18,7 +18,7 @@ describe('Browser Builder optimization level', () => { afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - const overrides = { optimizationLevel: 1 }; + const overrides = { optimization: true }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -34,7 +34,7 @@ describe('Browser Builder optimization level', () => { it('tsconfig target changes optimizations to use ES2015', (done) => { host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); - const overrides = { optimizationLevel: 1 }; + const overrides = { optimization: true }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts index 7db33331a1..8ba9362d01 100644 --- a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts @@ -79,7 +79,7 @@ describe('Browser Builder scripts array', () => { host.writeMultipleFiles(scripts); const overrides = { - optimizationLevel: 1, + optimization: true, sourceMap: true, outputHashing: 'all', scripts: getScriptsOption(), diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts index 8c75ba3825..dfc36201b9 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts @@ -211,7 +211,7 @@ describe('Browser Builder styles', () => { it(`supports material icons`, (done) => { const overrides = { extractCss: true, - optimizationLevel: 1, + optimization: true, styles: [ { input: '../../../../node_modules/material-design-icons/iconfont/material-icons.css' }, ], @@ -360,7 +360,7 @@ describe('Browser Builder styles', () => { div { flex: 1 }`, }); - const overrides = { extractCss: true, optimizationLevel: 0 }; + const overrides = { extractCss: true, optimization: false }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -383,7 +383,7 @@ describe('Browser Builder styles', () => { div { flex: 1 }`, }); - const overrides = { extractCss: true, optimizationLevel: 1 }; + const overrides = { extractCss: true, optimization: true }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index 4c8cd6fbe8..f65fcd417a 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -81,7 +81,7 @@ describe('Workspace', () => { }, configurations: { production: { - optimizationLevel: 1, + optimize: true, outputHashing: 'all', sourceMap: false, extractCss: true, diff --git a/packages/schematics/angular/application/files/__dot__angular.json b/packages/schematics/angular/application/files/__dot__angular.json index 9611f8e6e3..49c86aac11 100644 --- a/packages/schematics/angular/application/files/__dot__angular.json +++ b/packages/schematics/angular/application/files/__dot__angular.json @@ -43,7 +43,7 @@ }, "configurations": { "production": { - "optimizationLevel": 1, + "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json index d3318d0f16..c0d020ca86 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json @@ -41,7 +41,7 @@ }, "configurations": { "production": { - "optimizationLevel": 1, + "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, diff --git a/tests/@angular_devkit/core/workspace/angular-workspace.json b/tests/@angular_devkit/core/workspace/angular-workspace.json index e05e65d723..e9302b6be9 100644 --- a/tests/@angular_devkit/core/workspace/angular-workspace.json +++ b/tests/@angular_devkit/core/workspace/angular-workspace.json @@ -56,7 +56,7 @@ }, "configurations": { "production": { - "optimizationLevel": 1, + "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, From 8be4dc49a8d454f04281d5d311391f6b7618b15b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 00:32:02 +0000 Subject: [PATCH 240/724] fix(@angular-devkit/build-webpack): use direct dependencies on core and architect --- packages/angular_devkit/build_webpack/package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index fdb34335d5..778b9d5dd4 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -9,7 +9,9 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "dependencies": { + "@angular-devkit/architect": "0.0.0", "@angular-devkit/build-optimizer": "0.0.0", + "@angular-devkit/core": "0.0.0", "@ngtools/webpack": "0.0.0", "autoprefixer": "^7.2.3", "cache-loader": "^1.2.2", @@ -57,9 +59,5 @@ "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4" - }, - "peerDependencies": { - "@angular-devkit/architect": "0.0.0", - "@angular-devkit/core": "0.0.0" } } \ No newline at end of file From 08458f842e40a54d2b4bc7fca941949928a13760 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 13:23:25 +0000 Subject: [PATCH 241/724] ci: always run test-large with spec reporter --- .circleci/config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c19f060dec..4299fcca1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: - checkout: *post_checkout - restore_cache: *_root_package_lock_key - run: npm run webdriver-update - - run: npm run test-large -- --code-coverage --full --spec-reporter + - run: npm run test-large -- --code-coverage --full integration: <<: *defaults diff --git a/package.json b/package.json index 30cacbeae0..e9944cb364 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier", "templates": "node ./bin/devkit-admin templates", "test": "node ./bin/devkit-admin test", - "test-large": "node ./bin/devkit-admin test --large", + "test-large": "node ./bin/devkit-admin test --large --spec-reporter", "test:watch": "nodemon --watch packages -e ts ./bin/devkit-admin test", "validate": "node ./bin/devkit-admin validate", "validate-commits": "./bin/devkit-admin validate-commits", From 063875ee3a34fe4ecff9ee66af7b1b3d4b96b511 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 13:06:25 +0000 Subject: [PATCH 242/724] fix(@angular-devkit/build-webpack): revert logger change to runTargetSpec --- .../angular_devkit/build_webpack/test/utils/run-target-spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts index d7ebfc3ab5..f35cbd5444 100644 --- a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts +++ b/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts @@ -8,7 +8,6 @@ import { Architect, BuildEvent, TargetSpecifier } from '@angular-devkit/architect'; import { experimental, join, logging, normalize } from '@angular-devkit/core'; -import { createConsoleLogger } from '@angular-devkit/core/node'; import { Observable } from 'rxjs/Observable'; import { concatMap } from 'rxjs/operators'; import { TestProjectHost } from '../utils/test-project-host'; @@ -32,7 +31,7 @@ export function runTargetSpec( host: TestProjectHost, targetSpec: TargetSpecifier, overrides = {}, - logger: logging.Logger = createConsoleLogger(), + logger: logging.Logger = new logging.NullLogger(), ): Observable { targetSpec = { ...targetSpec, overrides }; const workspace = new experimental.workspace.Workspace(workspaceRoot, host); From 24880ad01162602270d2433208663df772dd275b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 15:23:16 +0000 Subject: [PATCH 243/724] test(@angular-devkit/build-webpack): rename duplicate describe --- .../angular_devkit/build_webpack/test/browser/aot_spec_large.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts index ec699154e7..c384534d0a 100644 --- a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts @@ -11,7 +11,7 @@ import { tap } from 'rxjs/operators'; import { browserTargetSpec, host, runTargetSpec } from '../utils'; -describe('Browser Builder', () => { +describe('Browser Builder AOT', () => { const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); From 45dafe56148ba985cef069120343ec185687a5c1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 13:07:15 +0000 Subject: [PATCH 244/724] fix(@angular-devkit/core): match windows paths with forward slashes --- packages/angular_devkit/core/src/virtual-fs/path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/path.ts b/packages/angular_devkit/core/src/virtual-fs/path.ts index e12b583f0d..9f80c9b9df 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path.ts @@ -204,7 +204,7 @@ export function normalize(path: string): Path { // Match absolute windows path. const original = path; - if (path.match(/^[A-Z]:\\/)) { + if (path.match(/^[A-Z]:[\/\\]/)) { path = '\\' + path[0] + '\\' + path.substr(3); } From abb5da2fa197d1f70185f2d9d5ebd82dc72d940e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 15:21:30 +0000 Subject: [PATCH 245/724] fix(@ngtools/webpack): work around AngularCompiler resolveModuleName --- .../webpack/src/angular_compiler_plugin.ts | 12 +++++++++--- packages/ngtools/webpack/src/compiler_host.ts | 19 +++++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 8c8fc75bba..0adea258e4 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -14,7 +14,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as ts from 'typescript'; import { time, timeEnd } from './benchmark'; -import { WebpackCompilerHost } from './compiler_host'; +import { WebpackCompilerHost, workaroundResolve } from './compiler_host'; import { resolveEntryModuleFromMain } from './entry_resolver'; import { gatherDiagnostics, hasErrors } from './gather_diagnostics'; import { LazyRouteMap, findLazyRoutes } from './lazy_routes'; @@ -497,6 +497,8 @@ export class AngularCompilerPlugin { moduleKey = `${lazyRouteModule}.ngfactory${factoryModuleName}`; } + modulePath = workaroundResolve(modulePath); + if (moduleKey in this._lazyRoutes) { if (this._lazyRoutes[moduleKey] !== modulePath) { // Found a duplicate, this is an error. @@ -736,8 +738,12 @@ export class AngularCompilerPlugin { private _makeTransformers() { const isAppPath = (fileName: string) => !fileName.endsWith('.ngfactory.ts') && !fileName.endsWith('.ngstyle.ts'); - const isMainPath = (fileName: string) => fileName === this._mainPath; - const getEntryModule = () => this.entryModule; + const isMainPath = (fileName: string) => fileName === ( + this._mainPath ? workaroundResolve(this._mainPath) : this._mainPath + ); + const getEntryModule = () => this.entryModule + ? { path: workaroundResolve(this.entryModule.path), className: this.entryModule.className } + : this.entryModule; const getLazyRoutes = () => this._lazyRoutes; const getTypeChecker = () => this._getTsProgram().getTypeChecker(); diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index 94c39db51b..7ed4d444fe 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -89,8 +89,9 @@ export class VirtualFileStats extends VirtualStats { } getSourceFile(languageVersion: ts.ScriptTarget, setParentNodes: boolean) { if (!this._sourceFile) { + // console.log(this._path) this._sourceFile = ts.createSourceFile( - this._path, + workaroundResolve(this._path), this._content, languageVersion, setParentNodes); @@ -303,7 +304,12 @@ export class WebpackCompilerHost implements ts.CompilerHost { const content = this.readFile(fileName); if (!this._cache && content) { - return ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes); + return ts.createSourceFile( + workaroundResolve(fileName), + content, + languageVersion, + this._setParentNodes, + ); } else { stats = this._files[fileName]; if (!stats) { @@ -374,3 +380,12 @@ export class WebpackCompilerHost implements ts.CompilerHost { } } } + + +// `TsCompilerAotCompilerTypeCheckHostAdapter` in @angular/compiler-cli seems to resolve module +// names directly via `resolveModuleName`, which prevents full Path usage. +// To work around this we must provide the same path format as TS internally uses in +// the SourceFile paths. +export function workaroundResolve(path: Path | string) { + return getSystemPath(normalize(path)).replace(/\\/g, '/'); +} From 9cf3d733e052fe4615a37bc5b03b3063f96a887c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 16:01:23 +0000 Subject: [PATCH 246/724] test(@angular-devkit/build-webpack): increase debounce on rebuild tests --- .../build_webpack/test/browser/rebuild_spec_large.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index 50469a8d60..4ca4b80e77 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -75,7 +75,7 @@ describe('Browser Builder', () => { // We must debounce on watch mode because file watchers are not very accurate. // Changes from just before a process runs can be picked up and cause rebuilds. // In this case, cleanup from the test right before this one causes a few rebuilds. - debounceTime(500), + debounceTime(1000), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => { buildNumber += 1; @@ -143,7 +143,7 @@ describe('Browser Builder', () => { let buildNumber = 0; runTargetSpec(host, browserTargetSpec, overrides, logger).pipe( - debounceTime(500), + debounceTime(1000), tap((buildEvent) => { buildNumber += 1; switch (buildNumber) { @@ -193,7 +193,7 @@ describe('Browser Builder', () => { const overrides = { watch: true }; runTargetSpec(host, browserTargetSpec, overrides).pipe( - debounceTime(500), + debounceTime(1000), tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })), take(2), From 42802f1a75b40a8ab437e27757fa1fc3441e2c98 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 9 Mar 2018 15:34:20 -0500 Subject: [PATCH 247/724] feat(@schematics/angular): Simplify schematic path options --- .../schematics/angular/application/index.ts | 6 +-- .../__name@dasherize____type__.spec.ts | 0 .../__name@dasherize____type__.ts | 0 packages/schematics/angular/class/index.ts | 23 +++++------ .../schematics/angular/class/index_spec.ts | 10 ++++- packages/schematics/angular/class/schema.d.ts | 8 +--- packages/schematics/angular/class/schema.json | 13 +------ .../__name@dasherize__.component.__styleext__ | 0 .../__name@dasherize__.component.html | 0 .../__name@dasherize__.component.spec.ts | 0 .../__name@dasherize__.component.ts | 0 .../schematics/angular/component/index.ts | 17 ++++---- .../angular/component/index_spec.ts | 13 +++---- .../schematics/angular/component/schema.d.ts | 8 +--- .../schematics/angular/component/schema.json | 14 +------ .../__name@dasherize__.directive.spec.ts | 0 .../__name@dasherize__.directive.ts | 0 .../schematics/angular/directive/index.ts | 18 +++++---- .../angular/directive/index_spec.ts | 3 +- .../schematics/angular/directive/schema.d.ts | 10 ++--- .../schematics/angular/directive/schema.json | 15 ++----- .../{__path__ => }/__name@dasherize__.enum.ts | 0 packages/schematics/angular/enum/index.ts | 15 +++---- .../schematics/angular/enum/index_spec.ts | 3 +- packages/schematics/angular/enum/schema.d.ts | 8 +--- packages/schematics/angular/enum/schema.json | 13 +------ .../__name@dasherize__.guard.spec.ts | 0 .../__name@dasherize__.guard.ts | 0 packages/schematics/angular/guard/index.ts | 19 ++++----- .../schematics/angular/guard/index_spec.ts | 3 +- packages/schematics/angular/guard/schema.d.ts | 10 ++--- packages/schematics/angular/guard/schema.json | 15 ++----- .../__name@dasherize____type__.ts | 0 .../schematics/angular/interface/index.ts | 18 +++++---- .../angular/interface/index_spec.ts | 3 +- .../schematics/angular/interface/schema.d.ts | 8 +--- .../schematics/angular/interface/schema.json | 13 +------ .../__name@dasherize__-routing.module.ts | 0 .../__name@dasherize__.module.spec.ts | 0 .../__name@dasherize__.module.ts | 0 packages/schematics/angular/module/index.ts | 18 +++++---- .../schematics/angular/module/index_spec.ts | 11 ++---- .../schematics/angular/module/schema.d.ts | 10 ++--- .../schematics/angular/module/schema.json | 15 ++----- .../__name@dasherize__.pipe.spec.ts | 0 .../__name@dasherize__.pipe.ts | 0 packages/schematics/angular/pipe/index.ts | 26 ++++++------- .../schematics/angular/pipe/index_spec.ts | 3 +- packages/schematics/angular/pipe/schema.d.ts | 8 +--- packages/schematics/angular/pipe/schema.json | 13 +------ .../__name@dasherize__.service.spec.ts | 0 .../__name@dasherize__.service.ts | 0 packages/schematics/angular/service/index.ts | 18 +++++---- .../schematics/angular/service/index_spec.ts | 3 +- .../schematics/angular/service/schema.d.ts | 8 +--- .../schematics/angular/service/schema.json | 13 +------ .../schematics/angular/utility/find-module.ts | 4 +- .../schematics/angular/utility/parse-name.ts | 27 +++++++++++++ .../angular/utility/parse-name_spec.ts | 39 +++++++++++++++++++ 59 files changed, 227 insertions(+), 275 deletions(-) rename packages/schematics/angular/class/files/{__path__ => }/__name@dasherize____type__.spec.ts (100%) rename packages/schematics/angular/class/files/{__path__ => }/__name@dasherize____type__.ts (100%) rename packages/schematics/angular/component/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ (100%) rename packages/schematics/angular/component/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.component.html (100%) rename packages/schematics/angular/component/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts (100%) rename packages/schematics/angular/component/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.component.ts (100%) rename packages/schematics/angular/directive/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.directive.spec.ts (100%) rename packages/schematics/angular/directive/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.directive.ts (100%) rename packages/schematics/angular/enum/files/{__path__ => }/__name@dasherize__.enum.ts (100%) rename packages/schematics/angular/guard/files/{__path__ => }/__name@dasherize__.guard.spec.ts (100%) rename packages/schematics/angular/guard/files/{__path__ => }/__name@dasherize__.guard.ts (100%) rename packages/schematics/angular/interface/files/{__path__ => }/__name@dasherize____type__.ts (100%) rename packages/schematics/angular/module/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts (100%) rename packages/schematics/angular/module/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.module.spec.ts (100%) rename packages/schematics/angular/module/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.module.ts (100%) rename packages/schematics/angular/pipe/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.pipe.spec.ts (100%) rename packages/schematics/angular/pipe/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts (100%) rename packages/schematics/angular/service/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts (100%) rename packages/schematics/angular/service/files/{__path__ => }/__name@dasherize@if-flat__/__name@dasherize__.service.ts (100%) create mode 100644 packages/schematics/angular/utility/parse-name.ts create mode 100644 packages/schematics/angular/utility/parse-name_spec.ts diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 6e0db4e4a5..758ff42e98 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -94,16 +94,14 @@ export default function (options: ApplicationOptions): Rule { flat: true, routing: options.routing, routingScope: 'Root', - path: options.path, - sourceDir: options.directory + '/' + sourceDir, + path: options.directory + '/' + sourceDir + '/' + options.path, spec: false, }), schematic('component', { name: 'app', selector: appRootSelector, - sourceDir: options.directory + '/' + sourceDir, flat: true, - path: options.path, + path: options.directory + '/' + sourceDir + '/' + options.path, skipImport: true, ...componentOptions, }), diff --git a/packages/schematics/angular/class/files/__path__/__name@dasherize____type__.spec.ts b/packages/schematics/angular/class/files/__name@dasherize____type__.spec.ts similarity index 100% rename from packages/schematics/angular/class/files/__path__/__name@dasherize____type__.spec.ts rename to packages/schematics/angular/class/files/__name@dasherize____type__.spec.ts diff --git a/packages/schematics/angular/class/files/__path__/__name@dasherize____type__.ts b/packages/schematics/angular/class/files/__name@dasherize____type__.ts similarity index 100% rename from packages/schematics/angular/class/files/__path__/__name@dasherize____type__.ts rename to packages/schematics/angular/class/files/__name@dasherize____type__.ts diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index 484ed2bc8f..9a9409a553 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -5,13 +5,11 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, - SchematicsException, apply, branchAndMerge, - chain, filter, mergeWith, move, @@ -19,16 +17,19 @@ import { template, url, } from '@angular-devkit/schematics'; +import { parseName } from '../utility/parse-name'; import { Schema as ClassOptions } from './schema'; export default function (options: ClassOptions): Rule { options.type = !!options.type ? `.${options.type}` : ''; - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); + + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), @@ -36,12 +37,8 @@ export default function (options: ClassOptions): Rule { ...strings, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); - return chain([ - branchAndMerge(chain([ - mergeWith(templateSource), - ])), - ]); + return branchAndMerge(mergeWith(templateSource)); } diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index 2de4594d93..fbf9b92556 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -18,8 +18,7 @@ describe('Class Schematic', () => { ); const defaultOptions: ClassOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', type: '', spec: false, }; @@ -65,4 +64,11 @@ describe('Class Schematic', () => { const content = getFileContent(tree, '/src/app/foo.model.ts'); expect(content).toMatch(/export class Foo/); }); + + it('should respect the path option', () => { + const options = { ...defaultOptions, path: 'zzz' }; + const tree = schematicRunner.runSchematic('class', options); + expect(tree.files.length).toEqual(1); + expect(tree.files[0]).toEqual('/zzz/foo.ts'); + }); }); diff --git a/packages/schematics/angular/class/schema.d.ts b/packages/schematics/angular/class/schema.d.ts index 9aa8015dfd..95c37cc3d8 100644 --- a/packages/schematics/angular/class/schema.d.ts +++ b/packages/schematics/angular/class/schema.d.ts @@ -16,13 +16,9 @@ export interface Schema { */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; /** * Specifies if a spec file is generated. */ diff --git a/packages/schematics/angular/class/schema.json b/packages/schematics/angular/class/schema.json index 1cc74bf93c..ba6e16e62e 100644 --- a/packages/schematics/angular/class/schema.json +++ b/packages/schematics/angular/class/schema.json @@ -12,20 +12,11 @@ "type": "string", "format": "path", "description": "The path to create the class.", - "default": "app", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "spec": { diff --git a/packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ similarity index 100% rename from packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ diff --git a/packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.html similarity index 100% rename from packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.html diff --git a/packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts similarity index 100% rename from packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts diff --git a/packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.ts similarity index 100% rename from packages/schematics/angular/component/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.ts diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index f1648a60ea..8a5495ebef 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -25,6 +25,7 @@ import * as ts from 'typescript'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; +import { parseName } from '../utility/parse-name'; import { Schema as ComponentOptions } from './schema'; @@ -42,7 +43,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { const sourceText = text.toString('utf-8'); const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - const componentPath = `/${options.sourceDir}/${options.path}/` + const componentPath = `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) + '.component'; @@ -100,12 +101,14 @@ function buildSelector(options: ComponentOptions) { export default function(options: ComponentOptions): Rule { - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); - } - return (host: Tree, context: SchematicContext) => { + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.selector = options.selector || buildSelector(options); options.path = options.path ? normalize(options.path) : options.path; options.module = findModuleFromOptions(host, options); @@ -119,7 +122,7 @@ export default function(options: ComponentOptions): Rule { 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); return chain([ diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 8e0b65d7bb..41d82808c3 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -19,8 +19,7 @@ describe('Component Schematic', () => { ); const defaultOptions: ComponentOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', inlineStyle: false, inlineTemplate: false, changeDetection: 'Default', @@ -142,12 +141,12 @@ describe('Component Schematic', () => { }); it('should handle upper case paths', () => { - const pathOption = 'app/SOME/UPPER/DIR'; + const pathOption = 'src/app/SOME/UPPER/DIR'; const options = { ...defaultOptions, path: pathOption }; const tree = schematicRunner.runSchematic('component', options, appTree); let files = tree.files; - let root = `/src/${pathOption}/foo/foo.component`; + let root = `/${pathOption}/foo/foo.component`; expect(files.indexOf(`${root}.css`)).toBeGreaterThanOrEqual(0); expect(files.indexOf(`${root}.html`)).toBeGreaterThanOrEqual(0); expect(files.indexOf(`${root}.spec.ts`)).toBeGreaterThanOrEqual(0); @@ -156,7 +155,7 @@ describe('Component Schematic', () => { const options2 = { ...options, name: 'BAR' }; const tree2 = schematicRunner.runSchematic('component', options2, tree); files = tree2.files; - root = `/src/${pathOption}/bar/bar.component`; + root = `/${pathOption}/bar/bar.component`; expect(files.indexOf(`${root}.css`)).toBeGreaterThanOrEqual(0); expect(files.indexOf(`${root}.html`)).toBeGreaterThanOrEqual(0); expect(files.indexOf(`${root}.spec.ts`)).toBeGreaterThanOrEqual(0); @@ -164,11 +163,11 @@ describe('Component Schematic', () => { }); it('should create a component in a sub-directory', () => { - const options = { ...defaultOptions, path: 'app/a/b/c' }; + const options = { ...defaultOptions, path: 'src/app/a/b/c' }; const tree = schematicRunner.runSchematic('component', options, appTree); const files = tree.files; - const root = `/src/${options.path}/foo/foo.component`; + const root = `/${options.path}/foo/foo.component`; expect(files.indexOf(`${root}.css`)).toBeGreaterThanOrEqual(0); expect(files.indexOf(`${root}.html`)).toBeGreaterThanOrEqual(0); expect(files.indexOf(`${root}.spec.ts`)).toBeGreaterThanOrEqual(0); diff --git a/packages/schematics/angular/component/schema.d.ts b/packages/schematics/angular/component/schema.d.ts index 3a410e13ee..81c02e4ab5 100644 --- a/packages/schematics/angular/component/schema.d.ts +++ b/packages/schematics/angular/component/schema.d.ts @@ -12,13 +12,9 @@ export interface Schema { */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; /** * The name of the component. */ diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 7bbf952aca..f5a74f6795 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -8,21 +8,11 @@ "type": "string", "format": "path", "description": "The path to create the component.", - "default": "app", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "alias": "D", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "name": { diff --git a/packages/schematics/angular/directive/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.directive.spec.ts b/packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.spec.ts similarity index 100% rename from packages/schematics/angular/directive/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.directive.spec.ts rename to packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.spec.ts diff --git a/packages/schematics/angular/directive/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.directive.ts b/packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts similarity index 100% rename from packages/schematics/angular/directive/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.directive.ts rename to packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 2cd937a04b..deadd1fe4a 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -25,6 +25,7 @@ import * as ts from 'typescript'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; +import { parseName } from '../utility/parse-name'; import { Schema as DirectiveOptions } from './schema'; @@ -42,7 +43,7 @@ function addDeclarationToNgModule(options: DirectiveOptions): Rule { const sourceText = text.toString('utf-8'); const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - const directivePath = `/${options.sourceDir}/${options.path}/` + const directivePath = `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) + '.directive'; @@ -98,13 +99,14 @@ function buildSelector(options: DirectiveOptions) { export default function (options: DirectiveOptions): Rule { options.selector = options.selector || buildSelector(options); - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); - } return (host: Tree, context: SchematicContext) => { + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; options.module = findModuleFromOptions(host, options); const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), @@ -113,7 +115,7 @@ export default function (options: DirectiveOptions): Rule { 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); return chain([ diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index 52e33f8f15..aad688554e 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -19,8 +19,7 @@ describe('Directive Schematic', () => { ); const defaultOptions: DirectiveOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', spec: true, module: undefined, export: false, diff --git a/packages/schematics/angular/directive/schema.d.ts b/packages/schematics/angular/directive/schema.d.ts index b7a4e94e75..039c01c749 100644 --- a/packages/schematics/angular/directive/schema.d.ts +++ b/packages/schematics/angular/directive/schema.d.ts @@ -12,21 +12,17 @@ export interface Schema { */ name: string; /** - * The path to create the directive. + * The path to create the interface. */ path?: string; /** - * The root of the application. + * The name of the project. */ - appRoot?: string; + project?: string; /** * The prefix to apply to generated selectors. */ prefix?: string; - /** - * The path of the source directory. - */ - sourceDir?: string; /** * Specifies if a spec file is generated. */ diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index ce8de2a228..62e0ca233f 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -11,14 +11,12 @@ "path": { "type": "string", "format": "path", - "description": "The path to create the directive.", - "default": "app", + "description": "The path to create the interface.", "visible": false }, - "appRoot": { + "project": { "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "prefix": { @@ -28,13 +26,6 @@ "default": "app", "alias": "p" }, - "sourceDir": { - "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, "spec": { "type": "boolean", "description": "Specifies if a spec file is generated.", diff --git a/packages/schematics/angular/enum/files/__path__/__name@dasherize__.enum.ts b/packages/schematics/angular/enum/files/__name@dasherize__.enum.ts similarity index 100% rename from packages/schematics/angular/enum/files/__path__/__name@dasherize__.enum.ts rename to packages/schematics/angular/enum/files/__name@dasherize__.enum.ts diff --git a/packages/schematics/angular/enum/index.ts b/packages/schematics/angular/enum/index.ts index 641205f185..764a70d4dc 100644 --- a/packages/schematics/angular/enum/index.ts +++ b/packages/schematics/angular/enum/index.ts @@ -5,10 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, - SchematicsException, apply, branchAndMerge, chain, @@ -17,22 +16,24 @@ import { template, url, } from '@angular-devkit/schematics'; +import { parseName } from '../utility/parse-name'; import { Schema as EnumOptions } from './schema'; export default function (options: EnumOptions): Rule { - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; const templateSource = apply(url('./files'), [ template({ ...strings, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); return chain([ diff --git a/packages/schematics/angular/enum/index_spec.ts b/packages/schematics/angular/enum/index_spec.ts index 0a2a51e362..9ce614346f 100644 --- a/packages/schematics/angular/enum/index_spec.ts +++ b/packages/schematics/angular/enum/index_spec.ts @@ -17,8 +17,7 @@ describe('Enum Schematic', () => { ); const defaultOptions: EnumOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', }; it('should create an enumeration', () => { diff --git a/packages/schematics/angular/enum/schema.d.ts b/packages/schematics/angular/enum/schema.d.ts index b1176ecf52..47671ee966 100644 --- a/packages/schematics/angular/enum/schema.d.ts +++ b/packages/schematics/angular/enum/schema.d.ts @@ -16,11 +16,7 @@ export interface Schema { */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; } diff --git a/packages/schematics/angular/enum/schema.json b/packages/schematics/angular/enum/schema.json index c30c95ee5d..f32366faff 100644 --- a/packages/schematics/angular/enum/schema.json +++ b/packages/schematics/angular/enum/schema.json @@ -12,20 +12,11 @@ "type": "string", "format": "path", "description": "The path to create the enum.", - "default": "app", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false } }, diff --git a/packages/schematics/angular/guard/files/__path__/__name@dasherize__.guard.spec.ts b/packages/schematics/angular/guard/files/__name@dasherize__.guard.spec.ts similarity index 100% rename from packages/schematics/angular/guard/files/__path__/__name@dasherize__.guard.spec.ts rename to packages/schematics/angular/guard/files/__name@dasherize__.guard.spec.ts diff --git a/packages/schematics/angular/guard/files/__path__/__name@dasherize__.guard.ts b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts similarity index 100% rename from packages/schematics/angular/guard/files/__path__/__name@dasherize__.guard.ts rename to packages/schematics/angular/guard/files/__name@dasherize__.guard.ts diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index e24fafea3e..dbc54c8983 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -25,6 +25,7 @@ import * as ts from 'typescript'; import { addProviderToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; +import { parseName } from '../utility/parse-name'; import { Schema as GuardOptions } from './schema'; @@ -43,7 +44,7 @@ function addDeclarationToNgModule(options: GuardOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - const guardPath = `/${options.sourceDir}/${options.path}/` + const guardPath = `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) + '.guard'; @@ -64,13 +65,13 @@ function addDeclarationToNgModule(options: GuardOptions): Rule { } export default function (options: GuardOptions): Rule { - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); - } - return (host: Tree, context: SchematicContext) => { + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; if (options.module) { options.module = findModuleFromOptions(host, options); } @@ -81,7 +82,7 @@ export default function (options: GuardOptions): Rule { ...strings, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); return chain([ diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index 87bdb5faff..38ce6dd980 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -19,8 +19,7 @@ describe('Guard Schematic', () => { ); const defaultOptions: GuardOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', spec: true, module: undefined, flat: true, diff --git a/packages/schematics/angular/guard/schema.d.ts b/packages/schematics/angular/guard/schema.d.ts index 93ac2aacb3..70ac1d232b 100644 --- a/packages/schematics/angular/guard/schema.d.ts +++ b/packages/schematics/angular/guard/schema.d.ts @@ -24,15 +24,11 @@ export interface Schema { */ module?: string; /** - * The path to create the guard. + * The path to create the interface. */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; } diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index 14b3a441fc..7e6076c151 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -26,21 +26,12 @@ "path": { "type": "string", "format": "path", - "description": "The path to create the guard.", - "default": "app", + "description": "The path to create the interface.", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false } }, diff --git a/packages/schematics/angular/interface/files/__path__/__name@dasherize____type__.ts b/packages/schematics/angular/interface/files/__name@dasherize____type__.ts similarity index 100% rename from packages/schematics/angular/interface/files/__path__/__name@dasherize____type__.ts rename to packages/schematics/angular/interface/files/__name@dasherize____type__.ts diff --git a/packages/schematics/angular/interface/index.ts b/packages/schematics/angular/interface/index.ts index 189cd913e5..7f406e6f6a 100644 --- a/packages/schematics/angular/interface/index.ts +++ b/packages/schematics/angular/interface/index.ts @@ -5,10 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, - SchematicsException, apply, branchAndMerge, chain, @@ -17,24 +16,27 @@ import { template, url, } from '@angular-devkit/schematics'; +import { parseName } from '../utility/parse-name'; import { Schema as InterfaceOptions } from './schema'; export default function (options: InterfaceOptions): Rule { + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.prefix = options.prefix ? options.prefix : ''; options.type = !!options.type ? `.${options.type}` : ''; - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); - } const templateSource = apply(url('./files'), [ template({ ...strings, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); return chain([ diff --git a/packages/schematics/angular/interface/index_spec.ts b/packages/schematics/angular/interface/index_spec.ts index 16d342402c..87ba532daa 100644 --- a/packages/schematics/angular/interface/index_spec.ts +++ b/packages/schematics/angular/interface/index_spec.ts @@ -18,9 +18,8 @@ describe('Interface Schematic', () => { ); const defaultOptions: InterfaceOptions = { name: 'foo', - path: 'app', + path: 'src/app', prefix: '', - sourceDir: 'src', type: '', }; diff --git a/packages/schematics/angular/interface/schema.d.ts b/packages/schematics/angular/interface/schema.d.ts index 92f220ab94..f38ea5158c 100644 --- a/packages/schematics/angular/interface/schema.d.ts +++ b/packages/schematics/angular/interface/schema.d.ts @@ -16,13 +16,9 @@ export interface Schema { */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; /** * Specifies the prefix to use. */ diff --git a/packages/schematics/angular/interface/schema.json b/packages/schematics/angular/interface/schema.json index 3403e12d23..fd1504c8a3 100644 --- a/packages/schematics/angular/interface/schema.json +++ b/packages/schematics/angular/interface/schema.json @@ -12,20 +12,11 @@ "type": "string", "format": "path", "description": "The path to create the interface.", - "default": "app", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "prefix": { diff --git a/packages/schematics/angular/module/files/__path__/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts b/packages/schematics/angular/module/files/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts similarity index 100% rename from packages/schematics/angular/module/files/__path__/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts rename to packages/schematics/angular/module/files/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts diff --git a/packages/schematics/angular/module/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.module.spec.ts b/packages/schematics/angular/module/files/__name@dasherize@if-flat__/__name@dasherize__.module.spec.ts similarity index 100% rename from packages/schematics/angular/module/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.module.spec.ts rename to packages/schematics/angular/module/files/__name@dasherize@if-flat__/__name@dasherize__.module.spec.ts diff --git a/packages/schematics/angular/module/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.module.ts b/packages/schematics/angular/module/files/__name@dasherize@if-flat__/__name@dasherize__.module.ts similarity index 100% rename from packages/schematics/angular/module/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.module.ts rename to packages/schematics/angular/module/files/__name@dasherize@if-flat__/__name@dasherize__.module.ts diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index 3c853146f7..eb7754a69f 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -25,6 +25,7 @@ import * as ts from 'typescript'; import { addImportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { findModuleFromOptions } from '../utility/find-module'; +import { parseName } from '../utility/parse-name'; import { Schema as ModuleOptions } from './schema'; @@ -44,7 +45,7 @@ function addDeclarationToNgModule(options: ModuleOptions): Rule { const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); const importModulePath = normalize( - `/${options.sourceDir}/${options.path}/` + `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) + '.module', @@ -69,13 +70,14 @@ function addDeclarationToNgModule(options: ModuleOptions): Rule { } export default function (options: ModuleOptions): Rule { - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); - } - return (host: Tree, context: SchematicContext) => { + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + if (options.module) { options.module = findModuleFromOptions(host, options); } @@ -88,7 +90,7 @@ export default function (options: ModuleOptions): Rule { 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); return chain([ diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts index 6cab95e0d9..6a4ae5744f 100644 --- a/packages/schematics/angular/module/index_spec.ts +++ b/packages/schematics/angular/module/index_spec.ts @@ -19,8 +19,7 @@ describe('Module Schematic', () => { ); const defaultOptions: ModuleOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', spec: true, module: undefined, flat: false, @@ -56,16 +55,14 @@ describe('Module Schematic', () => { tree = schematicRunner.runSchematic('module', { ...defaultOptions, - path: 'app/sub1', - appRoot: 'app', + path: 'src/app/sub1', name: 'test1', }, tree); tree = schematicRunner.runSchematic('module', { ...defaultOptions, - path: 'app/sub2', - appRoot: 'app', + path: 'src/app/sub2', name: 'test2', - module: 'sub1/test1', + module: '../sub1/test1', }, tree); const content = getFileContent(tree, '/src/app/sub1/test1/test1.module.ts'); diff --git a/packages/schematics/angular/module/schema.d.ts b/packages/schematics/angular/module/schema.d.ts index 12e908551e..7d9fffae5d 100644 --- a/packages/schematics/angular/module/schema.d.ts +++ b/packages/schematics/angular/module/schema.d.ts @@ -12,17 +12,13 @@ export interface Schema { */ name: string; /** - * The path to create the module. + * The path to create the pipe. */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; /** * Generates a routing module. */ diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index c124c2184f..6596cc1853 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -11,21 +11,12 @@ "path": { "type": "string", "format": "path", - "description": "The path to create the module.", - "default": "app", + "description": "The path to create the pipe.", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "routing": { diff --git a/packages/schematics/angular/pipe/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.pipe.spec.ts b/packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.spec.ts similarity index 100% rename from packages/schematics/angular/pipe/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.pipe.spec.ts rename to packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.spec.ts diff --git a/packages/schematics/angular/pipe/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts b/packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts similarity index 100% rename from packages/schematics/angular/pipe/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts rename to packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index 5887923330..5b47021d6a 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -25,6 +25,7 @@ import * as ts from 'typescript'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; +import { parseName } from '../utility/parse-name'; import { Schema as PipeOptions } from './schema'; @@ -42,7 +43,7 @@ function addDeclarationToNgModule(options: PipeOptions): Rule { const sourceText = text.toString('utf-8'); const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - const pipePath = `/${options.sourceDir}/${options.path}/` + const pipePath = `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) + '.pipe'; @@ -84,13 +85,14 @@ function addDeclarationToNgModule(options: PipeOptions): Rule { } export default function (options: PipeOptions): Rule { - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (!sourceDir) { - throw new SchematicsException(`sourceDir option is required.`); - } - return (host: Tree, context: SchematicContext) => { + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.module = findModuleFromOptions(host, options); const templateSource = apply(url('./files'), [ @@ -100,14 +102,12 @@ export default function (options: PipeOptions): Rule { 'if-flat': (s: string) => options.flat ? '' : s, ...options, }), - move(sourceDir), + move(parsedPath.path), ]); - return chain([ - branchAndMerge(chain([ + return branchAndMerge(chain([ addDeclarationToNgModule(options), mergeWith(templateSource), - ])), - ])(host, context); + ]))(host, context); }; } diff --git a/packages/schematics/angular/pipe/index_spec.ts b/packages/schematics/angular/pipe/index_spec.ts index db75607fc6..af73080ca1 100644 --- a/packages/schematics/angular/pipe/index_spec.ts +++ b/packages/schematics/angular/pipe/index_spec.ts @@ -19,8 +19,7 @@ describe('Pipe Schematic', () => { ); const defaultOptions: PipeOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', spec: true, module: undefined, export: false, diff --git a/packages/schematics/angular/pipe/schema.d.ts b/packages/schematics/angular/pipe/schema.d.ts index 562afd6ecb..70a37a9f3c 100644 --- a/packages/schematics/angular/pipe/schema.d.ts +++ b/packages/schematics/angular/pipe/schema.d.ts @@ -16,13 +16,9 @@ export interface Schema { */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; /** * Flag to indicate if a dir is created. */ diff --git a/packages/schematics/angular/pipe/schema.json b/packages/schematics/angular/pipe/schema.json index 009fe827cf..77ffdca4bf 100644 --- a/packages/schematics/angular/pipe/schema.json +++ b/packages/schematics/angular/pipe/schema.json @@ -12,20 +12,11 @@ "type": "string", "format": "path", "description": "The path to create the pipe.", - "default": "app", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "flat": { diff --git a/packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts similarity index 100% rename from packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts rename to packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts diff --git a/packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts similarity index 100% rename from packages/schematics/angular/service/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.service.ts rename to packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index 0f7a96ed2b..b695a228b6 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Path, normalize, strings } from '@angular-devkit/core'; +import { Path, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -22,6 +22,7 @@ import { import * as ts from 'typescript'; import { getFirstNgModuleName } from '../utility/ast-utils'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; +import { parseName } from '../utility/parse-name'; import { Schema as ServiceOptions } from './schema'; function getModuleNameFromPath(host: Tree, modulePath: Path) { @@ -48,16 +49,17 @@ function stripTsExtension(path: string): string { } export default function (options: ServiceOptions): Rule { - options.path = options.path ? normalize(options.path) : options.path; - const sourceDir = options.sourceDir; - if (sourceDir === undefined) { - throw new SchematicsException(`sourceDir option is required.`); - } - return (host: Tree, context: SchematicContext) => { let providedByModule = ''; let providedInPath = ''; + if (options.path === undefined) { + // TODO: read this default value from the config file + options.path = 'src/app'; + } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + if (options.module) { const modulePath = findModuleFromOptions(host, options); if (!modulePath || !host.exists(modulePath)) { @@ -86,7 +88,7 @@ export default function (options: ServiceOptions): Rule { providedIn: providedByModule, providedInPath: providedInPath, }), - move(sourceDir), + move(parsedPath.path), ]); return mergeWith(templateSource)(host, context); diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index d3b90f800e..18267ffa93 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -19,8 +19,7 @@ describe('Service Schematic', () => { ); const defaultOptions: ServiceOptions = { name: 'foo', - path: 'app', - sourceDir: 'src', + path: 'src/app', spec: true, module: undefined, flat: false, diff --git a/packages/schematics/angular/service/schema.d.ts b/packages/schematics/angular/service/schema.d.ts index 068b07b7f2..6e08cb165d 100644 --- a/packages/schematics/angular/service/schema.d.ts +++ b/packages/schematics/angular/service/schema.d.ts @@ -16,13 +16,9 @@ export interface Schema { */ path?: string; /** - * The path of the source directory. + * The name of the project. */ - sourceDir?: string; - /** - * The root of the application. - */ - appRoot?: string; + project?: string; /** * Flag to indicate if a dir is created. */ diff --git a/packages/schematics/angular/service/schema.json b/packages/schematics/angular/service/schema.json index 400f3939d8..b76ce29c5b 100644 --- a/packages/schematics/angular/service/schema.json +++ b/packages/schematics/angular/service/schema.json @@ -12,20 +12,11 @@ "type": "string", "format": "path", "description": "The path to create the service.", - "default": "app", "visible": false }, - "sourceDir": { + "project": { "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "visible": false - }, - "appRoot": { - "type": "string", - "format": "path", - "description": "The root of the application.", + "description": "The name of the project.", "visible": false }, "flat": { diff --git a/packages/schematics/angular/utility/find-module.ts b/packages/schematics/angular/utility/find-module.ts index c365515cde..80db1e4ae1 100644 --- a/packages/schematics/angular/utility/find-module.ts +++ b/packages/schematics/angular/utility/find-module.ts @@ -29,13 +29,13 @@ export function findModuleFromOptions(host: Tree, options: ModuleOptions): Path } if (!options.module) { - const pathToCheck = (options.sourceDir || '') + '/' + (options.path || '') + const pathToCheck = (options.path || '') + (options.flat ? '' : '/' + strings.dasherize(options.name)); return normalize(findModule(host, pathToCheck)); } else { const modulePath = normalize( - '/' + options.sourceDir + '/' + (options.appRoot || options.path) + '/' + options.module); + '/' + (options.appRoot || options.path) + '/' + options.module); const moduleBaseName = normalize(modulePath).split('/').pop(); if (host.exists(modulePath)) { diff --git a/packages/schematics/angular/utility/parse-name.ts b/packages/schematics/angular/utility/parse-name.ts new file mode 100644 index 0000000000..07f3c5453a --- /dev/null +++ b/packages/schematics/angular/utility/parse-name.ts @@ -0,0 +1,27 @@ + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs"; +import { Path, basename, normalize, split } from '@angular-devkit/core'; + +export interface Location { + name: string; + path: Path; +} + +export function parseName(path: string | Path, name: string): Location { + const splitName = split(name as Path); + const nameWithoutPath = basename(name as Path); + const namePath = splitName.join('/'); + const fullPath = normalize('/' + path + '/' + namePath); + + return { + name: nameWithoutPath, + path: fullPath, + }; +} diff --git a/packages/schematics/angular/utility/parse-name_spec.ts b/packages/schematics/angular/utility/parse-name_spec.ts new file mode 100644 index 0000000000..30d92e87f5 --- /dev/null +++ b/packages/schematics/angular/utility/parse-name_spec.ts @@ -0,0 +1,39 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { parseName } from './parse-name'; + + +describe('parse-name', () => { + it('should handle just the name', () => { + const result = parseName('src/app', 'foo'); + expect(result.name).toEqual('foo'); + expect(result.path).toEqual('/src/app'); + }); + + it('should handle no path', () => { + const result = parseName('', 'foo'); + expect(result.name).toEqual('foo'); + expect(result.path).toEqual('/'); + }); + + it('should handle name has a path (sub-dir)', () => { + const result = parseName('src/app', 'bar/foo'); + expect(result.name).toEqual('foo'); + expect(result.path).toEqual('/src/app/bar'); + }); + + it('should handle name has a higher path', () => { + const result = parseName('src/app', '../foo'); + expect(result.name).toEqual('foo'); + expect(result.path).toEqual('/src'); + }); + + it('should handle name has a higher path above root', () => { + expect(() => parseName('src/app', '../../../foo')).toThrow(); + }); +}); From 185467d3c9033be45317cbe819ff7b4faa18e7c4 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Sat, 17 Mar 2018 13:50:25 -0400 Subject: [PATCH 248/724] feat(@schematics/angular): Update schematics to new workspace structure --- .../core/src/json/schema/registry.ts | 4 +- .../core/src/workspace/index.ts | 1 + .../core/src/workspace/workspace-schema.ts | 101 +++++++ .../tools/schema-option-transform.ts | 21 +- .../angular/app-shell/index_spec.ts | 13 +- .../application/files/__dot__angular-cli.json | 39 --- .../application/files/__dot__angular.json | 145 --------- .../files/__sourcedir__/ngsw-config.json | 27 -- .../files/__sourcedir__/tsconfig.app.json | 13 - .../files/__sourcedir__/typings.d.ts | 5 - .../angular/application/files/karma.conf.js | 2 +- .../assets/__dot__gitkeep | 0 .../environments/environment.prod.ts | 0 .../environments/environment.ts | 0 .../files/{__sourcedir__ => src}/favicon.ico | Bin .../files/{__sourcedir__ => src}/index.html | 0 .../files/{__sourcedir__ => src}/main.ts | 2 +- .../files/{__sourcedir__ => src}/polyfills.ts | 0 .../{__sourcedir__ => src}/styles.__style__ | 0 .../files/{__sourcedir__ => src}/test.ts | 0 .../application/files/tsconfig.app.json | 13 + .../{__sourcedir__ => }/tsconfig.spec.json | 4 +- .../schematics/angular/application/index.ts | 278 ++++++++++++++---- .../angular/application/index_spec.ts | 118 ++++---- .../application/other-files/app.module.ts | 7 +- .../angular/application/schema.d.ts | 40 --- .../angular/application/schema.json | 80 +---- packages/schematics/angular/class/index.ts | 45 +-- .../schematics/angular/class/index_spec.ts | 70 +++-- packages/schematics/angular/class/schema.json | 10 +- packages/schematics/angular/collection.json | 18 ++ .../schematics/angular/component/index.ts | 22 +- .../angular/component/index_spec.ts | 118 +++++--- .../schematics/angular/component/schema.json | 10 +- .../schematics/angular/directive/index.ts | 16 +- .../angular/directive/index_spec.ts | 51 ++-- .../schematics/angular/directive/schema.json | 11 +- .../files/protractor.conf.js | 6 +- .../e2e => e2e/files/src}/app.e2e-spec.ts | 4 +- .../files/e2e => e2e/files/src}/app.po.ts | 2 +- .../files/e2e => e2e/files}/tsconfig.e2e.json | 6 +- packages/schematics/angular/e2e/index.ts | 162 ++++++++++ packages/schematics/angular/e2e/index_spec.ts | 94 ++++++ packages/schematics/angular/e2e/schema.d.ts | 22 ++ packages/schematics/angular/e2e/schema.json | 29 ++ packages/schematics/angular/enum/index.ts | 48 +-- .../schematics/angular/enum/index_spec.ts | 38 ++- packages/schematics/angular/enum/schema.json | 10 +- packages/schematics/angular/guard/index.ts | 17 +- .../schematics/angular/guard/index_spec.ts | 48 +-- packages/schematics/angular/guard/schema.json | 10 +- .../schematics/angular/interface/index.ts | 52 ++-- .../angular/interface/index_spec.ts | 40 ++- .../schematics/angular/interface/schema.json | 15 +- packages/schematics/angular/module/index.ts | 17 +- .../schematics/angular/module/index_spec.ts | 59 ++-- .../schematics/angular/module/schema.json | 10 +- packages/schematics/angular/ng-new/index.ts | 77 +++++ .../schematics/angular/ng-new/index_spec.ts | 41 +++ .../schematics/angular/ng-new/schema.d.ts | 70 +++++ .../schematics/angular/ng-new/schema.json | 118 ++++++++ packages/schematics/angular/pipe/index.ts | 12 +- .../schematics/angular/pipe/index_spec.ts | 46 ++- packages/schematics/angular/pipe/schema.json | 10 +- packages/schematics/angular/service/index.ts | 18 +- .../schematics/angular/service/index_spec.ts | 43 ++- .../schematics/angular/service/schema.json | 10 +- .../angular/universal/index_spec.ts | 12 +- packages/schematics/angular/utility/config.ts | 22 ++ .../schematics/angular/utility/find-module.ts | 8 +- .../angular/utility/find-module_spec.ts | 29 +- .../schematics/angular/utility/parse-name.ts | 10 +- .../angular/utility/test/create-app-module.ts | 4 +- .../schematics/angular/utility/validation.ts | 16 + .../files/README.md | 2 +- .../files/__dot__editorconfig | 0 .../files/__dot__gitignore | 5 - .../angular/workspace/files/angular.json | 10 + .../files/package.json | 27 +- .../files/tsconfig.json | 0 .../files/tslint.json | 12 - .../schematics/angular/workspace/index.ts | 31 ++ .../angular/workspace/index_spec.ts | 48 +++ .../schematics/angular/workspace/schema.d.ts | 38 +++ .../schematics/angular/workspace/schema.json | 74 +++++ 85 files changed, 1913 insertions(+), 853 deletions(-) create mode 100644 packages/angular_devkit/core/src/workspace/workspace-schema.ts delete mode 100644 packages/schematics/angular/application/files/__dot__angular-cli.json delete mode 100644 packages/schematics/angular/application/files/__dot__angular.json delete mode 100644 packages/schematics/angular/application/files/__sourcedir__/ngsw-config.json delete mode 100644 packages/schematics/angular/application/files/__sourcedir__/tsconfig.app.json delete mode 100644 packages/schematics/angular/application/files/__sourcedir__/typings.d.ts rename packages/schematics/angular/application/files/{__sourcedir__ => src}/assets/__dot__gitkeep (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/environments/environment.prod.ts (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/environments/environment.ts (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/favicon.ico (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/index.html (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/main.ts (86%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/polyfills.ts (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/styles.__style__ (100%) rename packages/schematics/angular/application/files/{__sourcedir__ => src}/test.ts (100%) create mode 100644 packages/schematics/angular/application/files/tsconfig.app.json rename packages/schematics/angular/application/files/{__sourcedir__ => }/tsconfig.spec.json (56%) rename packages/schematics/angular/{application => e2e}/files/protractor.conf.js (86%) rename packages/schematics/angular/{application/files/e2e => e2e/files/src}/app.e2e-spec.ts (60%) rename packages/schematics/angular/{application/files/e2e => e2e/files/src}/app.po.ts (70%) rename packages/schematics/angular/{application/files/e2e => e2e/files}/tsconfig.e2e.json (51%) create mode 100644 packages/schematics/angular/e2e/index.ts create mode 100644 packages/schematics/angular/e2e/index_spec.ts create mode 100644 packages/schematics/angular/e2e/schema.d.ts create mode 100644 packages/schematics/angular/e2e/schema.json create mode 100644 packages/schematics/angular/ng-new/index.ts create mode 100644 packages/schematics/angular/ng-new/index_spec.ts create mode 100644 packages/schematics/angular/ng-new/schema.d.ts create mode 100644 packages/schematics/angular/ng-new/schema.json create mode 100644 packages/schematics/angular/utility/validation.ts rename packages/schematics/angular/{application => workspace}/files/README.md (92%) rename packages/schematics/angular/{application => workspace}/files/__dot__editorconfig (100%) rename packages/schematics/angular/{application => workspace}/files/__dot__gitignore (92%) create mode 100644 packages/schematics/angular/workspace/files/angular.json rename packages/schematics/angular/{application => workspace}/files/package.json (58%) rename packages/schematics/angular/{application => workspace}/files/tsconfig.json (100%) rename packages/schematics/angular/{application => workspace}/files/tslint.json (92%) create mode 100644 packages/schematics/angular/workspace/index.ts create mode 100644 packages/schematics/angular/workspace/index_spec.ts create mode 100644 packages/schematics/angular/workspace/schema.d.ts create mode 100644 packages/schematics/angular/workspace/schema.json diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 07b353f53f..f56d43eb24 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -285,7 +285,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { ); return function() { - return true; + return > Promise.resolve(true); }; }, }); @@ -342,7 +342,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { } } - if (parent && parentProperty) { + if (parent && parentProperty && parent[parentProperty] === undefined) { parent[parentProperty] = value; } } diff --git a/packages/angular_devkit/core/src/workspace/index.ts b/packages/angular_devkit/core/src/workspace/index.ts index ac89707bd4..13517e107f 100644 --- a/packages/angular_devkit/core/src/workspace/index.ts +++ b/packages/angular_devkit/core/src/workspace/index.ts @@ -7,3 +7,4 @@ */ export * from './workspace'; +export * from './workspace-schema'; diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.ts b/packages/angular_devkit/core/src/workspace/workspace-schema.ts new file mode 100644 index 0000000000..c3803313b9 --- /dev/null +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.ts @@ -0,0 +1,101 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable +export interface WorkspaceSchema { + /** + * Link to schema. + */ + $schema?: string; + /** + * Workspace Schema version. + */ + version: number; + /** + * New project root. + */ + newProjectRoot?: string; + /** + * Tool options. + */ + cli?: { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; + }; + /** + * Tool options. + */ + schematics?: { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; + }; + /** + * Tool options. + */ + architect?: { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; + }; + /** + * A map of project names to project options. + */ + projects: { + [k: string]: Project; + }; +} +/** + * Project options. + */ +export interface Project { + /** + * Project type. + */ + projectType: "application" | "library"; + /** + * Root of the project sourcefiles. + */ + root: string; + /** + * Tool options. + */ + cli?: { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; + }; + /** + * Tool options. + */ + schematics?: { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; + }; + /** + * Tool options. + */ + architect?: { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; + }; +} diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index 13a665bf48..8282121f5f 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -32,17 +32,18 @@ export class InvalidInputOptions extends BaseException { // tslint:disable-next-line:no-any function _deepCopy(object: T): T { - const copy = {} as T; - for (const key of Object.keys(object)) { - if (typeof object[key] == 'object') { - copy[key] = _deepCopy(object[key]); - break; - } else { - copy[key] = object[key]; - } - } + return JSON.parse(JSON.stringify(object)); + // const copy = {} as T; + // for (const key of Object.keys(object)) { + // if (typeof object[key] == 'object') { + // copy[key] = _deepCopy(object[key]); + // break; + // } else { + // copy[key] = object[key]; + // } + // } - return copy; + // return copy; } diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index 0cb4820b47..c670139cc3 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -8,11 +8,12 @@ import { Tree } from '@angular-devkit/schematics'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as NgNewOptions } from '../ng-new/schema'; import { Schema as AppShellOptions } from './schema'; -describe('App Shell Schematic', () => { +// TODO: fix these tests once workspace is implemented +xdescribe('App Shell Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', path.join(__dirname, '../collection.json'), @@ -23,10 +24,9 @@ describe('App Shell Schematic', () => { }; let appTree: Tree; - const appOptions: ApplicationOptions = { + const appOptions: NgNewOptions = { directory: '', name: 'appshell-app', - sourceDir: 'src', inlineStyle: false, inlineTemplate: false, viewEncapsulation: 'None', @@ -34,15 +34,14 @@ describe('App Shell Schematic', () => { routing: true, style: 'css', skipTests: false, - minimal: false, }; beforeEach(() => { - appTree = schematicRunner.runSchematic('application', appOptions); + appTree = schematicRunner.runSchematic('ng-new', appOptions); }); it('should ensure the client app has a router-outlet', () => { - appTree = schematicRunner.runSchematic('application', {...appOptions, routing: false}); + appTree = schematicRunner.runSchematic('ng-new', {...appOptions, routing: false}); expect(() => { schematicRunner.runSchematic('appShell', defaultOptions, appTree); }).toThrowError(); diff --git a/packages/schematics/angular/application/files/__dot__angular-cli.json b/packages/schematics/angular/application/files/__dot__angular-cli.json deleted file mode 100644 index 280d4d8392..0000000000 --- a/packages/schematics/angular/application/files/__dot__angular-cli.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "<%= utils.dasherize(name) %>" - }, - "apps": [ - { - "root": "<%= sourceDir %>", - "prefix": "<%= prefix %>", - "main": "main.ts" - } - ], - "defaults": { - "styleExt": "<%= style %>",<% if (minimal || skipTests) { %> - "class": { - "spec": false - },<% } %> - "component": {<% if (minimal || inlineStyle) { %> - "inlineStyle": true<% } %><% if (minimal || (inlineTemplate && inlineStyle)) { %>,<% } %><% if (minimal || inlineTemplate) { %> - "inlineTemplate": true<% } %><% if (minimal || (skipTests && (inlineStyle || inlineTemplate))) { %>,<% } %><% if (minimal || skipTests) { %> - "spec": false - <% } %>}<% if (minimal || skipTests) { %>, - "directive": { - "spec": false - }, - "guard": { - "spec": false - }, - "module": { - "spec": false - }, - "pipe": { - "spec": false - }, - "service": { - "spec": false - }<% } %> - } -} diff --git a/packages/schematics/angular/application/files/__dot__angular.json b/packages/schematics/angular/application/files/__dot__angular.json deleted file mode 100644 index 49c86aac11..0000000000 --- a/packages/schematics/angular/application/files/__dot__angular.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json", - "version": 1, - "newProjectRoot": "./projects", - "cli": {}, - "schematics": {}, - "architect": {}, - "projects": { - "app": { - "root": "<%= sourceDir %>", - "projectType": "application", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-devkit/build-webpack:browser", - "options": { - "outputPath": "dist", - "index": "<%= sourceDir %>/index.html", - "main": "<%= sourceDir %>/main.ts", - "polyfills": "<%= sourceDir %>/polyfills.ts", - "tsConfig": "<%= sourceDir %>/tsconfig.app.json", - "assets": [ - { - "glob": "favicon.ico", - "input": "<%= sourceDir %>/", - "output": "./" - }, - { - "glob": "**/*", - "input": "<%= sourceDir %>/assets", - "output": "assets" - } - ], - "styles": [ - { - "input": "<%= sourceDir %>/styles.<%= style %>" - } - ], - "scripts": [] - <% if (serviceWorker) { %>, - "serviceWorker": true<% - } %> - }, - "configurations": { - "production": { - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true - } - } - }, - "serve": { - "builder": "@angular-devkit/build-webpack:dev-server", - "options": { - "browserTarget": "app:build" - }, - "configurations": { - "production": { - "browserTarget": "app:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-webpack:extract-i18n", - "options": { - "browserTarget": "app:build" - } - }, - "test": { - "builder": "@angular-devkit/build-webpack:karma", - "options": { - "main": "<%= sourceDir %>/test.ts", - "polyfills": "<%= sourceDir %>/polyfills.ts", - "tsConfig": "<%= sourceDir %>/tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "styles": [ - { - "input": "<%= sourceDir %>/styles.<%= style %>" - } - ], - "scripts": [], - "assets": [ - { - "glob": "favicon.ico", - "input": "<%= sourceDir %>/", - "output": "./" - }, - { - "glob": "**/*", - "input": "<%= sourceDir %>/assets", - "output": "assets" - } - ] - } - }, - "lint": { - "builder": "@angular-devkit/build-webpack:tslint", - "options": { - "tsConfig": "<%= sourceDir %>/tsconfig.app.json", - "exclude": [ - "**/node_modules/**" - ] - } - }, - "lint-test": { - "builder": "@angular-devkit/build-webpack:tslint", - "options": { - "tsConfig": "<%= sourceDir %>/tsconfig.spec.json", - "exclude": [ - "**/node_modules/**" - ] - } - } - } - }, - "app-e2e": { - "root": "e2e", - "projectType": "application", - "architect": { - "e2e": { - "builder": "@angular-devkit/build-webpack:protractor", - "options": { - "protractorConfig": "protractor.conf.js", - "devServerTarget": "app:serve" - } - }, - "lint": { - "builder": "@angular-devkit/build-webpack:tslint", - "options": { - "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/schematics/angular/application/files/__sourcedir__/ngsw-config.json b/packages/schematics/angular/application/files/__sourcedir__/ngsw-config.json deleted file mode 100644 index b9bf3a5570..0000000000 --- a/packages/schematics/angular/application/files/__sourcedir__/ngsw-config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "index": "/index.html", - "assetGroups": [{ - "name": "app", - "installMode": "prefetch", - "resources": { - "files": [ - "/favicon.ico", - "/index.html" - ], - "versionedFiles": [ - "/*.bundle.css", - "/*.bundle.js", - "/*.chunk.js" - ] - } - }, { - "name": "assets", - "installMode": "lazy", - "updateMode": "prefetch", - "resources": { - "files": [ - "/assets/**" - ] - } - }] -} \ No newline at end of file diff --git a/packages/schematics/angular/application/files/__sourcedir__/tsconfig.app.json b/packages/schematics/angular/application/files/__sourcedir__/tsconfig.app.json deleted file mode 100644 index 939fe613af..0000000000 --- a/packages/schematics/angular/application/files/__sourcedir__/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "<%= sourcedir.split('/').map(x => '..').join('/') %>/tsconfig.json", - "compilerOptions": { - "outDir": "<%= sourcedir.split('/').map(x => '..').join('/') %>/out-tsc/app", - "baseUrl": "./", - "module": "es2015", - "types": [] - }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/schematics/angular/application/files/__sourcedir__/typings.d.ts b/packages/schematics/angular/application/files/__sourcedir__/typings.d.ts deleted file mode 100644 index ef5c7bd620..0000000000 --- a/packages/schematics/angular/application/files/__sourcedir__/typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* SystemJS module definition */ -declare var module: NodeModule; -interface NodeModule { - id: string; -} diff --git a/packages/schematics/angular/application/files/karma.conf.js b/packages/schematics/angular/application/files/karma.conf.js index 85874a9222..a0566de9f7 100644 --- a/packages/schematics/angular/application/files/karma.conf.js +++ b/packages/schematics/angular/application/files/karma.conf.js @@ -31,4 +31,4 @@ module.exports = function (config) { browsers: ['Chrome'], singleRun: false }); -}; +}; \ No newline at end of file diff --git a/packages/schematics/angular/application/files/__sourcedir__/assets/__dot__gitkeep b/packages/schematics/angular/application/files/src/assets/__dot__gitkeep similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/assets/__dot__gitkeep rename to packages/schematics/angular/application/files/src/assets/__dot__gitkeep diff --git a/packages/schematics/angular/application/files/__sourcedir__/environments/environment.prod.ts b/packages/schematics/angular/application/files/src/environments/environment.prod.ts similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/environments/environment.prod.ts rename to packages/schematics/angular/application/files/src/environments/environment.prod.ts diff --git a/packages/schematics/angular/application/files/__sourcedir__/environments/environment.ts b/packages/schematics/angular/application/files/src/environments/environment.ts similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/environments/environment.ts rename to packages/schematics/angular/application/files/src/environments/environment.ts diff --git a/packages/schematics/angular/application/files/__sourcedir__/favicon.ico b/packages/schematics/angular/application/files/src/favicon.ico similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/favicon.ico rename to packages/schematics/angular/application/files/src/favicon.ico diff --git a/packages/schematics/angular/application/files/__sourcedir__/index.html b/packages/schematics/angular/application/files/src/index.html similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/index.html rename to packages/schematics/angular/application/files/src/index.html diff --git a/packages/schematics/angular/application/files/__sourcedir__/main.ts b/packages/schematics/angular/application/files/src/main.ts similarity index 86% rename from packages/schematics/angular/application/files/__sourcedir__/main.ts rename to packages/schematics/angular/application/files/src/main.ts index 91ec6da5f0..75db9776fe 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/main.ts +++ b/packages/schematics/angular/application/files/src/main.ts @@ -1,7 +1,7 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; +import { AppModule } from './src/app/app.module'; import { environment } from './environments/environment'; if (environment.production) { diff --git a/packages/schematics/angular/application/files/__sourcedir__/polyfills.ts b/packages/schematics/angular/application/files/src/polyfills.ts similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/polyfills.ts rename to packages/schematics/angular/application/files/src/polyfills.ts diff --git a/packages/schematics/angular/application/files/__sourcedir__/styles.__style__ b/packages/schematics/angular/application/files/src/styles.__style__ similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/styles.__style__ rename to packages/schematics/angular/application/files/src/styles.__style__ diff --git a/packages/schematics/angular/application/files/__sourcedir__/test.ts b/packages/schematics/angular/application/files/src/test.ts similarity index 100% rename from packages/schematics/angular/application/files/__sourcedir__/test.ts rename to packages/schematics/angular/application/files/src/test.ts diff --git a/packages/schematics/angular/application/files/tsconfig.app.json b/packages/schematics/angular/application/files/tsconfig.app.json new file mode 100644 index 0000000000..4c5ae20bfd --- /dev/null +++ b/packages/schematics/angular/application/files/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/app", + "baseUrl": "./", + "module": "es2015", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json b/packages/schematics/angular/application/files/tsconfig.spec.json similarity index 56% rename from packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json rename to packages/schematics/angular/application/files/tsconfig.spec.json index 1df99a878c..6eb00e7506 100644 --- a/packages/schematics/angular/application/files/__sourcedir__/tsconfig.spec.json +++ b/packages/schematics/angular/application/files/tsconfig.spec.json @@ -1,7 +1,7 @@ { - "extends": "<%= sourcedir.split('/').map(x => '..').join('/') %>/tsconfig.json", + "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { - "outDir": "<%= sourcedir.split('/').map(x => '..').join('/') %>/out-tsc/spec", + "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/spec", "baseUrl": "./", "module": "commonjs", "types": [ diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 758ff42e98..737be00d0c 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -5,11 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { strings } from '@angular-devkit/core'; +import { strings, tags } from '@angular-devkit/core'; +import { experimental } from '@angular-devkit/core'; import { MergeStrategy, Rule, SchematicContext, + SchematicsException, Tree, apply, chain, @@ -21,72 +23,239 @@ import { template, url, } from '@angular-devkit/schematics'; -import { - NodePackageInstallTask, - NodePackageLinkTask, - RepositoryInitializerTask, -} from '@angular-devkit/schematics/tasks'; +import { Schema as E2eOptions } from '../e2e/schema'; +import { getWorkspace, getWorkspacePath } from '../utility/config'; import { Schema as ApplicationOptions } from './schema'; +type WorkspaceSchema = experimental.workspace.WorkspaceSchema; + +// TODO: use JsonAST +// function appendPropertyInAstObject( +// recorder: UpdateRecorder, +// node: JsonAstObject, +// propertyName: string, +// value: JsonValue, +// indent = 4, +// ) { +// const indentStr = '\n' + new Array(indent + 1).join(' '); + +// if (node.properties.length > 0) { +// // Insert comma. +// const last = node.properties[node.properties.length - 1]; +// recorder.insertRight(last.start.offset + last.text.replace(/\s+$/, '').length, ','); +// } -function minimalPathFilter(path: string): boolean { - const toRemoveList: RegExp[] = [/e2e\//, /editorconfig/, /README/, /karma.conf.js/, - /protractor.conf.js/, /test.ts/, /tsconfig.spec.json/, - /tslint.json/, /favicon.ico/]; +// recorder.insertLeft( +// node.end.offset - 1, +// ' ' +// + `"${propertyName}": ${JSON.stringify(value, null, 2).replace(/\n/g, indentStr)}` +// + indentStr.slice(0, -2), +// ); +// } - return !toRemoveList.some(re => re.test(path)); +function addAppToWorkspaceFile(options: ApplicationOptions, workspace: WorkspaceSchema): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.info(`Updating workspace file`); + // TODO: use JsonAST + // const workspacePath = '/angular.json'; + // const workspaceBuffer = host.read(workspacePath); + // if (workspaceBuffer === null) { + // throw new SchematicsException(`Configuration file (${workspacePath}) not found.`); + // } + // const workspaceJson = parseJson(workspaceBuffer.toString()); + // if (workspaceJson.value === null) { + // throw new SchematicsException(`Unable to parse configuration file (${workspacePath}).`); + // } + const projectRoot = `${workspace.newProjectRoot}/${options.name}`; + // tslint:disable-next-line:no-any + const project: any = { + root: projectRoot, + projectType: 'application', + cli: {}, + schematics: {}, + architect: { + build: { + builder: '@angular-devkit/build-webpack:browser', + options: { + outputPath: `dist/${options.name}`, + index: `${projectRoot}/index.html`, + main: `${projectRoot}/main.ts`, + polyfills: `${projectRoot}/polyfills.ts`, + tsConfig: `${projectRoot}/tsconfig.app.json`, + assets: [ + { + glob: 'favicon.ico', + input: `${projectRoot}`, + output: './', + }, + { + glob: '**/*', + input: `${projectRoot}/assets>`, + output: 'assets', + }, + ], + styles: [ + { + input: `${projectRoot}/styles.${options.style}`, + }, + ], + scripts: [], + }, + configurations: { + production: { + optimization: true, + outputHashing: 'all', + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + }, + }, + }, + serve: { + builder: '@angular-devkit/build-webpack:dev-server', + options: { + browserTarget: `${options.name}:build`, + }, + configurations: { + production: { + browserTarget: `${options.name}:build:production`, + }, + }, + }, + 'extract-i18n': { + builder: '@angular-devkit/build-webpack:extract-i18n', + options: { + browserTarget: `${options.name}:build`, + }, + }, + test: { + builder: '@angular-devkit/build-webpack:karma', + options: { + main: `${projectRoot}/test.ts`, + polyfills: `${projectRoot}/polyfills.ts`, + tsConfig: `${projectRoot}/tsconfig.spec.json`, + karmaConfig: `${projectRoot}/karma.conf.js`, + styles: [ + { + input: `${projectRoot}/styles.${options.style}`, + }, + ], + scripts: [], + assets: [ + { + glob: 'favicon.ico', + input: `${projectRoot}/`, + output: './', + }, + { + glob: '**/*', + input: `${projectRoot}/assets`, + output: 'assets', + }, + ], + }, + }, + lint: { + builder: '@angular-devkit/build-webpack:tslint', + options: { + tsConfig: [ + `${projectRoot}/tsconfig.app.json`, + `${projectRoot}/tsconfig.spec.json`, + ], + exclude: [ + '**/node_modules/**', + ], + }, + }, + }, + }; + // tslint:disable-next-line:no-any + // const projects: JsonObject = ( workspaceAst.value).projects || {}; + // tslint:disable-next-line:no-any + // if (!( workspaceAst.value).projects) { + // // tslint:disable-next-line:no-any + // ( workspaceAst.value).projects = projects; + // } + + workspace.projects[options.name] = project; + host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); + }; } +const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/; +const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; + +function getRegExpFailPosition(str: string): number | null { + const parts = str.indexOf('-') >= 0 ? str.split('-') : [str]; + const matched: string[] = []; + + parts.forEach(part => { + if (part.match(projectNameRegexp)) { + matched.push(part); + } + }); + + const compare = matched.join('-'); + + return (str !== compare) ? compare.length : null; +} + +function validateProjectName(projectName: string) { + const errorIndex = getRegExpFailPosition(projectName); + if (errorIndex !== null) { + const firstMessage = tags.oneLine` + Project name "${projectName}" is not valid. New project names must + start with a letter, and must contain only alphanumeric characters or dashes. + When adding a dash the segment after the dash must also start with a letter. + `; + const msg = tags.stripIndent` + ${firstMessage} + ${projectName} + ${Array(errorIndex + 1).join(' ') + '^'} + `; + throw new SchematicsException(msg); + } else if (unsupportedProjectNames.indexOf(projectName) !== -1) { + throw new SchematicsException(`Project name "${projectName}" is not a supported name.`); + } + +} + export default function (options: ApplicationOptions): Rule { return (host: Tree, context: SchematicContext) => { - const appRootSelector = `${options.prefix}-root`; - const componentOptions = !options.minimal ? - { - inlineStyle: options.inlineStyle, - inlineTemplate: options.inlineTemplate, - spec: !options.skipTests, - styleext: options.style, - } : - { - inlineStyle: true, - inlineTemplate: true, - spec: false, - styleext: options.style, - }; - const sourceDir = options.sourceDir || 'src'; - - let packageTask; - if (!options.skipInstall) { - packageTask = context.addTask(new NodePackageInstallTask(options.directory)); - if (options.linkCli) { - packageTask = context.addTask( - new NodePackageLinkTask('@angular/cli', options.directory), - [packageTask], - ); - } - } - if (!options.skipGit) { - context.addTask( - new RepositoryInitializerTask( - options.directory, - options.commit, - ), - packageTask ? [packageTask] : [], - ); - } + validateProjectName(options.name); + const appRootSelector = `${options.prefix || 'app'}-root`; + const componentOptions = { + inlineStyle: options.inlineStyle, + inlineTemplate: options.inlineTemplate, + spec: !options.skipTests, + styleext: options.style, + }; + + const workspace = getWorkspace(host); + const newProjectRoot = workspace.newProjectRoot; + const appDir = `${newProjectRoot}/${options.name}`; + const sourceDir = `${appDir}/src/app`; + + const e2eOptions: E2eOptions = { + name: `${options.name}-e2e`, + relatedAppName: options.name, + rootSelector: appRootSelector, + }; return chain([ + addAppToWorkspaceFile(options, workspace), mergeWith( apply(url('./files'), [ - options.minimal ? filter(minimalPathFilter) : noop(), - options.skipGit ? filter(path => !path.endsWith('/__dot__gitignore')) : noop(), - options.serviceWorker ? noop() : filter(path => !path.endsWith('/ngsw-config.json')), template({ utils: strings, ...options, 'dot': '.', - sourcedir: sourceDir, + appDir, }), - move(options.directory), + move(appDir), ])), schematic('module', { name: 'app', @@ -94,14 +263,14 @@ export default function (options: ApplicationOptions): Rule { flat: true, routing: options.routing, routingScope: 'Root', - path: options.directory + '/' + sourceDir + '/' + options.path, + path: sourceDir, spec: false, }), schematic('component', { name: 'app', selector: appRootSelector, flat: true, - path: options.directory + '/' + sourceDir + '/' + options.path, + path: sourceDir, skipImport: true, ...componentOptions, }), @@ -115,8 +284,9 @@ export default function (options: ApplicationOptions): Rule { selector: appRootSelector, ...componentOptions, }), - move(options.directory + '/' + sourceDir + '/app'), + move(sourceDir), ]), MergeStrategy.Overwrite), + schematic('e2e', e2eOptions), ])(host, context); }; } diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 85138a0c04..43369f764d 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -7,117 +7,99 @@ */ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { getFileContent } from '../utility/test'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ApplicationOptions } from './schema'; - +// tslint:disable:max-line-length describe('Application Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', path.join(__dirname, '../collection.json'), ); + + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + const defaultOptions: ApplicationOptions = { - directory: 'foo', name: 'foo', - sourceDir: 'src', inlineStyle: false, inlineTemplate: false, viewEncapsulation: 'Emulated', - version: '1.2.3', routing: false, style: 'css', skipTests: false, - minimal: false, }; + let workspaceTree: UnitTestTree; + beforeEach(() => { + workspaceTree = schematicRunner.runSchematic('workspace', workspaceOptions); + }); + it('should create all files of an application', () => { const options = { ...defaultOptions }; - const tree = schematicRunner.runSchematic('application', options); + const tree = schematicRunner.runSchematic('application', options, workspaceTree); const files = tree.files; - expect(files.indexOf('/foo/.editorconfig')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/.angular-cli.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/.gitignore')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/package.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/protractor.conf.js')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/README.md')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/tsconfig.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/tslint.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/e2e/app.e2e-spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/e2e/app.po.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/favicon.ico')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/index.html')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/main.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/polyfills.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/styles.css')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/test.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/tsconfig.app.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/tsconfig.spec.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/typings.d.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/assets/.gitkeep')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/environments/environment.prod.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/environments/environment.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/app/app.component.css')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/app/app.component.html')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/app/app.component.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/app/app.component.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/tsconfig.app.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/tsconfig.spec.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/environments/environment.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/environments/environment.prod.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/favicon.ico')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/index.html')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/main.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/polyfills.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/styles.css')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/test.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app/app.component.ts')).toBeGreaterThanOrEqual(0); }); - it('should handle a different sourceDir', () => { - const options = { ...defaultOptions, sourceDir: 'some/custom/path' }; - - let tree: UnitTestTree | null = null; - expect(() => tree = schematicRunner.runSchematic('application', options)) - .not.toThrow(); + it('should add the application to the workspace', () => { + const options = { ...defaultOptions }; - if (tree) { - // tslint:disable-next-line:non-null-operator - const files = tree !.files; - expect(files.indexOf('/foo/some/custom/path/app/app.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/some/custom/path/tsconfig.app.json')).toBeGreaterThanOrEqual(0); - } + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo).toBeDefined(); }); it('should handle the routing flag', () => { const options = { ...defaultOptions, routing: true }; - const tree = schematicRunner.runSchematic('application', options); + const tree = schematicRunner.runSchematic('application', options, workspaceTree); const files = tree.files; - expect(files.indexOf('/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/foo/src/app/app-routing.module.ts')).toBeGreaterThanOrEqual(0); - const moduleContent = getFileContent(tree, '/foo/src/app/app.module.ts'); + expect(files.indexOf('/projects/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app/app-routing.module.ts')).toBeGreaterThanOrEqual(0); + const moduleContent = tree.readContent('/projects/foo/src/app/app.module.ts'); expect(moduleContent).toMatch(/import { AppRoutingModule } from '.\/app-routing.module'/); - const routingModuleContent = getFileContent(tree, '/foo/src/app/app-routing.module.ts'); + const routingModuleContent = tree.readContent('/projects/foo/src/app/app-routing.module.ts'); expect(routingModuleContent).toMatch(/RouterModule.forRoot\(routes\)/); }); - it('should handle the skip git flag', () => { - const options = { ...defaultOptions, skipGit: true }; - - const tree = schematicRunner.runSchematic('application', options); - const files = tree.files; - expect(files.indexOf('/foo/.gitignore')).toEqual(-1); - }); - it('should import BrowserModule in the app module', () => { - const tree = schematicRunner.runSchematic('application', defaultOptions); - const path = '/foo/src/app/app.module.ts'; + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + const path = '/projects/foo/src/app/app.module.ts'; const content = tree.readContent(path); expect(content).toMatch(/import { BrowserModule } from \'@angular\/platform-browser\';/); }); it('should declare app component in the app module', () => { - const tree = schematicRunner.runSchematic('application', defaultOptions); - const path = '/foo/src/app/app.module.ts'; + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + const path = '/projects/foo/src/app/app.module.ts'; const content = tree.readContent(path); expect(content).toMatch(/import { AppComponent } from \'\.\/app\.component\';/); }); - it('should use the directory option', () => { - const options = { ...defaultOptions, directory: 'my-dir' }; - const tree = schematicRunner.runSchematic('application', options); - expect(tree.exists('/my-dir/package.json')).toEqual(true); + it('should set the right paths in the tsconfig files', () => { + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + let path = '/projects/foo/tsconfig.app.json'; + let content = tree.readContent(path); + expect(content).toMatch('../../tsconfig.json'); + path = '/projects/foo/tsconfig.spec.json'; + content = tree.readContent(path); + expect(content).toMatch('../../tsconfig.json'); }); }); diff --git a/packages/schematics/angular/application/other-files/app.module.ts b/packages/schematics/angular/application/other-files/app.module.ts index 2ba765db55..2c4bc05c64 100644 --- a/packages/schematics/angular/application/other-files/app.module.ts +++ b/packages/schematics/angular/application/other-files/app.module.ts @@ -2,11 +2,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; <% if (routing) { %> import { AppRoutingModule } from './app-routing.module';<% } %> -<% if (serviceWorker) { %> -import { ServiceWorkerModule } from '@angular/service-worker';<% } %> import { AppComponent } from './app.component'; -<% if (serviceWorker) { %> -import { environment } from '../environments/environment';<% } %> @NgModule({ declarations: [ @@ -14,8 +10,7 @@ import { environment } from '../environments/environment';<% } %> ], imports: [ BrowserModule<% if (routing) { %>, - AppRoutingModule<% } %><% if (serviceWorker) { %>, - ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production })<% } %> + AppRoutingModule<% } %> ], providers: [], bootstrap: [AppComponent] diff --git a/packages/schematics/angular/application/schema.d.ts b/packages/schematics/angular/application/schema.d.ts index 091f548110..d54c96db09 100644 --- a/packages/schematics/angular/application/schema.d.ts +++ b/packages/schematics/angular/application/schema.d.ts @@ -7,18 +7,6 @@ */ export interface Schema { - /** - * The directory name to create the app in. - */ - directory: string; - /** - * The path of the application. - */ - path?: string; - /** - * The path of the source directory. - */ - sourceDir?: string; /** * The name of the application. */ @@ -35,10 +23,6 @@ export interface Schema { * Specifies the view encapsulation strategy. */ viewEncapsulation?: ('Emulated' | 'Native' | 'None'); - /** - * The version of the Angular CLI to use. - */ - version?: string; /** * Generates a routing module. */ @@ -55,28 +39,4 @@ export interface Schema { * Skip creating spec files. */ skipTests?: boolean; - /** - * Skip installing dependency packages. - */ - skipInstall?: boolean; - /** - * Link CLI to global version (internal development only). - */ - linkCli?: boolean; - /** - * Skip initializing a git repository. - */ - skipGit?: boolean; - /** - * Initial repository commit information. - */ - commit?: { name: string, email: string, message?: string }; - /** - * Create a minimal app (no test structure, inline styles/templates). - */ - minimal?: boolean; - /** - * Installs the @angular/service-worker. - */ - serviceWorker?: boolean; } diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index cf7babe5c6..164262e655 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -4,27 +4,6 @@ "title": "Angular Application Options Schema", "type": "object", "properties": { - "directory": { - "type": "string", - "format": "path", - "description": "The directory name to create the app in.", - "default": "" - }, - "path": { - "type": "string", - "format": "path", - "description": "The path of the application.", - "default": "app", - "visible": false - }, - "sourceDir": { - "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "alias": "D", - "visible": false - }, "name": { "description": "The name of the application.", "type": "string", @@ -51,11 +30,6 @@ "enum": ["Emulated", "Native", "None"], "type": "string" }, - "version": { - "type": "string", - "description": "The version of the Angular CLI to use.", - "visible": false - }, "routing": { "type": "boolean", "description": "Generates a routing module.", @@ -78,61 +52,9 @@ "type": "boolean", "default": false, "alias": "S" - }, - "skipInstall": { - "description": "Skip installing dependency packages.", - "type": "boolean", - "default": false - }, - "linkCli": { - "description": "Link CLI to global version (internal development only).", - "type": "boolean", - "default": false, - "visible": false - }, - "skipGit": { - "description": "Skip initializing a git repository.", - "type": "boolean", - "default": false, - "alias": "g" - }, - "commit": { - "description": "Initial repository commit information.", - "default": null, - "oneOf": [ - { "type": "null" }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - }, - "message": { - "type": "string" - } - }, - "required": [ - "name", - "email" - ] - } - ] - }, - "minimal": { - "description": "Create a minimal app (no test structure, inline styles/templates).", - "type": "boolean", - "default": false - }, - "serviceWorker": { - "description": "Installs the @angular/service-worker.", - "type": "boolean", - "default": false } }, "required": [ + "name" ] } diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index 9a9409a553..e0caef5fcc 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -8,6 +8,8 @@ import { strings } from '@angular-devkit/core'; import { Rule, + SchematicContext, + Tree, apply, branchAndMerge, filter, @@ -17,28 +19,37 @@ import { template, url, } from '@angular-devkit/schematics'; +import { getWorkspace } from '../utility/config'; import { parseName } from '../utility/parse-name'; import { Schema as ClassOptions } from './schema'; - export default function (options: ClassOptions): Rule { - options.type = !!options.type ? `.${options.type}` : ''; + return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; + + if (options.path === undefined) { + options.path = `/${project.root}/src`; + } + + options.type = !!options.type ? `.${options.type}` : ''; - if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; - } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; - const templateSource = apply(url('./files'), [ - options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), - template({ - ...strings, - ...options, - }), - move(parsedPath.path), - ]); + const templateSource = apply(url('./files'), [ + options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), + template({ + ...strings, + ...options, + }), + move(parsedPath.path), + ]); - return branchAndMerge(mergeWith(templateSource)); + return branchAndMerge(mergeWith(templateSource))(host, context); + }; } diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index fbf9b92556..40ac63a0ab 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -5,9 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { getFileContent } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ClassOptions } from './schema'; @@ -18,57 +19,72 @@ describe('Class Schematic', () => { ); const defaultOptions: ClassOptions = { name: 'foo', - path: 'src/app', type: '', spec: false, }; - it('should create one file', () => { - const tree = schematicRunner.runSchematic('class', defaultOptions); - expect(tree.files.length).toEqual(1); - expect(tree.files[0]).toEqual('/src/app/foo.ts'); + + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; + beforeEach(() => { + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); + }); + + it('should create just the class file', () => { + const tree = schematicRunner.runSchematic('class', defaultOptions, appTree); + expect(tree.files.indexOf('/projects/bar/src/foo.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/foo.spec.ts')).toBeLessThan(0); }); - it('should create two files if spec is true', () => { + it('should create the class and spec file', () => { const options = { ...defaultOptions, spec: true, }; - const tree = schematicRunner.runSchematic('class', options); - expect(tree.files.length).toEqual(2); - expect(tree.files.indexOf('/src/app/foo.spec.ts')).toBeGreaterThanOrEqual(0); - expect(tree.files.indexOf('/src/app/foo.ts')).toBeGreaterThanOrEqual(0); + const tree = schematicRunner.runSchematic('class', options, appTree); + expect(tree.files.indexOf('/projects/bar/src/foo.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/foo.spec.ts')).toBeGreaterThanOrEqual(0); }); it('should create an class named "Foo"', () => { - const tree = schematicRunner.runSchematic('class', defaultOptions); - const fileEntry = tree.get(tree.files[0]); - if (fileEntry) { - const fileContent = fileEntry.content.toString(); - expect(fileContent).toMatch(/export class Foo/); - } + const tree = schematicRunner.runSchematic('class', defaultOptions, appTree); + const fileContent = tree.readContent('/projects/bar/src/foo.ts'); + expect(fileContent).toMatch(/export class Foo/); }); it('should put type in the file name', () => { const options = { ...defaultOptions, type: 'model' }; - const tree = schematicRunner.runSchematic('class', options); - expect(tree.files[0]).toEqual('/src/app/foo.model.ts'); + const tree = schematicRunner.runSchematic('class', options, appTree); + expect(tree.files.indexOf('/projects/bar/src/foo.model.ts')).toBeGreaterThanOrEqual(0); }); it('should split the name to name & type with split on "."', () => { const options = {...defaultOptions, name: 'foo.model' }; - const tree = schematicRunner.runSchematic('class', options); - expect(tree.files.length).toEqual(1); - expect(tree.files[0]).toEqual('/src/app/foo.model.ts'); - const content = getFileContent(tree, '/src/app/foo.model.ts'); + const tree = schematicRunner.runSchematic('class', options, appTree); + const classPath = '/projects/bar/src/foo.model.ts'; + const content = tree.readContent(classPath); expect(content).toMatch(/export class Foo/); }); it('should respect the path option', () => { const options = { ...defaultOptions, path: 'zzz' }; - const tree = schematicRunner.runSchematic('class', options); - expect(tree.files.length).toEqual(1); - expect(tree.files[0]).toEqual('/zzz/foo.ts'); + const tree = schematicRunner.runSchematic('class', options, appTree); + expect(tree.files.indexOf('/zzz/foo.ts')).toBeGreaterThanOrEqual(0); }); }); diff --git a/packages/schematics/angular/class/schema.json b/packages/schematics/angular/class/schema.json index ba6e16e62e..9e257aaaed 100644 --- a/packages/schematics/angular/class/schema.json +++ b/packages/schematics/angular/class/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the class." + "description": "The name of the class.", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -30,7 +34,5 @@ "default": "" } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/collection.json b/packages/schematics/angular/collection.json index 093f07d48f..c53d4c1128 100644 --- a/packages/schematics/angular/collection.json +++ b/packages/schematics/angular/collection.json @@ -1,10 +1,28 @@ { "schematics": { + "ng-new": { + "factory": "./ng-new", + "schema": "./ng-new/schema.json", + "description": "Create an Angular workspace.", + "hidden": true + }, + "workspace": { + "factory": "./workspace", + "schema": "./workspace/schema.json", + "description": "Create an Angular workspace.", + "hidden": true + }, "application": { "factory": "./application", "schema": "./application/schema.json", "description": "Create an Angular application." }, + "e2e": { + "factory": "./e2e", + "schema": "./e2e/schema.json", + "description": "Create an Angular e2e application.", + "hidden": true + }, "class": { "aliases": [ "cl" ], "factory": "./class", diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 8a5495ebef..a99e4bba02 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -24,8 +24,10 @@ import { import * as ts from 'typescript'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; +import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; +import { validateName } from '../utility/validation'; import { Schema as ComponentOptions } from './schema'; @@ -102,17 +104,25 @@ function buildSelector(options: ComponentOptions) { export default function(options: ComponentOptions): Rule { return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; + if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; + options.path = `/${project.root}/src/app`; } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; options.selector = options.selector || buildSelector(options); - options.path = options.path ? normalize(options.path) : options.path; options.module = findModuleFromOptions(host, options); + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + + validateName(options.name); + const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), options.inlineStyle ? filter(path => !path.endsWith('.__styleext__')) : noop(), diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 41d82808c3..076e8da79f 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -5,13 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { createAppModule, getFileContent } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { createAppModule } from '../utility/test'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ComponentOptions } from './schema'; - +// tslint:disable:max-line-length describe('Component Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', @@ -19,7 +20,7 @@ describe('Component Schematic', () => { ); const defaultOptions: ComponentOptions = { name: 'foo', - path: 'src/app', + // path: 'src/app', inlineStyle: false, inlineTemplate: false, changeDetection: 'Default', @@ -30,23 +31,37 @@ describe('Component Schematic', () => { prefix: 'app', }; - let appTree: Tree; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = new VirtualTree(); - appTree = createAppModule(appTree); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a component', () => { const options = { ...defaultOptions }; - const tree = schematicRunner.runSchematic('component', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.component.css')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.component.html')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.component.ts')).toBeGreaterThanOrEqual(0); - const moduleContent = getFileContent(tree, '/src/app/app.module.ts'); + expect(files.indexOf('/projects/bar/src/app/foo/foo.component.css')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.component.html')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.component.ts')).toBeGreaterThanOrEqual(0); + const moduleContent = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(moduleContent).toMatch(/import.*Foo.*from '.\/foo\/foo.component'/); expect(moduleContent).toMatch(/declarations:\s*\[[^\]]+?,\r?\n\s+FooComponent\r?\n/m); }); @@ -55,7 +70,7 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, changeDetection: 'OnPush' }; const tree = schematicRunner.runSchematic('component', options, appTree); - const tsContent = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const tsContent = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(tsContent).toMatch(/changeDetection: ChangeDetectionStrategy.OnPush/); }); @@ -63,7 +78,7 @@ describe('Component Schematic', () => { const options = { ...defaultOptions }; const tree = schematicRunner.runSchematic('component', options, appTree); - const tsContent = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const tsContent = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(tsContent).not.toMatch(/encapsulation: ViewEncapsulation/); }); @@ -71,7 +86,7 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, viewEncapsulation: 'Emulated' }; const tree = schematicRunner.runSchematic('component', options, appTree); - const tsContent = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const tsContent = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(tsContent).toMatch(/encapsulation: ViewEncapsulation.Emulated/); }); @@ -79,7 +94,7 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, viewEncapsulation: 'None' }; const tree = schematicRunner.runSchematic('component', options, appTree); - const tsContent = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const tsContent = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(tsContent).toMatch(/encapsulation: ViewEncapsulation.None/); }); @@ -88,15 +103,15 @@ describe('Component Schematic', () => { const tree = schematicRunner.runSchematic('component', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo.component.css')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo.component.html')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo.component.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.component.css')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.component.html')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.component.ts')).toBeGreaterThanOrEqual(0); }); it('should find the closest module', () => { const options = { ...defaultOptions }; - const fooModule = '/src/app/foo/foo.module.ts'; + const fooModule = '/projects/bar/src/app/foo/foo.module.ts'; appTree.create(fooModule, ` import { NgModule } from '@angular/core'; @@ -108,7 +123,7 @@ describe('Component Schematic', () => { `); const tree = schematicRunner.runSchematic('component', options, appTree); - const fooModuleContent = getFileContent(tree, fooModule); + const fooModuleContent = tree.readContent(fooModule); expect(fooModuleContent).toMatch(/import { FooComponent } from '.\/foo.component'/); }); @@ -116,7 +131,7 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, export: true }; const tree = schematicRunner.runSchematic('component', options, appTree); - const appModuleContent = getFileContent(tree, '/src/app/app.module.ts'); + const appModuleContent = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(appModuleContent).toMatch(/exports: \[FooComponent\]/); }); @@ -124,13 +139,13 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('component', options, appTree); - const appModule = getFileContent(tree, '/src/app/app.module.ts'); + const appModule = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(appModule).toMatch(/import { FooComponent } from '.\/foo\/foo.component'/); }); it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/src/app/app.moduleXXX.ts' }; + const options = { ...defaultOptions, module: '/projects/bar/src/app.moduleXXX.ts' }; let thrownError: Error | null = null; try { schematicRunner.runSchematic('component', options, appTree); @@ -141,7 +156,7 @@ describe('Component Schematic', () => { }); it('should handle upper case paths', () => { - const pathOption = 'src/app/SOME/UPPER/DIR'; + const pathOption = 'projects/bar/src/app/SOME/UPPER/DIR'; const options = { ...defaultOptions, path: pathOption }; const tree = schematicRunner.runSchematic('component', options, appTree); @@ -163,7 +178,7 @@ describe('Component Schematic', () => { }); it('should create a component in a sub-directory', () => { - const options = { ...defaultOptions, path: 'src/app/a/b/c' }; + const options = { ...defaultOptions, path: 'projects/bar/src/app/a/b/c' }; const tree = schematicRunner.runSchematic('component', options, appTree); const files = tree.files; @@ -178,7 +193,7 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, prefix: 'pre' }; const tree = schematicRunner.runSchematic('component', options, appTree); - const content = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(content).toMatch(/selector: 'pre-foo'/); }); @@ -186,44 +201,67 @@ describe('Component Schematic', () => { const options = { ...defaultOptions, prefix: undefined }; const tree = schematicRunner.runSchematic('component', options, appTree); - const content = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(content).toMatch(/selector: 'foo'/); }); it('should respect the inlineTemplate option', () => { const options = { ...defaultOptions, inlineTemplate: true }; const tree = schematicRunner.runSchematic('component', options, appTree); - const content = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(content).toMatch(/template: /); expect(content).not.toMatch(/templateUrl: /); - expect(tree.files.indexOf('/src/app/foo/foo.component.html')).toEqual(-1); + expect(tree.files.indexOf('/projects/bar/src/app/foo/foo.component.html')).toEqual(-1); }); it('should respect the inlineStyle option', () => { const options = { ...defaultOptions, inlineStyle: true }; const tree = schematicRunner.runSchematic('component', options, appTree); - const content = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(content).toMatch(/styles: \[/); expect(content).not.toMatch(/styleUrls: /); - expect(tree.files.indexOf('/src/app/foo/foo.component.css')).toEqual(-1); + expect(tree.files.indexOf('/projects/bar/src/app/foo/foo.component.css')).toEqual(-1); }); it('should respect the styleext option', () => { const options = { ...defaultOptions, styleext: 'scss' }; const tree = schematicRunner.runSchematic('component', options, appTree); - const content = getFileContent(tree, '/src/app/foo/foo.component.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); expect(content).toMatch(/styleUrls: \['.\/foo.component.scss/); - expect(tree.files.indexOf('/src/app/foo/foo.component.scss')).toBeGreaterThanOrEqual(0); - expect(tree.files.indexOf('/src/app/foo/foo.component.css')).toEqual(-1); + expect(tree.files.indexOf('/projects/bar/src/app/foo/foo.component.scss')) + .toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo/foo.component.css')).toEqual(-1); }); it('should use the module flag even if the module is a routing module', () => { const routingFileName = 'app-routing.module.ts'; - const routingModulePath = `/src/app/${routingFileName}`; + const routingModulePath = `/projects/bar/src/app/${routingFileName}`; const newTree = createAppModule(appTree, routingModulePath); const options = { ...defaultOptions, module: routingFileName }; const tree = schematicRunner.runSchematic('component', options, newTree); - const content = getFileContent(tree, routingModulePath); + const content = tree.readContent(routingModulePath); expect(content).toMatch(/import { FooComponent } from '.\/foo\/foo.component/); }); + + it('should handle a path in the name option', () => { + const options = { ...defaultOptions, name: 'dir/test-component' }; + + const tree = schematicRunner.runSchematic('component', options, appTree); + const content = tree.readContent('/projects/bar/src/app/app.module.ts'); + expect(content).toMatch( + // tslint:disable-next-line:max-line-length + /import { TestComponentComponent } from '\.\/dir\/test-component\/test-component.component'/); + }); + + it('should handle a path in the name and module options', () => { + appTree = schematicRunner.runSchematic('module', { name: 'admin/module' }, appTree); + + const options = { ...defaultOptions, name: 'other/test-component', module: 'admin/module' }; + appTree = schematicRunner.runSchematic('component', options, appTree); + + const content = appTree.readContent('/projects/bar/src/app/admin/module/module.module.ts'); + expect(content).toMatch( + // tslint:disable-next-line:max-line-length + /import { TestComponentComponent } from '..\/..\/other\/test-component\/test-component.component'/); + }); }); diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index f5a74f6795..0507039984 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -17,7 +17,11 @@ }, "name": { "type": "string", - "description": "The name of the component." + "description": "The name of the component.", + "$default": { + "$source": "argv", + "index": 0 + } }, "inlineStyle": { "description": "Specifies if the style will be in the ts file.", @@ -86,7 +90,5 @@ "description": "Specifies if declaring module exports the component." } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index deadd1fe4a..64d6c25eb4 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -24,6 +24,7 @@ import { import * as ts from 'typescript'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; +import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as DirectiveOptions } from './schema'; @@ -101,13 +102,22 @@ export default function (options: DirectiveOptions): Rule { options.selector = options.selector || buildSelector(options); return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; + if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; + options.path = `/${project.root}/src/app`; } + + options.module = findModuleFromOptions(host, options); + const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; - options.module = findModuleFromOptions(host, options); + options.path = parsedPath.path; + const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index aad688554e..bb066e2622 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -5,13 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { createAppModule, getFileContent } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as DirectiveOptions } from './schema'; - +// tslint:disable:max-line-length describe('Directive Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', @@ -19,7 +19,6 @@ describe('Directive Schematic', () => { ); const defaultOptions: DirectiveOptions = { name: 'foo', - path: 'src/app', spec: true, module: undefined, export: false, @@ -27,11 +26,25 @@ describe('Directive Schematic', () => { flat: true, }; - let appTree: Tree; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = new VirtualTree(); - appTree = createAppModule(appTree); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a directive', () => { @@ -39,9 +52,9 @@ describe('Directive Schematic', () => { const tree = schematicRunner.runSchematic('directive', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo.directive.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo.directive.ts')).toBeGreaterThanOrEqual(0); - const moduleContent = getFileContent(tree, '/src/app/app.module.ts'); + expect(files.indexOf('/projects/bar/src/app/foo.directive.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.directive.ts')).toBeGreaterThanOrEqual(0); + const moduleContent = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(moduleContent).toMatch(/import.*Foo.*from '.\/foo.directive'/); expect(moduleContent).toMatch(/declarations:\s*\[[^\]]+?,\r?\n\s+FooDirective\r?\n/m); }); @@ -51,13 +64,13 @@ describe('Directive Schematic', () => { const tree = schematicRunner.runSchematic('directive', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.directive.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.directive.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.directive.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.directive.ts')).toBeGreaterThanOrEqual(0); }); it('should find the closest module', () => { const options = { ...defaultOptions, flat: false }; - const fooModule = '/src/app/foo/foo.module.ts'; + const fooModule = '/projects/bar/src/app/foo/foo.module.ts'; appTree.create(fooModule, ` import { NgModule } from '@angular/core'; @@ -69,7 +82,7 @@ describe('Directive Schematic', () => { `); const tree = schematicRunner.runSchematic('directive', options, appTree); - const fooModuleContent = getFileContent(tree, fooModule); + const fooModuleContent = tree.readContent(fooModule); expect(fooModuleContent).toMatch(/import { FooDirective } from '.\/foo.directive'/); }); @@ -77,7 +90,7 @@ describe('Directive Schematic', () => { const options = { ...defaultOptions, export: true }; const tree = schematicRunner.runSchematic('directive', options, appTree); - const appModuleContent = getFileContent(tree, '/src/app/app.module.ts'); + const appModuleContent = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(appModuleContent).toMatch(/exports: \[FooDirective\]/); }); @@ -85,13 +98,13 @@ describe('Directive Schematic', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('directive', options, appTree); - const appModule = getFileContent(tree, '/src/app/app.module.ts'); + const appModule = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(appModule).toMatch(/import { FooDirective } from '.\/foo.directive'/); }); it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/src/app/app.moduleXXX.ts' }; + const options = { ...defaultOptions, module: '/projects/bar/src/app/app.moduleXXX.ts' }; let thrownError: Error | null = null; try { schematicRunner.runSchematic('directive', options, appTree); @@ -105,7 +118,7 @@ describe('Directive Schematic', () => { const options = { ...defaultOptions, name: 'my-dir' }; const tree = schematicRunner.runSchematic('directive', options, appTree); - const content = getFileContent(tree, '/src/app/my-dir.directive.ts'); + const content = tree.readContent('/projects/bar/src/app/my-dir.directive.ts'); expect(content).toMatch(/selector: '\[appMyDir\]'/); }); }); diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index 62e0ca233f..033ea89d59 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -6,7 +6,12 @@ "properties": { "name": { "type": "string", - "description": "The name of the directive." + "description": "The name of the directive.", + "format": "html-selector", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -57,7 +62,5 @@ "description": "Specifies if declaring module exports the directive." } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/application/files/protractor.conf.js b/packages/schematics/angular/e2e/files/protractor.conf.js similarity index 86% rename from packages/schematics/angular/application/files/protractor.conf.js rename to packages/schematics/angular/e2e/files/protractor.conf.js index 7ee3b5ee86..86776a391a 100644 --- a/packages/schematics/angular/application/files/protractor.conf.js +++ b/packages/schematics/angular/e2e/files/protractor.conf.js @@ -6,7 +6,7 @@ const { SpecReporter } = require('jasmine-spec-reporter'); exports.config = { allScriptsTimeout: 11000, specs: [ - './e2e/**/*.e2e-spec.ts' + './src/**/*.e2e-spec.ts' ], capabilities: { 'browserName': 'chrome' @@ -21,8 +21,8 @@ exports.config = { }, onPrepare() { require('ts-node').register({ - project: 'e2e/tsconfig.e2e.json' + project: require('path').join(__dirname, './tsconfig.e2e.json') }); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } -}; +}; \ No newline at end of file diff --git a/packages/schematics/angular/application/files/e2e/app.e2e-spec.ts b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts similarity index 60% rename from packages/schematics/angular/application/files/e2e/app.e2e-spec.ts rename to packages/schematics/angular/e2e/files/src/app.e2e-spec.ts index b2c691dc76..e42d1f965f 100644 --- a/packages/schematics/angular/application/files/e2e/app.e2e-spec.ts +++ b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts @@ -1,6 +1,6 @@ import { AppPage } from './app.po'; -describe('<%= utils.dasherize(name) %> App', () => { +describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { @@ -9,6 +9,6 @@ describe('<%= utils.dasherize(name) %> App', () => { it('should display welcome message', () => { page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!'); + expect(page.getParagraphText()).toEqual('Welcome to app!'); }); }); diff --git a/packages/schematics/angular/application/files/e2e/app.po.ts b/packages/schematics/angular/e2e/files/src/app.po.ts similarity index 70% rename from packages/schematics/angular/application/files/e2e/app.po.ts rename to packages/schematics/angular/e2e/files/src/app.po.ts index 344e57db79..a3db76a531 100644 --- a/packages/schematics/angular/application/files/e2e/app.po.ts +++ b/packages/schematics/angular/e2e/files/src/app.po.ts @@ -6,6 +6,6 @@ export class AppPage { } getParagraphText() { - return element(by.css('<%= prefix %>-root h1')).getText(); + return element(by.css('<%= rootSelector %> h1')).getText(); } } diff --git a/packages/schematics/angular/application/files/e2e/tsconfig.e2e.json b/packages/schematics/angular/e2e/files/tsconfig.e2e.json similarity index 51% rename from packages/schematics/angular/application/files/e2e/tsconfig.e2e.json rename to packages/schematics/angular/e2e/files/tsconfig.e2e.json index 1d9e5edf09..8b92dbb6a3 100644 --- a/packages/schematics/angular/application/files/e2e/tsconfig.e2e.json +++ b/packages/schematics/angular/e2e/files/tsconfig.e2e.json @@ -1,7 +1,7 @@ { - "extends": "../tsconfig.json", + "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { - "outDir": "../out-tsc/e2e", + "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/app", "baseUrl": "./", "module": "commonjs", "target": "es5", @@ -11,4 +11,4 @@ "node" ] } -} +} \ No newline at end of file diff --git a/packages/schematics/angular/e2e/index.ts b/packages/schematics/angular/e2e/index.ts new file mode 100644 index 0000000000..72b31785ce --- /dev/null +++ b/packages/schematics/angular/e2e/index.ts @@ -0,0 +1,162 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { strings, tags } from '@angular-devkit/core'; +import { experimental } from '@angular-devkit/core'; +import { + Rule, + SchematicContext, + SchematicsException, + Tree, + apply, + chain, + mergeWith, + move, + template, + url, +} from '@angular-devkit/schematics'; +import { getWorkspace, getWorkspacePath } from '../utility/config'; +import { Schema as E2eOptions } from './schema'; + +type WorkspaceSchema = experimental.workspace.WorkspaceSchema; + +// TODO: use JsonAST +// function appendPropertyInAstObject( +// recorder: UpdateRecorder, +// node: JsonAstObject, +// propertyName: string, +// value: JsonValue, +// indent = 4, +// ) { +// const indentStr = '\n' + new Array(indent + 1).join(' '); + +// if (node.properties.length > 0) { +// // Insert comma. +// const last = node.properties[node.properties.length - 1]; +// recorder.insertRight(last.start.offset + last.text.replace(/\s+$/, '').length, ','); +// } + +// recorder.insertLeft( +// node.end.offset - 1, +// ' ' +// + `"${propertyName}": ${JSON.stringify(value, null, 2).replace(/\n/g, indentStr)}` +// + indentStr.slice(0, -2), +// ); +// } + +function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.info(`Updating workspace file`); + // TODO: use JsonAST + // const workspacePath = '/angular.json'; + // const workspaceBuffer = host.read(workspacePath); + // if (workspaceBuffer === null) { + // throw new SchematicsException(`Configuration file (${workspacePath}) not found.`); + // } + // const workspaceJson = parseJson(workspaceBuffer.toString()); + // if (workspaceJson.value === null) { + // throw new SchematicsException(`Unable to parse configuration file (${workspacePath}).`); + // } + const projectRoot = `${workspace.newProjectRoot}/${options.name}`; + // tslint:disable-next-line:no-any + const project: any = { + root: projectRoot, + projectType: 'application', + cli: {}, + schematics: {}, + architect: { + e2e: { + builder: '@angular-devkit/build-webpack:protractor', + options: { + protractorConfig: `projects/${options.name}/protractor.conf.js`, + devServerTarget: `${options.relatedAppName}:serve`, + }, + }, + lint: { + builder: '@angular-devkit/build-webpack:tslint', + options: { + tsConfig: `projects/${options.name}/tsconfig.e2e.json`, + exclude: [ + '**/node_modules/**', + ], + }, + }, + }, + }; + // tslint:disable-next-line:no-any + // const projects: JsonObject = ( workspaceAst.value).projects || {}; + // tslint:disable-next-line:no-any + // if (!( workspaceAst.value).projects) { + // // tslint:disable-next-line:no-any + // ( workspaceAst.value).projects = projects; + // } + + workspace.projects[options.name] = project; + host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); + }; +} +const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/; +const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; + +function getRegExpFailPosition(str: string): number | null { + const parts = str.indexOf('-') >= 0 ? str.split('-') : [str]; + const matched: string[] = []; + + parts.forEach(part => { + if (part.match(projectNameRegexp)) { + matched.push(part); + } + }); + + const compare = matched.join('-'); + + return (str !== compare) ? compare.length : null; +} + +function validateProjectName(projectName: string) { + const errorIndex = getRegExpFailPosition(projectName); + if (errorIndex !== null) { + const firstMessage = tags.oneLine` + Project name "${projectName}" is not valid. New project names must + start with a letter, and must contain only alphanumeric characters or dashes. + When adding a dash the segment after the dash must also start with a letter. + `; + const msg = tags.stripIndent` + ${firstMessage} + ${projectName} + ${Array(errorIndex + 1).join(' ') + '^'} + `; + throw new SchematicsException(msg); + } else if (unsupportedProjectNames.indexOf(projectName) !== -1) { + throw new SchematicsException(`Project name "${projectName}" is not a supported name.`); + } + +} + +export default function (options: E2eOptions): Rule { + return (host: Tree, context: SchematicContext) => { + validateProjectName(options.name); + + const workspace = getWorkspace(host); + const newProjectRoot = workspace.newProjectRoot; + const appDir = `${newProjectRoot}/${options.name}`; + + return chain([ + addAppToWorkspaceFile(options, workspace), + mergeWith( + apply(url('./files'), [ + template({ + utils: strings, + ...options, + 'dot': '.', + appDir, + }), + move(appDir), + ])), + ])(host, context); + }; +} diff --git a/packages/schematics/angular/e2e/index_spec.ts b/packages/schematics/angular/e2e/index_spec.ts new file mode 100644 index 0000000000..500b94e94b --- /dev/null +++ b/packages/schematics/angular/e2e/index_spec.ts @@ -0,0 +1,94 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; +import { Schema as E2eOptions } from './schema'; + +// tslint:disable:max-line-length +describe('Application Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/angular', + path.join(__dirname, '../collection.json'), + ); + + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const defaultOptions: E2eOptions = { + name: 'foo', + relatedAppName: 'app', + }; + + let workspaceTree: UnitTestTree; + beforeEach(() => { + workspaceTree = schematicRunner.runSchematic('workspace', workspaceOptions); + }); + + it('should create all files of an e2e application', () => { + const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); + const files = tree.files; + expect(files.indexOf('/projects/foo/protractor.conf.js')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/tsconfig.e2e.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app.e2e-spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app.po.ts')).toBeGreaterThanOrEqual(0); + }); + + it('should set the rootSelector in the app.po.ts', () => { + const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); + const content = tree.readContent('/projects/foo/src/app.po.ts'); + expect(content).toMatch(/app\-root/); + }); + + it('should set the rootSelector in the app.po.ts from the option', () => { + const options = {...defaultOptions, rootSelector: 't-a-c-o'}; + const tree = schematicRunner.runSchematic('e2e', options, workspaceTree); + const content = tree.readContent('/projects/foo/src/app.po.ts'); + expect(content).toMatch(/t\-a\-c\-o/); + }); + + it('should set the rootSelector in the app.po.ts from the option with emoji', () => { + const options = {...defaultOptions, rootSelector: '🌮-🌯'}; + const tree = schematicRunner.runSchematic('e2e', options, workspaceTree); + const content = tree.readContent('/projects/foo/src/app.po.ts'); + expect(content).toMatch(/🌮-🌯/); + }); + + describe('workspace config', () => { + it('should create the e2e app', () => { + const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo).toBeDefined(); + }); + + it('should set 2 targets for the app', () => { + const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + const architect = workspace.projects.foo.architect; + expect(Object.keys(architect)).toEqual(['e2e', 'lint']); + }); + + it('should set the e2e options', () => { + const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + const e2eOptions = workspace.projects.foo.architect.e2e.options; + expect(e2eOptions.protractorConfig).toEqual('projects/foo/protractor.conf.js'); + expect(e2eOptions.devServerTarget).toEqual('app:serve'); + }); + + it('should set the lint options', () => { + const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + const lintOptions = workspace.projects.foo.architect.lint.options; + expect(lintOptions.tsConfig).toEqual('projects/foo/tsconfig.e2e.json'); + }); + }); +}); diff --git a/packages/schematics/angular/e2e/schema.d.ts b/packages/schematics/angular/e2e/schema.d.ts new file mode 100644 index 0000000000..1390fef186 --- /dev/null +++ b/packages/schematics/angular/e2e/schema.d.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + /** + * The name of the application. + */ + name: string; + /** + * HTML selector for the root component. + */ + rootSelector?: string; + /** + * The name of the app being tested. + */ + relatedAppName: string; +} diff --git a/packages/schematics/angular/e2e/schema.json b/packages/schematics/angular/e2e/schema.json new file mode 100644 index 0000000000..cbede0850d --- /dev/null +++ b/packages/schematics/angular/e2e/schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsAngularE2eApp", + "title": "Angular e2e Application Options Schema", + "type": "object", + "properties": { + "name": { + "description": "The name of the e2e application.", + "type": "string", + "format": "html-selector", + "$default": { + "$source": "argv", + "index": 0 + } + }, + "rootSelector": { + "description": "HTML selector for the root component.", + "type": "string", + "default": "app-root" + }, + "relatedAppName": { + "description": "The name of the app being tested.", + "type": "string" + } + }, + "required": [ + "relatedAppName" + ] +} diff --git a/packages/schematics/angular/enum/index.ts b/packages/schematics/angular/enum/index.ts index 764a70d4dc..f2c57406dd 100644 --- a/packages/schematics/angular/enum/index.ts +++ b/packages/schematics/angular/enum/index.ts @@ -8,6 +8,8 @@ import { strings } from '@angular-devkit/core'; import { Rule, + SchematicContext, + Tree, apply, branchAndMerge, chain, @@ -16,29 +18,39 @@ import { template, url, } from '@angular-devkit/schematics'; +import { getWorkspace } from '../utility/config'; import { parseName } from '../utility/parse-name'; import { Schema as EnumOptions } from './schema'; export default function (options: EnumOptions): Rule { - if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; - } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; + return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; - const templateSource = apply(url('./files'), [ - template({ - ...strings, - ...options, - }), - move(parsedPath.path), - ]); + if (options.path === undefined) { + options.path = `/${project.root}/src`; + } - return chain([ - branchAndMerge(chain([ - mergeWith(templateSource), - ])), - ]); + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + + const templateSource = apply(url('./files'), [ + template({ + ...strings, + ...options, + }), + move(parsedPath.path), + ]); + + return chain([ + branchAndMerge(chain([ + mergeWith(templateSource), + ])), + ])(host, context); + }; } diff --git a/packages/schematics/angular/enum/index_spec.ts b/packages/schematics/angular/enum/index_spec.ts index 9ce614346f..54ccabe669 100644 --- a/packages/schematics/angular/enum/index_spec.ts +++ b/packages/schematics/angular/enum/index_spec.ts @@ -5,8 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as EnumOptions } from './schema'; @@ -17,16 +19,38 @@ describe('Enum Schematic', () => { ); const defaultOptions: EnumOptions = { name: 'foo', - path: 'src/app', }; - it('should create an enumeration', () => { - const options = { ...defaultOptions }; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; + beforeEach(() => { + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); + }); - const tree = schematicRunner.runSchematic('enum', options); + it('should create an enumeration', () => { + const tree = schematicRunner.runSchematic('enum', defaultOptions, appTree); const files = tree.files; - expect(files.length).toEqual(1); - expect(files.indexOf('/src/app/foo.enum.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/foo.enum.ts')).toBeGreaterThanOrEqual(0); + }); + it('should create an enumeration', () => { + const tree = schematicRunner.runSchematic('enum', defaultOptions, appTree); + const content = tree.readContent('/projects/bar/src/foo.enum.ts'); + expect(content).toMatch('export enum Foo {'); }); diff --git a/packages/schematics/angular/enum/schema.json b/packages/schematics/angular/enum/schema.json index f32366faff..a46f149e54 100644 --- a/packages/schematics/angular/enum/schema.json +++ b/packages/schematics/angular/enum/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the enum." + "description": "The name of the enum.", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -20,7 +24,5 @@ "visible": false } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index dbc54c8983..f57859e5de 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -24,6 +24,7 @@ import { import * as ts from 'typescript'; import { addProviderToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; +import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as GuardOptions } from './schema'; @@ -66,16 +67,24 @@ function addDeclarationToNgModule(options: GuardOptions): Rule { export default function (options: GuardOptions): Rule { return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; + if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; + options.path = `/${project.root}/src/app`; } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; + if (options.module) { options.module = findModuleFromOptions(host, options); } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index 38ce6dd980..4bba673ba5 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -5,10 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { createAppModule, getFileContent } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as GuardOptions } from './schema'; @@ -19,39 +19,49 @@ describe('Guard Schematic', () => { ); const defaultOptions: GuardOptions = { name: 'foo', - path: 'src/app', spec: true, module: undefined, flat: true, }; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; - let appTree: Tree; - + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = new VirtualTree(); - appTree = createAppModule(appTree); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a guard', () => { - const options = { ...defaultOptions }; - - const tree = schematicRunner.runSchematic('guard', options, appTree); + const tree = schematicRunner.runSchematic('guard', defaultOptions, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo.guard.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo.guard.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.guard.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.guard.ts')).toBeGreaterThanOrEqual(0); }); it('should import into a specified module', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('guard', options, appTree); - const appModule = getFileContent(tree, '/src/app/app.module.ts'); + const appModule = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(appModule).toMatch(/import { FooGuard } from '.\/foo.guard'/); }); it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/src/app/app.moduleXXX.ts' }; + const options = { ...defaultOptions, module: '/projects/bar/src/app/app.moduleXXX.ts' }; let thrownError: Error | null = null; try { schematicRunner.runSchematic('guard', options, appTree); @@ -66,15 +76,15 @@ describe('Guard Schematic', () => { const tree = schematicRunner.runSchematic('guard', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo.guard.spec.ts')).toEqual(-1); - expect(files.indexOf('/src/app/foo.guard.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.guard.spec.ts')).toEqual(-1); + expect(files.indexOf('/projects/bar/src/app/foo.guard.ts')).toBeGreaterThanOrEqual(0); }); it('should provide with the module flag', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('guard', options, appTree); - const content = getFileContent(tree, '/src/app/app.module.ts'); + const content = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(content).toMatch(/import.*FooGuard.*from '.\/foo.guard';/); expect(content).toMatch(/providers:\s*\[FooGuard\]/m); }); @@ -83,7 +93,7 @@ describe('Guard Schematic', () => { const options = { ...defaultOptions }; const tree = schematicRunner.runSchematic('guard', options, appTree); - const content = getFileContent(tree, '/src/app/app.module.ts'); + const content = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(content).not.toMatch(/import.*FooGuard.*from '.\/foo.guard';/); expect(content).not.toMatch(/providers:\s*\[FooGuard\]/m); }); diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index 7e6076c151..521ec6f629 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the guard." + "description": "The name of the guard.", + "$default": { + "$source": "argv", + "index": 0 + } }, "spec": { "type": "boolean", @@ -35,7 +39,5 @@ "visible": false } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/interface/index.ts b/packages/schematics/angular/interface/index.ts index 7f406e6f6a..1833174e2f 100644 --- a/packages/schematics/angular/interface/index.ts +++ b/packages/schematics/angular/interface/index.ts @@ -8,6 +8,8 @@ import { strings } from '@angular-devkit/core'; import { Rule, + SchematicContext, + Tree, apply, branchAndMerge, chain, @@ -16,32 +18,42 @@ import { template, url, } from '@angular-devkit/schematics'; +import { getWorkspace } from '../utility/config'; import { parseName } from '../utility/parse-name'; import { Schema as InterfaceOptions } from './schema'; export default function (options: InterfaceOptions): Rule { - if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; - } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; + return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; - options.prefix = options.prefix ? options.prefix : ''; - options.type = !!options.type ? `.${options.type}` : ''; + if (options.path === undefined) { + options.path = `/${project.root}/src`; + } - const templateSource = apply(url('./files'), [ - template({ - ...strings, - ...options, - }), - move(parsedPath.path), - ]); + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; - return chain([ - branchAndMerge(chain([ - mergeWith(templateSource), - ])), - ]); + options.prefix = options.prefix ? options.prefix : ''; + options.type = !!options.type ? `.${options.type}` : ''; + + const templateSource = apply(url('./files'), [ + template({ + ...strings, + ...options, + }), + move(parsedPath.path), + ]); + + return chain([ + branchAndMerge(chain([ + mergeWith(templateSource), + ])), + ])(host, context); + }; } diff --git a/packages/schematics/angular/interface/index_spec.ts b/packages/schematics/angular/interface/index_spec.ts index 87ba532daa..486ab6a79e 100644 --- a/packages/schematics/angular/interface/index_spec.ts +++ b/packages/schematics/angular/interface/index_spec.ts @@ -5,9 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { getFileContent } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as InterfaceOptions } from './schema'; @@ -18,28 +19,47 @@ describe('Interface Schematic', () => { ); const defaultOptions: InterfaceOptions = { name: 'foo', - path: 'src/app', prefix: '', type: '', }; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; + beforeEach(() => { + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); + }); + it('should create one file', () => { - const tree = schematicRunner.runSchematic('interface', defaultOptions); - expect(tree.files.length).toEqual(1); - expect(tree.files[0]).toEqual('/src/app/foo.ts'); + const tree = schematicRunner.runSchematic('interface', defaultOptions, appTree); + expect(tree.files.indexOf('/projects/bar/src/foo.ts')).toBeGreaterThanOrEqual(0); }); it('should create an interface named "Foo"', () => { - const tree = schematicRunner.runSchematic('interface', defaultOptions); - const fileContent = getFileContent(tree, '/src/app/foo.ts'); + const tree = schematicRunner.runSchematic('interface', defaultOptions, appTree); + const fileContent = tree.readContent('/projects/bar/src/foo.ts'); expect(fileContent).toMatch(/export interface Foo/); }); it('should put type in the file name', () => { const options = { ...defaultOptions, type: 'model' }; - const tree = schematicRunner.runSchematic('interface', options); - expect(tree.files[0]).toEqual('/src/app/foo.model.ts'); + const tree = schematicRunner.runSchematic('interface', options, appTree); + expect(tree.files.indexOf('/projects/bar/src/foo.model.ts')).toBeGreaterThanOrEqual(0); }); }); diff --git a/packages/schematics/angular/interface/schema.json b/packages/schematics/angular/interface/schema.json index fd1504c8a3..a13f65c1da 100644 --- a/packages/schematics/angular/interface/schema.json +++ b/packages/schematics/angular/interface/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the interface." + "description": "The name of the interface.", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -27,10 +31,11 @@ "type": { "type": "string", "description": "Specifies the type of interface.", - "default": "" + "$default": { + "$source": "argv", + "index": 1 + } } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index eb7754a69f..f415419237 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -24,6 +24,7 @@ import { import * as ts from 'typescript'; import { addImportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; +import { getWorkspace } from '../utility/config'; import { findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as ModuleOptions } from './schema'; @@ -71,17 +72,23 @@ function addDeclarationToNgModule(options: ModuleOptions): Rule { export default function (options: ModuleOptions): Rule { return (host: Tree, context: SchematicContext) => { - if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; + const project = workspace.projects[options.project]; + if (options.path === undefined) { + options.path = `/${project.root}/src/app`; + } if (options.module) { options.module = findModuleFromOptions(host, options); } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), options.routing ? noop() : filter(path => !path.endsWith('-routing.module.ts')), diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts index 6a4ae5744f..adf2dd95aa 100644 --- a/packages/schematics/angular/module/index_spec.ts +++ b/packages/schematics/angular/module/index_spec.ts @@ -5,13 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { createAppModule, getFileContent } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ModuleOptions } from './schema'; - +// tslint:disable:max-line-length describe('Module Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', @@ -19,17 +19,30 @@ describe('Module Schematic', () => { ); const defaultOptions: ModuleOptions = { name: 'foo', - path: 'src/app', spec: true, module: undefined, flat: false, }; - let appTree: Tree; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = new VirtualTree(); - appTree = createAppModule(appTree); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a module', () => { @@ -37,15 +50,15 @@ describe('Module Schematic', () => { const tree = schematicRunner.runSchematic('module', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.module.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.module.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0); }); it('should import into another module', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('module', options, appTree); - const content = getFileContent(tree, '/src/app/app.module.ts'); + const content = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(content).toMatch(/import { FooModule } from '.\/foo\/foo.module'/); expect(content).toMatch(/imports: \[[^\]]*FooModule[^\]]*\]/m); }); @@ -55,17 +68,17 @@ describe('Module Schematic', () => { tree = schematicRunner.runSchematic('module', { ...defaultOptions, - path: 'src/app/sub1', + path: 'projects/bar/src/app/sub1', name: 'test1', }, tree); tree = schematicRunner.runSchematic('module', { ...defaultOptions, - path: 'src/app/sub2', + path: 'projects/bar/src/app/sub2', name: 'test2', module: '../sub1/test1', }, tree); - const content = getFileContent(tree, '/src/app/sub1/test1/test1.module.ts'); + const content = tree.readContent('/projects/bar/src/app/sub1/test1/test1.module.ts'); expect(content).toMatch(/import { Test2Module } from '..\/..\/sub2\/test2\/test2.module'/); }); @@ -74,11 +87,11 @@ describe('Module Schematic', () => { const tree = schematicRunner.runSchematic('module', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo-routing.module.ts')).toBeGreaterThanOrEqual(0); - const moduleContent = getFileContent(tree, '/src/app/foo/foo.module.ts'); + expect(files.indexOf('/projects/bar/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo-routing.module.ts')).toBeGreaterThanOrEqual(0); + const moduleContent = tree.readContent('/projects/bar/src/app/foo/foo.module.ts'); expect(moduleContent).toMatch(/import { FooRoutingModule } from '.\/foo-routing.module'/); - const routingModuleContent = getFileContent(tree, '/src/app/foo/foo-routing.module.ts'); + const routingModuleContent = tree.readContent('/projects/bar/src/app/foo/foo-routing.module.ts'); expect(routingModuleContent).toMatch(/RouterModule.forChild\(routes\)/); }); @@ -87,8 +100,8 @@ describe('Module Schematic', () => { const tree = schematicRunner.runSchematic('module', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.module.spec.ts')).toEqual(-1); + expect(files.indexOf('/projects/bar/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.module.spec.ts')).toEqual(-1); }); it('should dasherize a name', () => { @@ -96,7 +109,9 @@ describe('Module Schematic', () => { const tree = schematicRunner.runSchematic('module', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/two-word/two-word.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/two-word/two-word.module.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/two-word/two-word.module.ts')) + .toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/two-word/two-word.module.spec.ts')) + .toBeGreaterThanOrEqual(0); }); }); diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index 6596cc1853..fae4ef7b51 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the module." + "description": "The name of the module.", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -52,7 +56,5 @@ "alias": "m" } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts new file mode 100644 index 0000000000..1020345e86 --- /dev/null +++ b/packages/schematics/angular/ng-new/index.ts @@ -0,0 +1,77 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { + Rule, + SchematicContext, + SchematicsException, + Tree, + chain, + move, + schematic, +} from '@angular-devkit/schematics'; +import { + NodePackageInstallTask, + NodePackageLinkTask, + RepositoryInitializerTask, +} from '@angular-devkit/schematics/tasks'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; +import { Schema as NgNewOptions } from './schema'; + + +export default function (options: NgNewOptions): Rule { + return (host: Tree, context: SchematicContext) => { + if (!options.name) { + throw new SchematicsException(`Invalid options, "name" is required.`); + } + + if (!options.directory) { + options.directory = options.name; + } + let packageTask; + if (!options.skipInstall) { + packageTask = context.addTask(new NodePackageInstallTask(options.directory)); + if (options.linkCli) { + packageTask = context.addTask( + new NodePackageLinkTask('@angular/cli', options.directory), + [packageTask], + ); + } + } + if (!options.skipGit) { + context.addTask( + new RepositoryInitializerTask( + options.directory, + options.commit, + ), + packageTask ? [packageTask] : [], + ); + } + + const workspaceOptions: WorkspaceOptions = { + name: options.name, + version: options.version, + newProjectRoot: options.newProjectRoot || 'projects', + }; + const applicationOptions: ApplicationOptions = { + name: options.name, + inlineStyle: options.inlineStyle, + inlineTemplate: options.inlineTemplate, + viewEncapsulation: options.viewEncapsulation, + routing: options.routing, + style: options.style, + skipTests: options.skipTests, + }; + + return chain([ + schematic('workspace', workspaceOptions), + schematic('application', applicationOptions), + move(options.directory || options.name), + ])(host, context); + }; +} diff --git a/packages/schematics/angular/ng-new/index_spec.ts b/packages/schematics/angular/ng-new/index_spec.ts new file mode 100644 index 0000000000..99113de273 --- /dev/null +++ b/packages/schematics/angular/ng-new/index_spec.ts @@ -0,0 +1,41 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { Schema as NgNewOptions } from './schema'; + + +describe('Ng New Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/angular', + path.join(__dirname, '../collection.json'), + ); + const defaultOptions: NgNewOptions = { + name: 'foo', + directory: 'bar', + version: '6.0.0', + }; + + it('should create files of a workspace', () => { + const options = { ...defaultOptions }; + + const tree = schematicRunner.runSchematic('ng-new', options); + const files = tree.files; + expect(files.indexOf('/bar/angular.json')).toBeGreaterThanOrEqual(0); + }); + + it('should create files of an application', () => { + const options = { ...defaultOptions }; + + const tree = schematicRunner.runSchematic('ng-new', options); + const files = tree.files; + expect(files.indexOf('/bar/projects/foo/tsconfig.app.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/bar/projects/foo/src/main.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/bar/projects/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); + }); +}); diff --git a/packages/schematics/angular/ng-new/schema.d.ts b/packages/schematics/angular/ng-new/schema.d.ts new file mode 100644 index 0000000000..22385e7cb1 --- /dev/null +++ b/packages/schematics/angular/ng-new/schema.d.ts @@ -0,0 +1,70 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + /** + * The directory name to create the workspace in. + */ + directory?: string; + /** + * The name of the workspace. + */ + name: string; + /** + * Skip installing dependency packages. + */ + skipInstall?: boolean; + /** + * Link CLI to global version (internal development only). + */ + linkCli?: boolean; + /** + * Skip initializing a git repository. + */ + skipGit?: boolean; + /** + * Initial repository commit information. + */ + commit?: { name: string, email: string, message?: string }; + /** + * The path where new projects will be created. + */ + newProjectRoot?: string; + /** + * The version of the Angular CLI to use. + */ + version?: string; + /** + * Specifies if the style will be in the ts file. + */ + inlineStyle?: boolean; + /** + * Specifies if the template will be in the ts file. + */ + inlineTemplate?: boolean; + /** + * Specifies the view encapsulation strategy. + */ + viewEncapsulation?: ('Emulated' | 'Native' | 'None'); + /** + * Generates a routing module. + */ + routing?: boolean; + /** + * The prefix to apply to generated selectors. + */ + prefix?: string; + /** + * The file extension to be used for style files. + */ + style?: string; + /** + * Skip creating spec files. + */ + skipTests?: boolean; +} diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json new file mode 100644 index 0000000000..896e25ee83 --- /dev/null +++ b/packages/schematics/angular/ng-new/schema.json @@ -0,0 +1,118 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsAngularNgNew", + "title": "Angular Ng New Options Schema", + "type": "object", + "properties": { + "directory": { + "type": "string", + "format": "path", + "description": "The directory name to create the workspace in.", + "default": "" + }, + "name": { + "description": "The name of the workspace.", + "type": "string", + "format": "html-selector", + "$default": { + "$source": "argv", + "index": 0 + } + }, + "skipInstall": { + "description": "Skip installing dependency packages.", + "type": "boolean", + "default": false + }, + "linkCli": { + "description": "Link CLI to global version (internal development only).", + "type": "boolean", + "default": false, + "visible": false + }, + "skipGit": { + "description": "Skip initializing a git repository.", + "type": "boolean", + "default": false, + "alias": "g" + }, + "commit": { + "description": "Initial repository commit information.", + "oneOf": [ + { "type": "null" }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "message": { + "type": "string" + } + }, + "required": [ + "name", + "email" + ] + } + ] + }, + "newProjectRoot": { + "description": "The path where new projects will be created.", + "type": "string", + "default": "projects" + }, + "inlineStyle": { + "description": "Specifies if the style will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "s" + }, + "inlineTemplate": { + "description": "Specifies if the template will be in the ts file.", + "type": "boolean", + "default": false, + "alias": "t" + }, + "viewEncapsulation": { + "description": "Specifies the view encapsulation strategy.", + "enum": ["Emulated", "Native", "None"], + "type": "string" + }, + "version": { + "type": "string", + "description": "The version of the Angular CLI to use.", + "visible": false + }, + "routing": { + "type": "boolean", + "description": "Generates a routing module.", + "default": false + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "default": "app", + "alias": "p" + }, + "style": { + "description": "The file extension to be used for style files.", + "type": "string", + "default": "css" + }, + "skipTests": { + "description": "Skip creating spec files.", + "type": "boolean", + "default": false, + "alias": "S" + } + }, + "required": [ + "version" + ] +} diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index 5b47021d6a..9de83edf8d 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -24,6 +24,7 @@ import { import * as ts from 'typescript'; import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; +import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as PipeOptions } from './schema'; @@ -86,12 +87,19 @@ function addDeclarationToNgModule(options: PipeOptions): Rule { export default function (options: PipeOptions): Rule { return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; + if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; + options.path = `/${project.root}/src/app`; } + const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; + options.path = parsedPath.path; options.module = findModuleFromOptions(host, options); diff --git a/packages/schematics/angular/pipe/index_spec.ts b/packages/schematics/angular/pipe/index_spec.ts index af73080ca1..4c895ebad6 100644 --- a/packages/schematics/angular/pipe/index_spec.ts +++ b/packages/schematics/angular/pipe/index_spec.ts @@ -5,10 +5,11 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; +import { Schema as ApplicationOptions } from '../application/schema'; import { createAppModule, getFileContent } from '../utility/test'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as PipeOptions } from './schema'; @@ -19,18 +20,31 @@ describe('Pipe Schematic', () => { ); const defaultOptions: PipeOptions = { name: 'foo', - path: 'src/app', spec: true, module: undefined, export: false, flat: true, }; - let appTree: Tree; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = new VirtualTree(); - appTree = createAppModule(appTree); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a pipe', () => { @@ -38,9 +52,9 @@ describe('Pipe Schematic', () => { const tree = schematicRunner.runSchematic('pipe', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo.pipe.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo.pipe.ts')).toBeGreaterThanOrEqual(0); - const moduleContent = getFileContent(tree, '/src/app/app.module.ts'); + expect(files.indexOf('/projects/bar/src/app/foo.pipe.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.pipe.ts')).toBeGreaterThanOrEqual(0); + const moduleContent = getFileContent(tree, '/projects/bar/src/app/app.module.ts'); expect(moduleContent).toMatch(/import.*Foo.*from '.\/foo.pipe'/); expect(moduleContent).toMatch(/declarations:\s*\[[^\]]+?,\r?\n\s+FooPipe\r?\n/m); }); @@ -49,13 +63,13 @@ describe('Pipe Schematic', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('pipe', options, appTree); - const appModule = getFileContent(tree, '/src/app/app.module.ts'); + const appModule = getFileContent(tree, '/projects/bar/src/app/app.module.ts'); expect(appModule).toMatch(/import { FooPipe } from '.\/foo.pipe'/); }); it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/src/app/app.moduleXXX.ts' }; + const options = { ...defaultOptions, module: '/projects/bar/src/app/app.moduleXXX.ts' }; let thrownError: Error | null = null; try { schematicRunner.runSchematic('pipe', options, appTree); @@ -69,7 +83,7 @@ describe('Pipe Schematic', () => { const options = { ...defaultOptions, export: true }; const tree = schematicRunner.runSchematic('pipe', options, appTree); - const appModuleContent = getFileContent(tree, '/src/app/app.module.ts'); + const appModuleContent = getFileContent(tree, '/projects/bar/src/app/app.module.ts'); expect(appModuleContent).toMatch(/exports: \[FooPipe\]/); }); @@ -78,16 +92,16 @@ describe('Pipe Schematic', () => { const tree = schematicRunner.runSchematic('pipe', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.pipe.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.pipe.ts')).toBeGreaterThanOrEqual(0); - const moduleContent = getFileContent(tree, '/src/app/app.module.ts'); + expect(files.indexOf('/projects/bar/src/app/foo/foo.pipe.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.pipe.ts')).toBeGreaterThanOrEqual(0); + const moduleContent = getFileContent(tree, '/projects/bar/src/app/app.module.ts'); expect(moduleContent).toMatch(/import.*Foo.*from '.\/foo\/foo.pipe'/); expect(moduleContent).toMatch(/declarations:\s*\[[^\]]+?,\r?\n\s+FooPipe\r?\n/m); }); it('should use the module flag even if the module is a routing module', () => { const routingFileName = 'app-routing.module.ts'; - const routingModulePath = `/src/app/${routingFileName}`; + const routingModulePath = `/projects/bar/src/app/${routingFileName}`; const newTree = createAppModule(appTree, routingModulePath); const options = { ...defaultOptions, module: routingFileName }; const tree = schematicRunner.runSchematic('pipe', options, newTree); diff --git a/packages/schematics/angular/pipe/schema.json b/packages/schematics/angular/pipe/schema.json index 77ffdca4bf..e57787103d 100644 --- a/packages/schematics/angular/pipe/schema.json +++ b/packages/schematics/angular/pipe/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the pipe." + "description": "The name of the pipe.", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -46,7 +50,5 @@ "description": "Specifies if declaring module exports the pipe." } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index b695a228b6..e1ddf94505 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -21,6 +21,7 @@ import { } from '@angular-devkit/schematics'; import * as ts from 'typescript'; import { getFirstNgModuleName } from '../utility/ast-utils'; +import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as ServiceOptions } from './schema'; @@ -53,12 +54,15 @@ export default function (options: ServiceOptions): Rule { let providedByModule = ''; let providedInPath = ''; + const workspace = getWorkspace(host); + if (!options.project) { + options.project = Object.keys(workspace.projects)[0]; + } + const project = workspace.projects[options.project]; + if (options.path === undefined) { - // TODO: read this default value from the config file - options.path = 'src/app'; + options.path = `/${project.root}/src/app`; } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; if (options.module) { const modulePath = findModuleFromOptions(host, options); @@ -71,7 +75,7 @@ export default function (options: ServiceOptions): Rule { throw new SchematicsException(`module option did not point to an @NgModule.`); } - const servicePath = `/${options.sourceDir}/${options.path}/` + const servicePath = `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) + '.service'; @@ -79,6 +83,10 @@ export default function (options: ServiceOptions): Rule { providedInPath = stripTsExtension(buildRelativePath(servicePath, modulePath)); } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), template({ diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 18267ffa93..14d1ddcc56 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -5,13 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { createAppModule } from '../utility/test'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ServiceOptions } from './schema'; - +// tslint:disable:max-line-length describe('Service Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', @@ -19,17 +19,30 @@ describe('Service Schematic', () => { ); const defaultOptions: ServiceOptions = { name: 'foo', - path: 'src/app', spec: true, module: undefined, flat: false, }; - let appTree: Tree; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = new VirtualTree(); - appTree = createAppModule(appTree); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a service', () => { @@ -37,15 +50,15 @@ describe('Service Schematic', () => { const tree = schematicRunner.runSchematic('service', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.service.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.service.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.service.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.service.ts')).toBeGreaterThanOrEqual(0); }); it('service should be tree-shakeable', () => { const options = { ...defaultOptions}; const tree = schematicRunner.runSchematic('service', options, appTree); - const content = tree.readContent('/src/app/foo/foo.service.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.service.ts'); expect(content).toMatch(/providedIn: 'root',/); }); @@ -53,13 +66,13 @@ describe('Service Schematic', () => { const options = { ...defaultOptions, module: 'app.module.ts' }; const tree = schematicRunner.runSchematic('service', options, appTree); - const content = tree.readContent('/src/app/foo/foo.service.ts'); + const content = tree.readContent('/projects/bar/src/app/foo/foo.service.ts'); expect(content).toMatch(/import { AppModule } from '..\/app.module'/); expect(content).toMatch(/providedIn: AppModule,/); }); it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/src/app/app.moduleXXX.ts' }; + const options = { ...defaultOptions, module: '/projects/bar/src/app/app.moduleXXX.ts' }; let thrownError: Error | null = null; try { schematicRunner.runSchematic('service', options, appTree); @@ -74,7 +87,7 @@ describe('Service Schematic', () => { const tree = schematicRunner.runSchematic('service', options, appTree); const files = tree.files; - expect(files.indexOf('/src/app/foo/foo.service.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/src/app/foo/foo.service.spec.ts')).toEqual(-1); + expect(files.indexOf('/projects/bar/src/app/foo/foo.service.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo/foo.service.spec.ts')).toEqual(-1); }); }); diff --git a/packages/schematics/angular/service/schema.json b/packages/schematics/angular/service/schema.json index b76ce29c5b..67ab7e6b32 100644 --- a/packages/schematics/angular/service/schema.json +++ b/packages/schematics/angular/service/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the service." + "description": "The name of the service.", + "$default": { + "$source": "argv", + "index": 0 + } }, "path": { "type": "string", @@ -36,7 +40,5 @@ "alias": "m" } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index e5e0135c96..c0a1c5b808 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -8,11 +8,11 @@ import { Tree } from '@angular-devkit/schematics'; import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as NgNewOptions } from '../ng-new/schema'; import { Schema as UniversalOptions } from './schema'; - -describe('Universal Schematic', () => { +// TODO: fix these tests once workspace is implemented +xdescribe('Universal Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', path.join(__dirname, '../collection.json'), @@ -24,10 +24,9 @@ describe('Universal Schematic', () => { let appTree: Tree; beforeEach(() => { - const appOptions: ApplicationOptions = { + const ngNewOptions: NgNewOptions = { directory: '', name: 'universal-app', - sourceDir: 'src', inlineStyle: false, inlineTemplate: false, viewEncapsulation: 'None', @@ -35,9 +34,8 @@ describe('Universal Schematic', () => { routing: false, style: 'css', skipTests: false, - minimal: false, }; - appTree = schematicRunner.runSchematic('application', appOptions); + appTree = schematicRunner.runSchematic('ng-new', ngNewOptions); }); it('should create a root module file', () => { diff --git a/packages/schematics/angular/utility/config.ts b/packages/schematics/angular/utility/config.ts index f80490dcd7..3add859083 100644 --- a/packages/schematics/angular/utility/config.ts +++ b/packages/schematics/angular/utility/config.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { experimental } from '@angular-devkit/core'; import { SchematicsException, Tree } from '@angular-devkit/schematics'; @@ -439,6 +440,27 @@ export interface CliConfig { }; } +export type WorkspaceSchema = experimental.workspace.WorkspaceSchema; + + +export function getWorkspacePath(host: Tree): string { + const possibleFiles = [ '/angular.json', '/.angular.json' ]; + const path = possibleFiles.filter(path => host.exists(path))[0]; + + return path; +} + +export function getWorkspace(host: Tree): WorkspaceSchema { + const path = getWorkspacePath(host); + const configBuffer = host.read(path); + if (configBuffer === null) { + throw new SchematicsException(`Could not find (${path})`); + } + const config = configBuffer.toString(); + + return JSON.parse(config); +} + export const configPath = '/.angular-cli.json'; export function getConfig(host: Tree): CliConfig { diff --git a/packages/schematics/angular/utility/find-module.ts b/packages/schematics/angular/utility/find-module.ts index 80db1e4ae1..cf55bbd2a8 100644 --- a/packages/schematics/angular/utility/find-module.ts +++ b/packages/schematics/angular/utility/find-module.ts @@ -13,10 +13,8 @@ export interface ModuleOptions { module?: string; name: string; flat?: boolean; - sourceDir?: string; path?: string; skipImport?: boolean; - appRoot?: string; } @@ -35,7 +33,7 @@ export function findModuleFromOptions(host: Tree, options: ModuleOptions): Path return normalize(findModule(host, pathToCheck)); } else { const modulePath = normalize( - '/' + (options.appRoot || options.path) + '/' + options.module); + '/' + (options.path) + '/' + options.module); const moduleBaseName = normalize(modulePath).split('/').pop(); if (host.exists(modulePath)) { @@ -74,8 +72,8 @@ export function findModule(host: Tree, generateDir: string): Path { dir = dir.parent; } - throw new Error('Could not find an NgModule for the new component. Use the skip-import ' - + 'option to skip importing components in NgModule.'); + throw new Error('Could not find an NgModule. Use the skip-import ' + + 'option to skip importing in NgModule.'); } /** diff --git a/packages/schematics/angular/utility/find-module_spec.ts b/packages/schematics/angular/utility/find-module_spec.ts index 554d736258..8b92f4ebc5 100644 --- a/packages/schematics/angular/utility/find-module_spec.ts +++ b/packages/schematics/angular/utility/find-module_spec.ts @@ -5,8 +5,9 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { Path } from '@angular-devkit/core'; import { EmptyTree, Tree } from '@angular-devkit/schematics'; -import { findModule } from './find-module'; +import { ModuleOptions, findModule, findModuleFromOptions } from './find-module'; describe('find-module', () => { @@ -62,4 +63,30 @@ describe('find-module', () => { } }); }); + + describe('findModuleFromOptions', () => { + let tree: Tree; + let options: ModuleOptions; + beforeEach(() => { + tree = new EmptyTree(); + options = { name: 'foo' }; + }); + + it('should find a module', () => { + tree.create('/projects/my-proj/src/app.module.ts', ''); + options.module = 'app.module.ts'; + options.path = '/projects/my-proj/src'; + const modPath = findModuleFromOptions(tree, options); + expect(modPath).toEqual('/projects/my-proj/src/app.module.ts' as Path); + }); + + it('should find a module in a sub dir', () => { + tree.create('/projects/my-proj/src/admin/foo.module.ts', ''); + options.name = 'other/test'; + options.module = 'admin/foo'; + options.path = '/projects/my-proj/src'; + const modPath = findModuleFromOptions(tree, options); + expect(modPath).toEqual('/projects/my-proj/src/admin/foo.module.ts' as Path); + }); + }); }); diff --git a/packages/schematics/angular/utility/parse-name.ts b/packages/schematics/angular/utility/parse-name.ts index 07f3c5453a..e30c13d568 100644 --- a/packages/schematics/angular/utility/parse-name.ts +++ b/packages/schematics/angular/utility/parse-name.ts @@ -7,21 +7,19 @@ * found in the LICENSE file at https://angular.io/license */ // import { relative, Path } from "../../../angular_devkit/core/src/virtual-fs"; -import { Path, basename, normalize, split } from '@angular-devkit/core'; +import { Path, basename, dirname, normalize } from '@angular-devkit/core'; export interface Location { name: string; path: Path; } -export function parseName(path: string | Path, name: string): Location { - const splitName = split(name as Path); +export function parseName(path: string, name: string): Location { const nameWithoutPath = basename(name as Path); - const namePath = splitName.join('/'); - const fullPath = normalize('/' + path + '/' + namePath); + const namePath = dirname((path + '/' + name) as Path); return { name: nameWithoutPath, - path: fullPath, + path: normalize('/' + namePath), }; } diff --git a/packages/schematics/angular/utility/test/create-app-module.ts b/packages/schematics/angular/utility/test/create-app-module.ts index e7f764c9dd..5847d5cb10 100644 --- a/packages/schematics/angular/utility/test/create-app-module.ts +++ b/packages/schematics/angular/utility/test/create-app-module.ts @@ -5,10 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree } from '@angular-devkit/schematics'; +import { UnitTestTree } from '@angular-devkit/schematics/testing'; -export function createAppModule(tree: Tree, path?: string): Tree { +export function createAppModule(tree: UnitTestTree, path?: string): UnitTestTree { tree.create(path || '/src/app/app.module.ts', ` import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; diff --git a/packages/schematics/angular/utility/validation.ts b/packages/schematics/angular/utility/validation.ts new file mode 100644 index 0000000000..dc80585efa --- /dev/null +++ b/packages/schematics/angular/utility/validation.ts @@ -0,0 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { tags } from '@angular-devkit/core'; +import { SchematicsException } from '@angular-devkit/schematics'; + +export function validateName(name: string): void { + if (name && /^\d/.test(name)) { + throw new SchematicsException(tags.oneLine`name (${name}) + can not start with a digit.`); + } +} diff --git a/packages/schematics/angular/application/files/README.md b/packages/schematics/angular/workspace/files/README.md similarity index 92% rename from packages/schematics/angular/application/files/README.md rename to packages/schematics/angular/workspace/files/README.md index ef84684d97..42a51babbb 100755 --- a/packages/schematics/angular/application/files/README.md +++ b/packages/schematics/angular/workspace/files/README.md @@ -12,7 +12,7 @@ Run `ng generate component component-name` to generate a new component. You can ## Build -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. ## Running unit tests diff --git a/packages/schematics/angular/application/files/__dot__editorconfig b/packages/schematics/angular/workspace/files/__dot__editorconfig similarity index 100% rename from packages/schematics/angular/application/files/__dot__editorconfig rename to packages/schematics/angular/workspace/files/__dot__editorconfig diff --git a/packages/schematics/angular/application/files/__dot__gitignore b/packages/schematics/angular/workspace/files/__dot__gitignore similarity index 92% rename from packages/schematics/angular/application/files/__dot__gitignore rename to packages/schematics/angular/workspace/files/__dot__gitignore index eabf65e51a..ee5c9d8336 100755 --- a/packages/schematics/angular/application/files/__dot__gitignore +++ b/packages/schematics/angular/workspace/files/__dot__gitignore @@ -2,7 +2,6 @@ # compiled output /dist -/dist-server /tmp /out-tsc @@ -35,10 +34,6 @@ yarn-error.log testem.log /typings -# e2e -/e2e/*.js -/e2e/*.map - # System Files .DS_Store Thumbs.db diff --git a/packages/schematics/angular/workspace/files/angular.json b/packages/schematics/angular/workspace/files/angular.json new file mode 100644 index 0000000000..80c1bb5def --- /dev/null +++ b/packages/schematics/angular/workspace/files/angular.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "newProjectRoot": "<%= newProjectRoot %>", + "cli": {}, + "schematics": { + "@schematics/angular": {} + }, + "architect": {}, + "projects": {} +} \ No newline at end of file diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/workspace/files/package.json similarity index 58% rename from packages/schematics/angular/application/files/package.json rename to packages/schematics/angular/workspace/files/package.json index 9e808bb67e..a6b0f9c130 100644 --- a/packages/schematics/angular/application/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -12,24 +12,23 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.2.0", - "@angular/common": "^5.2.0", - "@angular/compiler": "^5.2.0", - "@angular/core": "^5.2.0", - "@angular/forms": "^5.2.0", - "@angular/http": "^5.2.0", - "@angular/platform-browser": "^5.2.0", - "@angular/platform-browser-dynamic": "^5.2.0", - "@angular/router": "^5.2.0",<% if (serviceWorker) { %> - "@angular/service-worker": "^5.2.0",<% } %> + "@angular/animations": ">= 6.0.0-beta <6.1.0", + "@angular/common": ">= 6.0.0-beta <6.1.0", + "@angular/compiler": ">= 6.0.0-beta <6.1.0", + "@angular/core": ">= 6.0.0-beta <6.1.0", + "@angular/forms": ">= 6.0.0-beta <6.1.0", + "@angular/http": ">= 6.0.0-beta <6.1.0", + "@angular/platform-browser": ">= 6.0.0-beta <6.1.0", + "@angular/platform-browser-dynamic": ">= 6.0.0-beta <6.1.0", + "@angular/router": ">= 6.0.0-beta <6.1.0", "core-js": "^2.4.1", "rxjs": "^5.5.6", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~<%= version %>", - "@angular/compiler-cli": "^5.2.0", - "@angular/language-service": "^5.2.0",<% if (!minimal) { %> + "@angular/compiler-cli": ">= 6.0.0-beta <6.1.0", + "@angular/language-service": ">= 6.0.0-beta <6.1.0", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", @@ -43,7 +42,7 @@ "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.3.0", "ts-node": "~5.0.0", - "tslint": "~5.9.1",<% } %> - "typescript": "~2.5.3" + "tslint": "~5.9.1", + "typescript": "~2.7.2" } } diff --git a/packages/schematics/angular/application/files/tsconfig.json b/packages/schematics/angular/workspace/files/tsconfig.json similarity index 100% rename from packages/schematics/angular/application/files/tsconfig.json rename to packages/schematics/angular/workspace/files/tsconfig.json diff --git a/packages/schematics/angular/application/files/tslint.json b/packages/schematics/angular/workspace/files/tslint.json similarity index 92% rename from packages/schematics/angular/application/files/tslint.json rename to packages/schematics/angular/workspace/files/tslint.json index f28caa94d6..00e5fbecca 100644 --- a/packages/schematics/angular/application/files/tslint.json +++ b/packages/schematics/angular/workspace/files/tslint.json @@ -117,18 +117,6 @@ "check-separator", "check-type" ], - "directive-selector": [ - true, - "attribute", - "<%= prefix %>", - "camelCase" - ], - "component-selector": [ - true, - "element", - "<%= prefix %>", - "kebab-case" - ], "no-output-on-prefix": true, "use-input-property-decorator": true, "use-output-property-decorator": true, diff --git a/packages/schematics/angular/workspace/index.ts b/packages/schematics/angular/workspace/index.ts new file mode 100644 index 0000000000..ec38cd13b3 --- /dev/null +++ b/packages/schematics/angular/workspace/index.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { strings } from '@angular-devkit/core'; +import { + Rule, + SchematicContext, + Tree, + apply, + mergeWith, + template, + url, +} from '@angular-devkit/schematics'; +import { Schema as WorkspaceOptions } from './schema'; + +export default function (options: WorkspaceOptions): Rule { + return (host: Tree, context: SchematicContext) => { + + return mergeWith(apply(url('./files'), [ + template({ + utils: strings, + ...options, + 'dot': '.', + }), + ]))(host, context); + }; +} diff --git a/packages/schematics/angular/workspace/index_spec.ts b/packages/schematics/angular/workspace/index_spec.ts new file mode 100644 index 0000000000..6b57fc30f8 --- /dev/null +++ b/packages/schematics/angular/workspace/index_spec.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { Schema as WorkspaceOptions } from './schema'; + + +describe('Workspace Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/angular', + path.join(__dirname, '../collection.json'), + ); + const defaultOptions: WorkspaceOptions = { + name: 'foo', + version: '6.0.0', + }; + + it('should create all files of a workspace', () => { + const options = { ...defaultOptions }; + + const tree = schematicRunner.runSchematic('workspace', options); + const files = tree.files; + expect(files.indexOf('/.editorconfig')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/angular.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/.gitignore')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/package.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/README.md')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/tsconfig.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/tslint.json')).toBeGreaterThanOrEqual(0); + }); + + it('should set the name in package.json', () => { + const tree = schematicRunner.runSchematic('workspace', defaultOptions); + const pkg = JSON.parse(tree.readContent('/package.json')); + expect(pkg.name).toEqual('foo'); + }); + + it('should set the CLI version in package.json', () => { + const tree = schematicRunner.runSchematic('workspace', defaultOptions); + const pkg = JSON.parse(tree.readContent('/package.json')); + expect(pkg.devDependencies['@angular/cli']).toMatch('6.0.0'); + }); +}); diff --git a/packages/schematics/angular/workspace/schema.d.ts b/packages/schematics/angular/workspace/schema.d.ts new file mode 100644 index 0000000000..0db451ca11 --- /dev/null +++ b/packages/schematics/angular/workspace/schema.d.ts @@ -0,0 +1,38 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + /** + * The name of the workspace. + */ + name: string; + /** + * The path where new projects will be created. + */ + newProjectRoot?: string; + /** + * Skip installing dependency packages. + */ + skipInstall?: boolean; + /** + * Link CLI to global version (internal development only). + */ + linkCli?: boolean; + /** + * Skip initializing a git repository. + */ + skipGit?: boolean; + /** + * Initial repository commit information. + */ + commit?: { name: string, email: string, message?: string }; + /** + * The version of the Angular CLI to use. + */ + version?: string; +} diff --git a/packages/schematics/angular/workspace/schema.json b/packages/schematics/angular/workspace/schema.json new file mode 100644 index 0000000000..81e2a50423 --- /dev/null +++ b/packages/schematics/angular/workspace/schema.json @@ -0,0 +1,74 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsAngularWorkspace", + "title": "Angular Workspace Options Schema", + "type": "object", + "properties": { + "name": { + "description": "The name of the workspace.", + "type": "string", + "format": "html-selector", + "$default": { + "$source": "argv", + "index": 0 + } + }, + "newProjectRoot": { + "description": "The path where new projects will be created.", + "type": "string", + "visible": "false" + }, + "skipInstall": { + "description": "Skip installing dependency packages.", + "type": "boolean", + "default": false + }, + "linkCli": { + "description": "Link CLI to global version (internal development only).", + "type": "boolean", + "default": false, + "visible": false + }, + "skipGit": { + "description": "Skip initializing a git repository.", + "type": "boolean", + "default": false, + "alias": "g" + }, + "commit": { + "description": "Initial repository commit information.", + "default": null, + "oneOf": [ + { "type": "null" }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "message": { + "type": "string" + } + }, + "required": [ + "name", + "email" + ] + } + ] + }, + "version": { + "type": "string", + "description": "The version of the Angular CLI to use.", + "visible": false + } + }, + "required": [ + "name", + "version" + ] +} From c744db72fd302fe7503a3f2f9e6f8ce90b0de265 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 21 Mar 2018 15:34:48 -0400 Subject: [PATCH 249/724] fix(@angular-devkit/build-optimizer): prefix classes with tslib namespace imports --- .../src/transforms/prefix-classes.ts | 17 ++++++++----- .../src/transforms/prefix-classes_spec.ts | 24 +++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts index a5402a696b..678cab7a32 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts @@ -27,7 +27,7 @@ export function testPrefixClasses(content: string) { exportVarSetter, multiLineComment, /\(/, multiLineComment, /\s*function \(_super\) {/, newLine, - /\w*__extends\(\w+, _super\);/, + /\w*\.?__extends\(\w+, _super\);/, ], ].map(arr => new RegExp(arr.map(x => x.source).join(''), 'm')); @@ -179,19 +179,24 @@ function isDownleveledClass(node: ts.Node): boolean { return false; } - if (functionStatements.length < 3) { + if (functionStatements.length < 3 || !ts.isExpressionStatement(firstStatement)) { return false; } - if (!ts.isExpressionStatement(firstStatement) - || !ts.isCallExpression(firstStatement.expression)) { + if (!ts.isCallExpression(firstStatement.expression)) { return false; } const extendCallExpression = firstStatement.expression; - if (!ts.isIdentifier(extendCallExpression.expression) - || !extendCallExpression.expression.text.endsWith(extendsHelperName)) { + let functionName; + if (ts.isIdentifier(extendCallExpression.expression)) { + functionName = extendCallExpression.expression.text; + } else if (ts.isPropertyAccessExpression(extendCallExpression.expression)) { + functionName = extendCallExpression.expression.name.text; + } + + if (!functionName || !functionName.endsWith(extendsHelperName)) { return false; } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts index a5766eb02b..6ded564497 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes_spec.ts @@ -218,6 +218,30 @@ describe('prefix-classes', () => { expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); + it('works with tslib namespace import', () => { + const input = tags.stripIndent` + var BufferSubscriber = /** @class */ (function (_super) { + tslib_1.__extends(BufferSubscriber, _super); + function BufferSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + return BufferSubscriber; + }(OuterSubscriber)); + `; + const output = tags.stripIndent` + var BufferSubscriber = /*@__PURE__*/ (function (_super) { + tslib_1.__extends(BufferSubscriber, _super); + function BufferSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + return BufferSubscriber; + }(OuterSubscriber)); + `; + + expect(testPrefixClasses(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + it('fixes the RxJS use case (issue #214)', () => { const input = ` var ExtendedClass = /*@__PURE__*/ (/*@__PURE__*/ function (_super) { From 8d71dc1c3ed73041b4a5b8eed93d7759839142be Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 20 Mar 2018 16:38:03 -0700 Subject: [PATCH 250/724] feat(@angular-devkit/build-webpack): add a universal builder --- package-lock.json | 28 +++ package.json | 2 + .../build_webpack/builders.json | 5 + .../build_webpack/src/browser/index.ts | 2 - .../build_webpack/src/browser/schema.json | 18 -- .../build_webpack/src/server/index.ts | 178 ++++++++++++++++++ .../build_webpack/src/server/schema.d.ts | 145 ++++++++++++++ .../build_webpack/src/server/schema.json | 159 ++++++++++++++++ .../test/server/base_spec_large.ts | 33 ++++ .../hello-world-app/.angular.json | 8 + .../src/app/app.server.module.ts | 14 ++ .../hello-world-app/src/main.server.ts | 9 + .../hello-world-app/src/tsconfig.server.json | 16 ++ 13 files changed, 597 insertions(+), 20 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/src/server/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/server/schema.d.ts create mode 100644 packages/angular_devkit/build_webpack/src/server/schema.json create mode 100644 packages/angular_devkit/build_webpack/test/server/base_spec_large.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.server.module.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/main.server.ts create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.server.json diff --git a/package-lock.json b/package-lock.json index be32cd392b..3439f203a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,14 @@ "webpack-sources": "1.1.0" } }, + "@angular/animations": { + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.9.tgz", + "integrity": "sha512-H/3fMs4PhYjKoA81II6D0PHifDrqlKet2u/EXzUBq3ehXby+N/0GBzqsBYwPeU5pTye7WPFfW+5sgoJpN8Ye6Q==", + "requires": { + "tslib": "1.8.1" + } + }, "@angular/common": { "version": "5.2.7", "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.7.tgz", @@ -82,6 +90,16 @@ "tslib": "1.8.1" } }, + "@angular/platform-server": { + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-5.2.9.tgz", + "integrity": "sha512-BXal5+cltR0Qo8xuum5SHkDYaChBrf1ygJUU58nGVn7SptweI9z3B6woRAJxfij8aobf5uDEL9jaAygxUfQECg==", + "requires": { + "domino": "1.0.30", + "tslib": "1.8.1", + "xhr2": "0.1.4" + } + }, "@angular/router": { "version": "5.2.6", "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.6.tgz", @@ -2747,6 +2765,11 @@ "domelementtype": "1.3.0" } }, + "domino": { + "version": "1.0.30", + "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz", + "integrity": "sha512-ikq8WiDSkICdkElud317F2Sigc6A3EDpWsxWBwIZqOl95km4p/Vc9Rj98id7qKgsjDmExj0AVM7JOd4bb647Xg==" + }, "domutils": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", @@ -13051,6 +13074,11 @@ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" }, + "xhr2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" + }, "xml-char-classes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", diff --git a/package.json b/package.json index e9944cb364..fb03bdfa41 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "homepage": "https://github.com/angular/devkit", "dependencies": { "@angular-devkit/build-optimizer": "^0.4.2", + "@angular/animations": "^5.2.7", "@angular/common": "^5.2.7", "@angular/compiler": "^5.2.7", "@angular/compiler-cli": "^5.2.7", @@ -61,6 +62,7 @@ "@angular/material": "^5.2.3", "@angular/platform-browser": "^5.2.7", "@angular/platform-browser-dynamic": "^5.2.7", + "@angular/platform-server": "^5.2.7", "@angular/router": "^5.2.6", "@angular/service-worker": "^5.2.7", "@ngtools/json-schema": "^1.0.9", diff --git a/packages/angular_devkit/build_webpack/builders.json b/packages/angular_devkit/build_webpack/builders.json index eb6ec4ad9e..4e4b396f6e 100644 --- a/packages/angular_devkit/build_webpack/builders.json +++ b/packages/angular_devkit/build_webpack/builders.json @@ -30,6 +30,11 @@ "class": "./src/tslint", "schema": "./src/tslint/schema.json", "description": "Run tslint over a TS project." + }, + "server": { + "class": "./src/server", + "schema": "./src/server/schema.json", + "description": "Build a server Angular application." } } } diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 223da881ca..2d5100c536 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -51,7 +51,6 @@ export interface BrowserBuilderOptions { verbose: boolean; progress: boolean; extractCss: boolean; - bundleDependencies: 'none' | 'all'; watch: boolean; outputHashing: 'none' | 'all' | 'media' | 'bundles'; deleteOutputPath: boolean; @@ -90,7 +89,6 @@ export interface BrowserBuilderOptions { scripts: ExtraEntryPoint[]; styles: ExtraEntryPoint[]; stylePreprocessorOptions: { includePaths: string[] }; - platform: 'browser' | 'server'; // Some options are not needed anymore. // app?: string; // apps aren't used with build facade diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index d4dde8fd2d..596b5d106b 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -10,15 +10,6 @@ "$ref": "#/definitions/assetPattern" } }, - "platform": { - "type": "string", - "description": "The runtime platform of the app.", - "default": "browser", - "enum": [ - "browser", - "server" - ] - }, "main": { "type": "string", "description": "The name of the main entry-point file." @@ -195,15 +186,6 @@ "description": "Enables the use of subresource integrity validation.", "default": false }, - "bundleDependencies": { - "type": "string", - "description": "Available on server platform only. Which external dependencies to bundle into the module. By default, all of node_modules will be kept as requires.", - "default": "none", - "enum": [ - "none", - "all" - ] - }, "serviceWorker": { "type": "boolean", "description": "Generates a service worker config for production builds.", diff --git a/packages/angular_devkit/build_webpack/src/server/index.ts b/packages/angular_devkit/build_webpack/src/server/index.ts new file mode 100644 index 0000000000..c54ec7f446 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/server/index.ts @@ -0,0 +1,178 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; +import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import { Stats } from 'fs'; +import { Observable } from 'rxjs/Observable'; +import { of } from 'rxjs/observable/of'; +import { concat, concatMap } from 'rxjs/operators'; +import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies +import * as webpack from 'webpack'; +import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; +import { + getAotConfig, + getCommonConfig, + getNonAotConfig, + getServerConfig, + getStylesConfig, +} from '../angular-cli-files/models/webpack-configs'; +import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; +import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { + statsErrorsToString, + statsToString, + statsWarningsToString, +} from '../angular-cli-files/utilities/stats'; +import { BuildWebpackServerSchema } from './schema'; +const webpackMerge = require('webpack-merge'); + + +export class ServerBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(builderConfig: BuilderConfiguration): Observable { + const options = builderConfig.options; + const root = this.context.workspace.root; + const projectRoot = resolve(root, builderConfig.root); + + // TODO: verify using of(null) to kickstart things is a pattern. + return of(null).pipe( + concatMap(() => options.deleteOutputPath + ? this._deleteOutputDir(root, normalize(options.outputPath)) + : of(null)), + concatMap(() => new Observable(obs => { + // Ensure Build Optimizer is only used with AOT. + let webpackConfig; + try { + webpackConfig = this.buildWebpackConfig(root, projectRoot, options); + } catch (e) { + // TODO: why do I have to catch this error? I thought throwing inside an observable + // always got converted into an error. + obs.error(e); + + return; + } + const webpackCompiler = webpack(webpackConfig); + const statsConfig = getWebpackStatsConfig(options.verbose); + + const callback: webpack.compiler.CompilerCallback = (err, stats) => { + if (err) { + return obs.error(err); + } + + const json = stats.toJson(statsConfig); + if (options.verbose) { + this.context.logger.info(stats.toString(statsConfig)); + } else { + this.context.logger.info(statsToString(json, statsConfig)); + } + + if (stats.hasWarnings()) { + this.context.logger.warn(statsWarningsToString(json, statsConfig)); + } + if (stats.hasErrors()) { + this.context.logger.error(statsErrorsToString(json, statsConfig)); + } + + obs.next({ success: !stats.hasErrors() }); + obs.complete(); + }; + + try { + webpackCompiler.run(callback); + } catch (err) { + if (err) { + this.context.logger.error( + '\nAn error occured during the build:\n' + ((err && err.stack) || err)); + } + throw err; + } + })), + ); + } + + buildWebpackConfig(root: Path, projectRoot: Path, options: BuildWebpackServerSchema) { + let wco: WebpackConfigOptions; + + // TODO: make target defaults into configurations instead + // options = this.addTargetDefaults(options); + + const tsconfigPath = normalize(resolve(root, normalize(options.tsConfig as string))); + const tsConfig = readTsconfig(getSystemPath(tsconfigPath)); + + const projectTs = requireProjectModule(getSystemPath(projectRoot), 'typescript') as typeof ts; + + const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 + && tsConfig.options.target !== projectTs.ScriptTarget.ES5; + + + // TODO: inside the configs, always use the project root and not the workspace root. + // Until then we have to pretend the app root is relative (``) but the same as `projectRoot`. + (options as any).root = ''; // tslint:disable-line:no-any + + const buildOptions: typeof wco['buildOptions'] = { + ...options as {} as typeof wco['buildOptions'], + aot: true, + }; + + wco = { + root: getSystemPath(root), + projectRoot: getSystemPath(projectRoot), + // TODO: use only this.options, it contains all flags and configs items already. + buildOptions, + appConfig: { + ...options, + platform: 'server', + scripts: [], + styles: [], + }, + tsConfig, + supportES2015, + }; + + const webpackConfigs: {}[] = [ + getCommonConfig(wco), + getServerConfig(wco), + getStylesConfig(wco), + ]; + + if (wco.appConfig.main || wco.appConfig.polyfills) { + const typescriptConfigPartial = wco.buildOptions.aot + ? getAotConfig(wco, this.context.host as virtualFs.Host) + : getNonAotConfig(wco, this.context.host as virtualFs.Host); + webpackConfigs.push(typescriptConfigPartial); + } + + return webpackMerge(webpackConfigs); + } + + private _deleteOutputDir(root: Path, outputPath: Path) { + const resolvedOutputPath = resolve(root, outputPath); + if (resolvedOutputPath === root) { + throw new Error('Output path MUST not be project root directory!'); + } + + return this.context.host.exists(resolvedOutputPath).pipe( + concatMap(exists => exists + // TODO: remove this concat once host ops emit an event. + ? this.context.host.delete(resolvedOutputPath).pipe(concat(of(null))) + // ? of(null) + : of(null)), + ); + } +} + +export default ServerBuilder; diff --git a/packages/angular_devkit/build_webpack/src/server/schema.d.ts b/packages/angular_devkit/build_webpack/src/server/schema.d.ts new file mode 100644 index 0000000000..d4daa6557d --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/server/schema.d.ts @@ -0,0 +1,145 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export interface BuildWebpackServerSchema { + /** + * The name of the TypeScript configuration file. + */ + tsConfig: string; + /** + * Output sourcemaps. + */ + sourceMap?: boolean; + /** + * Adds more details to output logging. + */ + verbose?: boolean; + /** + * Use a separate bundle containing code used across multiple bundles. + */ + commonChunk?: boolean; + /** + * Show circular dependency warnings on builds. + */ + showCircularDependencies?: boolean; + /** + * Use a separate bundle containing only vendor libraries. + */ + vendorChunk?: boolean; + /** + * Output in-file eval sourcemaps. + */ + evalSourceMap?: boolean; + /** + * Path where output will be placed. + */ + outputPath: string; + /** + * Generates a 'stats.json' file which can be analyzed using tools such as: + * #webpack-bundle-analyzer' or https: //webpack.github.io/analyse. + */ + statsJson?: boolean; + /** + * How to handle missing translations for i18n. + */ + i18nMissingTranslation?: string; + /** + * Available on server platform only. Which external dependencies to bundle into the module. + * By default, all of node_modules will be kept as requires. + */ + bundleDependencies?: BundleDependencies; + /** + * Defines the optimization level of the build. + */ + optimization?: boolean; + /** + * Log progress to the console while building. + */ + progress?: boolean; + /** + * delete-output-path + */ + deleteOutputPath?: boolean; + /** + * List of additional NgModule files that will be lazy loaded. Lazy router modules with be + * discovered automatically. + */ + lazyModules?: string[]; + /** + * Defines the build environment. + */ + environment?: string; + /** + * Define the output filename cache-busting hashing mode. + */ + outputHashing?: OutputHashing; + /** + * Extract all licenses in a separate file, in the case of production builds only. + */ + extractLicenses?: boolean; + /** + * Format of the localization file specified with --i18n-file. + */ + i18nFormat?: string; + /** + * Locale to use for i18n. + */ + i18nLocale?: string; + /** + * Run the TypeScript type checker in a forked process. + */ + forkTypeChecker?: boolean; + /** + * The name of the main entry-point file. + */ + main: string; + /** + * Localization file to use for i18n. + */ + i18nFile?: string; + /** + * Options to pass to style preprocessors + */ + stylePreprocessorOptions?: StylePreprocessorOptions; + /** + * Do not use the real path when resolving modules. + */ + preserveSymlinks?: boolean; + /** + * Use file name for lazy loaded chunks. + */ + namedChunks?: boolean; +} + +/** + * Available on server platform only. Which external dependencies to bundle into the module. + * By default, all of node_modules will be kept as requires. + */ +export enum BundleDependencies { + All = 'all', + None = 'none', +} + +/** + * Define the output filename cache-busting hashing mode. + */ +export enum OutputHashing { + All = 'all', + Bundles = 'bundles', + Media = 'media', + None = 'none', +} + +/** + * Options to pass to style preprocessors + */ +export interface StylePreprocessorOptions { + /** + * Paths to include. Paths will be resolved to project root. + */ + includePaths?: string[]; +} diff --git a/packages/angular_devkit/build_webpack/src/server/schema.json b/packages/angular_devkit/build_webpack/src/server/schema.json new file mode 100644 index 0000000000..42b582a164 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/server/schema.json @@ -0,0 +1,159 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "BuildAngularWebpackServerSchema", + "title": "Angular Webpack Architect Builder Schema", + "properties": { + "main": { + "type": "string", + "description": "The name of the main entry-point file." + }, + "tsConfig": { + "type": "string", + "default": "tsconfig.app.json", + "description": "The name of the TypeScript configuration file." + }, + "stylePreprocessorOptions": { + "description": "Options to pass to style preprocessors", + "type": "object", + "properties": { + "includePaths": { + "description": "Paths to include. Paths will be resolved to project root.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + "additionalProperties": false + }, + "optimization": { + "type": "boolean", + "description": "Defines the optimization level of the build.", + "default": false + }, + "environment": { + "type": "string", + "description": "Defines the build environment." + }, + "outputPath": { + "type": "string", + "description": "Path where output will be placed." + }, + "sourceMap": { + "type": "boolean", + "description": "Output sourcemaps.", + "default": true + }, + "evalSourceMap": { + "type": "boolean", + "description": "Output in-file eval sourcemaps.", + "default": false + }, + "vendorChunk": { + "type": "boolean", + "description": "Use a separate bundle containing only vendor libraries.", + "default": true + }, + "commonChunk": { + "type": "boolean", + "description": "Use a separate bundle containing code used across multiple bundles.", + "default": true + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging.", + "default": false + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building.", + "default": true + }, + "i18nFile": { + "type": "string", + "description": "Localization file to use for i18n." + }, + "i18nFormat": { + "type": "string", + "description": "Format of the localization file specified with --i18n-file." + }, + "i18nLocale": { + "type": "string", + "description": "Locale to use for i18n." + }, + "i18nMissingTranslation": { + "type": "string", + "description": "How to handle missing translations for i18n." + }, + "outputHashing": { + "type": "string", + "description": "Define the output filename cache-busting hashing mode.", + "default": "none", + "enum": [ + "none", + "all", + "media", + "bundles" + ] + }, + "deleteOutputPath": { + "type": "boolean", + "description": "delete-output-path", + "default": true + }, + "preserveSymlinks": { + "type": "boolean", + "description": "Do not use the real path when resolving modules.", + "default": false + }, + "extractLicenses": { + "type": "boolean", + "description": "Extract all licenses in a separate file, in the case of production builds only.", + "default": true + }, + "showCircularDependencies": { + "type": "boolean", + "description": "Show circular dependency warnings on builds.", + "default": true + }, + "namedChunks": { + "type": "boolean", + "description": "Use file name for lazy loaded chunks.", + "default": true + }, + "bundleDependencies": { + "type": "string", + "description": "Available on server platform only. Which external dependencies to bundle into the module. By default, all of node_modules will be kept as requires.", + "default": "none", + "enum": [ + "none", + "all" + ] + }, + "statsJson": { + "type": "boolean", + "description": "Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse.", + "default": false + }, + "forkTypeChecker": { + "type": "boolean", + "description": "Run the TypeScript type checker in a forked process.", + "default": true + }, + "lazyModules": { + "description": "List of additional NgModule files that will be lazy loaded. Lazy router modules with be discovered automatically.", + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + "additionalProperties": false, + "required": [ + "outputPath", + "main", + "tsConfig" + ] +} \ No newline at end of file diff --git a/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts b/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts new file mode 100644 index 0000000000..cf4ed32e93 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts @@ -0,0 +1,33 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { tap } from 'rxjs/operators'; +import { host, runTargetSpec } from '../utils'; + + +describe('Server Builder', () => { + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works (base)', (done) => { + const overrides = { }; + + runTargetSpec(host, { project: 'app', target: 'server' }, overrides).pipe( + tap((buildEvent) => { + expect(buildEvent.success).toBe(true); + + const fileName = join(outputPath, 'main.js'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + expect(content).toMatch(/AppServerModuleNgFactory/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json index c0d020ca86..3751cf4f39 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json @@ -53,6 +53,14 @@ } } }, + "server": { + "builder": "../../../../packages/angular_devkit/build_webpack:server", + "options": { + "outputPath": "dist", + "main": "src/main.server.ts", + "tsConfig": "src/tsconfig.server.json" + } + }, "serve": { "builder": "../../../../packages/angular_devkit/build_webpack:dev-server", "options": { diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.server.module.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.server.module.ts new file mode 100644 index 0000000000..795380cd22 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.server.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { ServerModule } from '@angular/platform-server'; + +import { AppModule } from './app.module'; +import { AppComponent } from './app.component'; + +@NgModule({ + imports: [ + AppModule, + ServerModule, + ], + bootstrap: [AppComponent], +}) +export class AppServerModule {} diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/main.server.ts b/tests/@angular_devkit/build_webpack/hello-world-app/src/main.server.ts new file mode 100644 index 0000000000..b9ca5050c2 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/main.server.ts @@ -0,0 +1,9 @@ +import { enableProdMode } from '@angular/core'; + +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +export { AppServerModule } from './app/app.server.module'; diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.server.json b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.server.json new file mode 100644 index 0000000000..36fa0af8d3 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.server.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../dist-server", + "baseUrl": "./", + "module": "commonjs", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ], + "angularCompilerOptions": { + "entryModule": "app/app.server.module#AppServerModule" + } +} From 63ec4f0785047e95915c41046a8c873e565d9a3d Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 21 Mar 2018 18:41:13 -0400 Subject: [PATCH 251/724] fix(@schematics/angular): Fix schematics build and generate bugs --- .../angular/application/files/src/main.ts | 2 +- .../application/files/tsconfig.app.json | 2 +- .../application/files/tsconfig.spec.json | 2 +- .../schematics/angular/application/index.ts | 12 +++++----- packages/schematics/angular/class/index.ts | 2 +- .../schematics/angular/class/index_spec.ts | 14 +++++------ packages/schematics/angular/enum/index.ts | 2 +- .../schematics/angular/enum/index_spec.ts | 4 ++-- .../schematics/angular/interface/index.ts | 2 +- .../angular/interface/index_spec.ts | 6 ++--- .../angular/workspace/files/package.json | 24 +++++++++---------- 11 files changed, 36 insertions(+), 36 deletions(-) diff --git a/packages/schematics/angular/application/files/src/main.ts b/packages/schematics/angular/application/files/src/main.ts index 75db9776fe..91ec6da5f0 100644 --- a/packages/schematics/angular/application/files/src/main.ts +++ b/packages/schematics/angular/application/files/src/main.ts @@ -1,7 +1,7 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './src/app/app.module'; +import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { diff --git a/packages/schematics/angular/application/files/tsconfig.app.json b/packages/schematics/angular/application/files/tsconfig.app.json index 4c5ae20bfd..e5c80860db 100644 --- a/packages/schematics/angular/application/files/tsconfig.app.json +++ b/packages/schematics/angular/application/files/tsconfig.app.json @@ -7,7 +7,7 @@ "types": [] }, "exclude": [ - "test.ts", + "src/test.ts", "**/*.spec.ts" ] } diff --git a/packages/schematics/angular/application/files/tsconfig.spec.json b/packages/schematics/angular/application/files/tsconfig.spec.json index 6eb00e7506..02ef64a5e2 100644 --- a/packages/schematics/angular/application/files/tsconfig.spec.json +++ b/packages/schematics/angular/application/files/tsconfig.spec.json @@ -10,7 +10,7 @@ ] }, "files": [ - "test.ts" + "src/test.ts" ], "include": [ "**/*.spec.ts", diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 737be00d0c..2088963800 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -78,9 +78,9 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace builder: '@angular-devkit/build-webpack:browser', options: { outputPath: `dist/${options.name}`, - index: `${projectRoot}/index.html`, - main: `${projectRoot}/main.ts`, - polyfills: `${projectRoot}/polyfills.ts`, + index: `${projectRoot}/src/index.html`, + main: `${projectRoot}/src/main.ts`, + polyfills: `${projectRoot}/src/polyfills.ts`, tsConfig: `${projectRoot}/tsconfig.app.json`, assets: [ { @@ -96,7 +96,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace ], styles: [ { - input: `${projectRoot}/styles.${options.style}`, + input: `${projectRoot}/src/styles.${options.style}`, }, ], scripts: [], @@ -135,8 +135,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace test: { builder: '@angular-devkit/build-webpack:karma', options: { - main: `${projectRoot}/test.ts`, - polyfills: `${projectRoot}/polyfills.ts`, + main: `${projectRoot}/src/test.ts`, + polyfills: `${projectRoot}/src/polyfills.ts`, tsConfig: `${projectRoot}/tsconfig.spec.json`, karmaConfig: `${projectRoot}/karma.conf.js`, styles: [ diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index e0caef5fcc..058c6805e6 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -32,7 +32,7 @@ export default function (options: ClassOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src`; + options.path = `/${project.root}/src/app`; } options.type = !!options.type ? `.${options.type}` : ''; diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index 40ac63a0ab..bb4f20999d 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -47,8 +47,8 @@ describe('Class Schematic', () => { it('should create just the class file', () => { const tree = schematicRunner.runSchematic('class', defaultOptions, appTree); - expect(tree.files.indexOf('/projects/bar/src/foo.ts')).toBeGreaterThanOrEqual(0); - expect(tree.files.indexOf('/projects/bar/src/foo.spec.ts')).toBeLessThan(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.spec.ts')).toBeLessThan(0); }); it('should create the class and spec file', () => { @@ -57,13 +57,13 @@ describe('Class Schematic', () => { spec: true, }; const tree = schematicRunner.runSchematic('class', options, appTree); - expect(tree.files.indexOf('/projects/bar/src/foo.ts')).toBeGreaterThanOrEqual(0); - expect(tree.files.indexOf('/projects/bar/src/foo.spec.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.spec.ts')).toBeGreaterThanOrEqual(0); }); it('should create an class named "Foo"', () => { const tree = schematicRunner.runSchematic('class', defaultOptions, appTree); - const fileContent = tree.readContent('/projects/bar/src/foo.ts'); + const fileContent = tree.readContent('/projects/bar/src/app/foo.ts'); expect(fileContent).toMatch(/export class Foo/); }); @@ -71,13 +71,13 @@ describe('Class Schematic', () => { const options = { ...defaultOptions, type: 'model' }; const tree = schematicRunner.runSchematic('class', options, appTree); - expect(tree.files.indexOf('/projects/bar/src/foo.model.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.model.ts')).toBeGreaterThanOrEqual(0); }); it('should split the name to name & type with split on "."', () => { const options = {...defaultOptions, name: 'foo.model' }; const tree = schematicRunner.runSchematic('class', options, appTree); - const classPath = '/projects/bar/src/foo.model.ts'; + const classPath = '/projects/bar/src/app/foo.model.ts'; const content = tree.readContent(classPath); expect(content).toMatch(/export class Foo/); }); diff --git a/packages/schematics/angular/enum/index.ts b/packages/schematics/angular/enum/index.ts index f2c57406dd..29a40487fb 100644 --- a/packages/schematics/angular/enum/index.ts +++ b/packages/schematics/angular/enum/index.ts @@ -32,7 +32,7 @@ export default function (options: EnumOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src`; + options.path = `/${project.root}/src/app`; } const parsedPath = parseName(options.path, options.name); diff --git a/packages/schematics/angular/enum/index_spec.ts b/packages/schematics/angular/enum/index_spec.ts index 54ccabe669..bcc0b018fc 100644 --- a/packages/schematics/angular/enum/index_spec.ts +++ b/packages/schematics/angular/enum/index_spec.ts @@ -45,11 +45,11 @@ describe('Enum Schematic', () => { it('should create an enumeration', () => { const tree = schematicRunner.runSchematic('enum', defaultOptions, appTree); const files = tree.files; - expect(files.indexOf('/projects/bar/src/foo.enum.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/bar/src/app/foo.enum.ts')).toBeGreaterThanOrEqual(0); }); it('should create an enumeration', () => { const tree = schematicRunner.runSchematic('enum', defaultOptions, appTree); - const content = tree.readContent('/projects/bar/src/foo.enum.ts'); + const content = tree.readContent('/projects/bar/src/app/foo.enum.ts'); expect(content).toMatch('export enum Foo {'); }); diff --git a/packages/schematics/angular/interface/index.ts b/packages/schematics/angular/interface/index.ts index 1833174e2f..acf04d8d56 100644 --- a/packages/schematics/angular/interface/index.ts +++ b/packages/schematics/angular/interface/index.ts @@ -32,7 +32,7 @@ export default function (options: InterfaceOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src`; + options.path = `/${project.root}/src/app`; } const parsedPath = parseName(options.path, options.name); diff --git a/packages/schematics/angular/interface/index_spec.ts b/packages/schematics/angular/interface/index_spec.ts index 486ab6a79e..27b35cd5f2 100644 --- a/packages/schematics/angular/interface/index_spec.ts +++ b/packages/schematics/angular/interface/index_spec.ts @@ -46,12 +46,12 @@ describe('Interface Schematic', () => { it('should create one file', () => { const tree = schematicRunner.runSchematic('interface', defaultOptions, appTree); - expect(tree.files.indexOf('/projects/bar/src/foo.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.ts')).toBeGreaterThanOrEqual(0); }); it('should create an interface named "Foo"', () => { const tree = schematicRunner.runSchematic('interface', defaultOptions, appTree); - const fileContent = tree.readContent('/projects/bar/src/foo.ts'); + const fileContent = tree.readContent('/projects/bar/src/app/foo.ts'); expect(fileContent).toMatch(/export interface Foo/); }); @@ -59,7 +59,7 @@ describe('Interface Schematic', () => { const options = { ...defaultOptions, type: 'model' }; const tree = schematicRunner.runSchematic('interface', options, appTree); - expect(tree.files.indexOf('/projects/bar/src/foo.model.ts')).toBeGreaterThanOrEqual(0); + expect(tree.files.indexOf('/projects/bar/src/app/foo.model.ts')).toBeGreaterThanOrEqual(0); }); }); diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index a6b0f9c130..90e1561ab0 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -12,23 +12,23 @@ }, "private": true, "dependencies": { - "@angular/animations": ">= 6.0.0-beta <6.1.0", - "@angular/common": ">= 6.0.0-beta <6.1.0", - "@angular/compiler": ">= 6.0.0-beta <6.1.0", - "@angular/core": ">= 6.0.0-beta <6.1.0", - "@angular/forms": ">= 6.0.0-beta <6.1.0", - "@angular/http": ">= 6.0.0-beta <6.1.0", - "@angular/platform-browser": ">= 6.0.0-beta <6.1.0", - "@angular/platform-browser-dynamic": ">= 6.0.0-beta <6.1.0", - "@angular/router": ">= 6.0.0-beta <6.1.0", + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", "core-js": "^2.4.1", "rxjs": "^5.5.6", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~<%= version %>", - "@angular/compiler-cli": ">= 6.0.0-beta <6.1.0", - "@angular/language-service": ">= 6.0.0-beta <6.1.0", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", @@ -43,6 +43,6 @@ "protractor": "~5.3.0", "ts-node": "~5.0.0", "tslint": "~5.9.1", - "typescript": "~2.7.2" + "typescript": ">=2.4.2 <2.7.0" } } From e8c69f3bf888291e6dcc9140b48facd5a5fa6388 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 14:24:29 +0000 Subject: [PATCH 252/724] build: clear snapshot directory before publishing This prevents deleted files from being kept in the snapshot. --- scripts/snapshots.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 6cfbdb460e..2d3ff953a3 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -92,6 +92,8 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { _exec('git', ['clone', url], { cwd: root }, publishLogger); const destPath = path.join(root, path.basename(pkg.snapshotRepo)); + // Clear snapshot directory before publishing to remove deleted build files. + _exec('git', ['rm', '-rf', './'], { cwd: destPath }, publishLogger); _copy(pkg.dist, destPath); if (githubToken) { From 2b3f7239a988c2a338172b48c92b6af26619d12c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Mar 2018 10:43:49 +0000 Subject: [PATCH 253/724] fix(@angular-devkit/build-webpack): remove forced single file includes This will need the update schematic to add `polyfills` to the files array in `tsconfig.spec.json`. --- .../angular-cli-files/models/webpack-configs/typescript.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index 951ca008b7..07b4a86ec3 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -150,13 +150,6 @@ export function getNonAotTestConfig(wco: WebpackConfigOptions, host: virtualFs.H let pluginOptions: any = { tsConfigPath, skipCodeGeneration: true }; - if (appConfig.polyfills) { - // TODO: remove singleFileIncludes for 2.0, this is just to support old projects that did not - // include 'polyfills.ts' in `tsconfig.spec.json'. - const polyfillsPath = path.resolve(root, appConfig.polyfills); - pluginOptions.singleFileIncludes = [polyfillsPath]; - } - return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, plugins: [_createAotPlugin(wco, pluginOptions, host, false)] From 3b2b41505baf730bb7685b69a6eab98876f83137 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Mar 2018 21:01:02 +0000 Subject: [PATCH 254/724] fix(@schematics/angular): include polyfills in spec compilation --- .../schematics/angular/application/files/tsconfig.spec.json | 3 ++- .../build_webpack/hello-world-app/src/tsconfig.spec.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/files/tsconfig.spec.json b/packages/schematics/angular/application/files/tsconfig.spec.json index 02ef64a5e2..77fa229043 100644 --- a/packages/schematics/angular/application/files/tsconfig.spec.json +++ b/packages/schematics/angular/application/files/tsconfig.spec.json @@ -10,7 +10,8 @@ ] }, "files": [ - "src/test.ts" + "src/test.ts", + "src/polyfills.ts" ], "include": [ "**/*.spec.ts", diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json index ac22a298ac..1a18e6d00c 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json @@ -10,7 +10,8 @@ ] }, "files": [ - "test.ts" + "test.ts", + "polyfills.ts" ], "include": [ "**/*.spec.ts", From d64f4743ec931339ee4b976c0abde94f4684084a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 11 Mar 2018 15:49:36 +0000 Subject: [PATCH 255/724] fix(@angular-devkit/architect-cli): fix complete exit code --- packages/angular_devkit/architect_cli/bin/architect.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index 7b80ac9a44..424626ab1b 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -97,12 +97,12 @@ const workspaceJson = JSON.parse(configContent); const host = new NodeJsSyncHost(); const workspace = new experimental.workspace.Workspace(root, host); -let architect: Architect; + +let lastBuildEvent = { success: true }; workspace.loadWorkspaceFromJson(workspaceJson).pipe( concatMap(ws => new Architect(ws).loadArchitect()), - concatMap(arch => { - architect = arch; + concatMap(architect => { const overrides = { ...argv }; delete overrides['help']; @@ -127,8 +127,8 @@ workspace.loadWorkspaceFromJson(workspaceJson).pipe( } }), ).subscribe({ - next: (event => logger.info(JSON.stringify(event, null, 2))), - complete: () => process.exit(0), + next: (buildEvent => lastBuildEvent = buildEvent), + complete: () => process.exit(lastBuildEvent.success ? 0 : 1), error: (err: Error) => { logger.fatal(err.message); if (err.stack) { From f9997559b41b486205f327a16fe65c75af67d78f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Mar 2018 13:12:08 +0000 Subject: [PATCH 256/724] fix(@schematics/angular): library peerDependencies should be object --- packages/schematics/angular/library/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/library/files/package.json b/packages/schematics/angular/library/files/package.json index efee9298d5..0c8d8420f9 100644 --- a/packages/schematics/angular/library/files/package.json +++ b/packages/schematics/angular/library/files/package.json @@ -1,7 +1,7 @@ { "name": "<%= name %>", "version": "1.0.0", - "peerDependencies": [], + "peerDependencies": {}, "ngPackage": { "lib": { "entryFile": "<%= entryFile %>.ts" From 664851c3e6dc942d026429f218378ef8a5fea388 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Mar 2018 20:25:19 +0000 Subject: [PATCH 257/724] fix(@schematics/angular): update library structure --- .../src/build/index_spec_large.ts | 19 +++++ .../angular/library/files/__entryFile__.ts | 3 - .../angular/library/files/karma.conf.js | 34 ++++++++ .../angular/library/files/ng-package.json | 8 ++ .../angular/library/files/package.json | 12 ++- .../library/files/src/__entryFile__.ts | 7 ++ .../angular/library/files/src/test.ts | 22 +++++ .../angular/library/files/tsconfig.spec.json | 18 ++++ packages/schematics/angular/library/index.ts | 74 +++++++++-------- .../schematics/angular/library/index_spec.ts | 82 +++++-------------- .../schematics/angular/library/schema.d.ts | 4 - .../schematics/angular/library/schema.json | 5 -- 12 files changed, 173 insertions(+), 115 deletions(-) delete mode 100644 packages/schematics/angular/library/files/__entryFile__.ts create mode 100644 packages/schematics/angular/library/files/karma.conf.js create mode 100644 packages/schematics/angular/library/files/ng-package.json create mode 100644 packages/schematics/angular/library/files/src/__entryFile__.ts create mode 100644 packages/schematics/angular/library/files/src/test.ts create mode 100644 packages/schematics/angular/library/files/tsconfig.spec.json diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 7a9104c9f4..948450516c 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -31,4 +31,23 @@ describe('NgPackagr Builder', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); + + it('tests works', (done) => { + const workspaceFile = normalize('angular.json'); + const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any + const workspaceRoot = join(devkitRoot, + 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); + + // TODO: move TestProjectHost from build-webpack to architect, or somewhere else, where it + // can be imported from. + const host = new NodeJsSyncHost(); + const workspace = new experimental.workspace.Workspace(workspaceRoot, host); + const targetSpec: TargetSpecifier = { project: 'lib', target: 'test' }; + + return workspace.loadWorkspaceFromHost(workspaceFile).pipe( + concatMap(ws => new Architect(ws).loadArchitect()), + concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); }); diff --git a/packages/schematics/angular/library/files/__entryFile__.ts b/packages/schematics/angular/library/files/__entryFile__.ts deleted file mode 100644 index 42ef133238..0000000000 --- a/packages/schematics/angular/library/files/__entryFile__.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* - * Public API Surface of <%= name %> - */ diff --git a/packages/schematics/angular/library/files/karma.conf.js b/packages/schematics/angular/library/files/karma.conf.js new file mode 100644 index 0000000000..85874a9222 --- /dev/null +++ b/packages/schematics/angular/library/files/karma.conf.js @@ -0,0 +1,34 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-webpack'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-webpack/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, 'coverage'), + reports: ['html', 'lcovonly'], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/packages/schematics/angular/library/files/ng-package.json b/packages/schematics/angular/library/files/ng-package.json new file mode 100644 index 0000000000..1fd3041851 --- /dev/null +++ b/packages/schematics/angular/library/files/ng-package.json @@ -0,0 +1,8 @@ +{ + "$schema": "<%= baseDir.split('/').map(x => '..').join('/') %>/../node_modules/ng-packagr/package.schema.json", + "ngPackage": { + "lib": { + "entryFile": "src/<%= entryFile %>.ts" + } + } +} diff --git a/packages/schematics/angular/library/files/package.json b/packages/schematics/angular/library/files/package.json index 0c8d8420f9..b273265fbc 100644 --- a/packages/schematics/angular/library/files/package.json +++ b/packages/schematics/angular/library/files/package.json @@ -1,10 +1,8 @@ { - "name": "<%= name %>", - "version": "1.0.0", - "peerDependencies": {}, - "ngPackage": { - "lib": { - "entryFile": "<%= entryFile %>.ts" - } + "name": "<%= dasherize(name) %>", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^5.2.0", + "@angular/core": "^5.2.0" } } \ No newline at end of file diff --git a/packages/schematics/angular/library/files/src/__entryFile__.ts b/packages/schematics/angular/library/files/src/__entryFile__.ts new file mode 100644 index 0000000000..19a55ca749 --- /dev/null +++ b/packages/schematics/angular/library/files/src/__entryFile__.ts @@ -0,0 +1,7 @@ +/* + * Public API Surface of <%= dasherize(name) %> + */ + +export * from './<%= dasherize(name) %>.service'; +export * from './<%= dasherize(name) %>.component'; +export * from './<%= dasherize(name) %>.module'; diff --git a/packages/schematics/angular/library/files/src/test.ts b/packages/schematics/angular/library/files/src/test.ts new file mode 100644 index 0000000000..e11ff1c97b --- /dev/null +++ b/packages/schematics/angular/library/files/src/test.ts @@ -0,0 +1,22 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'core-js/es7/reflect'; +import 'zone.js/dist/zone'; +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/packages/schematics/angular/library/files/tsconfig.spec.json b/packages/schematics/angular/library/files/tsconfig.spec.json new file mode 100644 index 0000000000..bfdafa8f17 --- /dev/null +++ b/packages/schematics/angular/library/files/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "<%= baseDir.split('/').map(x => '..').join('/') %>/../tsconfig.json", + "compilerOptions": { + "outDir": "<%= baseDir.split('/').map(x => '..').join('/') %>/../out-tsc/spec", + "baseUrl": "./", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 8dc8a130e1..5f8ed33700 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -17,31 +17,23 @@ import { mergeWith, move, noop, + schematic, template, url, } from '@angular-devkit/schematics'; import * as path from 'path'; import { Schema as GenerateLibraryOptions } from './schema'; -function forwardSlashes(value: string): string { - return value.replace(/\\/g, '/'); -} type PackageJsonPartialType = { scripts: { [key: string]: string; }, - devDependencies: { + dependencies: { [key: string]: string; }, -}; - -type TsConfigPartialType = { - compilerOptions: { - baseUrl: string, - paths: { - [key: string]: string[]; - }, + devDependencies: { + [key: string]: string; }, }; @@ -61,42 +53,35 @@ function updateJsonFile(host: Tree, path: string, callback: UpdateJsonFn): return host; } -function updateTsConfig(npmPackageName: string, entryFilePath: string) { - - return (host: Tree) => { - if (!host.exists('tsconfig.json')) { return host; } - - return updateJsonFile(host, 'tsconfig.json', (tsconfig: TsConfigPartialType) => { - tsconfig.compilerOptions.baseUrl = '.'; - if (!tsconfig.compilerOptions.paths) { - tsconfig.compilerOptions.paths = {}; - } - if (!tsconfig.compilerOptions.paths[npmPackageName]) { - tsconfig.compilerOptions.paths[npmPackageName] = []; - } - tsconfig.compilerOptions.paths[npmPackageName].push(entryFilePath); - }); - }; -} - function addDependenciesAndScriptsToPackageJson() { return (host: Tree) => { if (!host.exists('package.json')) { return host; } return updateJsonFile(host, 'package.json', (json: PackageJsonPartialType) => { + if (!json['dependencies']) { + json['dependencies'] = {}; + } + + json.dependencies = { + '@angular/common': '^5.2.0', + '@angular/core': '^5.2.0', + '@angular/compiler': '^5.0.0', + // De-structure last keeps existing user dependencies. + ...json.dependencies, + }; + if (!json['devDependencies']) { json['devDependencies'] = {}; } json.devDependencies = { - '@angular/compiler': '^5.0.0', '@angular/compiler-cli': '^5.0.0', 'ng-packagr': '^2.2.0', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', 'typescript': '>=2.4.2', - // de-structure last keeps existing user dependencies + // De-structure last keeps existing user dependencies. ...json.devDependencies, }; }); @@ -113,7 +98,6 @@ export default function (options: GenerateLibraryOptions): Rule { entryFile = entryFile.substring(0, entryFile.length - 3); } const sourceDir = path.join(options.baseDir, options.name); - const entryFilePath = path.join(sourceDir, entryFile) + '.ts'; return (host: Tree, context: SchematicContext) => { const templateSource = apply(url('./files'), [ @@ -133,7 +117,29 @@ export default function (options: GenerateLibraryOptions): Rule { mergeWith(templateSource), ])), options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(), - options.skipTsConfig ? noop() : updateTsConfig(name, forwardSlashes(entryFilePath)), + schematic('module', { + name: name, + commonModule: false, + flat: true, + path: `/${name}/src`, + sourceDir: options.baseDir, + spec: false, + }), + schematic('component', { + name: name, + sourceDir: options.baseDir, + inlineStyle: true, + inlineTemplate: true, + flat: true, + path: `/${name}/src`, + }), + schematic('service', { + name: name, + sourceDir: options.baseDir, + flat: true, + path: `/${name}/src`, + module: `${name}.module.ts`, + }), ])(host, context); }; } diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 10d6584016..b7437bd0d4 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -11,7 +11,8 @@ import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; import { SimpleMemoryHost, - stringToFileBuffer } from '../../../angular_devkit/core/src/virtual-fs/host'; + stringToFileBuffer, +} from '../../../angular_devkit/core/src/virtual-fs/host'; import { getFileContent } from '../../angular/utility/test'; import { Schema as GenerateLibrarySchema } from './schema'; @@ -30,10 +31,20 @@ describe('Library Schematic', () => { entryFile: 'my_index.ts', }; - it('should create entryFile', () => { + it('should create files', () => { const tree = schematicRunner.runSchematic('library', defaultOptions); - expect(tree.files.length).toEqual(2); - expect(tree.files[1]).toEqual('/my-libs/foo/my_index.ts'); + const files = tree.files; + expect(tree.files.length).toEqual(11); + expect(files.indexOf('/my-libs/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/ng-package.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/package.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/test.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/my_index.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/foo.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/foo.component.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/foo.service.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/my-libs/foo/src/foo.service.ts')).toBeGreaterThanOrEqual(0); }); it('should create a package.json named "foo"', () => { @@ -42,70 +53,18 @@ describe('Library Schematic', () => { expect(fileContent).toMatch(/"name": "foo"/); }); - it('should create a package.json with ngPackage conf', () => { + it('should create a ng-package.json with ngPackage conf', () => { const tree = schematicRunner.runSchematic('library', defaultOptions); - const fileContent = getJsonFileContent(tree, '/my-libs/foo/package.json'); + const fileContent = getJsonFileContent(tree, '/my-libs/foo/ng-package.json'); expect(fileContent.ngPackage).toBeDefined(); - expect(fileContent.ngPackage.lib.entryFile).toEqual('my_index.ts'); + expect(fileContent.ngPackage.lib.entryFile).toEqual('src/my_index.ts'); }); - it('should use default value for sourceDir and entryFile', () => { + it('should use default value for baseDir and entryFile', () => { const tree = schematicRunner.runSchematic('library', { name: 'foobar', }); - expect(tree.files.length).toEqual(2); - expect(tree.files[1]).toEqual('/lib/foobar/public_api.ts'); - }); - - describe(`update tsconfig.json`, () => { - let mockTree: Tree; - beforeEach(() => { - mockTree = new VirtualTree(); - mockTree.create('tsconfig.json', JSON.stringify({ - compilerOptions: { - target: 'es2015', - module: 'es2015', - }, - })); - }); - - it(`should add paths mapping to empty tsconfig`, () => { - const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); - - const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); - expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); - expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(1); - expect(tsConfigJson.compilerOptions.paths.foo[0]).toEqual('my-libs/foo/my_index.ts'); - }); - - it(`should append to existing paths mappings`, () => { - mockTree.overwrite('tsconfig.json', JSON.stringify({ - compilerOptions: { - target: 'es2015', - module: 'es2015', - paths: { - 'unrelated': ['./something/else.ts'], - 'foo': ['libs/*'], - }, - }, - })); - const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); - - const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); - expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); - expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(2); - expect(tsConfigJson.compilerOptions.paths.foo[1]).toEqual('my-libs/foo/my_index.ts'); - }); - - it(`should not modify the file when --skipTsConfig`, () => { - const tree = schematicRunner.runSchematic('library', { - name: 'foo', - skipTsConfig: true, - }, mockTree); - - const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); - expect(tsConfigJson.compilerOptions.paths).toBeUndefined(); - }); + expect(tree.files.indexOf('/lib/foobar/src/public_api.ts')).toBeGreaterThanOrEqual(0); }); describe(`update package.json`, () => { @@ -126,7 +85,6 @@ describe('Library Schematic', () => { const packageJson = getJsonFileContent(tree, 'package.json'); expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.2.0'); - // TODO ... }); it(`should not override existing users dependencies`, () => { diff --git a/packages/schematics/angular/library/schema.d.ts b/packages/schematics/angular/library/schema.d.ts index 9e080730d2..5a68653e49 100644 --- a/packages/schematics/angular/library/schema.d.ts +++ b/packages/schematics/angular/library/schema.d.ts @@ -23,8 +23,4 @@ export interface Schema { * Do not add dependencies to package.json (e.g., --skipPackageJson) */ skipPackageJson?: boolean; - /** - * Do not update tsconfig.json for development experience (e.g., --skipTsConfig) - */ - skipTsConfig?: boolean; } diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index 35881fb2fb..5640d1cd1a 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -25,11 +25,6 @@ "type": "boolean", "default": false, "description": "Do not add dependencies to package.json (e.g., --skipPackageJson)" - }, - "skipTsConfig": { - "type": "boolean", - "default": false, - "description": "Do not update tsconfig.json for development experience (e.g., --skipTsConfig)" } }, "required": [ From 61dd296f832c7b67af68619f9b25e09220b13fcc Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Mar 2018 20:33:00 +0000 Subject: [PATCH 258/724] fix(@angular-devkit/build-ng-packagr): use updated structure --- .../src/build/index_spec_large.ts | 28 ++++++--------- .../build_ng_packagr/ng-packaged/angular.json | 15 ++++++-- .../ng-packaged/projects/lib/index.ts | 1 - .../ng-packaged/projects/lib/karma.conf.js | 34 +++++++++++++++++++ .../ng-packaged/projects/lib/ng-package.json | 8 +++++ .../ng-packaged/projects/lib/package.json | 13 ++++--- .../projects/lib/src/lib.component.spec.ts | 25 ++++++++++++++ .../projects/lib/src/lib.component.ts | 19 +++++++++++ .../projects/lib/src/lib.module.ts | 11 ++++++ .../projects/lib/src/lib.service.spec.ts | 15 ++++++++ .../projects/lib/src/lib.service.ts | 8 +++++ .../projects/lib/src/public_api.ts | 7 ++++ .../ng-packaged/projects/lib/src/test.ts | 22 ++++++++++++ .../projects/lib/tsconfig.spec.json | 18 ++++++++++ 14 files changed, 196 insertions(+), 28 deletions(-) delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/index.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.spec.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.module.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.spec.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 948450516c..c95df75f0d 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -13,16 +13,17 @@ import { concatMap, tap } from 'rxjs/operators'; describe('NgPackagr Builder', () => { + const workspaceFile = normalize('angular.json'); + const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any + const workspaceRoot = join(devkitRoot, + 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); + + // TODO: move TestProjectHost from build-webpack to architect, or somewhere else, where it + // can be imported from. + const host = new NodeJsSyncHost(); + const workspace = new experimental.workspace.Workspace(workspaceRoot, host); + it('works', (done) => { - const workspaceFile = normalize('angular.json'); - const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any - const workspaceRoot = join(devkitRoot, - 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); - - // TODO: move TestProjectHost from build-webpack to architect, or somewhere else, where it - // can be imported from. - const host = new NodeJsSyncHost(); - const workspace = new experimental.workspace.Workspace(workspaceRoot, host); const targetSpec: TargetSpecifier = { project: 'lib', target: 'build' }; return workspace.loadWorkspaceFromHost(workspaceFile).pipe( @@ -33,15 +34,6 @@ describe('NgPackagr Builder', () => { }, 30000); it('tests works', (done) => { - const workspaceFile = normalize('angular.json'); - const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any - const workspaceRoot = join(devkitRoot, - 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); - - // TODO: move TestProjectHost from build-webpack to architect, or somewhere else, where it - // can be imported from. - const host = new NodeJsSyncHost(); - const workspace = new experimental.workspace.Workspace(workspaceRoot, host); const targetSpec: TargetSpecifier = { project: 'lib', target: 'test' }; return workspace.loadWorkspaceFromHost(workspaceFile).pipe( diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json index b5b2d57cd4..70dc59254a 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json @@ -9,10 +9,21 @@ "build": { "builder": "../../../../packages/angular_devkit/build_ng_packagr:build", "options": { - "project": "projects/lib/package.json" + "project": "projects/lib/ng-package.json" + } + }, + "test": { + "builder": "../../../../packages/angular_devkit/build_webpack:karma", + "options": { + "main": "projects/lib/src/test.ts", + "tsConfig": "projects/lib/tsconfig.spec.json", + "karmaConfig": "projects/lib/karma.conf.js", + "browsers": "ChromeHeadless", + "progress": false, + "watch": false } } } } } -} +} \ No newline at end of file diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/index.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/index.ts deleted file mode 100644 index 73894e4f7f..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const HELLO_PACKAGR = 'I am packaged with ng-packagr!'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js new file mode 100644 index 0000000000..85874a9222 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js @@ -0,0 +1,34 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-webpack'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-webpack/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, 'coverage'), + reports: ['html', 'lcovonly'], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json new file mode 100644 index 0000000000..049458816d --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../node_modules/ng-packagr/package.schema.json", + "ngPackage": { + "lib": { + "entryFile": "src/public_api.ts" + } + } +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json index 002d71b45a..c82dc0425d 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json @@ -1,9 +1,8 @@ { - "$schema": "../../../../../../node_modules/ng-packagr/package.schema.json", - "name": "ng-packaged-one", - "ngPackage": { - "lib": { - "entryFile": "index.ts" - } + "name": "lib", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^5.2.0", + "@angular/core": "^5.2.0" } -} +} \ No newline at end of file diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.spec.ts new file mode 100644 index 0000000000..c02003e11d --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LibComponent } from './lib.component'; + +describe('LibComponent', () => { + let component: LibComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LibComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LibComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.ts new file mode 100644 index 0000000000..4c25073a25 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'lib', + template: ` +

+ lib works! +

+ `, + styles: [] +}) +export class LibComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.module.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.module.ts new file mode 100644 index 0000000000..511e052093 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.module.ts @@ -0,0 +1,11 @@ +import { NgModule } from '@angular/core'; +import { LibComponent } from './lib.component'; +import { LibService } from './lib.service'; + +@NgModule({ + imports: [ + ], + declarations: [LibComponent], + providers: [LibService] +}) +export class LibModule { } diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.spec.ts new file mode 100644 index 0000000000..a62c02c2fb --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { LibService } from './lib.service'; + +describe('LibService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [LibService] + }); + }); + + it('should be created', inject([LibService], (service: LibService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.ts new file mode 100644 index 0000000000..3e6c7e592b --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.ts @@ -0,0 +1,8 @@ +import { Injectable } from '@angular/core'; + +@Injectable() +export class LibService { + + constructor() { } + +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts new file mode 100644 index 0000000000..1d53ecc81e --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts @@ -0,0 +1,7 @@ +/* + * Public API Surface of lib + */ + +export * from './lib.service'; +export * from './lib.component'; +export * from './lib.module'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts new file mode 100644 index 0000000000..e11ff1c97b --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts @@ -0,0 +1,22 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'core-js/es7/reflect'; +import 'zone.js/dist/zone'; +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json new file mode 100644 index 0000000000..1886944d46 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "baseUrl": "./", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} From 1fd8f1e75a18b62c9cf85e1860a03721d04ba9ea Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Mar 2018 20:48:04 +0000 Subject: [PATCH 259/724] fix(@angular-devkit/build-webpack): remove broken defaults --- packages/angular_devkit/build_webpack/src/browser/schema.json | 1 - packages/angular_devkit/build_webpack/src/karma/schema.json | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 596b5d106b..17561abca1 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -20,7 +20,6 @@ }, "tsConfig": { "type": "string", - "default": "tsconfig.app.json", "description": "The name of the TypeScript configuration file." }, "scripts": { diff --git a/packages/angular_devkit/build_webpack/src/karma/schema.json b/packages/angular_devkit/build_webpack/src/karma/schema.json index a026e5d228..fa29a32e06 100644 --- a/packages/angular_devkit/build_webpack/src/karma/schema.json +++ b/packages/angular_devkit/build_webpack/src/karma/schema.json @@ -9,12 +9,10 @@ }, "tsConfig": { "type": "string", - "default": "tsconfig.app.json", "description": "The name of the TypeScript configuration file." }, "karmaConfig": { "type": "string", - "default": "tsconfig.app.json", "description": "The name of the TypeScript configuration file." }, "polyfills": { From bbac6d3d955f359e499be20e88f74cbde2485cf0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 21:25:40 +0000 Subject: [PATCH 260/724] fix(@schematics/angular): update library schematic for workspace --- packages/schematics/angular/e2e/index.ts | 1 + .../files/{ => __projectRoot__}/karma.conf.js | 0 .../files/__projectRoot__/ng-package.json | 8 ++ .../files/{ => __projectRoot__}/package.json | 0 .../__projectRoot__/src/__entryFile__.ts | 7 ++ .../files/{ => __projectRoot__}/src/test.ts | 0 .../{ => __projectRoot__}/tsconfig.spec.json | 4 +- .../angular/library/files/ng-package.json | 8 -- .../library/files/src/__entryFile__.ts | 7 -- packages/schematics/angular/library/index.ts | 78 ++++++++++------ .../schematics/angular/library/index_spec.ts | 89 +++++++++---------- .../schematics/angular/library/schema.d.ts | 8 +- .../schematics/angular/library/schema.json | 9 +- .../lib/src/{ => lib}/lib.component.spec.ts | 0 .../lib/src/{ => lib}/lib.component.ts | 0 .../projects/lib/src/{ => lib}/lib.module.ts | 0 .../lib/src/{ => lib}/lib.service.spec.ts | 0 .../projects/lib/src/{ => lib}/lib.service.ts | 0 .../projects/lib/src/public_api.ts | 6 +- 19 files changed, 118 insertions(+), 107 deletions(-) rename packages/schematics/angular/library/files/{ => __projectRoot__}/karma.conf.js (100%) create mode 100644 packages/schematics/angular/library/files/__projectRoot__/ng-package.json rename packages/schematics/angular/library/files/{ => __projectRoot__}/package.json (100%) create mode 100644 packages/schematics/angular/library/files/__projectRoot__/src/__entryFile__.ts rename packages/schematics/angular/library/files/{ => __projectRoot__}/src/test.ts (100%) rename packages/schematics/angular/library/files/{ => __projectRoot__}/tsconfig.spec.json (53%) delete mode 100644 packages/schematics/angular/library/files/ng-package.json delete mode 100644 packages/schematics/angular/library/files/src/__entryFile__.ts rename tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/{ => lib}/lib.component.spec.ts (100%) rename tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/{ => lib}/lib.component.ts (100%) rename tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/{ => lib}/lib.module.ts (100%) rename tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/{ => lib}/lib.service.spec.ts (100%) rename tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/{ => lib}/lib.service.ts (100%) diff --git a/packages/schematics/angular/e2e/index.ts b/packages/schematics/angular/e2e/index.ts index 72b31785ce..f3c5e79738 100644 --- a/packages/schematics/angular/e2e/index.ts +++ b/packages/schematics/angular/e2e/index.ts @@ -95,6 +95,7 @@ function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): // ( workspaceAst.value).projects = projects; // } + // TODO: throw if the project already exist. workspace.projects[options.name] = project; host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); }; diff --git a/packages/schematics/angular/library/files/karma.conf.js b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js similarity index 100% rename from packages/schematics/angular/library/files/karma.conf.js rename to packages/schematics/angular/library/files/__projectRoot__/karma.conf.js diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json new file mode 100644 index 0000000000..7392ff348c --- /dev/null +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json @@ -0,0 +1,8 @@ +{ + "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/package.schema.json", + "ngPackage": { + "lib": { + "entryFile": "src/<%= entryFile %>.ts" + } + } +} diff --git a/packages/schematics/angular/library/files/package.json b/packages/schematics/angular/library/files/__projectRoot__/package.json similarity index 100% rename from packages/schematics/angular/library/files/package.json rename to packages/schematics/angular/library/files/__projectRoot__/package.json diff --git a/packages/schematics/angular/library/files/__projectRoot__/src/__entryFile__.ts b/packages/schematics/angular/library/files/__projectRoot__/src/__entryFile__.ts new file mode 100644 index 0000000000..b4d46cdc03 --- /dev/null +++ b/packages/schematics/angular/library/files/__projectRoot__/src/__entryFile__.ts @@ -0,0 +1,7 @@ +/* + * Public API Surface of <%= dasherize(name) %> + */ + +export * from './lib/<%= dasherize(name) %>.service'; +export * from './lib/<%= dasherize(name) %>.component'; +export * from './lib/<%= dasherize(name) %>.module'; diff --git a/packages/schematics/angular/library/files/src/test.ts b/packages/schematics/angular/library/files/__projectRoot__/src/test.ts similarity index 100% rename from packages/schematics/angular/library/files/src/test.ts rename to packages/schematics/angular/library/files/__projectRoot__/src/test.ts diff --git a/packages/schematics/angular/library/files/tsconfig.spec.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json similarity index 53% rename from packages/schematics/angular/library/files/tsconfig.spec.json rename to packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json index bfdafa8f17..a15b3bbc37 100644 --- a/packages/schematics/angular/library/files/tsconfig.spec.json +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json @@ -1,7 +1,7 @@ { - "extends": "<%= baseDir.split('/').map(x => '..').join('/') %>/../tsconfig.json", + "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { - "outDir": "<%= baseDir.split('/').map(x => '..').join('/') %>/../out-tsc/spec", + "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/spec", "baseUrl": "./", "types": [ "jasmine", diff --git a/packages/schematics/angular/library/files/ng-package.json b/packages/schematics/angular/library/files/ng-package.json deleted file mode 100644 index 1fd3041851..0000000000 --- a/packages/schematics/angular/library/files/ng-package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "<%= baseDir.split('/').map(x => '..').join('/') %>/../node_modules/ng-packagr/package.schema.json", - "ngPackage": { - "lib": { - "entryFile": "src/<%= entryFile %>.ts" - } - } -} diff --git a/packages/schematics/angular/library/files/src/__entryFile__.ts b/packages/schematics/angular/library/files/src/__entryFile__.ts deleted file mode 100644 index 19a55ca749..0000000000 --- a/packages/schematics/angular/library/files/src/__entryFile__.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Public API Surface of <%= dasherize(name) %> - */ - -export * from './<%= dasherize(name) %>.service'; -export * from './<%= dasherize(name) %>.component'; -export * from './<%= dasherize(name) %>.module'; diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 5f8ed33700..8022309960 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -9,20 +9,18 @@ import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, - SchematicsException, Tree, apply, branchAndMerge, chain, mergeWith, - move, noop, schematic, template, url, } from '@angular-devkit/schematics'; -import * as path from 'path'; -import { Schema as GenerateLibraryOptions } from './schema'; +import { WorkspaceSchema, getWorkspace, getWorkspacePath } from '../utility/config'; +import { Schema as LibraryOptions } from './schema'; type PackageJsonPartialType = { @@ -88,56 +86,80 @@ function addDependenciesAndScriptsToPackageJson() { }; } -export default function (options: GenerateLibraryOptions): Rule { - if (!options.name) { - throw new SchematicsException(`name option is required.`); - } - const name = options.name; - let entryFile = options.entryFile ? options.entryFile : 'public_api'; - if (entryFile.endsWith('.ts')) { - entryFile = entryFile.substring(0, entryFile.length - 3); - } - const sourceDir = path.join(options.baseDir, options.name); +function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSchema): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.info(`Updating workspace file`); + + const projectRoot = `${workspace.newProjectRoot}/${options.name}`; + // tslint:disable-next-line:no-any + const project: any = { + root: `${projectRoot}`, + projectType: 'library', + architect: { + build: { + builder: '@angular-devkit/build-ng-packagr:build', + options: { + project: `${projectRoot}/ng-package.json`, + }, + }, + test: { + builder: '@angular-devkit/build-webpack:karma', + options: { + main: `${projectRoot}/src/test.ts`, + tsConfig: `${projectRoot}/tsconfig.spec.json`, + karmaConfig: `${projectRoot}/karma.conf.js`, + }, + }, + }, + }; + workspace.projects[options.name] = project; + host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); + }; +} + +export default function (options: LibraryOptions): Rule { return (host: Tree, context: SchematicContext) => { + const name = options.name; + + const workspace = getWorkspace(host); + const newProjectRoot = workspace.newProjectRoot; + const projectRoot = `${newProjectRoot}/${options.name}`; + const sourceDir = `${projectRoot}/src/lib`; + const templateSource = apply(url('./files'), [ template({ ...strings, ...options, - ...{ - entryFile, - name, - }, + projectRoot, }), - move(sourceDir), + // TODO: Moving inside `branchAndMerge` should work but is bugged right now. + // The __projectRoot__ is being used meanwhile. + // move(projectRoot), ]); return chain([ - branchAndMerge(chain([ - mergeWith(templateSource), - ])), + branchAndMerge(mergeWith(templateSource)), + addAppToWorkspaceFile(options, workspace), options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(), schematic('module', { name: name, commonModule: false, flat: true, - path: `/${name}/src`, - sourceDir: options.baseDir, + path: sourceDir, spec: false, }), schematic('component', { name: name, - sourceDir: options.baseDir, inlineStyle: true, inlineTemplate: true, flat: true, - path: `/${name}/src`, + path: sourceDir, }), schematic('service', { name: name, - sourceDir: options.baseDir, flat: true, - path: `/${name}/src`, + path: sourceDir, module: `${name}.module.ts`, }), ])(host, context); diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index b7437bd0d4..469e93dd6e 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -5,19 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; -import { HostTree, Tree, VirtualTree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { - SimpleMemoryHost, - stringToFileBuffer, -} from '../../../angular_devkit/core/src/virtual-fs/host'; import { getFileContent } from '../../angular/utility/test'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as GenerateLibrarySchema } from './schema'; -function getJsonFileContent(tree: Tree, path: string) { - return JSON.parse(getFileContent(tree, path)); +function getJsonFileContent(tree: UnitTestTree, path: string) { + return JSON.parse(tree.readContent(path)); } describe('Library Schematic', () => { @@ -27,35 +22,44 @@ describe('Library Schematic', () => { ); const defaultOptions: GenerateLibrarySchema = { name: 'foo', - baseDir: 'my-libs', - entryFile: 'my_index.ts', + entryFile: 'my_index', + skipPackageJson: false, }; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + let workspaceTree: UnitTestTree; + beforeEach(() => { + workspaceTree = schematicRunner.runSchematic('workspace', workspaceOptions); + }); it('should create files', () => { - const tree = schematicRunner.runSchematic('library', defaultOptions); + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const files = tree.files; - expect(tree.files.length).toEqual(11); - expect(files.indexOf('/my-libs/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/ng-package.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/package.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/test.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/my_index.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/foo.module.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/foo.component.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/foo.service.spec.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/my-libs/foo/src/foo.service.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/ng-package.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/package.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/test.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/my_index.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/lib/foo.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/lib/foo.component.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/lib/foo.component.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/lib/foo.service.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/lib/foo.service.ts')).toBeGreaterThanOrEqual(0); }); it('should create a package.json named "foo"', () => { - const tree = schematicRunner.runSchematic('library', defaultOptions); - const fileContent = getFileContent(tree, '/my-libs/foo/package.json'); + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const fileContent = getFileContent(tree, '/projects/foo/package.json'); expect(fileContent).toMatch(/"name": "foo"/); }); it('should create a ng-package.json with ngPackage conf', () => { - const tree = schematicRunner.runSchematic('library', defaultOptions); - const fileContent = getJsonFileContent(tree, '/my-libs/foo/ng-package.json'); + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const fileContent = getJsonFileContent(tree, '/projects/foo/ng-package.json'); expect(fileContent.ngPackage).toBeDefined(); expect(fileContent.ngPackage.lib.entryFile).toEqual('src/my_index.ts'); }); @@ -63,42 +67,37 @@ describe('Library Schematic', () => { it('should use default value for baseDir and entryFile', () => { const tree = schematicRunner.runSchematic('library', { name: 'foobar', - }); - expect(tree.files.indexOf('/lib/foobar/src/public_api.ts')).toBeGreaterThanOrEqual(0); + }, workspaceTree); + expect(tree.files.indexOf('/projects/foobar/src/public_api.ts')).toBeGreaterThanOrEqual(0); }); - describe(`update package.json`, () => { - let mockTree: VirtualTree; - let memoryfs: SimpleMemoryHost; - beforeEach(() => { - memoryfs = new SimpleMemoryHost(); - memoryfs.write(normalize('/package.json'), stringToFileBuffer(JSON.stringify({ - devDependencies: { - typescript: '~2.5.0', - }, - }))).subscribe(); - mockTree = new HostTree(memoryfs); - }); + it(`should add library workspace`, () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + + const workspace = getJsonFileContent(tree, '/angular.json'); + expect(workspace.projects.foo).toBeDefined(); + }); + describe(`update package.json`, () => { it(`should add ng-packagr to devDependencies`, () => { - const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const packageJson = getJsonFileContent(tree, 'package.json'); expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.2.0'); }); it(`should not override existing users dependencies`, () => { - const tree = schematicRunner.runSchematic('library', defaultOptions, mockTree); + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.devDependencies.typescript).toEqual('~2.5.0'); + expect(packageJson.devDependencies.typescript).toEqual('~2.7.2'); }); it(`should not modify the file when --skipPackageJson`, () => { const tree = schematicRunner.runSchematic('library', { name: 'foo', skipPackageJson: true, - }, mockTree); + }, workspaceTree); const packageJson = getJsonFileContent(tree, 'package.json'); expect(packageJson.devDependencies['ng-packagr']).toBeUndefined(); diff --git a/packages/schematics/angular/library/schema.d.ts b/packages/schematics/angular/library/schema.d.ts index 5a68653e49..82b5a61bda 100644 --- a/packages/schematics/angular/library/schema.d.ts +++ b/packages/schematics/angular/library/schema.d.ts @@ -10,17 +10,13 @@ export interface Schema { /** * The name of the library. Required field. */ - name?: string; + name: string; /** * The path to create the interface. */ entryFile: string; - /** - * The path of the base directory. The library source folder will be a sub-folder. - */ - baseDir: string; /** * Do not add dependencies to package.json (e.g., --skipPackageJson) */ - skipPackageJson?: boolean; + skipPackageJson: boolean; } diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index 5640d1cd1a..932cae4485 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -12,14 +12,7 @@ "type": "string", "format": "path", "description": "The path to create the library's public API file.", - "default": "public_api.ts" - }, - "baseDir": { - "type": "string", - "format": "path", - "description": "The base path where the library sources will be created.", - "default": "lib", - "visible": false + "default": "public_api" }, "skipPackageJson": { "type": "boolean", diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.spec.ts similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.spec.ts rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.spec.ts diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.ts similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.component.ts rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.ts diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.module.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.module.ts rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.spec.ts similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.spec.ts rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.spec.ts diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts similarity index 100% rename from tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib.service.ts rename to tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts index 1d53ecc81e..a09e1deb35 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts @@ -2,6 +2,6 @@ * Public API Surface of lib */ -export * from './lib.service'; -export * from './lib.component'; -export * from './lib.module'; +export * from './lib/lib.service'; +export * from './lib/lib.component'; +export * from './lib/lib.module'; From 33af719bad1d34cca814f59ab3c0796204af9c39 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Mar 2018 19:12:24 +0000 Subject: [PATCH 261/724] fix(@schematics/angular): remove baseUrl from project tsconfigs In a multiple project environment, the workspace tsconfig should be used for path mapping and tooling. Having a baseUrl in the project tsconfigs would lead to either tooling or builds to be broken. --- .../test/browser/tsconfig-paths_spec_large.ts | 22 +++++++------------ .../application/files/tsconfig.app.json | 1 - .../application/files/tsconfig.spec.json | 1 - .../angular/e2e/files/tsconfig.e2e.json | 1 - .../files/__projectRoot__/tsconfig.spec.json | 1 - .../angular/workspace/files/tsconfig.json | 1 + .../projects/lib/tsconfig.spec.json | 1 - .../ng-packaged/tsconfig.json | 1 + .../hello-world-app/e2e/tsconfig.e2e.json | 1 - .../hello-world-app/src/tsconfig.app.json | 1 - .../hello-world-app/src/tsconfig.spec.json | 1 - .../hello-world-app/tsconfig.json | 1 + 12 files changed, 11 insertions(+), 22 deletions(-) diff --git a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts index 185acf7e4b..7f4a8d8cb9 100644 --- a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts @@ -15,18 +15,12 @@ describe('Browser Builder tsconfig paths', () => { afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - host.writeMultipleFiles({ - 'src/meaning-too.ts': 'export var meaning = 42;', - 'src/app/shared/meaning.ts': 'export var meaning = 42;', - 'src/app/shared/index.ts': `export * from './meaning'`, - }); - host.replaceInFile('src/app/app.module.ts', './app.component', '@root/app/app.component'); - host.replaceInFile('src/tsconfig.app.json', /"baseUrl": "[^"]*",/, ` + host.replaceInFile('tsconfig.json', /"baseUrl": ".\/",/, ` "baseUrl": "./", "paths": { "@root/*": [ - "./*" + "./src/*" ] }, `); @@ -42,27 +36,27 @@ describe('Browser Builder tsconfig paths', () => { 'src/app/shared/meaning.ts': 'export var meaning = 42;', 'src/app/shared/index.ts': `export * from './meaning'`, }); - host.replaceInFile('src/tsconfig.app.json', /"baseUrl": "[^"]*",/, ` + host.replaceInFile('tsconfig.json', /"baseUrl": ".\/",/, ` "baseUrl": "./", "paths": { "@shared": [ - "app/shared" + "src/app/shared" ], "@shared/*": [ - "app/shared/*" + "src/app/shared/*" ], "*": [ "*", - "app/shared/*" + "src/app/shared/*" ] }, `); host.appendToFile('src/app/app.component.ts', ` - import { meaning } from 'app/shared/meaning'; + import { meaning } from 'src/app/shared/meaning'; import { meaning as meaning2 } from '@shared'; import { meaning as meaning3 } from '@shared/meaning'; import { meaning as meaning4 } from 'meaning'; - import { meaning as meaning5 } from 'meaning-too'; + import { meaning as meaning5 } from 'src/meaning-too'; // need to use imports otherwise they are ignored and // no error is outputted, even if baseUrl/paths don't work diff --git a/packages/schematics/angular/application/files/tsconfig.app.json b/packages/schematics/angular/application/files/tsconfig.app.json index e5c80860db..df0a3ec393 100644 --- a/packages/schematics/angular/application/files/tsconfig.app.json +++ b/packages/schematics/angular/application/files/tsconfig.app.json @@ -2,7 +2,6 @@ "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/app", - "baseUrl": "./", "module": "es2015", "types": [] }, diff --git a/packages/schematics/angular/application/files/tsconfig.spec.json b/packages/schematics/angular/application/files/tsconfig.spec.json index 77fa229043..04c16e21f4 100644 --- a/packages/schematics/angular/application/files/tsconfig.spec.json +++ b/packages/schematics/angular/application/files/tsconfig.spec.json @@ -2,7 +2,6 @@ "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/spec", - "baseUrl": "./", "module": "commonjs", "types": [ "jasmine", diff --git a/packages/schematics/angular/e2e/files/tsconfig.e2e.json b/packages/schematics/angular/e2e/files/tsconfig.e2e.json index 8b92dbb6a3..a5e0455e5f 100644 --- a/packages/schematics/angular/e2e/files/tsconfig.e2e.json +++ b/packages/schematics/angular/e2e/files/tsconfig.e2e.json @@ -2,7 +2,6 @@ "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/app", - "baseUrl": "./", "module": "commonjs", "target": "es5", "types": [ diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json index a15b3bbc37..0ebff0e1ac 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json @@ -2,7 +2,6 @@ "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", "compilerOptions": { "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/spec", - "baseUrl": "./", "types": [ "jasmine", "node" diff --git a/packages/schematics/angular/workspace/files/tsconfig.json b/packages/schematics/angular/workspace/files/tsconfig.json index a6c016bf38..ef44e2862b 100644 --- a/packages/schematics/angular/workspace/files/tsconfig.json +++ b/packages/schematics/angular/workspace/files/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json index 1886944d46..16da33db07 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "baseUrl": "./", "types": [ "jasmine", "node" diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json index a6c016bf38..ef44e2862b 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json index 1d9e5edf09..39b800f789 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json @@ -2,7 +2,6 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/e2e", - "baseUrl": "./", "module": "commonjs", "target": "es5", "types": [ diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json index 39ba8dbacb..b90ffb0148 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json @@ -2,7 +2,6 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", - "baseUrl": "./", "module": "es2015", "types": [] }, diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json index 1a18e6d00c..8f7cedecab 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json @@ -2,7 +2,6 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/spec", - "baseUrl": "./", "module": "commonjs", "types": [ "jasmine", diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json b/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json index a6c016bf38..ef44e2862b 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, From 6b4288753ed78c2bf58cfd2f6fb03743a64725f2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 00:44:29 +0000 Subject: [PATCH 262/724] fix(@schematics/angular): update library peer dependencies for 6.x --- .../angular/library/files/__projectRoot__/package.json | 4 ++-- .../build_ng_packagr/ng-packaged/projects/lib/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/library/files/__projectRoot__/package.json b/packages/schematics/angular/library/files/__projectRoot__/package.json index b273265fbc..66125d35f0 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/package.json +++ b/packages/schematics/angular/library/files/__projectRoot__/package.json @@ -2,7 +2,7 @@ "name": "<%= dasherize(name) %>", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^5.2.0", - "@angular/core": "^5.2.0" + "@angular/common": "^6.0.0-rc.0 || ^6.0.0", + "@angular/core": "^6.0.0-rc.0 || ^6.0.0" } } \ No newline at end of file diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json index c82dc0425d..6c4cf3cf93 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json @@ -2,7 +2,7 @@ "name": "lib", "version": "0.0.1", "peerDependencies": { - "@angular/common": "^5.2.0", - "@angular/core": "^5.2.0" + "@angular/common": "^6.0.0-rc.0 || ^6.0.0", + "@angular/core": "^6.0.0-rc.0 || ^6.0.0" } } \ No newline at end of file From be7cc5b3f683ddb77f9b7182f1aeb6c205ae8656 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 00:54:37 +0000 Subject: [PATCH 263/724] fix(@schematics/angular): export lib component in NgModule --- packages/schematics/angular/library/index.ts | 1 + packages/schematics/angular/library/index_spec.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 8022309960..523fdcbedb 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -155,6 +155,7 @@ export default function (options: LibraryOptions): Rule { inlineTemplate: true, flat: true, path: sourceDir, + export: true, }), schematic('service', { name: name, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 469e93dd6e..37744281bc 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -78,6 +78,12 @@ describe('Library Schematic', () => { expect(workspace.projects.foo).toBeDefined(); }); + it('should export the component in the NgModule', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const fileContent = getFileContent(tree, '/projects/foo/src/lib/foo.module.ts'); + expect(fileContent).toContain('exports: [FooComponent]'); + }); + describe(`update package.json`, () => { it(`should add ng-packagr to devDependencies`, () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); From 31f942cae697c07d96ec64a64dfe6a08b266cb9d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 15:16:10 +0000 Subject: [PATCH 264/724] fix(@schematics/angular): use centralized known versions --- packages/schematics/angular/library/index.ts | 13 +++++---- .../schematics/angular/library/index_spec.ts | 17 +++++++++-- .../angular/utility/latest-versions.ts | 14 ++++++++++ .../angular/workspace/files/package.json | 28 +++++++++---------- .../schematics/angular/workspace/index.ts | 2 ++ .../angular/workspace/index_spec.ts | 10 +++++++ 6 files changed, 63 insertions(+), 21 deletions(-) create mode 100644 packages/schematics/angular/utility/latest-versions.ts diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 523fdcbedb..27387a0c1d 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -20,6 +20,7 @@ import { url, } from '@angular-devkit/schematics'; import { WorkspaceSchema, getWorkspace, getWorkspacePath } from '../utility/config'; +import { latestVersions } from '../utility/latest-versions'; import { Schema as LibraryOptions } from './schema'; @@ -57,14 +58,16 @@ function addDependenciesAndScriptsToPackageJson() { if (!host.exists('package.json')) { return host; } return updateJsonFile(host, 'package.json', (json: PackageJsonPartialType) => { + + if (!json['dependencies']) { json['dependencies'] = {}; } json.dependencies = { - '@angular/common': '^5.2.0', - '@angular/core': '^5.2.0', - '@angular/compiler': '^5.0.0', + '@angular/common': latestVersions.Angular, + '@angular/core': latestVersions.Angular, + '@angular/compiler': latestVersions.Angular, // De-structure last keeps existing user dependencies. ...json.dependencies, }; @@ -74,11 +77,11 @@ function addDependenciesAndScriptsToPackageJson() { } json.devDependencies = { - '@angular/compiler-cli': '^5.0.0', + '@angular/compiler-cli': latestVersions.Angular, 'ng-packagr': '^2.2.0', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', - 'typescript': '>=2.4.2', + 'typescript': latestVersions.TypeScript, // De-structure last keeps existing user dependencies. ...json.devDependencies, }; diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 37744281bc..f5ab1d1db9 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -8,6 +8,7 @@ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; import { getFileContent } from '../../angular/utility/test'; +import { latestVersions } from '../utility/latest-versions'; import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as GenerateLibrarySchema } from './schema'; @@ -92,11 +93,23 @@ describe('Library Schematic', () => { expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.2.0'); }); - it(`should not override existing users dependencies`, () => { + it('should use the latest known versions in package.json', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const pkg = JSON.parse(tree.readContent('/package.json')); + expect(pkg.devDependencies['@angular/compiler-cli']).toEqual(latestVersions.Angular); + expect(pkg.devDependencies['typescript']).toEqual(latestVersions.TypeScript); + }); + it(`should not override existing users dependencies`, () => { + const oldPackageJson = workspaceTree.readContent('package.json'); + workspaceTree.overwrite('package.json', oldPackageJson.replace( + `"typescript": "${latestVersions.TypeScript}"`, + `"typescript": "~2.5.2"`, + )); + + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.devDependencies.typescript).toEqual('~2.7.2'); + expect(packageJson.devDependencies.typescript).toEqual('~2.5.2'); }); it(`should not modify the file when --skipPackageJson`, () => { diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts new file mode 100644 index 0000000000..eec41dabf9 --- /dev/null +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export const latestVersions = { + Angular: '^5.2.9', + RxJs: '^5.5.7', + ZoneJs: '^0.8.20', + TypeScript: '~2.6.2', +}; diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index 90e1561ab0..9591aa3268 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -12,23 +12,23 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.2.0", - "@angular/common": "^5.2.0", - "@angular/compiler": "^5.2.0", - "@angular/core": "^5.2.0", - "@angular/forms": "^5.2.0", - "@angular/http": "^5.2.0", - "@angular/platform-browser": "^5.2.0", - "@angular/platform-browser-dynamic": "^5.2.0", - "@angular/router": "^5.2.0", + "@angular/animations": "<%= latestVersions.Angular %>", + "@angular/common": "<%= latestVersions.Angular %>", + "@angular/compiler": "<%= latestVersions.Angular %>", + "@angular/core": "<%= latestVersions.Angular %>", + "@angular/forms": "<%= latestVersions.Angular %>", + "@angular/http": "<%= latestVersions.Angular %>", + "@angular/platform-browser": "<%= latestVersions.Angular %>", + "@angular/platform-browser-dynamic": "<%= latestVersions.Angular %>", + "@angular/router": "<%= latestVersions.Angular %>", "core-js": "^2.4.1", - "rxjs": "^5.5.6", - "zone.js": "^0.8.19" + "rxjs": "<%= latestVersions.RxJs %>", + "zone.js": "<%= latestVersions.ZoneJs %>" }, "devDependencies": { "@angular/cli": "~<%= version %>", - "@angular/compiler-cli": "^5.2.0", - "@angular/language-service": "^5.2.0", + "@angular/compiler-cli": "<%= latestVersions.Angular %>", + "@angular/language-service": "<%= latestVersions.Angular %>", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", @@ -43,6 +43,6 @@ "protractor": "~5.3.0", "ts-node": "~5.0.0", "tslint": "~5.9.1", - "typescript": ">=2.4.2 <2.7.0" + "typescript": "<%= latestVersions.TypeScript %>" } } diff --git a/packages/schematics/angular/workspace/index.ts b/packages/schematics/angular/workspace/index.ts index ec38cd13b3..98f9aa0069 100644 --- a/packages/schematics/angular/workspace/index.ts +++ b/packages/schematics/angular/workspace/index.ts @@ -15,6 +15,7 @@ import { template, url, } from '@angular-devkit/schematics'; +import { latestVersions } from '../utility/latest-versions'; import { Schema as WorkspaceOptions } from './schema'; export default function (options: WorkspaceOptions): Rule { @@ -25,6 +26,7 @@ export default function (options: WorkspaceOptions): Rule { utils: strings, ...options, 'dot': '.', + latestVersions, }), ]))(host, context); }; diff --git a/packages/schematics/angular/workspace/index_spec.ts b/packages/schematics/angular/workspace/index_spec.ts index 6b57fc30f8..669403396c 100644 --- a/packages/schematics/angular/workspace/index_spec.ts +++ b/packages/schematics/angular/workspace/index_spec.ts @@ -7,6 +7,7 @@ */ import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; import * as path from 'path'; +import { latestVersions } from '../utility/latest-versions'; import { Schema as WorkspaceOptions } from './schema'; @@ -45,4 +46,13 @@ describe('Workspace Schematic', () => { const pkg = JSON.parse(tree.readContent('/package.json')); expect(pkg.devDependencies['@angular/cli']).toMatch('6.0.0'); }); + + it('should use the latest known versions in package.json', () => { + const tree = schematicRunner.runSchematic('workspace', defaultOptions); + const pkg = JSON.parse(tree.readContent('/package.json')); + expect(pkg.dependencies['@angular/core']).toEqual(latestVersions.Angular); + expect(pkg.dependencies['rxjs']).toEqual(latestVersions.RxJs); + expect(pkg.dependencies['zone.js']).toEqual(latestVersions.ZoneJs); + expect(pkg.devDependencies['typescript']).toEqual(latestVersions.TypeScript); + }); }); From 1a9ef3e37992324a5f0184d82e61f724f02ed11b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 15:28:01 +0000 Subject: [PATCH 265/724] fix(@angular-devkit/build-webpack): use basename for index path --- .../src/angular-cli-files/models/webpack-configs/browser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts index 0beaec16ae..ba046b8bc2 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts @@ -113,7 +113,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { plugins: extraPlugins.concat([ new IndexHtmlWebpackPlugin({ input: path.resolve(root, appConfig.index), - output: path.relative(projectRoot, path.resolve(root, appConfig.index)), + output: path.basename(appConfig.index), baseHref: buildOptions.baseHref, entrypoints: generateEntryPoints(appConfig), deployUrl: buildOptions.deployUrl, From 553cd89f03da4472ec305d3cb9fc718f11a6b63b Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 22 Mar 2018 18:05:23 -0400 Subject: [PATCH 266/724] fix(@schematics/angular): Fix typo in workspace generation --- packages/schematics/angular/application/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 2088963800..2893889c70 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -90,7 +90,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, { glob: '**/*', - input: `${projectRoot}/assets>`, + input: `${projectRoot}/assets`, output: 'assets', }, ], From 6a7a302dc6c4ca6dd5796d3c398645dabd4d30cf Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 22 Mar 2018 08:46:48 -0700 Subject: [PATCH 267/724] feat(@angular-devkit/core): add an alias host That can alias paths from one to another. --- .../core/src/virtual-fs/host/alias.ts | 132 ++++++++++++++++++ .../core/src/virtual-fs/host/alias_spec.ts | 59 ++++++++ .../core/src/virtual-fs/host/index.ts | 1 + 3 files changed, 192 insertions(+) create mode 100644 packages/angular_devkit/core/src/virtual-fs/host/alias.ts create mode 100644 packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts diff --git a/packages/angular_devkit/core/src/virtual-fs/host/alias.ts b/packages/angular_devkit/core/src/virtual-fs/host/alias.ts new file mode 100644 index 0000000000..6fefaec917 --- /dev/null +++ b/packages/angular_devkit/core/src/virtual-fs/host/alias.ts @@ -0,0 +1,132 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Observable } from 'rxjs/Observable'; +import { NormalizedRoot, Path, PathFragment, join, split } from '../path'; +import { + FileBuffer, + Host, + HostCapabilities, + HostWatchEvent, + HostWatchOptions, + Stats, +} from './interface'; + + +/** + * A Virtual Host that allow to alias some paths to other paths. + * + * This does not verify, when setting an alias, that the target or source exist. Neither does it + * check whether it's a file or a directory. Please not that directories are also renamed/replaced. + * + * No recursion is done on the resolution, which means the following is perfectly valid then: + * + * ``` + * host.aliases.set(normalize('/file/a'), normalize('/file/b')); + * host.aliases.set(normalize('/file/b'), normalize('/file/a')); + * ``` + * + * This will result in a proper swap of two files for each others. + * + * @example + * const host = new SimpleMemoryHost(); + * host.write(normalize('/some/file'), content).subscribe(); + * + * const aHost = new AliasHost(host); + * aHost.read(normalize('/some/file')) + * .subscribe(x => expect(x).toBe(content)); + * aHost.aliases.set(normalize('/some/file'), normalize('/other/path'); + * + * // This file will not exist because /other/path does not exist. + * aHost.read(normalize('/some/file')) + * .subscribe(undefined, err => expect(err.message).toMatch(/does not exist/)); + * + * @example + * const host = new SimpleMemoryHost(); + * host.write(normalize('/some/folder/file'), content).subscribe(); + * + * const aHost = new AliasHost(host); + * aHost.read(normalize('/some/folder/file')) + * .subscribe(x => expect(x).toBe(content)); + * aHost.aliases.set(normalize('/some'), normalize('/other'); + * + * // This file will not exist because /other/path does not exist. + * aHost.read(normalize('/some/folder/file')) + * .subscribe(undefined, err => expect(err.message).toMatch(/does not exist/)); + * + * // Create the file with new content and verify that this has the new content. + * aHost.write(normalize('/other/folder/file'), content2).subscribe(); + * aHost.read(normalize('/some/folder/file')) + * .subscribe(x => expect(x).toBe(content2)); + */ +export class AliasHost implements Host { + protected _aliases = new Map(); + + constructor(protected _delegate: Host) {} + + protected _resolve(path: Path) { + let maybeAlias = this._aliases.get(path); + const sp = split(path); + const remaining: PathFragment[] = []; + + // Also resolve all parents of the requested files, only picking the first one that matches. + // This can have surprising behaviour when aliases are inside another alias. It will always + // use the closest one to the file. + while (!maybeAlias && sp.length > 0) { + const p = join(NormalizedRoot, ...sp); + maybeAlias = this._aliases.get(p); + + if (maybeAlias) { + maybeAlias = join(maybeAlias, ...remaining); + } + // Allow non-null-operator because we know sp.length > 0 (condition on while). + remaining.unshift(sp.pop() !); // tslint:disable-line:non-null-operator + } + + return maybeAlias || path; + } + + get aliases(): Map { return this._aliases; } + get capabilities(): HostCapabilities { return this._delegate.capabilities; } + + write(path: Path, content: FileBuffer): Observable { + return this._delegate.write(this._resolve(path), content); + } + read(path: Path): Observable { + return this._delegate.read(this._resolve(path)); + } + delete(path: Path): Observable { + return this._delegate.delete(this._resolve(path)); + } + rename(from: Path, to: Path): Observable { + return this._delegate.rename(this._resolve(from), this._resolve(to)); + } + + list(path: Path): Observable { + return this._delegate.list(this._resolve(path)); + } + + exists(path: Path): Observable { + return this._delegate.exists(this._resolve(path)); + } + isDirectory(path: Path): Observable { + return this._delegate.isDirectory(this._resolve(path)); + } + isFile(path: Path): Observable { + return this._delegate.isFile(this._resolve(path)); + } + + // Some hosts may not support stat. + stat(path: Path): Observable> | null { + return this._delegate.stat(this._resolve(path)); + } + + // Some hosts may not support watching. + watch(path: Path, options?: HostWatchOptions): Observable | null { + return this._delegate.watch(this._resolve(path), options); + } +} diff --git a/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts new file mode 100644 index 0000000000..f6aa537d73 --- /dev/null +++ b/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts @@ -0,0 +1,59 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { normalize } from '..'; +import { AliasHost } from './alias'; +import { stringToFileBuffer } from './buffer'; +import { SimpleMemoryHost } from './memory'; + +describe('AliasHost', () => { + it('works as in the example', () => { + const content = stringToFileBuffer('hello world'); + + const host = new SimpleMemoryHost(); + host.write(normalize('/some/file'), content).subscribe(); + + const aHost = new AliasHost(host); + aHost.read(normalize('/some/file')) + .subscribe(x => expect(x).toBe(content)); + aHost.aliases.set(normalize('/some/file'), normalize('/other/path')); + + // This file will not exist because /other/path does not exist. + try { + aHost.read(normalize('/some/file')) + .subscribe(undefined, err => { + expect(err.message).toMatch(/does not exist/); + }); + } catch (e) { + // Ignore it. RxJS <6 still throw errors when they happen synchronously. + } + }); + + it('works as in the example (2)', () => { + const content = stringToFileBuffer('hello world'); + const content2 = stringToFileBuffer('hello world 2'); + + const host = new SimpleMemoryHost(); + host.write(normalize('/some/folder/file'), content).subscribe(); + + const aHost = new AliasHost(host); + aHost.read(normalize('/some/folder/file')) + .subscribe(x => expect(x).toBe(content)); + aHost.aliases.set(normalize('/some'), normalize('/other'); + + // This file will not exist because /other/path does not exist. + try { + aHost.read(normalize('/some/folder/file')) + .subscribe(undefined, err => expect(err.message).toMatch(/does not exist/)); + } catch (e) {} + + // Create the file with new content and verify that this has the new content. + aHost.write(normalize('/other/folder/file'), content2).subscribe(); + aHost.read(normalize('/some/folder/file')) + .subscribe(x => expect(x).toBe(content2)); + }); +}); diff --git a/packages/angular_devkit/core/src/virtual-fs/host/index.ts b/packages/angular_devkit/core/src/virtual-fs/host/index.ts index e959f3df56..a1973c868f 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/index.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/index.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ +export * from './alias'; export * from './buffer'; export * from './interface'; export * from './memory'; From bc325022f3f061a6830cf419c77721b4b4db4f35 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 22 Mar 2018 12:09:03 -0700 Subject: [PATCH 268/724] feat(@angular-devkit/build-webpack): add support for file replacements This should replace the environment concept with a more flexible design. --- .../build_webpack/src/browser/index.ts | 36 ++++++++----- .../build_webpack/src/browser/schema.json | 18 +++++-- .../test/browser/replacements_spec_large.ts | 52 +++++++++++++++++++ .../core/src/virtual-fs/host/alias_spec.ts | 2 +- 4 files changed, 90 insertions(+), 18 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 2d5100c536..471816ebf7 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -5,14 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ - import { BuildEvent, Builder, BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; import { concat as concatObservable } from 'rxjs/observable/concat'; @@ -90,11 +89,7 @@ export interface BrowserBuilderOptions { styles: ExtraEntryPoint[]; stylePreprocessorOptions: { includePaths: string[] }; - // Some options are not needed anymore. - // app?: string; // apps aren't used with build facade - - // TODO: figure out what to do about these. - environment?: string; // Maybe replace with 'fileReplacement' object? + fileReplacements: { from: string; to: string; }[]; } export interface AssetPattern { @@ -130,7 +125,7 @@ export class BrowserBuilder implements Builder { return concatObservable( options.deleteOutputPath - ? this._deleteOutputDir(root, normalize(options.outputPath)) + ? this._deleteOutputDir(root, normalize(options.outputPath), this.context.host) : empty(), new Observable(obs => { // Ensure Build Optimizer is only used with AOT. @@ -207,9 +202,22 @@ export class BrowserBuilder implements Builder { ); } - buildWebpackConfig(root: Path, projectRoot: Path, options: BrowserBuilderOptions) { + buildWebpackConfig( + root: Path, + projectRoot: Path, + options: BrowserBuilderOptions, + ) { let wco: WebpackConfigOptions; + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); + + options.fileReplacements.forEach(({from, to}) => { + host.aliases.set( + join(root, normalize(from)), + join(root, normalize(to)), + ); + }); + // TODO: make target defaults into configurations instead // options = this.addTargetDefaults(options); @@ -268,24 +276,24 @@ export class BrowserBuilder implements Builder { if (wco.appConfig.main || wco.appConfig.polyfills) { const typescriptConfigPartial = wco.buildOptions.aot - ? getAotConfig(wco, this.context.host as virtualFs.Host) - : getNonAotConfig(wco, this.context.host as virtualFs.Host); + ? getAotConfig(wco, host) + : getNonAotConfig(wco, host); webpackConfigs.push(typescriptConfigPartial); } return webpackMerge(webpackConfigs); } - private _deleteOutputDir(root: Path, outputPath: Path): Observable { + private _deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host): Observable { const resolvedOutputPath = resolve(root, outputPath); if (resolvedOutputPath === root) { throw new Error('Output path MUST not be project root directory!'); } - return this.context.host.exists(resolvedOutputPath).pipe( + return host.exists(resolvedOutputPath).pipe( switchMap(exists => { if (exists) { - return this.context.host.delete(resolvedOutputPath); + return host.delete(resolvedOutputPath); } else { return empty(); } diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 17561abca1..8c90d03869 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -58,9 +58,21 @@ "description": "Defines the optimization level of the build.", "default": false }, - "environment": { - "type": "string", - "description": "Defines the build environment." + "fileReplacements": { + "description": "Replace files with other files in the build.", + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + }, + "default": [] }, "outputPath": { "type": "string", diff --git a/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts new file mode 100644 index 0000000000..da9be6af82 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts @@ -0,0 +1,52 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { tap } from 'rxjs/operators'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; + + +describe('Browser Builder', () => { + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('allows file replacements', (done) => { + host.writeMultipleFiles({ + 'src/meaning-too.ts': 'export var meaning = 42;', + 'src/meaning.ts': `export var meaning = 10;`, + + 'src/main.ts': ` + import { meaning } from './meaning'; + + console.log(meaning); + `, + }); + + const overrides = { + fileReplacements: [ + { + from: normalize('/src/meaning.ts'), + to: normalize('/src/meaning-too.ts'), + }, + ], + }; + + runTargetSpec(host, browserTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.js'); + expect(virtualFs.fileBufferToString(host.scopedSync().read(fileName))) + .toMatch(/meaning\s*=\s*42/); + expect(virtualFs.fileBufferToString(host.scopedSync().read(fileName))) + .not.toMatch(/meaning\s*=\s*10/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); diff --git a/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts index f6aa537d73..6283b63e68 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/alias_spec.ts @@ -43,7 +43,7 @@ describe('AliasHost', () => { const aHost = new AliasHost(host); aHost.read(normalize('/some/folder/file')) .subscribe(x => expect(x).toBe(content)); - aHost.aliases.set(normalize('/some'), normalize('/other'); + aHost.aliases.set(normalize('/some'), normalize('/other')); // This file will not exist because /other/path does not exist. try { From 58c58c0b8df65f52c3c54cd343dc191f6b2acde0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 23:22:27 +0000 Subject: [PATCH 269/724] fix(@schematics/angular): add file replacements to production configs --- packages/schematics/angular/application/index.ts | 4 ++++ .../build_webpack/hello-world-app/.angular.json | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 2893889c70..e3c1425055 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -103,6 +103,10 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, configurations: { production: { + fileReplacements: [{ + from: `${projectRoot}/src/environments/environments.ts`, + to: `${projectRoot}/src/environments/environments.prod.ts`, + }], optimization: true, outputHashing: 'all', sourceMap: false, diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json index 3751cf4f39..0adc33789e 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json @@ -41,6 +41,12 @@ }, "configurations": { "production": { + "fileReplacements": [ + { + "from": "src/environments/environments.ts", + "to": "src/environments/environments.prod.ts" + } + ], "optimization": true, "outputHashing": "all", "sourceMap": false, From 386a31b03aa27fbcc8faa1bf273a1119ae2620c2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 23:34:20 +0000 Subject: [PATCH 270/724] refactor: rename specs with same name --- .../build_webpack/test/browser/rebuild_spec_large.ts | 2 +- .../build_webpack/test/browser/replacements_spec_large.ts | 2 +- .../build_webpack/test/browser/works_spec_large.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts index 4ca4b80e77..aff7cdb8d1 100644 --- a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts @@ -12,7 +12,7 @@ import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; -describe('Browser Builder', () => { +describe('Browser Builder rebuilds', () => { const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); diff --git a/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts index da9be6af82..0bd2d38dd8 100644 --- a/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts @@ -11,7 +11,7 @@ import { tap } from 'rxjs/operators'; import { browserTargetSpec, host, runTargetSpec } from '../utils'; -describe('Browser Builder', () => { +describe('Browser Builder file replacements', () => { const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts index 0396ca25a5..c2ad432c9c 100644 --- a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts @@ -11,7 +11,7 @@ import { tap } from 'rxjs/operators'; import { browserTargetSpec, host, runTargetSpec } from '../utils'; -describe('Browser Builder', () => { +describe('Browser Builder basic test', () => { const outputPath = normalize('dist'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); From 02258680b23829365e0bb4c7dfeb893002f03029 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 23:41:08 +0000 Subject: [PATCH 271/724] test(@angular-devkit/build-webpack): add failing file replacement test --- .../browser/file-replacements_spec_large.ts | 99 ------------------- .../test/browser/replacements_spec_large.ts | 27 +++-- 2 files changed, 21 insertions(+), 105 deletions(-) delete mode 100644 packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts deleted file mode 100644 index 360d7099e8..0000000000 --- a/packages/angular_devkit/build_webpack/test/browser/file-replacements_spec_large.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -// import { Architect } from '@angular-devkit/architect'; -// import { join, normalize, virtualFs } from '@angular-devkit/core'; -// import { concatMap, tap } from 'rxjs/operators'; -// import { host, browserTargetSpec, makeWorkspace } from '../utils'; - - -// TODO: re-enable this test when the functionality is implemented, wether by option or via VFS. -// describe('Browser Builder file replacements', () => { -// -// const architect = new Architect(normalize(workspaceRoot), host); -// const outputPath = normalize('dist'); - -// beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); -// afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - -// it('works', (done) => { -// const overrides = { -// fileReplacements: [ -// { from: 'src/environments/environment.ts', to: 'src/environments/environment.prod.ts' }, -// ], -// }; - -// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( -// concatMap(() => architect.run(architect.getTarget({ overrides }))), -// tap(() => { -// const fileName = join(outputPath, 'main.js'); -// const content = virtualFs.fileBufferToString(host.scopedSync().read(fileName)); -// expect(content).toContain('production: true'); -// }), -// ).subscribe(undefined, done.fail, done); -// }, 30000); - -// it(`fails with missing 'from' file`, (done) => { -// const overrides = { -// fileReplacements: [ -// { -// from: 'src/environments/environment.potato.ts', -// to: 'src/environments/environment.prod.ts', -// }, -// ], -// }; - -// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( -// concatMap(() => architect.run(architect.getTarget({ overrides }))), -// tap((buildEvent) => expect(buildEvent.success).toBe(false)), -// ).subscribe(undefined, done.fail, done); -// }, 30000); - -// it(`fails with missing 'to' file`, (done) => { -// const overrides = { -// fileReplacements: [ -// { -// from: 'src/environments/environment.ts', -// to: 'src/environments/environment.potato.ts', -// }, -// ], -// }; - -// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( -// concatMap(() => architect.run(architect.getTarget({ overrides }))), -// tap((buildEvent) => expect(buildEvent.success).toBe(false)), -// ).subscribe(undefined, done.fail, done); -// }, 30000); -// }); - -// TODO: Also add a karma test like the one below. -// export default function () { -// // Tests run in 'dev' environment by default. -// return writeFile('src/app/environment.spec.ts', ` -// import { environment } from '../environments/environment'; - -// describe('Test environment', () => { -// it('should have production disabled', () => { -// expect(environment.production).toBe(false); -// }); -// }); -// `) -// .then(() => ng('test', '--single-run')) - -// // Tests can run in different environment. -// .then(() => writeFile('src/app/environment.spec.ts', ` -// import { environment } from '../environments/environment'; - -// describe('Test environment', () => { -// it('should have production enabled', () => { -// expect(environment.production).toBe(true); -// }); -// }); -// `)) -// .then(() => ng('test', '-e', 'prod', '--single-run')); -// } diff --git a/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts index 0bd2d38dd8..acdb5637d5 100644 --- a/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts @@ -17,18 +17,18 @@ describe('Browser Builder file replacements', () => { beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - it('allows file replacements', (done) => { - host.writeMultipleFiles({ - 'src/meaning-too.ts': 'export var meaning = 42;', - 'src/meaning.ts': `export var meaning = 10;`, + beforeEach(() => host.writeMultipleFiles({ + 'src/meaning-too.ts': 'export var meaning = 42;', + 'src/meaning.ts': `export var meaning = 10;`, - 'src/main.ts': ` + 'src/main.ts': ` import { meaning } from './meaning'; console.log(meaning); `, - }); + })); + it('allows file replacements', (done) => { const overrides = { fileReplacements: [ { @@ -49,4 +49,19 @@ describe('Browser Builder file replacements', () => { }), ).subscribe(undefined, done.fail, done); }, 30000); + + it(`fails compilation with missing 'to' file`, (done) => { + const overrides = { + fileReplacements: [ + { + from: normalize('/src/meaning.ts'), + to: normalize('/src/meaning-three.ts'), + }, + ], + }; + + runTargetSpec(host, browserTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); }); From 9bc7f6deabab1848bce069cc7067b74c9978516e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 22 Mar 2018 23:47:22 +0000 Subject: [PATCH 272/724] feat(@angular-devkit/build-webpack): support file replacement in karma --- .../build_webpack/src/karma/index.ts | 16 +++++-- .../build_webpack/src/karma/schema.json | 16 +++++++ .../test/karma/replacements_spec_large.ts | 45 +++++++++++++++++++ 3 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/test/karma/replacements_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_webpack/src/karma/index.ts index 6539ce8c97..e443fed7a5 100644 --- a/packages/angular_devkit/build_webpack/src/karma/index.ts +++ b/packages/angular_devkit/build_webpack/src/karma/index.ts @@ -12,7 +12,7 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies @@ -63,8 +63,7 @@ export interface KarmaBuilderOptions { // logLevel?: string; // same as above // reporters?: string; // same as above - // TODO: figure out what to do about these. - environment?: string; // Maybe replace with 'fileReplacement' object? + fileReplacements: { from: string; to: string; }[]; } export class KarmaBuilder implements Builder { @@ -129,6 +128,15 @@ export class KarmaBuilder implements Builder { // tslint:disable-next-line:no-any let wco: any; + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); + + options.fileReplacements.forEach(({ from, to }) => { + host.aliases.set( + join(root, normalize(from)), + join(root, normalize(to)), + ); + }); + const tsconfigPath = getSystemPath(resolve(root, normalize(options.tsConfig as string))); const tsConfig = readTsconfig(tsconfigPath); @@ -159,7 +167,7 @@ export class KarmaBuilder implements Builder { const webpackConfigs: {}[] = [ getCommonConfig(wco), getStylesConfig(wco), - getNonAotTestConfig(wco, this.context.host as virtualFs.Host), + getNonAotTestConfig(wco, host), getTestConfig(wco), ]; diff --git a/packages/angular_devkit/build_webpack/src/karma/schema.json b/packages/angular_devkit/build_webpack/src/karma/schema.json index fa29a32e06..b21cc4ec86 100644 --- a/packages/angular_devkit/build_webpack/src/karma/schema.json +++ b/packages/angular_devkit/build_webpack/src/karma/schema.json @@ -102,6 +102,22 @@ "type": "string" }, "default": [] + }, + "fileReplacements": { + "description": "Replace files with other files in the build.", + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + }, + "default": [] } }, "additionalProperties": false, diff --git a/packages/angular_devkit/build_webpack/test/karma/replacements_spec_large.ts b/packages/angular_devkit/build_webpack/test/karma/replacements_spec_large.ts new file mode 100644 index 0000000000..263ee3e6bc --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/karma/replacements_spec_large.ts @@ -0,0 +1,45 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { normalize } from '@angular-devkit/core'; +import { tap } from 'rxjs/operators'; +import { host, karmaTargetSpec, runTargetSpec } from '../utils'; + + +describe('Karma Builder file replacements', () => { + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('allows file replacements', (done) => { + host.writeMultipleFiles({ + 'src/meaning-too.ts': 'export var meaning = 42;', + 'src/meaning.ts': `export var meaning = 10;`, + + 'src/test.ts': ` + import { meaning } from './meaning'; + + describe('Test file replacement', () => { + it('should replace file', () => { + expect(meaning).toBe(42); + }); + }); + `, + }); + + const overrides = { + fileReplacements: [{ + from: normalize('/src/meaning.ts'), + to: normalize('/src/meaning-too.ts'), + }], + }; + + runTargetSpec(host, karmaTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); From d2c74f7f079255e8701af1521fafe25ada41e745 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 23 Mar 2018 00:23:43 +0000 Subject: [PATCH 273/724] fix(@angular-devkit/architect-cli): accept angular workspace filenames --- .../angular_devkit/architect_cli/bin/architect.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index 424626ab1b..222b607a16 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -81,11 +81,17 @@ if (targetStr) { // Load workspace configuration file. const currentPath = process.cwd(); -const configFileName = '.workspace.json'; -const configFilePath = findUp([configFileName], currentPath); +const configFileNames = [ + 'angular.json', + '.angular.json', + 'workspace.json', + '.workspace.json', +]; + +const configFilePath = findUp(configFileNames, currentPath); if (!configFilePath) { - logger.fatal(`Workspace configuration file (${configFileName}) cannot be found in ` + logger.fatal(`Workspace configuration file (${configFileNames.join(', ')}) cannot be found in ` + `'${currentPath}' or in parent directories.`); process.exit(3); throw 3; // TypeScript doesn't know that process.exit() never returns. From d01deecb09b4f11753f7773dd7153e913578aa06 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 23 Mar 2018 00:45:05 +0000 Subject: [PATCH 274/724] fix(@schematics/angular): use correct asset input --- packages/schematics/angular/application/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index e3c1425055..ba5c0402f2 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -85,12 +85,12 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace assets: [ { glob: 'favicon.ico', - input: `${projectRoot}`, + input: `${projectRoot}/src`, output: './', }, { glob: '**/*', - input: `${projectRoot}/assets`, + input: `${projectRoot}/src/assets`, output: 'assets', }, ], @@ -152,12 +152,12 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace assets: [ { glob: 'favicon.ico', - input: `${projectRoot}/`, + input: `${projectRoot}/src/`, output: './', }, { glob: '**/*', - input: `${projectRoot}/assets`, + input: `${projectRoot}/src/assets`, output: 'assets', }, ], From caf9a5e720f68df1f57c8b316ec1a320abeac91e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 23 Mar 2018 00:49:05 +0000 Subject: [PATCH 275/724] fix(@angular-devkit/build-webpack): use basename on fallback as well --- packages/angular_devkit/build_webpack/src/dev-server/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index 50ec1d725d..dfaf89c406 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -234,9 +234,7 @@ export class DevServerBuilder implements Builder { const config: WebpackDevServerConfigurationOptions = { headers: { 'Access-Control-Allow-Origin': '*' }, historyApiFallback: { - index: `${servePath}/${ - path.relative(projectRoot, path.resolve(root, browserOptions.index)) - }`, + index: `${servePath}/${path.basename(browserOptions.index)}`, disableDotRule: true, htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'], }, From eb93adffd1c393927fcd1e375fbdaed4a3b3e98d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 23 Mar 2018 01:33:49 +0000 Subject: [PATCH 276/724] fix(@angular-devkit/build-webpack): always build after delete dir The browser builder was not building after deleting the output dir. It now does the same as the server builder. --- .../build_webpack/src/browser/index.ts | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 471816ebf7..8572c30e50 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -14,9 +14,8 @@ import { import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable } from 'rxjs/Observable'; -import { concat as concatObservable } from 'rxjs/observable/concat'; -import { empty } from 'rxjs/observable/empty'; -import { ignoreElements, switchMap } from 'rxjs/operators'; +import { of } from 'rxjs/observable/of'; +import { concat, concatMap } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import * as webpack from 'webpack'; import { @@ -123,11 +122,11 @@ export class BrowserBuilder implements Builder { const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); - return concatObservable( - options.deleteOutputPath + return of(null).pipe( + concatMap(() => options.deleteOutputPath ? this._deleteOutputDir(root, normalize(options.outputPath), this.context.host) - : empty(), - new Observable(obs => { + : of(null)), + concatMap(() => new Observable(obs => { // Ensure Build Optimizer is only used with AOT. if (options.buildOptimizer && !options.aot) { throw new Error('The `--build-optimizer` option cannot be used without `--aot`.'); @@ -198,7 +197,7 @@ export class BrowserBuilder implements Builder { } throw err; } - }), + })), ); } @@ -211,7 +210,7 @@ export class BrowserBuilder implements Builder { const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); - options.fileReplacements.forEach(({from, to}) => { + options.fileReplacements.forEach(({ from, to }) => { host.aliases.set( join(root, normalize(from)), join(root, normalize(to)), @@ -284,21 +283,18 @@ export class BrowserBuilder implements Builder { return webpackMerge(webpackConfigs); } - private _deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host): Observable { + private _deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host) { const resolvedOutputPath = resolve(root, outputPath); if (resolvedOutputPath === root) { throw new Error('Output path MUST not be project root directory!'); } return host.exists(resolvedOutputPath).pipe( - switchMap(exists => { - if (exists) { - return host.delete(resolvedOutputPath); - } else { - return empty(); - } - }), - ignoreElements(), + concatMap(exists => exists + // TODO: remove this concat once host ops emit an event. + ? host.delete(resolvedOutputPath).pipe(concat(of(null))) + // ? of(null) + : of(null)), ); } } From 32ad58e8497c8b2f9e43dd9a7b1eee0acd9033f2 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 9 Mar 2018 14:43:25 -0500 Subject: [PATCH 277/724] refactor(@angular-devkit/build-webpack): update autoprefixer to v8.1 --- package-lock.json | 32 +++++++++---------- package.json | 2 +- .../angular_devkit/build_webpack/package.json | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3439f203a8..95cb8d1ecc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -705,12 +705,12 @@ "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" }, "autoprefixer": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.3.tgz", - "integrity": "sha512-dqzVGiz3v934+s3YZA6nk7tAs9xuTz5wMJbX1M+L4cY/MTNkOUqP61c1GWkEVlUL/PEy1pKRSCFuoRZrXYx9qA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.1.0.tgz", + "integrity": "sha512-b6mjq6VZ0guW6evRkKXL5sSSvIXICAE9dyWReZ3l/riidU7bVaJMe5cQ512SmaLA4Pvgnhi5MFsMs/Mvyh9//Q==", "requires": { - "browserslist": "2.10.0", - "caniuse-lite": "1.0.30000784", + "browserslist": "3.1.2", + "caniuse-lite": "1.0.30000813", "normalize-range": "0.1.2", "num2fraction": "1.2.2", "postcss": "6.0.19", @@ -1306,12 +1306,12 @@ } }, "browserslist": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.10.0.tgz", - "integrity": "sha512-WyvzSLsuAVPOjbljXnyeWl14Ae+ukAT8MUuagKVzIDvwBxl4UAwD1xqtyQs2eWYPGUKMeC3Ol62goqYuKqTTcw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.1.2.tgz", + "integrity": "sha512-iO5MiK7MZXejqfnCK8onktxxb+mcW+KMiL/5gGF/UCWvVgPzbgbkA5cyYfqj/IIHHo7X1z0znrSHPw9AIfpvrw==", "requires": { - "caniuse-lite": "1.0.30000784", - "electron-to-chromium": "1.3.28" + "caniuse-lite": "1.0.30000813", + "electron-to-chromium": "1.3.37" } }, "buffer": { @@ -1497,9 +1497,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000784", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz", - "integrity": "sha1-EpztdOmhKApEGIC2zSvOMO9Z5sA=" + "version": "1.0.30000813", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000813.tgz", + "integrity": "sha512-A8ITSmH5SFdMFdC704ggjg+x2z5PzQmVlG8tavwnfvbC33Q1UYrj0+G+Xm0SNAnd4He36fwUE/KEWytOEchw+A==" }, "capture-stack-trace": { "version": "1.0.0", @@ -2842,9 +2842,9 @@ "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=" }, "electron-to-chromium": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz", - "integrity": "sha1-jdTmRYCGZE6fnwoc8y4qH53/2e4=" + "version": "1.3.37", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.37.tgz", + "integrity": "sha1-SpJzTgBEyM8LFVO+V+riGkxuX6s=" }, "elliptic": { "version": "6.4.0", diff --git a/package.json b/package.json index fb03bdfa41..c69c20adf1 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "@types/webpack": "^3.8.2", "@types/webpack-sources": "^0.1.3", "ajv": "^5.5.1", - "autoprefixer": "^7.2.3", + "autoprefixer": "^8.1.0", "bootstrap": "^4.0.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 778b9d5dd4..1621e8a566 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -13,7 +13,7 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/core": "0.0.0", "@ngtools/webpack": "0.0.0", - "autoprefixer": "^7.2.3", + "autoprefixer": "^8.1.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", "circular-dependency-plugin": "^5.0.0", From 488149316f15a8f6c8cf91c21bfe8ccdc46eb380 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 16 Mar 2018 13:57:05 -0400 Subject: [PATCH 278/724] feat(@schematics/angular): add a default browserslist file --- .../build_webpack/test/browser/styles_spec_large.ts | 4 ++-- packages/schematics/angular/application/files/browserslist | 5 +++++ .../build_webpack/hello-world-app/browserslist | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 packages/schematics/angular/application/files/browserslist create mode 100644 tests/@angular_devkit/build_webpack/hello-world-app/browserslist diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts index dfc36201b9..d58ce0f971 100644 --- a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts @@ -370,7 +370,7 @@ describe('Browser Builder styles', () => { expect(content).toContain(tags.stripIndents` /* normal-comment */ /*! important-comment */ - div { -webkit-box-flex: 1; -ms-flex: 1; flex: 1 }`); + div { -ms-flex: 1; flex: 1 }`); }), ).subscribe(undefined, done.fail, done); }, 30000); @@ -391,7 +391,7 @@ describe('Browser Builder styles', () => { const fileName = 'dist/styles.css'; const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); expect(content).toContain( - '/*! important-comment */div{-webkit-box-flex:1;-ms-flex:1;flex:1}'); + '/*! important-comment */div{-ms-flex:1;flex:1}'); }), ).subscribe(undefined, done.fail, done); }, 45000); diff --git a/packages/schematics/angular/application/files/browserslist b/packages/schematics/angular/application/files/browserslist new file mode 100644 index 0000000000..1b1be90441 --- /dev/null +++ b/packages/schematics/angular/application/files/browserslist @@ -0,0 +1,5 @@ +> 0.5% +last 2 versions +Firefox ESR +not dead +IE 9-11 \ No newline at end of file diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/browserslist b/tests/@angular_devkit/build_webpack/hello-world-app/browserslist new file mode 100644 index 0000000000..1b1be90441 --- /dev/null +++ b/tests/@angular_devkit/build_webpack/hello-world-app/browserslist @@ -0,0 +1,5 @@ +> 0.5% +last 2 versions +Firefox ESR +not dead +IE 9-11 \ No newline at end of file From da7fe5ea38fc7f30a87ae1492ecaabff7140e087 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 24 Mar 2018 00:45:17 +0000 Subject: [PATCH 279/724] fix(@schematics/angular): fix environment file path --- packages/schematics/angular/application/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index ba5c0402f2..e9d490787c 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -104,8 +104,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace configurations: { production: { fileReplacements: [{ - from: `${projectRoot}/src/environments/environments.ts`, - to: `${projectRoot}/src/environments/environments.prod.ts`, + from: `${projectRoot}/src/environments/environment.ts`, + to: `${projectRoot}/src/environments/environment.prod.ts`, }], optimization: true, outputHashing: 'all', From 18587e51b19b416c24350763041a74d22df48e3c Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 23 Mar 2018 11:59:11 -0700 Subject: [PATCH 280/724] fix(@angular-devkit/schematics): actions need to be created with id Otherwise they dont get properly checked and compared. --- .../schematics/src/tree/action.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/angular_devkit/schematics/src/tree/action.ts b/packages/angular_devkit/schematics/src/tree/action.ts index 8618862f4d..5413a82ed5 100644 --- a/packages/angular_devkit/schematics/src/tree/action.ts +++ b/packages/angular_devkit/schematics/src/tree/action.ts @@ -107,20 +107,22 @@ export class ActionList implements Iterable { } } - this._actions = [ - ...[...toDelete.values()].map(x => { - return { kind: 'd', path: x } as DeleteFileAction; - }), - ...[...toRename.entries()].map(([from, to]) => { - return { kind: 'r', path: from, to } as RenameFileAction; - }), - ...[...toCreate.entries()].map(([path, content]) => { - return { kind: 'c', path, content } as CreateFileAction; - }), - ...[...toOverwrite.entries()].map(([path, content]) => { - return { kind: 'o', path, content } as OverwriteFileAction; - }), - ]; + this._actions = []; + toDelete.forEach(x => { + this.delete(x); + }); + + toRename.forEach((to, from) => { + this.rename(from, to); + }); + + toCreate.forEach((content, path) => { + this.create(path, content); + }); + + toOverwrite.forEach((content, path) => { + this.overwrite(path, content); + }); } push(action: Action) { this._actions.push(action); } From eb653d685155ff7af308b838327642ee13a2c265 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 23 Mar 2018 12:05:09 -0700 Subject: [PATCH 281/724] fix(@schematics/angular): fix performance By using a new empty tree instead of moving on all files. Also, we should optimize actions before merging to avoid weird side effects. --- packages/schematics/angular/ng-new/index.ts | 100 +++++++++++--------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index 1020345e86..ed2747ce74 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -10,7 +10,10 @@ import { SchematicContext, SchematicsException, Tree, + apply, chain, + empty, + mergeWith, move, schematic, } from '@angular-devkit/schematics'; @@ -25,53 +28,58 @@ import { Schema as NgNewOptions } from './schema'; export default function (options: NgNewOptions): Rule { - return (host: Tree, context: SchematicContext) => { - if (!options.name) { - throw new SchematicsException(`Invalid options, "name" is required.`); - } + if (!options.name) { + throw new SchematicsException(`Invalid options, "name" is required.`); + } - if (!options.directory) { - options.directory = options.name; - } - let packageTask; - if (!options.skipInstall) { - packageTask = context.addTask(new NodePackageInstallTask(options.directory)); - if (options.linkCli) { - packageTask = context.addTask( - new NodePackageLinkTask('@angular/cli', options.directory), - [packageTask], - ); - } - } - if (!options.skipGit) { - context.addTask( - new RepositoryInitializerTask( - options.directory, - options.commit, - ), - packageTask ? [packageTask] : [], - ); - } + if (!options.directory) { + options.directory = options.name; + } - const workspaceOptions: WorkspaceOptions = { - name: options.name, - version: options.version, - newProjectRoot: options.newProjectRoot || 'projects', - }; - const applicationOptions: ApplicationOptions = { - name: options.name, - inlineStyle: options.inlineStyle, - inlineTemplate: options.inlineTemplate, - viewEncapsulation: options.viewEncapsulation, - routing: options.routing, - style: options.style, - skipTests: options.skipTests, - }; - - return chain([ - schematic('workspace', workspaceOptions), - schematic('application', applicationOptions), - move(options.directory || options.name), - ])(host, context); + const workspaceOptions: WorkspaceOptions = { + name: options.name, + version: options.version, + newProjectRoot: options.newProjectRoot || 'projects', + }; + const applicationOptions: ApplicationOptions = { + name: options.name, + inlineStyle: options.inlineStyle, + inlineTemplate: options.inlineTemplate, + viewEncapsulation: options.viewEncapsulation, + routing: options.routing, + style: options.style, + skipTests: options.skipTests, }; + + return chain([ + (host: Tree, context: SchematicContext) => { + let packageTask; + if (!options.skipInstall) { + packageTask = context.addTask(new NodePackageInstallTask(options.directory)); + if (options.linkCli) { + packageTask = context.addTask( + new NodePackageLinkTask('@angular/cli', options.directory), + [packageTask], + ); + } + } + if (!options.skipGit) { + context.addTask( + new RepositoryInitializerTask( + options.directory, + options.commit, + ), + packageTask ? [packageTask] : [], + ); + } + }, + mergeWith( + apply(empty(), [ + schematic('workspace', workspaceOptions), + schematic('application', applicationOptions), + move(options.directory || options.name), + tree => Tree.optimize(tree), + ]), + ), + ]); } From bafa223e16812b77ac50f203e66753c1b05a725a Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 23 Mar 2018 12:27:25 -0700 Subject: [PATCH 282/724] feat(@angular-devkit/schematics): allow repo init to not have author Would use (for git at least) the systems defaults. --- .../schematics/tasks/repo-init/executor.ts | 12 ++++++++---- .../schematics/tasks/repo-init/init-task.ts | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts index 697661fc48..a7b844fea8 100644 --- a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts +++ b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts @@ -32,10 +32,14 @@ export default function( shell: true, cwd: path.join(rootDirectory, options.workingDirectory || ''), env: { - GIT_AUTHOR_NAME: authorName, - GIT_COMMITTER_NAME: authorName, - GIT_AUTHOR_EMAIL: authorEmail, - GIT_COMMITTER_EMAIL: authorEmail, + ...(authorName + ? { GIT_AUTHOR_NAME: authorName, GIT_COMMITTER_NAME: authorName } + : {} + ), + ...(authorEmail + ? { GIT_AUTHOR_EMAIL: authorEmail, GIT_COMMITTER_EMAIL: authorEmail } + : {} + ), }, }; diff --git a/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts b/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts index c24e58412e..df2a2888d4 100644 --- a/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts +++ b/packages/angular_devkit/schematics/tasks/repo-init/init-task.ts @@ -10,8 +10,8 @@ import { RepositoryInitializerName, RepositoryInitializerTaskOptions } from './o export interface CommitOptions { message?: string; - name: string; - email: string; + name?: string; + email?: string; } export class RepositoryInitializerTask From bee027fdd9b2d3d8ddc8c56ff487c9d2b641a6c4 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 23 Mar 2018 12:27:48 -0700 Subject: [PATCH 283/724] fix(@schematics/angular): make a first commit properly By using the systems defaults. --- packages/schematics/angular/ng-new/index.ts | 22 +++++++++++-------- .../schematics/angular/ng-new/schema.d.ts | 2 +- .../schematics/angular/ng-new/schema.json | 5 +++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index ed2747ce74..1e703faf55 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -52,6 +52,14 @@ export default function (options: NgNewOptions): Rule { }; return chain([ + mergeWith( + apply(empty(), [ + schematic('workspace', workspaceOptions), + schematic('application', applicationOptions), + move(options.directory || options.name), + tree => Tree.optimize(tree), + ]), + ), (host: Tree, context: SchematicContext) => { let packageTask; if (!options.skipInstall) { @@ -64,22 +72,18 @@ export default function (options: NgNewOptions): Rule { } } if (!options.skipGit) { + const commit = typeof options.commit == 'object' + ? options.commit + : (!!options.commit ? {} : false); + context.addTask( new RepositoryInitializerTask( options.directory, - options.commit, + commit, ), packageTask ? [packageTask] : [], ); } }, - mergeWith( - apply(empty(), [ - schematic('workspace', workspaceOptions), - schematic('application', applicationOptions), - move(options.directory || options.name), - tree => Tree.optimize(tree), - ]), - ), ]); } diff --git a/packages/schematics/angular/ng-new/schema.d.ts b/packages/schematics/angular/ng-new/schema.d.ts index 22385e7cb1..dfdc8f1082 100644 --- a/packages/schematics/angular/ng-new/schema.d.ts +++ b/packages/schematics/angular/ng-new/schema.d.ts @@ -30,7 +30,7 @@ export interface Schema { /** * Initial repository commit information. */ - commit?: { name: string, email: string, message?: string }; + commit?: { name: string, email: string, message?: string } | boolean; /** * The path where new projects will be created. */ diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json index 896e25ee83..9a53a97e89 100644 --- a/packages/schematics/angular/ng-new/schema.json +++ b/packages/schematics/angular/ng-new/schema.json @@ -39,7 +39,7 @@ "commit": { "description": "Initial repository commit information.", "oneOf": [ - { "type": "null" }, + { "type": "boolean" }, { "type": "object", "properties": { @@ -59,7 +59,8 @@ "email" ] } - ] + ], + "default": true }, "newProjectRoot": { "description": "The path where new projects will be created.", From 5612f8b691d462c958eccb430cc876f5b0d88dba Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 26 Mar 2018 10:32:24 +0100 Subject: [PATCH 284/724] fix(@schematics/angular): remove empty fields in workspace --- packages/schematics/angular/application/index.ts | 2 -- packages/schematics/angular/e2e/index.ts | 2 -- packages/schematics/angular/workspace/files/angular.json | 6 +----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index e9d490787c..23218f37f8 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -71,8 +71,6 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace const project: any = { root: projectRoot, projectType: 'application', - cli: {}, - schematics: {}, architect: { build: { builder: '@angular-devkit/build-webpack:browser', diff --git a/packages/schematics/angular/e2e/index.ts b/packages/schematics/angular/e2e/index.ts index f3c5e79738..facc071390 100644 --- a/packages/schematics/angular/e2e/index.ts +++ b/packages/schematics/angular/e2e/index.ts @@ -66,8 +66,6 @@ function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): const project: any = { root: projectRoot, projectType: 'application', - cli: {}, - schematics: {}, architect: { e2e: { builder: '@angular-devkit/build-webpack:protractor', diff --git a/packages/schematics/angular/workspace/files/angular.json b/packages/schematics/angular/workspace/files/angular.json index 80c1bb5def..5149ecd721 100644 --- a/packages/schematics/angular/workspace/files/angular.json +++ b/packages/schematics/angular/workspace/files/angular.json @@ -1,10 +1,6 @@ { + "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json", "version": 1, "newProjectRoot": "<%= newProjectRoot %>", - "cli": {}, - "schematics": { - "@schematics/angular": {} - }, - "architect": {}, "projects": {} } \ No newline at end of file From f180e4307da870467cb9aa3bc6117ee446495cfa Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 24 Mar 2018 17:42:17 +0000 Subject: [PATCH 285/724] feat(@schematics/angular): add linting to library targets --- .../src/build/index_spec_large.ts | 10 ++ .../files/__projectRoot__/tsconfig.lint.json | 12 ++ packages/schematics/angular/library/index.ts | 12 ++ .../build_ng_packagr/ng-packaged/angular.json | 12 ++ .../projects/lib/tsconfig.lint.json | 12 ++ .../build_ng_packagr/ng-packaged/tslint.json | 131 ++++++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index c95df75f0d..f9a63e8391 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -42,4 +42,14 @@ describe('NgPackagr Builder', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); }, 30000); + + it('lint works', (done) => { + const targetSpec: TargetSpecifier = { project: 'lib', target: 'lint' }; + + return workspace.loadWorkspaceFromHost(workspaceFile).pipe( + concatMap(ws => new Architect(ws).loadArchitect()), + concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec))), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); }); diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json new file mode 100644 index 0000000000..2a80c8ebc4 --- /dev/null +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json @@ -0,0 +1,12 @@ +{ + "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/spec", + "module": "es2015", + "types": [] + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 27387a0c1d..2ec595b301 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -113,6 +113,18 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche karmaConfig: `${projectRoot}/karma.conf.js`, }, }, + lint: { + builder: '@angular-devkit/build-webpack:lint', + options: { + tsConfig: [ + 'projects/lib/tsconfig.lint.json', + 'projects/lib/tsconfig.spec.json', + ], + exclude: [ + '**/node_modules/**', + ], + }, + }, }, }; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json index 70dc59254a..bea384833c 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json @@ -22,6 +22,18 @@ "progress": false, "watch": false } + }, + "lint": { + "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "options": { + "tsConfig": [ + "projects/lib/tsconfig.lint.json", + "projects/lib/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } } } } diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json new file mode 100644 index 0000000000..f098e3ea6a --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "module": "es2015", + "types": [] + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json new file mode 100644 index 0000000000..944ad565fc --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/tslint.json @@ -0,0 +1,131 @@ +{ + "rulesDirectory": [ + "../../../../node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs", + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} From d19774d27f744bbbe4c3135d2a35d361a52c38f7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 24 Mar 2018 19:07:43 +0000 Subject: [PATCH 286/724] feat(@schematics/angular): add back library tsconfig paths --- .../files/__projectRoot__/ng-package.json | 12 +++--- .../__projectRoot__/ng-package.prod.json | 7 ++++ packages/schematics/angular/library/index.ts | 32 +++++++++++++++ .../schematics/angular/library/index_spec.ts | 39 +++++++++++++++++++ .../schematics/angular/library/schema.d.ts | 4 ++ .../schematics/angular/library/schema.json | 7 +++- .../ng-packaged/projects/lib/ng-package.json | 11 +++--- 7 files changed, 99 insertions(+), 13 deletions(-) create mode 100644 packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json index 7392ff348c..13a13bd75d 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json @@ -1,8 +1,8 @@ { - "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/package.schema.json", - "ngPackage": { - "lib": { - "entryFile": "src/<%= entryFile %>.ts" - } + "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/ng-package.schema.json", + "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/lib", + "deleteDestPath": false, + "lib": { + "entryFile": "src/<%= entryFile %>.ts" } -} +} \ No newline at end of file diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json new file mode 100644 index 0000000000..f41a75a4cc --- /dev/null +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json @@ -0,0 +1,7 @@ +{ + "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/ng-package.schema.json", + "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/lib", + "lib": { + "entryFile": "src/<%= entryFile %>.ts" + } +} \ No newline at end of file diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 2ec595b301..d5f891f350 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -40,6 +40,15 @@ interface UpdateJsonFn { (obj: T): T | void; } +type TsConfigPartialType = { + compilerOptions: { + baseUrl: string, + paths: { + [key: string]: string[]; + }, + }, +}; + function updateJsonFile(host: Tree, path: string, callback: UpdateJsonFn): Tree { const source = host.read(path); if (source) { @@ -52,6 +61,23 @@ function updateJsonFile(host: Tree, path: string, callback: UpdateJsonFn): return host; } +function updateTsConfig(npmPackageName: string) { + + return (host: Tree) => { + if (!host.exists('tsconfig.json')) { return host; } + + return updateJsonFile(host, 'tsconfig.json', (tsconfig: TsConfigPartialType) => { + if (!tsconfig.compilerOptions.paths) { + tsconfig.compilerOptions.paths = {}; + } + if (!tsconfig.compilerOptions.paths[npmPackageName]) { + tsconfig.compilerOptions.paths[npmPackageName] = []; + } + tsconfig.compilerOptions.paths[npmPackageName].push(`dist/${npmPackageName}`); + }); + }; +} + function addDependenciesAndScriptsToPackageJson() { return (host: Tree) => { @@ -104,6 +130,11 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche options: { project: `${projectRoot}/ng-package.json`, }, + configurations: { + production: { + project: `${projectRoot}/ng-package.prod.json`, + }, + }, }, test: { builder: '@angular-devkit/build-webpack:karma', @@ -157,6 +188,7 @@ export default function (options: LibraryOptions): Rule { branchAndMerge(mergeWith(templateSource)), addAppToWorkspaceFile(options, workspace), options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(), + options.skipTsConfig ? noop() : updateTsConfig(name), schematic('module', { name: name, commonModule: false, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index f5ab1d1db9..7cc6e1940c 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -25,6 +25,7 @@ describe('Library Schematic', () => { name: 'foo', entryFile: 'my_index', skipPackageJson: false, + skipTsConfig: false, }; const workspaceOptions: WorkspaceOptions = { name: 'workspace', @@ -122,4 +123,42 @@ describe('Library Schematic', () => { expect(packageJson.devDependencies['ng-packagr']).toBeUndefined(); }); }); + + describe(`update tsconfig.json`, () => { + it(`should add paths mapping to empty tsconfig`, () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + + const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); + expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); + expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(1); + expect(tsConfigJson.compilerOptions.paths.foo[0]).toEqual('dist/foo'); + }); + + it(`should append to existing paths mappings`, () => { + workspaceTree.overwrite('tsconfig.json', JSON.stringify({ + compilerOptions: { + paths: { + 'unrelated': ['./something/else.ts'], + 'foo': ['libs/*'], + }, + }, + })); + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + + const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); + expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); + expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(2); + expect(tsConfigJson.compilerOptions.paths.foo[1]).toEqual('dist/foo'); + }); + + it(`should not modify the file when --skipTsConfig`, () => { + const tree = schematicRunner.runSchematic('library', { + name: 'foo', + skipTsConfig: true, + }, workspaceTree); + + const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json'); + expect(tsConfigJson.compilerOptions.paths).toBeUndefined(); + }); + }); }); diff --git a/packages/schematics/angular/library/schema.d.ts b/packages/schematics/angular/library/schema.d.ts index 82b5a61bda..838dd7ee2c 100644 --- a/packages/schematics/angular/library/schema.d.ts +++ b/packages/schematics/angular/library/schema.d.ts @@ -19,4 +19,8 @@ export interface Schema { * Do not add dependencies to package.json (e.g., --skipPackageJson) */ skipPackageJson: boolean; + /** + * Do not update tsconfig.json for development experience (e.g., --skipTsConfig) + */ + skipTsConfig: boolean; } diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index 932cae4485..e1b0209b6a 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -18,9 +18,14 @@ "type": "boolean", "default": false, "description": "Do not add dependencies to package.json (e.g., --skipPackageJson)" + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update tsconfig.json for development experience (e.g., --skipTsConfig)" } }, "required": [ "name" ] -} +} \ No newline at end of file diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json index 049458816d..36fcf49d9c 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json @@ -1,8 +1,7 @@ { - "$schema": "../../node_modules/ng-packagr/package.schema.json", - "ngPackage": { - "lib": { - "entryFile": "src/public_api.ts" - } + "$schema": "../../../../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/lib", + "lib": { + "entryFile": "src/public_api.ts" } -} +} \ No newline at end of file From 1b317e78e30c84a08e334335bfdcd0e4784b0071 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 26 Mar 2018 10:02:40 +0100 Subject: [PATCH 287/724] fix(@schematics/angular): update minimum ng-packager version --- package-lock.json | 270 +++++++++++------- package.json | 2 +- .../files/__projectRoot__/ng-package.json | 2 +- packages/schematics/angular/library/index.ts | 2 +- .../schematics/angular/library/index_spec.ts | 8 +- 5 files changed, 170 insertions(+), 114 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95cb8d1ecc..9cb0bd0398 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1794,6 +1794,11 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, + "commenting": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.5.tgz", + "integrity": "sha512-U7qGbcDLSNpOcV3RQRKHp7hFpy9WUmfawbkPdS4R2RhrSu4dOF85QQpx/Zjcv7uLF6tWSUKEKUIkxknPCrVjwg==" + }, "common-tags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.5.1.tgz", @@ -1900,9 +1905,9 @@ } }, "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "requires": { "dot-prop": "4.2.0", "graceful-fs": "4.1.11", @@ -3560,6 +3565,14 @@ "universalify": "0.1.1" } }, + "fs-minipass": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "requires": { + "minipass": "2.2.1" + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -4644,7 +4657,7 @@ "is-redirect": "1.0.0", "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", + "lowercase-keys": "1.0.1", "safe-buffer": "5.1.1", "timed-out": "4.0.1", "unzip-response": "2.0.1", @@ -6666,9 +6679,9 @@ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" }, "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, "lru-cache": { "version": "4.1.1", @@ -6680,9 +6693,9 @@ } }, "magic-string": { - "version": "0.22.4", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", - "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "requires": { "vlq": "0.2.3" } @@ -7091,6 +7104,11 @@ } } }, + "moment": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", + "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -7199,13 +7217,13 @@ "optional": true }, "ng-packagr": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-2.2.0.tgz", - "integrity": "sha512-2qpXc2Dgyt9/JlIXoVB1eZZTtKu9OTv7eEngLLxfDXQSJ4q8elYDYMGXytIXdBO2GlVP2Z1uOCNMryQnAvhR0Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-2.4.1.tgz", + "integrity": "sha512-cOKF59RzAftlLNgGGasTaczJ2GD7NZmA2GWmqXK7/BJFiRX2xMeYbbJke5dpYw7yUIkHJbZMd7WtcKSlVpJ4TQ==", "requires": { "@ngtools/json-schema": "1.1.0", - "autoprefixer": "7.2.3", - "browserslist": "2.10.0", + "autoprefixer": "7.2.6", + "browserslist": "2.11.3", "chalk": "2.3.2", "commander": "2.12.2", "cpx": "1.5.0", @@ -7214,7 +7232,7 @@ "injection-js": "2.2.1", "less": "2.7.3", "node-sass": "4.7.2", - "node-sass-tilde-importer": "1.0.1", + "node-sass-tilde-importer": "1.0.2", "postcss": "6.0.19", "postcss-clean": "1.1.0", "postcss-url": "7.3.1", @@ -7224,20 +7242,16 @@ "rollup-plugin-cleanup": "2.0.0", "rollup-plugin-commonjs": "8.3.0", "rollup-plugin-license": "0.6.0", - "rollup-plugin-node-resolve": "3.2.0", + "rollup-plugin-node-resolve": "3.3.0", "rxjs": "5.5.6", "sorcery": "0.10.0", "strip-bom": "3.0.0", "stylus": "0.54.5", + "tar": "4.4.1", "uglify-js": "3.3.16", - "update-notifier": "2.3.0" + "update-notifier": "2.4.0" }, "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -7246,6 +7260,28 @@ "color-convert": "1.9.1" } }, + "autoprefixer": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", + "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", + "requires": { + "browserslist": "2.11.3", + "caniuse-lite": "1.0.30000813", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.19", + "postcss-value-parser": "3.3.0" + } + }, + "browserslist": { + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", + "requires": { + "caniuse-lite": "1.0.30000813", + "electron-to-chromium": "1.3.37" + } + }, "chalk": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", @@ -7256,16 +7292,6 @@ "supports-color": "5.3.0" } }, - "commenting": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.5.tgz", - "integrity": "sha512-U7qGbcDLSNpOcV3RQRKHp7hFpy9WUmfawbkPdS4R2RhrSu4dOF85QQpx/Zjcv7uLF6tWSUKEKUIkxknPCrVjwg==" - }, - "estree-walker": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", - "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" - }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -7292,14 +7318,6 @@ "promise": "7.3.1", "request": "2.81.0", "source-map": "0.5.7" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "optional": true - } } }, "load-json-file": { @@ -7313,15 +7331,14 @@ "strip-bom": "3.0.0" } }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "moment": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", - "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==" + "minipass": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } }, "parse-json": { "version": "4.0.0", @@ -7402,35 +7419,6 @@ "glob": "7.1.2" } }, - "rollup-plugin-commonjs": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz", - "integrity": "sha512-PYs3OiYgENFYEmI3vOEm5nrp3eY90YZqd5vGmQqeXmhJsAWFIrFdROCvOasqJ1HgeTvqyYo9IGXnFDyoboNcgQ==", - "requires": { - "acorn": "5.5.3", - "estree-walker": "0.5.1", - "magic-string": "0.22.4", - "resolve": "1.5.0", - "rollup-pluginutils": "2.0.1" - } - }, - "rollup-plugin-license": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.6.0.tgz", - "integrity": "sha512-Ttz65oRtNKcfV5icDkQTixc8ja64ueoXejRJoAtmjXYAWVg0qx+tu5rXmEOXWXmUXeGs0ARUVIAG0p1JK0gACQ==", - "requires": { - "commenting": "1.0.5", - "lodash": "4.17.5", - "magic-string": "0.22.4", - "mkdirp": "0.5.1", - "moment": "2.21.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -7444,21 +7432,45 @@ "has-flag": "3.0.0" } }, + "tar": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", + "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, "uglify-js": { "version": "3.3.16", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.16.tgz", "integrity": "sha512-FMh5SRqJRGhv9BbaTffENIpDDQIoPDR8DBraunGORGhySArsXlw9++CN+BWzPBLpoI4RcSnpfGPnilTxWL3Vvg==", "requires": { - "commander": "2.15.0", + "commander": "2.15.1", "source-map": "0.6.1" }, "dependencies": { "commander": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.0.tgz", - "integrity": "sha512-7B1ilBwtYSbetCgTY1NJFg+gVpestg0fdA1MhC1Vs4ssyfSXnCAjFr+QcQM9/RedXC0EaUx1sG8Smgw2VfgKEg==" + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } + }, + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, @@ -7666,9 +7678,9 @@ } }, "node-sass-tilde-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.1.tgz", - "integrity": "sha512-Fh9+WztCbell05Xy2KpU96Fkj5JWrs5RX/nP4ko2n6zi1/SJnw1tMXDzS1wD9ttFNy3A0jsmTFqObdPIjx35Wg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", + "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", "requires": { "find-parent-dir": "0.3.0" } @@ -9367,14 +9379,65 @@ "integrity": "sha1-hZdzGaO/VHUKnXX7kJx+UfWaLaQ=", "requires": { "acorn": "4.0.13", - "magic-string": "0.22.4", + "magic-string": "0.22.5", + "rollup-pluginutils": "2.0.1" + } + }, + "rollup-plugin-commonjs": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz", + "integrity": "sha512-PYs3OiYgENFYEmI3vOEm5nrp3eY90YZqd5vGmQqeXmhJsAWFIrFdROCvOasqJ1HgeTvqyYo9IGXnFDyoboNcgQ==", + "requires": { + "acorn": "5.5.3", + "estree-walker": "0.5.1", + "magic-string": "0.22.5", + "resolve": "1.5.0", "rollup-pluginutils": "2.0.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" + }, + "estree-walker": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", + "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" + } + } + }, + "rollup-plugin-license": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.6.0.tgz", + "integrity": "sha512-Ttz65oRtNKcfV5icDkQTixc8ja64ueoXejRJoAtmjXYAWVg0qx+tu5rXmEOXWXmUXeGs0ARUVIAG0p1JK0gACQ==", + "requires": { + "commenting": "1.0.5", + "lodash": "4.17.5", + "magic-string": "0.22.4", + "mkdirp": "0.5.1", + "moment": "2.21.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "magic-string": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", + "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", + "requires": { + "vlq": "0.2.3" + } + } } }, "rollup-plugin-node-resolve": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.2.0.tgz", - "integrity": "sha512-stvVrKaQiNu65ObGJLCHyHH/NXjiPMt/ZHwvl444KgJPrii1zCgyg+NTK2Uy6WExL+OuUWdHd7T8EoPQDtYEkw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", + "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", "requires": { "builtin-modules": "2.0.0", "is-module": "1.0.0", @@ -10153,7 +10216,7 @@ "buffer-crc32": "0.2.13", "minimist": "1.2.0", "sander": "0.5.1", - "sourcemap-codec": "1.4.0" + "sourcemap-codec": "1.4.1" } }, "source-list-map": { @@ -10199,19 +10262,9 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "sourcemap-codec": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.0.tgz", - "integrity": "sha512-66s3CwUASiYGiwQxkr34IctPs/LDkaJ8qNqVK6bBektymq3Sx1rX9qDZ8MNXFwiXqKuM3JYwzG3NAhI1ivqkjA==", - "requires": { - "vlq": "1.0.0" - }, - "dependencies": { - "vlq": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.0.tgz", - "integrity": "sha512-o3WmXySo+oI5thgqr7Qy8uBkT/v9Zr+sRyrh1lr8aWPUkgDWdWt4Nae2WKBrLsocgE8BuWWD0jLc+VW8LeU+2g==" - } - } + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", + "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==" }, "spdx": { "version": "0.5.1", @@ -11300,14 +11353,15 @@ "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" }, "update-notifier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", - "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.4.0.tgz", + "integrity": "sha1-+bTHAPv9TsEsgRWHJYd31WPYyGY=", "requires": { "boxen": "1.3.0", "chalk": "2.2.2", - "configstore": "3.1.1", + "configstore": "3.1.2", "import-lazy": "2.1.0", + "is-ci": "1.1.0", "is-installed-globally": "0.1.0", "is-npm": "1.0.0", "latest-version": "3.1.0", diff --git a/package.json b/package.json index c69c20adf1..aa2dab7ad9 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "mini-css-extract-plugin": "~0.2.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", - "ng-packagr": "^2.2.0", + "ng-packagr": "^2.4.1", "node-sass": "^4.7.2", "opn": "^5.1.0", "parse5": "^4.0.0", diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json index 13a13bd75d..123cc3811b 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/ng-package.schema.json", - "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/lib", + "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/<%= dasherize(name) %>", "deleteDestPath": false, "lib": { "entryFile": "src/<%= entryFile %>.ts" diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index d5f891f350..dbb97304fb 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -104,7 +104,7 @@ function addDependenciesAndScriptsToPackageJson() { json.devDependencies = { '@angular/compiler-cli': latestVersions.Angular, - 'ng-packagr': '^2.2.0', + 'ng-packagr': '^2.4.1', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', 'typescript': latestVersions.TypeScript, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 7cc6e1940c..55758bcf83 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -62,8 +62,10 @@ describe('Library Schematic', () => { it('should create a ng-package.json with ngPackage conf', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const fileContent = getJsonFileContent(tree, '/projects/foo/ng-package.json'); - expect(fileContent.ngPackage).toBeDefined(); - expect(fileContent.ngPackage.lib.entryFile).toEqual('src/my_index.ts'); + expect(fileContent.lib).toBeDefined(); + expect(fileContent.lib.entryFile).toEqual('src/my_index.ts'); + expect(fileContent.deleteDestPath).toEqual(false); + expect(fileContent.dest).toEqual('../../dist/foo'); }); it('should use default value for baseDir and entryFile', () => { @@ -91,7 +93,7 @@ describe('Library Schematic', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.2.0'); + expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.4.1'); }); it('should use the latest known versions in package.json', () => { From 453e82d0a0ce2868682abdf316e0383e22328a3c Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 26 Mar 2018 11:14:36 -0400 Subject: [PATCH 288/724] fix(@schematics/angular): Correct name parse/validation for lib and app --- packages/schematics/angular/application/index.ts | 3 +++ packages/schematics/angular/application/schema.json | 4 +--- packages/schematics/angular/library/index.ts | 4 ++++ packages/schematics/angular/library/schema.json | 10 ++++++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 23218f37f8..742261249c 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -227,6 +227,9 @@ function validateProjectName(projectName: string) { export default function (options: ApplicationOptions): Rule { return (host: Tree, context: SchematicContext) => { + if (!options.name) { + throw new SchematicsException(`Invalid options, "name" is required.`); + } validateProjectName(options.name); const appRootSelector = `${options.prefix || 'app'}-root`; const componentOptions = { diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 164262e655..b963e1cc5c 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -54,7 +54,5 @@ "alias": "S" } }, - "required": [ - "name" - ] + "required": [] } diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index dbb97304fb..827ddb205a 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -9,6 +9,7 @@ import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, + SchematicsException, Tree, apply, branchAndMerge, @@ -166,6 +167,9 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche export default function (options: LibraryOptions): Rule { return (host: Tree, context: SchematicContext) => { + if (!options.name) { + throw new SchematicsException(`Invalid options, "name" is required.`); + } const name = options.name; const workspace = getWorkspace(host); diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index e1b0209b6a..8f3f5a5bc1 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -6,7 +6,11 @@ "properties": { "name": { "type": "string", - "description": "The name of the library." + "description": "The name of the library.", + "$default": { + "$source": "argv", + "index": 0 + } }, "entryFile": { "type": "string", @@ -25,7 +29,5 @@ "description": "Do not update tsconfig.json for development experience (e.g., --skipTsConfig)" } }, - "required": [ - "name" - ] + "required": [] } \ No newline at end of file From 4594296f225f2618545a6ea18a744935b3e83eb4 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 21 Mar 2018 16:49:48 -0700 Subject: [PATCH 289/724] feat(@angular-devkit/build-webpack): build app-shell builder --- .../build_webpack/builders.json | 5 + .../build_webpack/src/app-shell/index.ts | 179 ++++++++++++++++++ .../build_webpack/src/app-shell/schema.d.ts | 15 ++ .../build_webpack/src/app-shell/schema.json | 37 ++++ .../angular_devkit/build_webpack/src/index.ts | 2 + 5 files changed, 238 insertions(+) create mode 100644 packages/angular_devkit/build_webpack/src/app-shell/index.ts create mode 100644 packages/angular_devkit/build_webpack/src/app-shell/schema.d.ts create mode 100644 packages/angular_devkit/build_webpack/src/app-shell/schema.json diff --git a/packages/angular_devkit/build_webpack/builders.json b/packages/angular_devkit/build_webpack/builders.json index 4e4b396f6e..bf8b1a6ca2 100644 --- a/packages/angular_devkit/build_webpack/builders.json +++ b/packages/angular_devkit/build_webpack/builders.json @@ -1,6 +1,11 @@ { "$schema": "../architect/src/builders-schema.json", "builders": { + "app-shell": { + "class": "./src/app-shell", + "schema": "./src/app-shell/schema.json", + "description": "Build a server app and a browser app, then render the index.html and use it for the browser output." + }, "browser": { "class": "./src/browser", "schema": "./src/browser/schema.json", diff --git a/packages/angular_devkit/build_webpack/src/app-shell/index.ts b/packages/angular_devkit/build_webpack/src/app-shell/index.ts new file mode 100644 index 0000000000..739668886f --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/app-shell/index.ts @@ -0,0 +1,179 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { + BuildEvent, + Builder, + BuilderConfiguration, + BuilderContext, +} from '@angular-devkit/architect'; +import { Path, getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core'; +import { Observable } from 'rxjs/Observable'; +import { forkJoin } from 'rxjs/observable/forkJoin'; +import { fromPromise } from 'rxjs/observable/fromPromise'; +import { merge } from 'rxjs/observable/merge'; +import { of } from 'rxjs/observable/of'; +import { _throw } from 'rxjs/observable/throw'; +import { concatMap, map, switchMap } from 'rxjs/operators'; +import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { BuildWebpackServerSchema } from '../server/schema'; +import { BuildWebpackAppShellSchema } from './schema'; + + +export class AppShellBuilder implements Builder { + + constructor(public context: BuilderContext) { } + + run(builderConfig: BuilderConfiguration): Observable { + const options = builderConfig.options; + + return new Observable(obs => { + let success = true; + const subscription = merge( + this.build(options.serverTarget, {}), + this.build(options.browserTarget, { watch: false }), + ).subscribe((event: BuildEvent) => { + // TODO: once we support a better build event, add support for merging two event streams + // together. + success = success && event.success; + }, error => { + obs.error(error); + }, () => { + obs.next({ success }); + obs.complete(); + }); + + // Allow subscriptions to us to unsubscribe from each builds at the same time. + return () => subscription.unsubscribe(); + }).pipe( + switchMap(event => { + if (!event.success) { + return of(event); + } + + return this.renderUniversal(options); + }), + ); + } + + build(targetString: string, overrides: {}) { + const architect = this.context.architect; + const [project, target, configuration] = targetString.split(':'); + + // Override browser build watch setting. + const builderConfig = architect.getBuilderConfiguration<{}>({ + project, + target, + configuration, + overrides, + }); + + return architect.run(builderConfig, this.context); + } + + getServerModuleBundlePath(options: BuildWebpackAppShellSchema) { + const architect = this.context.architect; + + return new Observable(obs => { + if (options.appModuleBundle) { + obs.next(join(this.context.workspace.root, options.appModuleBundle)); + + return obs.complete(); + } else { + const [project, target, configuration] = options.serverTarget.split(':'); + const builderConfig = architect.getBuilderConfiguration({ + project, + target, + configuration, + }); + + return architect.getBuilderDescription(builderConfig).pipe( + concatMap(description => architect.validateBuilderOptions(builderConfig, description)), + switchMap(config => { + const outputPath = join(this.context.workspace.root, config.options.outputPath); + + return this.context.host.list(outputPath).pipe( + switchMap(files => { + const re = /^main\.(?:[a-zA-Z0-9]{20}\.)?(?:bundle\.)?js$/; + const maybeMain = files.filter(x => re.test(x))[0]; + + if (!maybeMain) { + return _throw(new Error('Could not find the main bundle.')); + } else { + return of(join(outputPath, maybeMain)); + } + }), + ); + }), + ).subscribe(obs); + } + }); + } + + getBrowserIndexOutputPath(options: BuildWebpackAppShellSchema) { + const architect = this.context.architect; + const [project, target, configuration] = options.browserTarget.split(':'); + const builderConfig = architect.getBuilderConfiguration({ + project, + target, + configuration, + }); + + return architect.getBuilderDescription(builderConfig).pipe( + concatMap(description => architect.validateBuilderOptions(builderConfig, description)), + map(config => join(normalize(config.options.outputPath), 'index.html')), + ); + } + + renderUniversal(options: BuildWebpackAppShellSchema): Observable { + return forkJoin( + this.getBrowserIndexOutputPath(options).pipe( + switchMap(browserIndexOutputPath => { + const path = join(this.context.workspace.root, browserIndexOutputPath); + + return this.context.host.read(path).pipe( + map(x => { + return [browserIndexOutputPath, x]; + }), + ); + }), + ), + this.getServerModuleBundlePath(options), + ).pipe( + switchMap(([[browserIndexOutputPath, indexContent], serverBundlePath]) => { + const root = this.context.workspace.root; + requireProjectModule(getSystemPath(root), 'zone.js/dist/zone-node'); + + const renderModuleFactory = requireProjectModule( + getSystemPath(root), + '@angular/platform-server', + ).renderModuleFactory; + const AppServerModuleNgFactory = require( + getSystemPath(serverBundlePath), + ).AppServerModuleNgFactory; + const indexHtml = virtualFs.fileBufferToString(indexContent); + const outputPath = join(root, options.outputIndexPath || browserIndexOutputPath); + + // Render to HTML and overwrite the client index file. + return fromPromise( + renderModuleFactory(AppServerModuleNgFactory, { + document: indexHtml, + url: options.route, + }) + .then((html: string) => { + return this.context.host + .write(outputPath, virtualFs.stringToFileBuffer(html)) + .toPromise(); + }) + .then(() => ({ success: true })), + ); + }), + ); + } +} + +export default AppShellBuilder; diff --git a/packages/angular_devkit/build_webpack/src/app-shell/schema.d.ts b/packages/angular_devkit/build_webpack/src/app-shell/schema.d.ts new file mode 100644 index 0000000000..b7f0b1d1de --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/app-shell/schema.d.ts @@ -0,0 +1,15 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export interface BuildWebpackAppShellSchema { + browserTarget: string; + serverTarget: string; + appModuleBundle?: string; + route: string; + inputIndexPath?: string; + outputIndexPath?: string; +} diff --git a/packages/angular_devkit/build_webpack/src/app-shell/schema.json b/packages/angular_devkit/build_webpack/src/app-shell/schema.json new file mode 100644 index 0000000000..4e246a6f83 --- /dev/null +++ b/packages/angular_devkit/build_webpack/src/app-shell/schema.json @@ -0,0 +1,37 @@ +{ + "title": "App Shell Target", + "description": "App Shell target options for Build Facade.", + "type": "object", + "properties": { + "browserTarget": { + "type": "string", + "description": "Target to build." + }, + "serverTarget": { + "type": "string", + "description": "Server target to use for rendering the app shell." + }, + "appModuleBundle": { + "type": "string", + "description": "Script that exports the Server AppModule to render. This should be the main JavaScript outputted by the server target. By default we will resolve the outputPath of the serverTarget and find a bundle named 'main' in it (whether or not there's a hash tag)." + }, + "route": { + "type": "string", + "description": "The route to render.", + "default": "/" + }, + "inputIndexPath": { + "type": "string", + "description": "The input path for the index.html file. By default uses the output index.html of the browser target." + }, + "outputIndexPath": { + "type": "string", + "description": "The output path of the index.html file. By default will overwrite the input file." + } + }, + "additionalProperties": false, + "required": [ + "browserTarget", + "serverTarget" + ] +} diff --git a/packages/angular_devkit/build_webpack/src/index.ts b/packages/angular_devkit/build_webpack/src/index.ts index 8101bf131e..f09ed2f04d 100644 --- a/packages/angular_devkit/build_webpack/src/index.ts +++ b/packages/angular_devkit/build_webpack/src/index.ts @@ -6,9 +6,11 @@ * found in the LICENSE file at https://angular.io/license */ +export * from './app-shell'; export * from './browser'; export * from './dev-server'; export * from './extract-i18n'; export * from './karma'; export * from './protractor'; +export * from './server'; export * from './tslint'; From abc96c23094ff9918c81caec4d315b6a6253c337 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 22 Mar 2018 21:28:06 -0700 Subject: [PATCH 290/724] test: add test for app-shell architect builder --- .../test/app-shell/app-shell_spec_large.ts | 50 +++++++++++++++++++ .../test/server/base_spec_large.ts | 2 +- .../hello-world-app/.angular.json | 9 +++- 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 packages/angular_devkit/build_webpack/test/app-shell/app-shell_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/app-shell/app-shell_spec_large.ts b/packages/angular_devkit/build_webpack/test/app-shell/app-shell_spec_large.ts new file mode 100644 index 0000000000..17b358d1bb --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/app-shell/app-shell_spec_large.ts @@ -0,0 +1,50 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { normalize, virtualFs } from '@angular-devkit/core'; +import { tap } from 'rxjs/operators'; +import { host, runTargetSpec } from '../utils'; + + +describe('AppShell Builder', () => { + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works (basic)', done => { + host.replaceInFile('src/app/app.module.ts', / BrowserModule/, ` + BrowserModule.withServerTransition({ appId: 'some-app' }) + `); + host.writeMultipleFiles({ + 'src/app/app.server.module.ts': ` + import { NgModule } from '@angular/core'; + import { ServerModule } from '@angular/platform-server'; + + import { AppModule } from './app.module'; + import { AppComponent } from './app.component'; + + @NgModule({ + imports: [ + AppModule, + ServerModule, + ], + bootstrap: [AppComponent], + }) + export class AppServerModule {} + `, + }); + + runTargetSpec(host, { project: 'app', target: 'app-shell' }).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = 'dist/index.html'; + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + expect(content).toMatch(/Welcome to app!/); + }), + ).subscribe(undefined, done.fail, done); + + }, 60000); +}); diff --git a/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts b/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts index cf4ed32e93..159c1bd7a9 100644 --- a/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts @@ -12,7 +12,7 @@ import { host, runTargetSpec } from '../utils'; describe('Server Builder', () => { - const outputPath = normalize('dist'); + const outputPath = normalize('dist-server'); beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json index 0adc33789e..7bd61d84af 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json @@ -62,11 +62,18 @@ "server": { "builder": "../../../../packages/angular_devkit/build_webpack:server", "options": { - "outputPath": "dist", + "outputPath": "dist-server", "main": "src/main.server.ts", "tsConfig": "src/tsconfig.server.json" } }, + "app-shell": { + "builder": "../../../../packages/angular_devkit/build_webpack:app-shell", + "options": { + "browserTarget": "app:build", + "serverTarget": "app:server" + } + }, "serve": { "builder": "../../../../packages/angular_devkit/build_webpack:dev-server", "options": { From 0838a23804d3645d86deb6a7a70edcbed737436c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 27 Mar 2018 12:49:12 +0100 Subject: [PATCH 291/724] build: use rxjs@5.5.8 as minimum --- package-lock.json | 8 ++++---- package.json | 2 +- packages/angular_devkit/architect/package.json | 2 +- .../angular_devkit/architect/test/package.json | 2 +- .../angular_devkit/architect_cli/package.json | 2 +- .../build_ng_packagr/package.json | 2 +- .../angular_devkit/build_webpack/package.json | 2 +- packages/angular_devkit/core/package.json | 2 +- .../angular_devkit/schematics/package.json | 2 +- .../angular_devkit/schematics_cli/package.json | 2 +- .../angular/utility/latest-versions.ts | 2 +- .../schematics/package_update/package.json | 2 +- packages/schematics/update/package.json | 2 +- scripts/patch-dependencies.ts | 1 - scripts/patches/rxjs-ts27.patch | 18 ------------------ .../webpack/aio-app/package.json | 2 +- .../webpack/simple-app/package.json | 2 +- .../build_webpack/hello-world-app/package.json | 2 +- 18 files changed, 19 insertions(+), 38 deletions(-) delete mode 100644 scripts/patches/rxjs-ts27.patch diff --git a/package-lock.json b/package-lock.json index 9cb0bd0398..6be9235b2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7243,7 +7243,7 @@ "rollup-plugin-commonjs": "8.3.0", "rollup-plugin-license": "0.6.0", "rollup-plugin-node-resolve": "3.3.0", - "rxjs": "5.5.6", + "rxjs": "5.5.8", "sorcery": "0.10.0", "strip-bom": "3.0.0", "stylus": "0.54.5", @@ -9469,9 +9469,9 @@ } }, "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "version": "5.5.8", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.8.tgz", + "integrity": "sha512-Bz7qou7VAIoGiglJZbzbXa4vpX5BmTTN2Dj/se6+SwADtw4SihqBIiEa7VmTXJ8pynvq0iFr5Gx9VLyye1rIxQ==", "requires": { "symbol-observable": "1.0.1" } diff --git a/package.json b/package.json index aa2dab7ad9..d94309f0da 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^5.5.6", + "rxjs": "^5.5.8", "sass-loader": "^6.0.7", "semver": "^5.3.0", "semver-intersect": "^1.1.2", diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json index c67ae236b3..a5afda8cc1 100644 --- a/packages/angular_devkit/architect/package.json +++ b/packages/angular_devkit/architect/package.json @@ -8,7 +8,7 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "dependencies": { - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" }, "peerDependencies": { "@angular-devkit/core": "0.0.0" diff --git a/packages/angular_devkit/architect/test/package.json b/packages/angular_devkit/architect/test/package.json index 438977c186..ba27998e12 100644 --- a/packages/angular_devkit/architect/test/package.json +++ b/packages/angular_devkit/architect/test/package.json @@ -1,6 +1,6 @@ { "builders": "builders.json", "dependencies": { - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" } } diff --git a/packages/angular_devkit/architect_cli/package.json b/packages/angular_devkit/architect_cli/package.json index c2162242d3..1ab31bae82 100644 --- a/packages/angular_devkit/architect_cli/package.json +++ b/packages/angular_devkit/architect_cli/package.json @@ -18,6 +18,6 @@ "@angular-devkit/core": "0.0.0", "@angular-devkit/architect": "0.0.0", "minimist": "^1.2.0", - "rxjs": "^5.5.2" + "rxjs": "^5.5.8" } } diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index f424243e3a..0704eae144 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -12,7 +12,7 @@ "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", "resolve": "^1.5.0", - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" }, "peerDependencies": { "ng-packagr": "^2.2.0" diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 1621e8a566..47981b22d3 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -42,7 +42,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^5.5.6", + "rxjs": "^5.5.8", "sass-loader": "^6.0.7", "silent-error": "^1.1.0", "source-map-support": "^0.5.0", diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 25407cd3f9..6d9b37569e 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -14,6 +14,6 @@ "ajv": "~5.5.1", "chokidar": "^1.7.0", "source-map": "^0.5.6", - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" } } diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 041a541fd2..f8f68e2008 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,7 +17,7 @@ ], "dependencies": { "@ngtools/json-schema": "^1.1.0", - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" }, "peerDependencies": { "@angular-devkit/core": "0.0.0" diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index 415b74c40f..79252b3e46 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -25,6 +25,6 @@ "@angular-devkit/schematics": "0.0.0", "@schematics/schematics": "0.0.0", "minimist": "^1.2.0", - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" } } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index eec41dabf9..c272019c35 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,7 +8,7 @@ export const latestVersions = { Angular: '^5.2.9', - RxJs: '^5.5.7', + RxJs: '^5.5.8', ZoneJs: '^0.8.20', TypeScript: '~2.6.2', }; diff --git a/packages/schematics/package_update/package.json b/packages/schematics/package_update/package.json index 171028bb95..da765a6308 100644 --- a/packages/schematics/package_update/package.json +++ b/packages/schematics/package_update/package.json @@ -15,7 +15,7 @@ "dependencies": { "semver": "^5.3.0", "semver-intersect": "^1.1.2", - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" }, "peerDependencies": { "@angular-devkit/core": "0.0.0", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index e426e4e71d..151c8311c7 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "dependencies": { "semver": "^5.3.0", "semver-intersect": "^1.1.2", - "rxjs": "^5.5.6" + "rxjs": "^5.5.8" }, "peerDependencies": { "@angular-devkit/core": "0.0.0", diff --git a/scripts/patch-dependencies.ts b/scripts/patch-dependencies.ts index b9a9b18c50..a3eda95bb1 100644 --- a/scripts/patch-dependencies.ts +++ b/scripts/patch-dependencies.ts @@ -12,7 +12,6 @@ const PATCH_LOCK = 'node_modules/rxjs/.patched'; export default function () { if (!existsSync(PATCH_LOCK)) { - execSync('patch -p0 -i scripts/patches/rxjs-ts27.patch'); execSync('patch -p0 -i scripts/patches/rxjs-typings.patch'); writeFileSync(PATCH_LOCK, ''); } diff --git a/scripts/patches/rxjs-ts27.patch b/scripts/patches/rxjs-ts27.patch deleted file mode 100644 index 99529ff3a5..0000000000 --- a/scripts/patches/rxjs-ts27.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- node_modules/rxjs/src/observable/dom/AjaxObservable.ts 2017-12-21 16:48:41.000000000 -0500 -+++ node_modules/rxjs/src/observable/dom/AjaxObservable.ts 2018-02-20 11:00:21.000000000 -0500 -@@ -462,13 +462,13 @@ - //IE does not support json as responseType, parse it internally - return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null'); - } else { -- return JSON.parse(xhr.responseText || 'null'); -+ return JSON.parse((xhr as any).responseText || 'null'); - } - case 'xml': - return xhr.responseXML; - case 'text': - default: -- return ('response' in xhr) ? xhr.response : xhr.responseText; -+ return ('response' in xhr) ? xhr.response : (xhr as any).responseText; - } - } - diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/package.json b/tests/@angular_devkit/build_optimizer/webpack/aio-app/package.json index 92d1e79b62..13ce4ef3c1 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/package.json +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/package.json @@ -29,7 +29,7 @@ "@angular/service-worker": "1.0.0-beta.16", "@ngtools/webpack": "1.4.1", "core-js": "^2.4.1", - "rxjs": "^5.1.0", + "rxjs": "^5.5.8", "zone.js": "^0.8.4" }, "devDependencies": { diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/package.json b/tests/@angular_devkit/build_optimizer/webpack/simple-app/package.json index b4ff7a6cab..02e2ae0557 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/package.json +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/package.json @@ -25,7 +25,7 @@ "@angular/router": "^4.2.3", "@ngtools/webpack": "1.4.1", "core-js": "^2.4.1", - "rxjs": "^5.1.0", + "rxjs": "^5.5.8", "zone.js": "^0.8.4" }, "devDependencies": { diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/package.json b/tests/@angular_devkit/build_webpack/hello-world-app/package.json index a09e45fde5..18e425a6de 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/package.json +++ b/tests/@angular_devkit/build_webpack/hello-world-app/package.json @@ -22,7 +22,7 @@ "@angular/platform-browser-dynamic": "^5.2.0", "@angular/router": "^5.2.0", "core-js": "^2.4.1", - "rxjs": "^5.5.6", + "rxjs": "^5.5.8", "zone.js": "^0.8.19" }, "devDependencies": { From 9834378f6b43db323fed07fa10f33b93b9bf4a86 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 27 Mar 2018 14:20:33 +0100 Subject: [PATCH 292/724] fix(@schematics/angular): add build-ng-packagr when generating library --- packages/schematics/angular/library/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 827ddb205a..33170462fc 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -105,6 +105,7 @@ function addDependenciesAndScriptsToPackageJson() { json.devDependencies = { '@angular/compiler-cli': latestVersions.Angular, + '@angular-devkit/build-ng-packagr': 'latest', 'ng-packagr': '^2.4.1', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', From 2ac60288e970633836e97f0d0ac27df33c101c61 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 26 Mar 2018 12:10:33 -0700 Subject: [PATCH 293/724] fix(@angular-devkit/build-webpack): service-worker should reject on error This error is particularly recoverable. --- .../src/angular-cli-files/utilities/service-worker/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts index 0991c1dc8d..bdcc2364a8 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts @@ -89,9 +89,11 @@ export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string const configPath = path.resolve(appRoot, 'ngsw-config.json'); if (!fs.existsSync(configPath)) { - throw new Error(oneLine`Error: Expected to find an ngsw-config.json configuration + return Promise.reject(new Error(oneLine` + Error: Expected to find an ngsw-config.json configuration file in the ${appRoot} folder. Either provide one or disable Service Worker - in .angular-cli.json.`); + in .angular-cli.json.`, + )); } const config = fs.readFileSync(configPath, 'utf8'); From 0ad1ace729e9d3c367b998f4ba3b262f4b5df96b Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 20 Mar 2018 15:09:04 -0700 Subject: [PATCH 294/724] feat(@angular-devkit/build-webpack): add support for service-worker --- .../utilities/service-worker/index.ts | 152 +++++++++++------- .../build_webpack/src/browser/index.ts | 34 ++-- 2 files changed, 116 insertions(+), 70 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts index bdcc2364a8..2d5c2a6061 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts @@ -1,56 +1,51 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. - +import { Path, join, normalize, virtualFs, dirname, getSystemPath } from '@angular-devkit/core'; import { Filesystem } from '@angular/service-worker/config'; import { oneLine, stripIndent } from 'common-tags'; import * as crypto from 'crypto'; import * as fs from 'fs'; -import * as path from 'path'; import * as semver from 'semver'; import { resolveProjectModule } from '../require-project-module'; +import { map, reduce, switchMap } from "rxjs/operators"; +import { Observable } from "rxjs"; +import { merge } from "rxjs/observable/merge"; +import { of } from "rxjs/observable/of"; + export const NEW_SW_VERSION = '5.0.0-rc.0'; -class CliFilesystem implements Filesystem { - constructor(private base: string) { } - list(_path: string): Promise { - return Promise.resolve(this.syncList(_path)); - } - - private syncList(_path: string): string[] { - const dir = this.canonical(_path); - const entries = fs.readdirSync(dir).map( - (entry: string) => ({ entry, stats: fs.statSync(path.posix.join(dir, entry)) })); - const files = entries.filter((entry: any) => !entry.stats.isDirectory()) - .map((entry: any) => path.posix.join(_path, entry.entry)); +class CliFilesystem implements Filesystem { + constructor(private _host: virtualFs.Host, private base: string) { } - return entries.filter((entry: any) => entry.stats.isDirectory()) - .map((entry: any) => path.posix.join(_path, entry.entry)) - .reduce((list: string[], subdir: string) => list.concat(this.syncList(subdir)), files); + list(path: string): Promise { + return this._host.list(this._resolve(path)).toPromise().then(x => x, _err => []); } - read(_path: string): Promise { - const file = this.canonical(_path); - return Promise.resolve(fs.readFileSync(file).toString()); + read(path: string): Promise { + return this._host.read(this._resolve(path)) + .toPromise() + .then(content => virtualFs.fileBufferToString(content)); } - hash(_path: string): Promise { + hash(path: string): Promise { const sha1 = crypto.createHash('sha1'); - const file = this.canonical(_path); - const contents: Buffer = fs.readFileSync(file); - sha1.update(contents); - return Promise.resolve(sha1.digest('hex')); + + return this.read(path) + .then(content => sha1.update(content)) + .then(() => sha1.digest('hex')); } - write(_path: string, contents: string): Promise { - const file = this.canonical(_path); - fs.writeFileSync(file, contents); - return Promise.resolve(); + write(path: string, content: string): Promise { + return this._host.write(this._resolve(path), virtualFs.stringToFileBuffer(content)) + .toPromise(); } - private canonical(_path: string): string { return path.posix.join(this.base, _path); } + private _resolve(path: string): Path { + return join(normalize(this.base), path); + } } export function usesServiceWorker(projectRoot: string): boolean { @@ -81,38 +76,75 @@ export function usesServiceWorker(projectRoot: string): boolean { return true; } -export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string, - outputPath: string, baseHref: string): Promise { +export function augmentAppWithServiceWorker( + host: virtualFs.Host, + projectRoot: Path, + appRoot: Path, + outputPath: Path, + baseHref: string, +): Promise { // Path to the worker script itself. - const workerPath = resolveProjectModule(projectRoot, '@angular/service-worker/ngsw-worker.js'); - const safetyPath = path.join(path.dirname(workerPath), 'safety-worker.js'); - const configPath = path.resolve(appRoot, 'ngsw-config.json'); - - if (!fs.existsSync(configPath)) { - return Promise.reject(new Error(oneLine` - Error: Expected to find an ngsw-config.json configuration - file in the ${appRoot} folder. Either provide one or disable Service Worker - in .angular-cli.json.`, - )); - } - const config = fs.readFileSync(configPath, 'utf8'); + const distPath = normalize(outputPath); + const workerPath = normalize( + resolveProjectModule(getSystemPath(projectRoot), '@angular/service-worker/ngsw-worker.js'), + ); + const swConfigPath = resolveProjectModule( + getSystemPath(projectRoot), + '@angular/service-worker/config', + ); + const safetyPath = join(dirname(workerPath), 'safety-worker.js'); + const configPath = join(appRoot, 'ngsw-config.json'); + + return host.exists(configPath).pipe( + switchMap(exists => { + if (!exists) { + throw new Error(oneLine` + Error: Expected to find an ngsw-config.json configuration + file in the ${appRoot} folder. Either provide one or disable Service Worker + in your angular.json configuration file.`, + ); + } - const Generator = require('@angular/service-worker/config').Generator; - const gen = new Generator(new CliFilesystem(outputPath), baseHref); - return gen - .process(JSON.parse(config)) - .then((output: Object) => { + return host.read(configPath) as Observable; + }), + map(content => JSON.parse(virtualFs.fileBufferToString(content))), + switchMap(configJson => { + const Generator = require(swConfigPath).Generator; + const gen = new Generator(new CliFilesystem(host, outputPath), baseHref); + + return gen.process(configJson); + }), + + switchMap(output => { const manifest = JSON.stringify(output, null, 2); - fs.writeFileSync(path.resolve(outputPath, 'ngsw.json'), manifest); - // Copy worker script to dist directory. - const workerCode = fs.readFileSync(workerPath); - fs.writeFileSync(path.resolve(outputPath, 'ngsw-worker.js'), workerCode); - - // If @angular/service-worker has the safety script, copy it into two locations. - if (fs.existsSync(safetyPath)) { - const safetyCode = fs.readFileSync(safetyPath); - fs.writeFileSync(path.resolve(outputPath, 'worker-basic.min.js'), safetyCode); - fs.writeFileSync(path.resolve(outputPath, 'safety-worker.js'), safetyCode); + return host.read(workerPath).pipe( + switchMap(workerCode => { + return merge( + host.write(join(distPath, 'ngsw.json'), virtualFs.stringToFileBuffer(manifest)), + host.write(join(distPath, 'ngsw-worker.js'), workerCode), + ) as Observable; + }), + ); + }), + + switchMap(() => host.exists(safetyPath)), + // If @angular/service-worker has the safety script, copy it into two locations. + switchMap(exists => { + if (!exists) { + return of(undefined); } - }); + + return host.read(safetyPath).pipe( + switchMap(safetyCode => { + return merge( + host.write(join(distPath, 'worker-basic.min.js'), safetyCode), + host.write(join(distPath, 'safety-worker.js'), safetyCode), + ) as Observable; + }), + ); + }), + + // Remove all elements, reduce them to a single emit. + reduce(() => {}), + ).toPromise(); } diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index 8572c30e50..eb65f14400 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -28,6 +28,7 @@ import { import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; +import { augmentAppWithServiceWorker } from '../angular-cli-files/utilities/service-worker'; import { statsErrorsToString, statsToString, @@ -164,20 +165,33 @@ export class BrowserBuilder implements Builder { this.context.logger.error(statsErrorsToString(json, statsConfig)); } - obs.next({ success: !stats.hasErrors() }); - if (options.watch) { + obs.next({ success: !stats.hasErrors() }); + // Never complete on watch mode. return; } else { - // if (!!app.serviceWorker && runTaskOptions.target === 'production' && - // usesServiceWorker(this.project.root) && runTaskOptions.serviceWorker !== false) { - // const appRoot = path.resolve(this.project.root, app.root); - // augmentAppWithServiceWorker(this.project.root, appRoot, path.resolve(outputPath), - // runTaskOptions.baseHref || '/') - // .then(() => resolve(), (err: any) => reject(err)); - // } - obs.complete(); + if (builderConfig.options.serviceWorker) { + augmentAppWithServiceWorker( + this.context.host, + root, + projectRoot, + resolve(root, normalize(options.outputPath)), + options.baseHref || '/', + ).then( + () => { + obs.next({ success: !stats.hasErrors() }); + obs.complete(); + }, + (err: Error) => { + // We error out here because we're not in watch mode anyway (see above). + obs.error(err); + }, + ); + } else { + obs.next({ success: !stats.hasErrors() }); + obs.complete(); + } } }; From 68225958c880fd55029a68e5da4e0ed531743065 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 25 Mar 2018 22:22:43 -0700 Subject: [PATCH 295/724] test: add test for service worker in browser builder --- .../test/browser/service-worker_spec_large.ts | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 packages/angular_devkit/build_webpack/test/browser/service-worker_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/service-worker_spec_large.ts new file mode 100644 index 0000000000..ded92ecd3e --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/service-worker_spec_large.ts @@ -0,0 +1,83 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { normalize, virtualFs } from '@angular-devkit/core'; +import { tap } from 'rxjs/operators'; +import { browserTargetSpec, host, runTargetSpec } from '../utils'; + + +describe('Browser Builder', () => { + const manifest = { + index: '/index.html', + assetGroups: [ + { + name: 'app', + installMode: 'prefetch', + resources: { + files: [ '/favicon.ico', '/index.html' ], + versionedFiles: [ + '/*.bundle.css', + '/*.bundle.js', + '/*.chunk.js', + ], + }, + }, + { + name: 'assets', + installMode: 'lazy', + updateMode: 'prefetch', + resources: { + files: [ '/assets/**' ], + }, + }, + ], + }; + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('errors if no ngsw-config.json is present', (done) => { + const overrides = { serviceWorker: true }; + + runTargetSpec(host, browserTargetSpec, overrides) + .subscribe(event => { + expect(event.success).toBe(false); + }, done, done.fail); + }, 30000); + + it('works with service worker', (done) => { + host.writeMultipleFiles({ + 'src/ngsw-config.json': JSON.stringify(manifest), + }); + + const overrides = { serviceWorker: true }; + runTargetSpec(host, browserTargetSpec, overrides).pipe( + tap(buildEvent => { + expect(buildEvent.success).toBe(true); + expect(host.scopedSync().exists(normalize('dist/ngsw.json'))); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('works with service worker and baseHref', (done) => { + host.writeMultipleFiles({ + 'src/ngsw-config.json': JSON.stringify(manifest), + }); + + const overrides = { serviceWorker: true, baseHref: '/foo/bar' }; + runTargetSpec(host, browserTargetSpec, overrides).pipe( + tap(buildEvent => { + expect(buildEvent.success).toBe(true); + expect(host.scopedSync().exists(normalize('dist/ngsw.json'))); + expect(virtualFs.fileBufferToString( + host.scopedSync().read(normalize('dist/ngsw.json')), + )).toMatch(/"\/foo\/bar\/index.html"/); + }), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); From c5eebfe23a148146e0ba29b1d9579e15e6ede1bd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 27 Mar 2018 15:59:36 +0100 Subject: [PATCH 296/724] feat(@angular-devkit/build-webpack): re-enable bundle budgets --- .../build_webpack/src/browser/index.ts | 2 + .../build_webpack/src/browser/schema.json | 61 +++++++++++++++++++ .../test/browser/bundle-budgets_spec_large.ts | 56 +++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 packages/angular_devkit/build_webpack/test/browser/bundle-budgets_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_webpack/src/browser/index.ts index eb65f14400..cf2e3898ff 100644 --- a/packages/angular_devkit/build_webpack/src/browser/index.ts +++ b/packages/angular_devkit/build_webpack/src/browser/index.ts @@ -26,6 +26,7 @@ import { getStylesConfig, } from '../angular-cli-files/models/webpack-configs'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; +import { Budget } from '../angular-cli-files/utilities/bundle-calculator'; import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; import { augmentAppWithServiceWorker } from '../angular-cli-files/utilities/service-worker'; @@ -64,6 +65,7 @@ export interface BrowserBuilderOptions { forkTypeChecker: boolean; statsJson: boolean; lazyModules: string[]; + budgets: Budget[]; // Options with no defaults. // TODO: reconsider this list. diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_webpack/src/browser/schema.json index 8c90d03869..58c5b5efb4 100644 --- a/packages/angular_devkit/build_webpack/src/browser/schema.json +++ b/packages/angular_devkit/build_webpack/src/browser/schema.json @@ -228,6 +228,14 @@ "type": "string" }, "default": [] + }, + "budgets": { + "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.", + "type": "array", + "items": { + "$ref": "#/definitions/budget" + }, + "default": [] } }, "additionalProperties": false, @@ -283,6 +291,59 @@ "required": [ "input" ] + }, + "budget": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of budget.", + "enum": [ + "all", + "allScript", + "any", + "anyScript", + "bundle", + "initial" + ] + }, + "name": { + "type": "string", + "description": "The name of the bundle." + }, + "baseline": { + "type": "string", + "description": "The baseline size for comparison." + }, + "maximumWarning": { + "type": "string", + "description": "The maximum threshold for warning relative to the baseline." + }, + "maximumError": { + "type": "string", + "description": "The maximum threshold for error relative to the baseline." + }, + "minimumWarning": { + "type": "string", + "description": "The minimum threshold for warning relative to the baseline." + }, + "minimumError": { + "type": "string", + "description": "The minimum threshold for error relative to the baseline." + }, + "warning": { + "type": "string", + "description": "The threshold for warning relative to the baseline (min & max)." + }, + "error": { + "type": "string", + "description": "The threshold for error relative to the baseline (min & max)." + } + }, + "additionalProperties": false, + "required": [ + "type" + ] } } } \ No newline at end of file diff --git a/packages/angular_devkit/build_webpack/test/browser/bundle-budgets_spec_large.ts b/packages/angular_devkit/build_webpack/test/browser/bundle-budgets_spec_large.ts new file mode 100644 index 0000000000..68ace905f6 --- /dev/null +++ b/packages/angular_devkit/build_webpack/test/browser/bundle-budgets_spec_large.ts @@ -0,0 +1,56 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { tap } from 'rxjs/operators'; +import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; + + +describe('Browser Builder bundle budgets', () => { + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('accepts valid bundles', (done) => { + const overrides = { + optimization: true, + budgets: [{ type: 'allScript', maximumError: '100mb' }], + }; + + const logger = new TestLogger('rebuild-type-errors'); + + runTargetSpec(host, browserTargetSpec, overrides, logger).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(logger.includes('WARNING')).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('shows errors', (done) => { + const overrides = { + optimization: true, + budgets: [{ type: 'all', maximumError: '100b' }], + }; + + runTargetSpec(host, browserTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(false)), + ).subscribe(undefined, done.fail, done); + }, 30000); + + it('shows warnings', (done) => { + const overrides = { + optimization: true, + budgets: [{ type: 'all', minimumWarning: '100mb' }], + }; + + const logger = new TestLogger('rebuild-type-errors'); + + runTargetSpec(host, browserTargetSpec, overrides, logger).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(logger.includes('WARNING')).toBe(true)), + ).subscribe(undefined, done.fail, done); + }, 30000); +}); From 66e0d5360893c3055cb7e870dc2553123a8f5945 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 27 Mar 2018 08:39:28 -0700 Subject: [PATCH 297/724] release: 0.4.7 --- .monorepo.json | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 8205a57927..a4107bf6cd 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -46,8 +46,8 @@ "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.4.5", - "hash": "" + "version": "0.4.6", + "hash": "f48bf7e6bb335235b32ba8b93871ea40" }, "@angular-devkit/architect": { "name": "Architect", @@ -57,14 +57,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.7", - "hash": "4673efec2a63e71ed639a928bc2d83d8", + "version": "0.0.8", + "hash": "52f21956121f83d7bf01328995df988c", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.7", - "hash": "290511f4eb44413a19f4beae44d900bf", + "version": "0.0.8", + "hash": "b899b0a5bbd38674efb366ab6f05d148", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -75,8 +75,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.6", - "hash": "16619356762199de42e1641d35e5ec7d", + "version": "0.4.7", + "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-ng-packagr": { @@ -87,8 +87,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.0.1", - "hash": "" + "version": "0.0.2", + "hash": "5b9d0ea3a961a7c58ba5312f689cf137" }, "@angular-devkit/build-webpack": { "name": "Build Webpack", @@ -98,8 +98,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" } ], - "version": "0.0.7", - "hash": "530b50f4c826937facf9d94881e4040e", + "version": "0.0.8", + "hash": "cb56150be7e0ec5ad40d0851029ed271", "snapshotRepo": "angular/angular-devkit-build-webpack-builds" }, "@angular-devkit/core": { @@ -110,8 +110,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.6", - "hash": "5ed585e9eccdc0c98e254dca7aa29f68", + "version": "0.4.7", + "hash": "8dd264f0af0e96024f525bf1ae900d51", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -122,28 +122,28 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.6", - "hash": "bbc4ed77fe0169277aafff89dd48cfe4", + "version": "0.4.7", + "hash": "ee6ab5f074ea6402e78f3c8e24148040", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.6", - "hash": "ebdb3ec1ec15ef5c91a7f46f93df6137", + "version": "0.4.7", + "hash": "4028af94bb8b25304064decdb91ed8eb", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0", + "version": "6.0.0-beta.7", "section": "Misc", - "hash": "", + "hash": "8ceb0098b4d60ed0948b613a3d829262", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.6", - "hash": "0cf53840426bea125cb32561a04022b8", + "version": "0.4.7", + "hash": "a4e0ab1e42a5b031581f1192a2f52321", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { @@ -154,16 +154,16 @@ }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.6", + "version": "0.4.7", "section": "Schematics", - "hash": "1abc8090ac37083ca02f92ab794c6d7f", + "hash": "e4366dd236a21a125ebac55a20363aa6", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.4.6", + "version": "0.4.7", "section": "Schematics", - "hash": "3c9aa9830a3b56aa729aac923a815059", + "hash": "adef93c50dbfc2a2bffa797b12c29141", "snapshotRepo": "" } } From df35083a1cc31a41c8ba5c59e5ea204d81038436 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 27 Mar 2018 21:31:32 -0400 Subject: [PATCH 298/724] refactor(@angular-devkit/build-webpack): remove common-tags dependency --- package-lock.json | 13 ------------- package.json | 2 -- packages/angular_devkit/build_webpack/package.json | 1 - .../base-href-webpack-plugin_spec.ts | 14 +++++++------- .../models/webpack-configs/typescript.ts | 5 ++--- .../utilities/service-worker/index.ts | 9 ++++----- .../src/angular-cli-files/utilities/stats.ts | 6 +++--- 7 files changed, 16 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6be9235b2b..355c7288cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -135,11 +135,6 @@ "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==" }, - "@types/common-tags": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@types/common-tags/-/common-tags-1.4.0.tgz", - "integrity": "sha512-HI1tSO87vmd1sPS3DOVSK4gvVKROvCBFvAnXlLiQtAus/+1xXMQcNyu9TX2ChwRXFeQZeB9+f+nMo99xLd5DdA==" - }, "@types/copy-webpack-plugin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz", @@ -1799,14 +1794,6 @@ "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.5.tgz", "integrity": "sha512-U7qGbcDLSNpOcV3RQRKHp7hFpy9WUmfawbkPdS4R2RhrSu4dOF85QQpx/Zjcv7uLF6tWSUKEKUIkxknPCrVjwg==" }, - "common-tags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.5.1.tgz", - "integrity": "sha512-NrUYGY5TApAk9KB+IZXkR3GR4tA3g26HDsoiGt4kCMHZ727gOGkC+UNfq0Z22jE15bLkc/6RV5Jw1RBW6Usg6A==", - "requires": { - "babel-runtime": "6.26.0" - } - }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", diff --git a/package.json b/package.json index d94309f0da..1b7416e2e1 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ "@angular/router": "^5.2.6", "@angular/service-worker": "^5.2.7", "@ngtools/json-schema": "^1.0.9", - "@types/common-tags": "^1.4.0", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", "@types/glob": "^5.0.29", @@ -89,7 +88,6 @@ "circular-dependency-plugin": "^5.0.0", "clean-css": "^4.1.11", "codelyzer": "^4.0.2", - "common-tags": "^1.5.1", "conventional-changelog": "^1.1.0", "copy-webpack-plugin": "^4.5.0", "express": "^4.16.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 47981b22d3..cc09e7d7c0 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -18,7 +18,6 @@ "chalk": "~2.2.2", "circular-dependency-plugin": "^5.0.0", "clean-css": "^4.1.11", - "common-tags": "^1.5.1", "copy-webpack-plugin": "^4.5.0", "file-loader": "^1.1.11", "glob": "^7.0.3", diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts index 2766f3b0a8..8501239e3e 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts @@ -1,7 +1,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import {oneLineTrim} from 'common-tags'; +import { tags } from '@angular-devkit/core'; import {BaseHrefWebpackPlugin} from './base-href-webpack-plugin'; @@ -22,7 +22,7 @@ function mockCompiler(indexHtml: string, callback: Function) { } describe('base href webpack plugin', () => { - const html = oneLineTrim` + const html = tags.oneLine` @@ -41,7 +41,7 @@ describe('base href webpack plugin', () => { it('should insert base tag when not exist', function () { const plugin = new BaseHrefWebpackPlugin({ baseHref: '/' }); const compiler = mockCompiler(html, (_x: any, htmlPluginData: any) => { - expect(htmlPluginData.html).toEqual(oneLineTrim` + expect(htmlPluginData.html).toEqual(tags.oneLine` @@ -55,11 +55,11 @@ describe('base href webpack plugin', () => { it('should replace href attribute when base tag already exists', function () { const plugin = new BaseHrefWebpackPlugin({ baseHref: '/myUrl/' }); - const compiler = mockCompiler(oneLineTrim` + const compiler = mockCompiler(tags.oneLine` `, (_x: any, htmlPluginData: any) => { - expect(htmlPluginData.html).toEqual(oneLineTrim` + expect(htmlPluginData.html).toEqual(tags.oneLine` `); @@ -70,11 +70,11 @@ describe('base href webpack plugin', () => { it('should replace href attribute when baseHref is empty', function () { const plugin = new BaseHrefWebpackPlugin({ baseHref: '' }); - const compiler = mockCompiler(oneLineTrim` + const compiler = mockCompiler(tags.oneLine` `, (_x: any, htmlPluginData: any) => { - expect(htmlPluginData.html).toEqual(oneLineTrim` + expect(htmlPluginData.html).toEqual(tags.oneLine` `); diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts index 07b4a86ec3..4516bf6c97 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -1,9 +1,8 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { virtualFs } from '@angular-devkit/core'; +import { tags, virtualFs } from '@angular-devkit/core'; import { Stats } from 'fs'; import * as path from 'path'; -import { stripIndent } from 'common-tags'; import { AngularCompilerPlugin, AngularCompilerPluginOptions, @@ -40,7 +39,7 @@ function _createAotPlugin( if (!appConfig.environmentSource) { let migrationMessage = ''; if ('source' in appConfig.environments) { - migrationMessage = '\n\n' + stripIndent` + migrationMessage = '\n\n' + tags.stripIndent` A new environmentSource entry replaces the previous source entry inside environments. To migrate angular-cli.json follow the example below: diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts index 2d5c2a6061..aeadcf3dc5 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts @@ -1,8 +1,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { Path, join, normalize, virtualFs, dirname, getSystemPath } from '@angular-devkit/core'; +import { Path, join, normalize, virtualFs, dirname, getSystemPath, tags } from '@angular-devkit/core'; import { Filesystem } from '@angular/service-worker/config'; -import { oneLine, stripIndent } from 'common-tags'; import * as crypto from 'crypto'; import * as fs from 'fs'; import * as semver from 'semver'; @@ -55,7 +54,7 @@ export function usesServiceWorker(projectRoot: string): boolean { swPackageJsonPath = resolveProjectModule(projectRoot, '@angular/service-worker/package.json'); } catch (_) { // @angular/service-worker is not installed - throw new Error(stripIndent` + throw new Error(tags.stripIndent` Your project is configured with serviceWorker = true, but @angular/service-worker is not installed. Run \`npm install --save-dev @angular/service-worker\` and try again, or run \`ng set apps.0.serviceWorker=false\` in your .angular-cli.json. @@ -66,7 +65,7 @@ export function usesServiceWorker(projectRoot: string): boolean { const swVersion = JSON.parse(swPackageJson)['version']; if (!semver.gte(swVersion, NEW_SW_VERSION)) { - throw new Error(stripIndent` + throw new Error(tags.stripIndent` The installed version of @angular/service-worker is ${swVersion}. This version of the CLI requires the @angular/service-worker version to satisfy ${NEW_SW_VERSION}. Please upgrade your service worker version. @@ -98,7 +97,7 @@ export function augmentAppWithServiceWorker( return host.exists(configPath).pipe( switchMap(exists => { if (!exists) { - throw new Error(oneLine` + throw new Error(tags.oneLine` Error: Expected to find an ngsw-config.json configuration file in the ${appRoot} folder. Either provide one or disable Service Worker in your angular.json configuration file.`, diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts index 02f6a9dd60..b7d7a345c6 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts +++ b/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts @@ -2,7 +2,7 @@ // TODO: cleanup this file, it's copied as is from Angular CLI. import chalk from 'chalk'; -import { stripIndents } from 'common-tags'; +import { tags } from '@angular-devkit/core'; // Force basic color support on terminals with no color support. @@ -47,13 +47,13 @@ export function statsToString(json: any, statsConfig: any) { const unchangedChunkNumber = json.chunks.length - changedChunksStats.length; if (unchangedChunkNumber > 0) { - return rs(stripIndents` + return rs(tags.stripIndents` Date: ${w(new Date().toISOString())} - Hash: ${w(json.hash)} - Time: ${w('' + json.time)}ms ${unchangedChunkNumber} unchanged chunks ${changedChunksStats.join('\n')} `); } else { - return rs(stripIndents` + return rs(tags.stripIndents` Date: ${w(new Date().toISOString())} Hash: ${w(json.hash)} Time: ${w('' + json.time)}ms From 80e78c4b2d5c07fa2e242a80c86e2f8a808abe6a Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 27 Mar 2018 21:25:22 -0700 Subject: [PATCH 299/724] fix(@angular-devkit/core): fix smart defaults on arrays By adding undefined and empty arrays everywhere were preventing smart defaults to work on arrays. Also, when ending with an array or object, smart defaults path will have an extra key. --- .../core/src/json/schema/registry.ts | 12 ++++++--- .../core/src/json/schema/registry_spec.ts | 25 +++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index f56d43eb24..5db8ccdd03 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -187,7 +187,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { }), switchMap(([data, valid]) => { if (valid) { - let dataObs = observableOf(data); + let dataObs = this._applySmartDefaults(data); this._post.forEach(visitor => dataObs = dataObs.pipe( concatMap(data => { @@ -203,8 +203,6 @@ export class CoreSchemaRegistry implements SchemaRegistry { ); return dataObs.pipe( - // Apply smart defaults. - concatMap(data => this._applySmartDefaults(data)), map(data => [data, valid]), ); } else { @@ -280,7 +278,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { // We cheat, heavily. this._smartDefaultRecord.set( // tslint:disable-next-line:no-any - JSON.stringify((it as any).dataPathArr.slice(1) as string[]), + JSON.stringify((it as any).dataPathArr.slice(1, (it as any).dataLevel + 1) as string[]), schema, ); @@ -334,8 +332,14 @@ export class CoreSchemaRegistry implements SchemaRegistry { .replace(/\\r/g, '\r') .replace(/\\f/g, '\f') .replace(/\\t/g, '\t'); + + // We know we need an object because the fragment is a property key. + if (!data && parent !== null && parentProperty) { + data = parent[parentProperty] = {}; + } parent = data; parentProperty = property; + data = data[property]; } else { return; diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index 5ffb0585c0..a9d0833ca9 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -273,6 +273,9 @@ describe('CoreSchemaRegistry', () => { return schema['blue']; }); + registry.addSmartDefaultProvider('test3', (schema) => { + return [ 1, 2, 3 ]; + }); registry .compile({ @@ -289,6 +292,20 @@ describe('CoreSchemaRegistry', () => { }, }, }, + arr2: { + $ref: '#/definitions/test3', + }, + obj: { + properties: { + deep: { + properties: { + arr: { + $ref: '#/definitions/test3', + }, + }, + }, + }, + }, }, definitions: { example: { @@ -304,6 +321,12 @@ describe('CoreSchemaRegistry', () => { blue: 'yep', }, }, + test3: { + type: 'array', + $default: { + $source: 'test3', + }, + }, }, }) .pipe( @@ -312,6 +335,8 @@ describe('CoreSchemaRegistry', () => { expect(result.success).toBe(true); expect(data.bool).toBe(true); expect(data.arr[0].test).toBe('yep'); + expect(data.arr2).toEqual([1, 2, 3]); + expect(data.obj.deep.arr).toEqual([1, 2, 3]); }), ) .subscribe(done, done.fail); From d9638bbf56539042c98b151e10539530ad477977 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 27 Mar 2018 21:25:46 -0700 Subject: [PATCH 300/724] fix(@schematics/update): fix update argv --- packages/schematics/update/update/index.ts | 2 +- packages/schematics/update/update/schema.json | 21 +++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 5f553df05b..3ba6836c4b 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -374,7 +374,7 @@ function _buildPackageInfo( ); } - const installedPackageJson = npmPackageJson.versions[installedVersion]; + const installedPackageJson = npmPackageJson.versions[installedVersion] || packageContent; if (!installedPackageJson) { throw new SchematicsException( `An unexpected error happened; package ${name} has no version ${installedVersion}.`, diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json index ad762e27ee..79eed258d2 100644 --- a/packages/schematics/update/update/schema.json +++ b/packages/schematics/update/update/schema.json @@ -6,20 +6,13 @@ "properties": { "packages": { "description": "The packages to get.", - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "$default": { - "$source": "argv" - } - }, - { - "type": "string" - } - ] + "type": "array", + "items": { + "type": "string" + }, + "$default": { + "$source": "argv" + } }, "force": { "description": "If false, will error out if installed packages are incompatible with the update.", From a275d785b217081c1b63f01a4ade14fbc3de6338 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 9 Mar 2018 14:49:48 -0500 Subject: [PATCH 301/724] refactor(@angular-devkit/build-webpack): update dev-server to 3.1 stable --- package-lock.json | 166 +++++++++++------- package.json | 6 +- .../angular_devkit/build_webpack/package.json | 6 +- 3 files changed, 109 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index 355c7288cf..7bc6c90f78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -355,13 +355,13 @@ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "requires": { - "acorn": "5.5.0" + "acorn": "5.5.3" }, "dependencies": { "acorn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", - "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" } } }, @@ -4879,9 +4879,9 @@ "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "requires": { "inherits": "2.0.3", - "obuf": "1.1.1", + "obuf": "1.1.2", "readable-stream": "2.3.3", - "wbuf": "1.7.2" + "wbuf": "1.7.3" } }, "html-entities": { @@ -5016,9 +5016,9 @@ } }, "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=" + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.11.tgz", + "integrity": "sha512-QCR5O2AjjMW8Mo4HyI1ctFcv+O99j/0g367V3YoVnrNw5hkDvAWZD0lWGcc+F4yN3V55USPCVix4efb75HxFfA==" }, "http-proxy": { "version": "1.16.2", @@ -7951,9 +7951,9 @@ } }, "obuf": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz", - "integrity": "sha1-EEEktsYCxnlogaBCVB0220OlJk4=" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" }, "on-finished": { "version": "2.3.0", @@ -10323,21 +10323,21 @@ "http-deceiver": "1.2.7", "safe-buffer": "5.1.1", "select-hose": "2.0.0", - "spdy-transport": "2.0.20" + "spdy-transport": "2.1.0" } }, "spdy-transport": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", - "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", "requires": { "debug": "2.6.9", "detect-node": "2.0.3", "hpack.js": "2.1.6", - "obuf": "1.1.1", + "obuf": "1.1.2", "readable-stream": "2.3.3", "safe-buffer": "5.1.1", - "wbuf": "1.7.2" + "wbuf": "1.7.3" } }, "split": { @@ -11361,6 +11361,21 @@ "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -11383,9 +11398,9 @@ } }, "url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" }, "url-loader": { "version": "1.0.1", @@ -11657,7 +11672,7 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", "requires": { - "chokidar": "2.0.2", + "chokidar": "2.0.3", "graceful-fs": "4.1.11", "neo-async": "2.5.0" }, @@ -11667,7 +11682,7 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "micromatch": "3.1.9", + "micromatch": "3.1.10", "normalize-path": "2.1.1" } }, @@ -11719,9 +11734,9 @@ } }, "chokidar": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", - "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", "requires": { "anymatch": "2.0.0", "async-each": "1.0.1", @@ -11935,9 +11950,9 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, "micromatch": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", - "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", @@ -11957,9 +11972,9 @@ } }, "wbuf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.2.tgz", - "integrity": "sha1-1pe5nx9ZUS3ydRvkJ2nBWAtYAf4=", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "requires": { "minimalistic-assert": "1.0.0" } @@ -12025,9 +12040,9 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.1.0.tgz", "integrity": "sha512-ZFYcAZ44kOT+xsS5MS2H1fQr0PJkwQdYem/d17wacDkkupzsAkBJ3hDShWHdPVvWluFs6pfhHWw/dVso1m0rsA==", "requires": { - "acorn": "5.5.1", + "acorn": "5.5.3", "acorn-dynamic-import": "3.0.0", - "ajv": "6.2.1", + "ajv": "6.4.0", "ajv-keywords": "3.1.0", "chrome-trace-event": "0.1.2", "enhanced-resolve": "4.0.0", @@ -12035,7 +12050,7 @@ "loader-runner": "2.3.0", "loader-utils": "1.1.0", "memory-fs": "0.4.1", - "micromatch": "3.1.9", + "micromatch": "3.1.10", "mkdirp": "0.5.1", "neo-async": "2.5.0", "node-libs-browser": "2.1.0", @@ -12047,18 +12062,19 @@ }, "dependencies": { "acorn": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.1.tgz", - "integrity": "sha512-D/KGiCpM/VOtTMDS+wfjywEth926WUrArrzYov4N4SI7t+3y8747dPpCmmAvrm/Z3ygqMHnyPxvYYO0yTdn/nQ==" + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" }, "ajv": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", - "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", "requires": { "fast-deep-equal": "1.0.0", "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "json-schema-traverse": "0.3.1", + "uri-js": "3.0.2" } }, "arr-diff": { @@ -12274,9 +12290,9 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, "micromatch": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", - "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", @@ -12298,7 +12314,7 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "6.2.1", + "ajv": "6.4.0", "ajv-keywords": "3.1.0" } } @@ -12329,16 +12345,16 @@ } }, "webpack-dev-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", - "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.0.tgz", + "integrity": "sha512-UtAd5+J3IihQilwxOESie2BKaeo37yjmMSfV5G+UGEwPwqgL9+L/rShvjrfse8ARSRQGd3QwN2ANSk++KYZizQ==", "requires": { "loud-rejection": "1.6.0", "memory-fs": "0.4.1", "mime": "2.2.0", "path-is-absolute": "1.0.1", "range-parser": "1.2.0", - "url-join": "2.0.5", + "url-join": "4.0.0", "webpack-log": "1.1.2" }, "dependencies": { @@ -12350,14 +12366,14 @@ } }, "webpack-dev-server": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.0.tgz", - "integrity": "sha512-ap7Fth7oh4sthC0nJkvRm2W3SaWryBeR19DWIcAwJlcooN0tB2fEKuZqckYR3uaJ6wXPCK1xMWAQWXhV5xVe8g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.1.tgz", + "integrity": "sha512-u5lz6REb3+KklgSIytUIOrmWgnpgFmfj/+I+GBXurhEoCsHXpG9twk4NO3bsu72GC9YtxIsiavjfRdhmNt0A/A==", "requires": { "ansi-html": "0.0.7", "array-includes": "3.0.3", "bonjour": "3.5.0", - "chokidar": "2.0.2", + "chokidar": "2.0.3", "compression": "1.7.2", "connect-history-api-fallback": "1.5.0", "debug": "3.1.0", @@ -12379,7 +12395,7 @@ "spdy": "3.4.7", "strip-ansi": "3.0.1", "supports-color": "5.3.0", - "webpack-dev-middleware": "2.0.6", + "webpack-dev-middleware": "3.0.1", "webpack-log": "1.1.2", "yargs": "9.0.1" }, @@ -12394,7 +12410,7 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "micromatch": "3.1.9", + "micromatch": "3.1.10", "normalize-path": "2.1.1" } }, @@ -12451,9 +12467,9 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, "chokidar": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", - "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", "requires": { "anymatch": "2.0.0", "async-each": "1.0.1", @@ -12773,9 +12789,9 @@ } }, "micromatch": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", - "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", @@ -12792,6 +12808,11 @@ "to-regex": "3.0.2" } }, + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -12878,6 +12899,25 @@ "has-flag": "3.0.0" } }, + "url-join": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" + }, + "webpack-dev-middleware": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.0.1.tgz", + "integrity": "sha512-JCturcEZNGA0KHEpOJVRTC/VVazTcPfpR9c1Au6NO9a+jxCRchMi87Qe7y3JeOzc0v5eMMKpuGBnPdN52NA+CQ==", + "requires": { + "loud-rejection": "1.6.0", + "memory-fs": "0.4.1", + "mime": "2.2.0", + "path-is-absolute": "1.0.1", + "range-parser": "1.2.0", + "url-join": "4.0.0", + "webpack-log": "1.1.2" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -12968,7 +13008,7 @@ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", "requires": { - "http-parser-js": "0.4.10", + "http-parser-js": "0.4.11", "websocket-extensions": "0.1.3" } }, diff --git a/package.json b/package.json index 1b7416e2e1..a8a8d096bd 100644 --- a/package.json +++ b/package.json @@ -149,9 +149,9 @@ "typescript": "~2.7.2", "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^1.0.1", - "webpack": "~4.1.0", - "webpack-dev-middleware": "^2.0.6", - "webpack-dev-server": "^3.0.1-beta.0", + "webpack": "4.1.0", + "webpack-dev-middleware": "^3.1.0", + "webpack-dev-server": "^3.1.1", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index cc09e7d7c0..554b056c64 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -52,9 +52,9 @@ "tree-kill": "^1.2.0", "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^1.0.1", - "webpack": "~4.1.0", - "webpack-dev-middleware": "^2.0.6", - "webpack-dev-server": "^3.0.1-beta.0", + "webpack": "4.1.0", + "webpack-dev-middleware": "^3.1.0", + "webpack-dev-server": "^3.1.1", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4" From 7af59880ddf6ddba36d2fe1f638310fbb8caeea1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 15:43:18 +0100 Subject: [PATCH 302/724] fix(@angular-devkit/architect): also resolve builders locally --- packages/angular_devkit/architect/src/architect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index bf41eb8f37..7e3b7e0e43 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -239,7 +239,7 @@ export class Architect { // TODO: this probably needs to be more like NodeModulesEngineHost. const basedir = getSystemPath(this._workspace.root); const [pkg, builderName] = builderConfig.builder.split(':'); - const pkgJsonPath = nodeResolve(pkg, { basedir, resolvePackageJson: true }); + const pkgJsonPath = nodeResolve(pkg, { basedir, resolvePackageJson: true, checkLocal: true }); let buildersJsonPath: Path; let builderPaths: BuilderPaths; From aef7754dd3ffa113592d82f9bd997477fe5ecef4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 17:43:10 +0100 Subject: [PATCH 303/724] test: update Angular versions --- package-lock.json | 60 +++++++++++++++++++++++------------------------ package.json | 24 +++++++++---------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7bc6c90f78..a89b438cbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,25 +24,25 @@ } }, "@angular/common": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.7.tgz", - "integrity": "sha512-TqsDMmPX1JlEH2QIneuAVzEO4ubzxLBAdV4XbKWDQKC/UfbWIIpSrSp2cIi85NV1tKkg0WAaodCIZ02NucHIHg==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.9.tgz", + "integrity": "sha512-g2hPcI0fnT4TV+Fd+1IohjuqBxPvxwyH9IzTn8PkU9X2M+F6cHCUvHxL1sWI2sF8pYcaHzVjq9WClym10X36Lg==", "requires": { "tslib": "1.8.1" } }, "@angular/compiler": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.7.tgz", - "integrity": "sha512-26RG+Dy+M/95OyNNqM+OAruarIPOmbndiaglz2dMrNYzenfbSgG/AoPlL5uCdSqZDiXgnlKnS2K6/ePWXDSKNw==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.9.tgz", + "integrity": "sha512-mN+ofInk8y/tk2TCJZx8RrGdOKdrfunoCair7tfDy4XoQJE90waGfaYWo07hYU+UYwLhrg19m2Czy6rIDciUJA==", "requires": { "tslib": "1.8.1" } }, "@angular/compiler-cli": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.7.tgz", - "integrity": "sha512-91gQolzsKyOlmBNW1J7lyu+dXHe/KHbAXU459hn6rycMHuTt60XvxA5O3xy3Pqt28VgbOOSrQfq5eVjZodKjWg==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.9.tgz", + "integrity": "sha512-LAEpL/6PAev3zwTow/43Atzv9AtKLAiLoS285X3EV1f80yQpYAmFRrPUtDlrIZdhZHBBv7CxnyCVpOLU3T8ohw==", "requires": { "chokidar": "1.7.0", "minimist": "1.2.0", @@ -51,41 +51,41 @@ } }, "@angular/core": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.7.tgz", - "integrity": "sha512-DQuL6n7cjBfZmWX5RCV271g6PW9N8b93g2skWnM/zjm+BL9tfHPgvmsjMNB7QEHSxW8VBaaQ6gjj422O01A87g==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.9.tgz", + "integrity": "sha512-cvHBJGtasrIoARvbLFyHaOsiWKVwMNrrSTZLwrlyHP8oYzkDrE0qKGer6QCqyKt+51hF53cgWEffGzM/u/0wYg==", "requires": { "tslib": "1.8.1" } }, "@angular/http": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.6.tgz", - "integrity": "sha512-8ecA0HrDY88vO9YKl6aG82budd0+vwFoECmZ9xRCiNu+HqlgJ7siyLzwdjllmoi90pJbvhQITytfy2zEmDBNIA==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.9.tgz", + "integrity": "sha512-DKjgIk+Dp0Xv1ieG8LawvUnL4dYZp1KroAq5cfKuO9EojP0zM3tUvBtw2vbPLsHYma7g7ZMjOoAbzVxtmTBZqw==", "requires": { "tslib": "1.8.1" } }, "@angular/material": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-5.2.3.tgz", - "integrity": "sha512-v6IGxGWaeALgBH8+kt2Q9K32zmJQH193bWdCeWmtXk0vJlj3NTiWYy+vLoZQ8aPIAtOqCKCmhf5VrerkS6pgww==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-5.2.4.tgz", + "integrity": "sha1-noI3mDJCg9I+qDkVb6xby3NEPVU=", "requires": { "tslib": "1.8.1" } }, "@angular/platform-browser": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.7.tgz", - "integrity": "sha512-SdLx4F6tOy4/s3y1KZ/Z3YA6fiIrydaO2bry2FJglDxJh24p6TZIob+zC16N2MTuFW819KY5OlacNhc8aj6Yag==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.9.tgz", + "integrity": "sha512-P6iviRTuLsLRuqtZNOO0fd4cjTo8DWsDCecwntUlI08R3kH5qeqvqarTzlw/4oD+wBzZY6bfb89JyY+n5XbX3Q==", "requires": { "tslib": "1.8.1" } }, "@angular/platform-browser-dynamic": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.7.tgz", - "integrity": "sha512-95Rwf1JcGF/BI48k+VG2moLTVC863jPSjmHaGkz7cA9bi/QrRFGvFghl1qIm4Ezp3dj8CH8TE3TWB+1AmAg3AQ==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.9.tgz", + "integrity": "sha512-8C3MtyguJKDTT8FcHIRDlBxswcIdpfugOf4S2t94pVedCr4h9w2da/lcfwJKUISw1aKjfA77Sl8TDUhoS8ymmQ==", "requires": { "tslib": "1.8.1" } @@ -101,17 +101,17 @@ } }, "@angular/router": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.6.tgz", - "integrity": "sha512-10Otnr5nmDWrlCpR5DTuDZmLj2hGf8WX1yFkfQ8H4EJWYe3YCTwGvz5D/smrWL6m6I2rOFgYOO3rFj9iYvMumA==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.9.tgz", + "integrity": "sha512-NtDbFK0EA1rfFc+5Dqd5mIv8E1Wcc5rDUnSty4cX2V+HxTEZvQ9DRdpO2Q0abWU5siXyqponuPHJzF08OVGyNA==", "requires": { "tslib": "1.8.1" } }, "@angular/service-worker": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.7.tgz", - "integrity": "sha512-pHHaboqA+5SaIiKEGIh/NVZMjmhhGgoDy/rfXArEhSWKOfqXJBUg1P95aD/lqOYFrapxXgQ8zKAllez7AsmEzQ==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.9.tgz", + "integrity": "sha512-gni6t7rU8wGoRsCoXkQBO1p3cfPjpRXWxef1VeMnlRVL5EYhasLalR2zVSTqHJGQ1IPAw52bHhivGTVaLlErqQ==", "requires": { "tslib": "1.8.1" } diff --git a/package.json b/package.json index a8a8d096bd..5bc47d6cff 100644 --- a/package.json +++ b/package.json @@ -53,18 +53,18 @@ "homepage": "https://github.com/angular/devkit", "dependencies": { "@angular-devkit/build-optimizer": "^0.4.2", - "@angular/animations": "^5.2.7", - "@angular/common": "^5.2.7", - "@angular/compiler": "^5.2.7", - "@angular/compiler-cli": "^5.2.7", - "@angular/core": "^5.2.7", - "@angular/http": "^5.2.6", - "@angular/material": "^5.2.3", - "@angular/platform-browser": "^5.2.7", - "@angular/platform-browser-dynamic": "^5.2.7", - "@angular/platform-server": "^5.2.7", - "@angular/router": "^5.2.6", - "@angular/service-worker": "^5.2.7", + "@angular/animations": "5.2.9", + "@angular/common": "5.2.9", + "@angular/compiler": "5.2.9", + "@angular/compiler-cli": "5.2.9", + "@angular/core": "5.2.9", + "@angular/http": "5.2.9", + "@angular/material": "5.2.4", + "@angular/platform-browser": "5.2.9", + "@angular/platform-browser-dynamic": "5.2.9", + "@angular/platform-server": "5.2.9", + "@angular/router": "5.2.9", + "@angular/service-worker": "5.2.9", "@ngtools/json-schema": "^1.0.9", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", From c8b24f4c28771550f7559eb8c626966d0bf7051d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 17:49:33 +0100 Subject: [PATCH 304/724] fix(@ngtools/webpack): fix TS peerdep ranges --- packages/ngtools/webpack/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 437a61f598..f519a3d98a 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -32,7 +32,7 @@ }, "peerDependencies": { "@angular-devkit/core": "0.0.0", - "typescript": "~2.5.0 | ~2.6.0 | ~2.7.0", + "typescript": "~2.5.0 || ~2.6.0 || ~2.7.0", "webpack": "^4.0.0" } } From 59a3d7e9f75e1d9c2cc49b76bc8658beecfb699c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 17:56:09 +0100 Subject: [PATCH 305/724] ci: add missing bootstrap peerdeps --- package-lock.json | 10 ++++++++++ package.json | 2 ++ 2 files changed, 12 insertions(+) diff --git a/package-lock.json b/package-lock.json index a89b438cbb..f67c43f323 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5845,6 +5845,11 @@ "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=" }, + "jquery": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + }, "js-base64": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.0.tgz", @@ -8383,6 +8388,11 @@ } } }, + "popper.js": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.1.tgz", + "integrity": "sha1-uIFeXNpvYvwgQuR2GGSfdYZuZ1M=" + }, "portfinder": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", diff --git a/package.json b/package.json index 5bc47d6cff..b376708bba 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "istanbul-instrumenter-loader": "^3.0.0", "jasmine": "^2.6.0", "jasmine-spec-reporter": "^3.2.0", + "jquery": "^3.3.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", @@ -121,6 +122,7 @@ "node-sass": "^4.7.2", "opn": "^5.1.0", "parse5": "^4.0.0", + "popper.js": "^1.14.1", "portfinder": "^1.0.13", "postcss": "^6.0.19", "postcss-import": "^11.1.0", From f7fe440f44762cf108a9cb6642051301b1744123 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 17:57:42 +0100 Subject: [PATCH 306/724] ci: add missing angular/material peerdeps --- package-lock.json | 8 ++++++++ package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/package-lock.json b/package-lock.json index f67c43f323..a9441946bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,14 @@ "tslib": "1.8.1" } }, + "@angular/cdk": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-5.2.4.tgz", + "integrity": "sha1-wKQpqHENj+2xV/VG4hy0nUM19/c=", + "requires": { + "tslib": "1.8.1" + } + }, "@angular/common": { "version": "5.2.9", "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.9.tgz", diff --git a/package.json b/package.json index b376708bba..211e64c8c4 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@angular/core": "5.2.9", "@angular/http": "5.2.9", "@angular/material": "5.2.4", + "@angular/cdk": "5.2.4", "@angular/platform-browser": "5.2.9", "@angular/platform-browser-dynamic": "5.2.9", "@angular/platform-server": "5.2.9", From 98d8c660571703b1e5f61afa4a3f91078174a09d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 17:59:06 +0100 Subject: [PATCH 307/724] fix(@angular-devkit/build-webpack): add missing istanbul dependencies --- packages/angular_devkit/build_webpack/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 554b056c64..3045868aa0 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -22,6 +22,8 @@ "file-loader": "^1.1.11", "glob": "^7.0.3", "html-webpack-plugin": "^3.0.6", + "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.0", "karma-source-map-support": "^1.2.0", "less": "^3.0.1", "less-loader": "^4.1.0", From be6d03378bcad692cf42d007950fbd04ebd07777 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 18:34:48 +0100 Subject: [PATCH 308/724] fix(@angular-devkit/build-webpack): update istanbul-instrumenter-loader --- package-lock.json | 6 +++--- package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9441946bd..27eeffb85e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5732,9 +5732,9 @@ } }, "istanbul-instrumenter-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.0.tgz", - "integrity": "sha512-alLSEFX06ApU75sm5oWcaVNaiss/bgMRiWTct3g0P0ZZTKjR+6QiCcuVOKDI1kWJgwHEnIXsv/dWm783kPpmtw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", "requires": { "convert-source-map": "1.5.1", "istanbul-lib-instrument": "1.9.1", diff --git a/package.json b/package.json index 211e64c8c4..5d721ffd11 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "html-webpack-plugin": "^3.0.6", "husky": "^0.14.3", "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.0", + "istanbul-instrumenter-loader": "^3.0.1", "jasmine": "^2.6.0", "jasmine-spec-reporter": "^3.2.0", "jquery": "^3.3.1", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 3045868aa0..154f664c25 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -23,7 +23,7 @@ "glob": "^7.0.3", "html-webpack-plugin": "^3.0.6", "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.0", + "istanbul-instrumenter-loader": "^3.0.1", "karma-source-map-support": "^1.2.0", "less": "^3.0.1", "less-loader": "^4.1.0", From bdf2e4f44b44bc488c95945da15864dd1ac61388 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 28 Mar 2018 14:02:36 -0400 Subject: [PATCH 309/724] fix(@angular-devkit/build-webpack): only open browser on first build --- packages/angular_devkit/build_webpack/src/dev-server/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_webpack/src/dev-server/index.ts index dfaf89c406..3e508a3db3 100644 --- a/packages/angular_devkit/build_webpack/src/dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/dev-server/index.ts @@ -169,6 +169,7 @@ export class DevServerBuilder implements Builder { const server = new WebpackDevServer(webpackCompiler, webpackDevServerConfig); + let first = true; // tslint:disable-next-line:no-any (webpackCompiler as any).hooks.done.tap('angular-cli', (stats: webpack.Stats) => { if (!browserOptions.verbose) { @@ -183,7 +184,8 @@ export class DevServerBuilder implements Builder { } obs.next({ success: true }); - if (options.open) { + if (first && options.open) { + first = false; opn(serverAddress + webpackDevServerConfig.publicPath); } }); From 2fd68de40bbc9430da49e5448ce1aa965518a212 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 19:33:33 +0100 Subject: [PATCH 310/724] fix(@schematics/angular): add builders when running schematics --- .../schematics/angular/application/index.ts | 32 +++++++++++++++ .../angular/application/index_spec.ts | 41 +++++++++++++++++++ .../angular/application/schema.d.ts | 4 ++ .../angular/application/schema.json | 5 +++ .../schematics/angular/class/index_spec.ts | 1 + .../angular/component/index_spec.ts | 1 + .../angular/directive/index_spec.ts | 1 + .../schematics/angular/enum/index_spec.ts | 1 + .../schematics/angular/guard/index_spec.ts | 1 + .../angular/interface/index_spec.ts | 1 + packages/schematics/angular/library/index.ts | 7 ++-- .../schematics/angular/library/index_spec.ts | 3 ++ .../schematics/angular/library/schema.json | 4 +- .../schematics/angular/module/index_spec.ts | 1 + packages/schematics/angular/ng-new/index.ts | 1 + .../schematics/angular/pipe/index_spec.ts | 1 + .../schematics/angular/service/index_spec.ts | 1 + .../angular/utility/latest-versions.ts | 2 + 18 files changed, 103 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 742261249c..6dbd2b0a02 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -25,6 +25,7 @@ import { } from '@angular-devkit/schematics'; import { Schema as E2eOptions } from '../e2e/schema'; import { getWorkspace, getWorkspacePath } from '../utility/config'; +import { latestVersions } from '../utility/latest-versions'; import { Schema as ApplicationOptions } from './schema'; type WorkspaceSchema = experimental.workspace.WorkspaceSchema; @@ -53,6 +54,36 @@ type WorkspaceSchema = experimental.workspace.WorkspaceSchema; // ); // } +function addDependenciesToPackageJson() { + return (host: Tree) => { + const packageJsonPath = 'package.json'; + + if (!host.exists('package.json')) { return host; } + + const source = host.read('package.json'); + if (!source) { return host; } + + const sourceText = source.toString('utf-8'); + const json = JSON.parse(sourceText); + + if (!json['devDependencies']) { + json['devDependencies'] = {}; + } + + json.devDependencies = { + '@angular/compiler-cli': latestVersions.Angular, + '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, + 'typescript': latestVersions.TypeScript, + // De-structure last keeps existing user dependencies. + ...json.devDependencies, + }; + + host.overwrite(packageJsonPath, JSON.stringify(json, null, 2)); + + return host; + }; +} + function addAppToWorkspaceFile(options: ApplicationOptions, workspace: WorkspaceSchema): Rule { return (host: Tree, context: SchematicContext) => { context.logger.info(`Updating workspace file`); @@ -252,6 +283,7 @@ export default function (options: ApplicationOptions): Rule { return chain([ addAppToWorkspaceFile(options, workspace), + options.skipPackageJson ? noop() : addDependenciesToPackageJson(), mergeWith( apply(url('./files'), [ template({ diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 43369f764d..f65d7232e9 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -7,6 +7,7 @@ */ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; +import { latestVersions } from '../utility/latest-versions'; import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ApplicationOptions } from './schema'; @@ -31,6 +32,7 @@ describe('Application Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let workspaceTree: UnitTestTree; @@ -102,4 +104,43 @@ describe('Application Schematic', () => { content = tree.readContent(path); expect(content).toMatch('../../tsconfig.json'); }); + + describe(`update package.json`, () => { + it(`should add build-webpack to devDependencies`, () => { + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + + const packageJson = JSON.parse(tree.readContent('package.json')); + expect(packageJson.devDependencies['@angular-devkit/build-webpack']) + .toEqual(latestVersions.DevkitBuildWebpack); + }); + + it('should use the latest known versions in package.json', () => { + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + const pkg = JSON.parse(tree.readContent('/package.json')); + expect(pkg.devDependencies['@angular/compiler-cli']).toEqual(latestVersions.Angular); + expect(pkg.devDependencies['typescript']).toEqual(latestVersions.TypeScript); + }); + + it(`should not override existing users dependencies`, () => { + const oldPackageJson = workspaceTree.readContent('package.json'); + workspaceTree.overwrite('package.json', oldPackageJson.replace( + `"typescript": "${latestVersions.TypeScript}"`, + `"typescript": "~2.5.2"`, + )); + + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + const packageJson = JSON.parse(tree.readContent('package.json')); + expect(packageJson.devDependencies.typescript).toEqual('~2.5.2'); + }); + + it(`should not modify the file when --skipPackageJson`, () => { + const tree = schematicRunner.runSchematic('application', { + name: 'foo', + skipPackageJson: true, + }, workspaceTree); + + const packageJson = JSON.parse(tree.readContent('package.json')); + expect(packageJson.devDependencies['@angular-devkit/build-webpack']).toBeUndefined(); + }); + }); }); diff --git a/packages/schematics/angular/application/schema.d.ts b/packages/schematics/angular/application/schema.d.ts index d54c96db09..70b7e840fa 100644 --- a/packages/schematics/angular/application/schema.d.ts +++ b/packages/schematics/angular/application/schema.d.ts @@ -39,4 +39,8 @@ export interface Schema { * Skip creating spec files. */ skipTests?: boolean; + /** + * Do not add dependencies to package.json (e.g., --skipPackageJson) + */ + skipPackageJson: boolean; } diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index b963e1cc5c..20626779b2 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -52,6 +52,11 @@ "type": "boolean", "default": false, "alias": "S" + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to package.json." } }, "required": [] diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index bb4f20999d..77b2d22c6c 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -38,6 +38,7 @@ describe('Class Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 076e8da79f..0c7a40ac55 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -46,6 +46,7 @@ describe('Component Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index bb066e2622..6dd2a6268e 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -40,6 +40,7 @@ describe('Directive Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/enum/index_spec.ts b/packages/schematics/angular/enum/index_spec.ts index bcc0b018fc..d22ef3e982 100644 --- a/packages/schematics/angular/enum/index_spec.ts +++ b/packages/schematics/angular/enum/index_spec.ts @@ -35,6 +35,7 @@ describe('Enum Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index 4bba673ba5..384278e84f 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -37,6 +37,7 @@ describe('Guard Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/interface/index_spec.ts b/packages/schematics/angular/interface/index_spec.ts index 27b35cd5f2..f2bb33b5f3 100644 --- a/packages/schematics/angular/interface/index_spec.ts +++ b/packages/schematics/angular/interface/index_spec.ts @@ -37,6 +37,7 @@ describe('Interface Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 33170462fc..36399026ed 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -79,7 +79,7 @@ function updateTsConfig(npmPackageName: string) { }; } -function addDependenciesAndScriptsToPackageJson() { +function addDependenciesToPackageJson() { return (host: Tree) => { if (!host.exists('package.json')) { return host; } @@ -105,7 +105,8 @@ function addDependenciesAndScriptsToPackageJson() { json.devDependencies = { '@angular/compiler-cli': latestVersions.Angular, - '@angular-devkit/build-ng-packagr': 'latest', + '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, + '@angular-devkit/build-webpack': latestVersions.DevkitBuildNgPackagr, 'ng-packagr': '^2.4.1', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', @@ -192,7 +193,7 @@ export default function (options: LibraryOptions): Rule { return chain([ branchAndMerge(mergeWith(templateSource)), addAppToWorkspaceFile(options, workspace), - options.skipPackageJson ? noop() : addDependenciesAndScriptsToPackageJson(), + options.skipPackageJson ? noop() : addDependenciesToPackageJson(), options.skipTsConfig ? noop() : updateTsConfig(name), schematic('module', { name: name, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 55758bcf83..a61e38aaf5 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -94,6 +94,8 @@ describe('Library Schematic', () => { const packageJson = getJsonFileContent(tree, 'package.json'); expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.4.1'); + expect(packageJson.devDependencies['@angular-devkit/build-ng-packagr']) + .toEqual(latestVersions.DevkitBuildNgPackagr); }); it('should use the latest known versions in package.json', () => { @@ -123,6 +125,7 @@ describe('Library Schematic', () => { const packageJson = getJsonFileContent(tree, 'package.json'); expect(packageJson.devDependencies['ng-packagr']).toBeUndefined(); + expect(packageJson.devDependencies['@angular-devkit/build-webpack']).toBeUndefined(); }); }); diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index 8f3f5a5bc1..53e574e0b1 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -21,12 +21,12 @@ "skipPackageJson": { "type": "boolean", "default": false, - "description": "Do not add dependencies to package.json (e.g., --skipPackageJson)" + "description": "Do not add dependencies to package.json." }, "skipTsConfig": { "type": "boolean", "default": false, - "description": "Do not update tsconfig.json for development experience (e.g., --skipTsConfig)" + "description": "Do not update tsconfig.json for development experience." } }, "required": [] diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts index adf2dd95aa..005154b9bd 100644 --- a/packages/schematics/angular/module/index_spec.ts +++ b/packages/schematics/angular/module/index_spec.ts @@ -38,6 +38,7 @@ describe('Module Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index 1e703faf55..11055c1019 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -49,6 +49,7 @@ export default function (options: NgNewOptions): Rule { routing: options.routing, style: options.style, skipTests: options.skipTests, + skipPackageJson: false, }; return chain([ diff --git a/packages/schematics/angular/pipe/index_spec.ts b/packages/schematics/angular/pipe/index_spec.ts index 4c895ebad6..f1abe72df8 100644 --- a/packages/schematics/angular/pipe/index_spec.ts +++ b/packages/schematics/angular/pipe/index_spec.ts @@ -40,6 +40,7 @@ describe('Pipe Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 14d1ddcc56..25ddac8613 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -38,6 +38,7 @@ describe('Service Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; beforeEach(() => { diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index c272019c35..08bc718890 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -11,4 +11,6 @@ export const latestVersions = { RxJs: '^5.5.8', ZoneJs: '^0.8.20', TypeScript: '~2.6.2', + DevkitBuildWebpack: '~0.0.8', + DevkitBuildNgPackagr: '~0.0.2', }; From 24dccf5a057cfa5cf94e43e94cd0a9cdb0b2b9bd Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 23 Feb 2018 12:03:18 -0500 Subject: [PATCH 311/724] refactor: Move service worker into a private schematic --- .../application/files/__dot__angular-cli.json | 48 ++++++ .../angular/application/files/package.json | 48 ++++++ packages/schematics/angular/collection.json | 6 + .../service-worker/files/ngsw-config.json | 27 ++++ .../angular/service-worker/index.ts | 143 ++++++++++++++++++ .../angular/service-worker/index_spec.ts | 79 ++++++++++ .../angular/service-worker/schema.d.ts | 14 ++ .../angular/service-worker/schema.json | 14 ++ 8 files changed, 379 insertions(+) create mode 100644 packages/schematics/angular/application/files/__dot__angular-cli.json create mode 100644 packages/schematics/angular/application/files/package.json create mode 100644 packages/schematics/angular/service-worker/files/ngsw-config.json create mode 100644 packages/schematics/angular/service-worker/index.ts create mode 100644 packages/schematics/angular/service-worker/index_spec.ts create mode 100644 packages/schematics/angular/service-worker/schema.d.ts create mode 100644 packages/schematics/angular/service-worker/schema.json diff --git a/packages/schematics/angular/application/files/__dot__angular-cli.json b/packages/schematics/angular/application/files/__dot__angular-cli.json new file mode 100644 index 0000000000..29931a61e3 --- /dev/null +++ b/packages/schematics/angular/application/files/__dot__angular-cli.json @@ -0,0 +1,48 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "<%= utils.dasherize(name) %>" + }, + "apps": [ + { + "root": "<%= sourceDir %>", + "prefix": "<%= prefix %>", + "main": "main.ts", + "styles": [ + "styles.<%= style %>" + ], + "scripts": [], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "defaults": { + "styleExt": "<%= style %>",<% if (minimal || skipTests) { %> + "class": { + "spec": false + },<% } %> + "component": {<% if (minimal || inlineStyle) { %> + "inlineStyle": true<% } %><% if (minimal || (inlineTemplate && inlineStyle)) { %>,<% } %><% if (minimal || inlineTemplate) { %> + "inlineTemplate": true<% } %><% if (minimal || (skipTests && (inlineStyle || inlineTemplate))) { %>,<% } %><% if (minimal || skipTests) { %> + "spec": false + <% } %>}<% if (minimal || skipTests) { %>, + "directive": { + "spec": false + }, + "guard": { + "spec": false + }, + "module": { + "spec": false + }, + "pipe": { + "spec": false + }, + "service": { + "spec": false + }<% } %> + } +} diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json new file mode 100644 index 0000000000..841b528050 --- /dev/null +++ b/packages/schematics/angular/application/files/package.json @@ -0,0 +1,48 @@ +{ + "name": "<%= utils.dasherize(name) %>", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19" + }, + "devDependencies": { + "@angular/cli": "~<%= version %>", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0",<% if (!minimal) { %> + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~8.9.4", + "codelyzer": "~4.1.0", + "jasmine-core": "~2.99.1", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~1.4.1", + "karma-jasmine": "~1.1.1", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.3.0", + "ts-node": "~5.0.0", + "tslint": "~5.9.1",<% } %> + "typescript": "~2.5.3" + } +} diff --git a/packages/schematics/angular/collection.json b/packages/schematics/angular/collection.json index c53d4c1128..79fe1b9ec4 100644 --- a/packages/schematics/angular/collection.json +++ b/packages/schematics/angular/collection.json @@ -12,6 +12,12 @@ "description": "Create an Angular workspace.", "hidden": true }, + "serviceWorker": { + "aliases": [ "service-worker" ], + "factory": "./service-worker", + "description": "Initializes a service worker setup.", + "schema": "./service-worker/schema.json" + }, "application": { "factory": "./application", "schema": "./application/schema.json", diff --git a/packages/schematics/angular/service-worker/files/ngsw-config.json b/packages/schematics/angular/service-worker/files/ngsw-config.json new file mode 100644 index 0000000000..b9bf3a5570 --- /dev/null +++ b/packages/schematics/angular/service-worker/files/ngsw-config.json @@ -0,0 +1,27 @@ +{ + "index": "/index.html", + "assetGroups": [{ + "name": "app", + "installMode": "prefetch", + "resources": { + "files": [ + "/favicon.ico", + "/index.html" + ], + "versionedFiles": [ + "/*.bundle.css", + "/*.bundle.js", + "/*.chunk.js" + ] + } + }, { + "name": "assets", + "installMode": "lazy", + "updateMode": "prefetch", + "resources": { + "files": [ + "/assets/**" + ] + } + }] +} \ No newline at end of file diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts new file mode 100644 index 0000000000..3ee2d1bf26 --- /dev/null +++ b/packages/schematics/angular/service-worker/index.ts @@ -0,0 +1,143 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { + Rule, + SchematicContext, + SchematicsException, + Tree, + chain, +} from '@angular-devkit/schematics'; +import * as ts from 'typescript'; +import { addSymbolToNgModuleMetadata, isImported } from '../utility/ast-utils'; +import { InsertChange } from '../utility/change'; +import { AppConfig, CliConfig, getAppFromConfig, getConfig } from '../utility/config'; +import { getAppModulePath } from '../utility/ng-ast-utils'; +import { insertImport } from '../utility/route-utils'; +import { Schema as ServiceWorkerOptions } from './schema'; + +const configFilePath = '/.angular-cli.json'; +const packageJsonPath = '/package.json'; + +function getAppConfig(config: CliConfig, nameOrIndex: string): AppConfig { + const appConfig = getAppFromConfig(config, nameOrIndex); + if (!appConfig) { + throw new SchematicsException(`App (${nameOrIndex}) not found.`); + } + + return appConfig; +} + +function updateConfigFile(options: ServiceWorkerOptions): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.debug(`updating config file (${configFilePath})`); + const config = getConfig(host); + const appConfig = getAppConfig(config, options.app || '0'); + appConfig.serviceWorker = true; + host.overwrite(configFilePath, JSON.stringify(config, null, 2)); + + return host; + }; +} + +function addDependencies(): Rule { + return (host: Tree, context: SchematicContext) => { + const packageName = '@angular/platform-server'; + context.logger.debug(`adding dependency (${packageName})`); + const buffer = host.read(packageJsonPath); + if (buffer === null) { + throw new SchematicsException('Could not find package.json'); + } + + const packageObject = JSON.parse(buffer.toString()); + + const ngCoreVersion = packageObject.dependencies['@angular/core']; + packageObject.dependencies[packageName] = ngCoreVersion; + + host.overwrite(packageJsonPath, JSON.stringify(packageObject, null, 2)); + + return host; + }; +} + +function updateAppModule(options: ServiceWorkerOptions): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.debug('Updating appmodule'); + + // find app module + const appConfig = getAppConfig(getConfig(host), options.app || '0'); + const modulePath = getAppModulePath(host, appConfig); + context.logger.debug(`module path: ${modulePath}`); + + // add import + let moduleSource = getTsSourceFile(host, modulePath); + let importModule = 'ServiceWorkerModule'; + let importPath = '@angular/service-worker'; + if (!isImported(moduleSource, importModule, importPath)) { + const change = insertImport + (moduleSource, modulePath, importModule, importPath); + if (change) { + const recorder = host.beginUpdate(modulePath); + recorder.insertLeft((change as InsertChange).pos, (change as InsertChange).toAdd); + host.commitUpdate(recorder); + } + } + + // add import for environments + // import { environment } from '../environments/environment'; + moduleSource = getTsSourceFile(host, modulePath); + importModule = 'environment'; + // TODO: dynamically find environments relative path + importPath = '../environments/environment'; + if (!isImported(moduleSource, importModule, importPath)) { + const change = insertImport + (moduleSource, modulePath, importModule, importPath); + if (change) { + const recorder = host.beginUpdate(modulePath); + recorder.insertLeft((change as InsertChange).pos, (change as InsertChange).toAdd); + host.commitUpdate(recorder); + } + } + + // register SW in app module + const importText = + `ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production })`; + moduleSource = getTsSourceFile(host, modulePath); + const metadataChanges = addSymbolToNgModuleMetadata( + moduleSource, modulePath, 'imports', importText); + if (metadataChanges) { + const recorder = host.beginUpdate(modulePath); + metadataChanges.forEach((change: InsertChange) => { + recorder.insertRight(change.pos, change.toAdd); + }); + host.commitUpdate(recorder); + } + + return host; + }; +} + +function getTsSourceFile(host: Tree, path: string): ts.SourceFile { + const buffer = host.read(path); + if (!buffer) { + throw new SchematicsException(`Could not read file (${path}).`); + } + const content = buffer.toString(); + const source = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true); + + return source; +} + +export default function (options: ServiceWorkerOptions): Rule { + return (host: Tree, context: SchematicContext) => { + return chain([ + updateConfigFile(options), + addDependencies(), + updateAppModule(options), + ])(host, context); + }; +} diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts new file mode 100644 index 0000000000..742f3ee72b --- /dev/null +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -0,0 +1,79 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as ServiceWorkerOptions } from './schema'; + + +describe('Service Worker Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/angular', + path.join(__dirname, '../collection.json'), + ); + const defaultOptions: ServiceWorkerOptions = { + app: '0', + }; + + let appTree: UnitTestTree; + const appOptions: ApplicationOptions = { + directory: '', + name: 'appshell-app', + sourceDir: 'src', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'None', + version: '1.2.3', + routing: true, + style: 'css', + skipTests: false, + minimal: false, + }; + + beforeEach(() => { + appTree = schematicRunner.runSchematic('application', appOptions); + }); + + it('should update the config file', () => { + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const configText = tree.readContent('/.angular-cli.json'); + const config = JSON.parse(configText); + expect(config.apps[0].serviceWorker).toEqual(true); + }); + + it('should add the necessary dependency', () => { + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const pkgText = tree.readContent('/package.json'); + const pkg = JSON.parse(pkgText); + const version = pkg.dependencies['@angular/core']; + expect(pkg.dependencies['@angular/platform-server']).toEqual(version); + }); + + it('should import ServiceWorkerModule', () => { + //// import { ServiceWorkerModule } from '@angular/service-worker'; + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const pkgText = tree.readContent('/src/app/app.module.ts'); + expect(pkgText).toMatch(/import \{ ServiceWorkerModule \} from '@angular\/service-worker'/); + }); + + it('should import environment', () => { + //// import { ServiceWorkerModule } from '@angular/service-worker'; + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const pkgText = tree.readContent('/src/app/app.module.ts'); + expect(pkgText).toMatch(/import \{ environment \} from '\.\.\/environments\/environment'/); + }); + + it('should add the SW import to the NgModule imports', () => { + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const pkgText = tree.readContent('/src/app/app.module.ts'); + // tslint:disable-next-line:max-line-length + const regex = /ServiceWorkerModule\.register\('\/ngsw-worker.js\', { enabled: environment.production }\)/; + expect(pkgText).toMatch(regex); + + }); +}); diff --git a/packages/schematics/angular/service-worker/schema.d.ts b/packages/schematics/angular/service-worker/schema.d.ts new file mode 100644 index 0000000000..92384e132b --- /dev/null +++ b/packages/schematics/angular/service-worker/schema.d.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + /** + * Name or index of related client app. + */ + app?: string; +} diff --git a/packages/schematics/angular/service-worker/schema.json b/packages/schematics/angular/service-worker/schema.json new file mode 100644 index 0000000000..1c17f8b85f --- /dev/null +++ b/packages/schematics/angular/service-worker/schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsAngularServiceWorker", + "title": "Angular Service Worker Options Schema", + "type": "object", + "properties": { + "app": { + "type": "string", + "description": "Name or index of related client app.", + "default": "0" + } + }, + "required": [] +} \ No newline at end of file From 51a75ac2232edea4c9f1bc84a3ca065cafd53bcf Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 26 Feb 2018 17:44:13 -0500 Subject: [PATCH 312/724] feat(@schematics/angular): Add schematic for PWA --- .monorepo.json | 7 + README.md | 13 +- packages/angular/pwa/collection.json | 11 + packages/angular/pwa/package.json | 22 + .../pwa/files/assets/icons/icon-128x128.png | Bin 0 -> 1253 bytes .../pwa/files/assets/icons/icon-144x144.png | Bin 0 -> 1394 bytes .../pwa/files/assets/icons/icon-152x152.png | Bin 0 -> 1427 bytes .../pwa/files/assets/icons/icon-192x192.png | Bin 0 -> 1790 bytes .../pwa/files/assets/icons/icon-384x384.png | Bin 0 -> 3557 bytes .../pwa/files/assets/icons/icon-512x512.png | Bin 0 -> 5008 bytes .../pwa/pwa/files/assets/icons/icon-72x72.png | Bin 0 -> 792 bytes .../pwa/pwa/files/assets/icons/icon-96x96.png | Bin 0 -> 958 bytes .../pwa/pwa/files/assets/manifest.json | 52 ++ packages/angular/pwa/pwa/index.ts | 55 ++ packages/angular/pwa/pwa/index_spec.ts | 81 +++ packages/angular/pwa/pwa/schema.d.ts | 26 + packages/angular/pwa/pwa/schema.json | 29 ++ packages/angular/pwa/utility/config.ts | 487 ++++++++++++++++++ .../core/src/workspace/workspace-schema.ts | 18 +- .../schematics/angular/app-shell/index.ts | 128 +++-- .../angular/app-shell/index_spec.ts | 92 ++-- .../schematics/angular/app-shell/schema.d.ts | 8 +- .../schematics/angular/app-shell/schema.json | 11 +- .../application/files/__dot__angular-cli.json | 48 -- .../angular/application/files/package.json | 48 -- .../angular/service-worker/index.ts | 60 ++- .../angular/service-worker/index_spec.ts | 49 +- .../angular/service-worker/schema.d.ts | 12 +- .../angular/service-worker/schema.json | 19 +- .../__tsconfigFileName__.json | 2 +- .../__main@stripTsExtension__.ts | 2 +- .../app}/__rootModuleFileName__ | 0 .../schematics/angular/universal/index.ts | 133 ++--- .../angular/universal/index_spec.ts | 100 ++-- .../schematics/angular/universal/schema.d.ts | 19 +- .../schematics/angular/universal/schema.json | 35 +- .../angular/utility/ng-ast-utils.ts | 8 +- 37 files changed, 1140 insertions(+), 435 deletions(-) create mode 100644 packages/angular/pwa/collection.json create mode 100644 packages/angular/pwa/package.json create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-128x128.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-144x144.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-152x152.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-192x192.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-384x384.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-512x512.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-72x72.png create mode 100644 packages/angular/pwa/pwa/files/assets/icons/icon-96x96.png create mode 100644 packages/angular/pwa/pwa/files/assets/manifest.json create mode 100644 packages/angular/pwa/pwa/index.ts create mode 100644 packages/angular/pwa/pwa/index_spec.ts create mode 100644 packages/angular/pwa/pwa/schema.d.ts create mode 100644 packages/angular/pwa/pwa/schema.json create mode 100644 packages/angular/pwa/utility/config.ts delete mode 100644 packages/schematics/angular/application/files/__dot__angular-cli.json delete mode 100644 packages/schematics/angular/application/files/package.json rename packages/schematics/angular/universal/files/{__sourceDir__ => }/__tsconfigFileName__.json (89%) rename packages/schematics/angular/universal/files/{__sourceDir__ => src}/__main@stripTsExtension__.ts (60%) rename packages/schematics/angular/universal/files/{__sourceDir__/__appDir__ => src/app}/__rootModuleFileName__ (100%) diff --git a/.monorepo.json b/.monorepo.json index a4107bf6cd..edff52e6fb 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -49,6 +49,13 @@ "version": "0.4.6", "hash": "f48bf7e6bb335235b32ba8b93871ea40" }, + "@angular/pwa": { + "name": "Angular PWA Schematics", + "section": "Schematics", + "version": "0.0.0", + "hash": "f2f1253db8e7a01eb0e5a945dd08979c", + "snapshotRepo": "angular/pwa" + }, "@angular-devkit/architect": { "name": "Architect", "links": [ diff --git a/README.md b/README.md index aaf19c4b1f..f663fa87a7 100644 --- a/README.md +++ b/README.md @@ -59,19 +59,20 @@ This is a monorepo which contains many packages: **Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) **Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | -#### Misc - -| Project | Package | Version | Links | -|---|---|---|---| -**Webpack Angular Plugin** | [`@ngtools/webpack`](http://npmjs.com/packages/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](http://npmjs.com/packages/@ngtools/webpack) | - #### Schematics | Project | Package | Version | Links | |---|---|---|---| +**Angular PWA Schematics** | [`@angular/pwa`](http://npmjs.com/packages/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](http://npmjs.com/packages/@angular/pwa) | **Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | **Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | **Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | **Package Update Schematics** | [`@schematics/update`](http://npmjs.com/packages/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](http://npmjs.com/packages/@schematics/update) | +#### Misc + +| Project | Package | Version | Links | +|---|---|---|---| +**Webpack Angular Plugin** | [`@ngtools/webpack`](http://npmjs.com/packages/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](http://npmjs.com/packages/@ngtools/webpack) | + diff --git a/packages/angular/pwa/collection.json b/packages/angular/pwa/collection.json new file mode 100644 index 0000000000..f0fc0030d5 --- /dev/null +++ b/packages/angular/pwa/collection.json @@ -0,0 +1,11 @@ +{ + "schematics": { + "ng-add": { + "factory": "./pwa", + "description": "Update an application with PWA defaults.", + "schema": "./pwa/schema.json", + "private": true, + "hidden": true + } + } +} diff --git a/packages/angular/pwa/package.json b/packages/angular/pwa/package.json new file mode 100644 index 0000000000..3abd668d0a --- /dev/null +++ b/packages/angular/pwa/package.json @@ -0,0 +1,22 @@ +{ + "name": "@angular/pwa", + "version": "0.0.0", + "description": "PWA schematics for Angular", + "keywords": [ + "blueprints", + "code generation", + "schematics" + ], + "scripts": { + "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" + }, + "schematics": "./collection.json", + "dependencies": { + "@schematics/angular": "0.0.0", + "typescript": "~2.6.2" + }, + "peerDependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0" + } +} diff --git a/packages/angular/pwa/pwa/files/assets/icons/icon-128x128.png b/packages/angular/pwa/pwa/files/assets/icons/icon-128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..9f9241f0be40661db1eed29384231e76d33b6e7c GIT binary patch literal 1253 zcmVC00004XF*Lt006O% z3;baP00001b5ch_0Itp)=>Px#R8UM*MNDaN$N(?b05IDCG1mYv%m6RW1~u3KGtmGr z)c`Qj05H@5G1vex-2gG&05Sjn|HA+;>W7}%C{ggJx%=nr_R-qsQgh#Rj_Gxf@wLO% zPH*a#s-Rh6fB*mh4s=pZQvmBRsYJy17_o~a(q!H`#xchL000SaNLh0L00)l%00)l& zd2k#i000C4Nkl8EL$(w!{vTD#Ez6h&Vm;Z@RJyJ5Pb=t?kfC0(@}L=|6A zC;?{4bI!=^4sa_Okxqbw@%_I8P!z%|z=;8HeE_r!fY3el836hLpcw$}37N77pePIu z0L(@lpm_o`H~=sW1p0kbywbw}fCf+p-6ix)=MzBk=HMf!i~;~4-H3n#XX#h5n9s__fIwQZuJPGk+1pOlOB*c>uv^u-+B*c;tv>=H%64II_ zBM3lp=3rHEWE4OEz>=hXe^qg06hQ!I#sGAA*)e1!u|+9ELMAVJhK#WNL5fRA-?wHB zE+cGn5aSZM-T_)%M&OYiE}_4hQ-R9}+?iZZ3Du9?aSh7|1c=a;ka_?pbY&EP03kRB zo9FpJ1Ij1^0TNI`<_Tax8A)_^iVc8%osbBP$tVN?j+lh1_YqBn$p}5CNU@cWdIKnI zWdt8mKoaVPhg2OTBlxgLAQCb|fF6<&d_}T zib!ph5$D<@wH=CS^3qCJWyHBNiEVSRqHoP^HW{&AI@lznXaHrKiL5)T3q1gx?cT7l z$cP0H(GoH?fR-MDfCUhe64KV2Q$fopV*yM|^j>pLD){5-_D0G`vH(t`gp?gXkunNd z07ptfo$KUL(aa7(zyuhW$Xs7h2tePy(toxbVclW-yS1Lo!^|@P|54BB z;t@a|K1m`x0Ysm^qlrTw0NIk~OlhliHp@bRe4-o_QW$7|yn-D9Px#S5Qn;MNDaN$N(_Y04&%5Fw_7r%m6RZ1vJ?JG1&ky z)c`Qm05I49G1LGt-2gGe059DDG5`Pn?3%64E>-4njObBw`{(S}RdwSpSM|!&_}=8- zBu@0X#@b+gK;5I&0000EbW%=J0PQ0&M8x(NsEw~<(cU)swx9q2010qNS#tmY2!Q|q z2!R10?Pm-C00fFjL_t(|+U=W*a;q>5M1f%57z`milK=nC8``FU7Ta25pmT@)f-{=c zA}fmHoH}*t)TvXaPM!K6<;BeZJ2YX+ih^^VT>b=(pA@6`C^rfZrny8xQM`dhrZ_y% zIC=3c{uYZ5F;1KnQ}LPhw)lsQ3kA@=7XPxb252vfziq4q+QH(UghmSVR2FY%%ivTyN48$&>&#l4MfJX2e7y=++AqtHBc7o4PZ7FXMNs-Y|^PL!#|!!#?% z5@jhkT?Q8SS%Ii2%O>E6AdCA^fvGN^syQa|m&FeXRQ(9lb661xD1~{h<%e!CP(rH^ z4AgxBbubVu11=~}TYjlRfl^w(qd@l;kU)Wm-4F5%WocR>Vw>d{kaz>3B_hTUmWjoi z2MtFmP=tr#OISF%M4%Y`YP^MoBO?N(2BG-U&3;gW$=J<-I{Uf!9LmfKgmpf3FbYjV z(WLXq6NphL8kC4U59KDIXiy?D5L;0oARJvXP-GN}a5!dUpcoIuroqE8q0iJrp2x&F z0uRTC40ORmaj5Wcq`w(GI27*%zr&qRe=vq{C|(PGgF7F1=m%iW_v7}XM@s~}6f-as z>k+6%O9TKVU?>hFPymLb3jjq}D2mU8mB7N00YEV}DYl4dNV=`P~C{u&U^j^R3Vciw9#Yq zP`pp~)OVmn5Ku%9#p@L4Mh{090*c86YUZ2#h8&Iz0!qoDSkHlKayUj1kWU_^hdEF{ zepX{EeNVr1o%a0X#}`2jM{J)TQlHQ5PatyVgTDU81AV4zr6 zpsVWkrQKm1n-bM^9Cu6<%onO3;5t?vJVW3bGih~-c(uAYIIgvUP zh3-A=9y#j6hJq3(Qx>lmgA#a?@1HMR9Zi41@uRnOP@lP{qvk!t`Ht0u)k z4^*ipM`i$&DhebhM{%7Z93ulDUok1R6rhJq}lgcd!D8d5(Rl-MxdCvFujhq|SDdyL%@u)7@?LGYU=t0U2l$ zFB9FpWS;&0gSX)B{aQ=%Imt9Y`~Q>k$FQ_-YZ2T%^YT&uy`8%I5HG9TeUO*s?mo=R zGIt;7E%Ut^X%gMC3(Jc>eQ)Ir%oNBf5;sefixnja{vGU07*qoM6N<$f>q^o A1ONa4 literal 0 HcmV?d00001 diff --git a/packages/angular/pwa/pwa/files/assets/icons/icon-152x152.png b/packages/angular/pwa/pwa/files/assets/icons/icon-152x152.png new file mode 100644 index 0000000000000000000000000000000000000000..34a1a8d645872c776c9425de45c3fcfba12c271e GIT binary patch literal 1427 zcmV;E1#J3>P)0{{R3FC5Sl00004XF*Lt006O% z3;baP00001b5ch_0Itp)=>Px#S5Qn;MNDaN)BrNc058)3FxCJt%K$IW1~u3KFxCJt z*8nrs05IMFFxCJu+yF7w05QV=FWmq!|NsBlCs6RIx%%hq)l6;YNo@Dg+Uk;~=yZ

X{-?>fGCXfYNSFwSa_5FdK zVWbmbiyjU>K0ZD^K0ZD^KL2TsQY8DMN~18(vn<;gTO#sXvhT>_UZ`aLlk6vfOgE>x z$T-hm!ES8PrsW=;^Kr6C!eqm8&oyA1v_kq*?gp^0oQ|86yBTb~R+yAK1#Fd8crAA# znB!KMDR(-UvsRcdcL>ZyD=d{e3TC$zlI3!r%+{YP;V#uJdT7g#Xqm;#0N{kF{1!}pE)7`+j3=Yr=A6bs)`+*fjoG~J)&x^s8 z_jj;s0P7~D{|#2dlPq?GcR}Ua z{+_|MsARG8yA+k{=P%eNDp~OG4wS2UoLa{Ulq`6lc*f+~J&)5nP_iJHz$Vx7307j0 zYyg5u$Q8r*0%Cw98-idFB-dsPRzs2%AXtJtFg3lhQHW%vZLn_oGdTw95XqufBuC^} zpqzrm$Z^33dMyITwR*jMs{qNumm@L#fi)2U)kti#;?W8&*b#JvZYHF1{36S zl>T3^PqJhK7)+ASQD$y?}F88 z9_@nlYJR5FA|6=i{)<^n7pz4J@Fer8w` zTCgqu^~JOcHmrGl7ucESt>yX3@;t&!4|~X?3%0KL#V*(z)}ssdQ1i3H+8(jKyI?0Z h@8jd+Hf^L(!7eV+I8=gXo5oJ1=hR0aT`iN0Qe zaus}o5<<@L@SFB>K_#Q-}bNaC0-2D8WTcCw67Vup>xep(As<% z=3-mw{}10XRU_N<&vDVI;9nNPIaiH5YwBENuYkkb%P}jQC?){aMpxSIjHkyH&7RSW?b}fOv0Fzd|8;gk0fXG$3O%~Ycs3k$y zcoJxgTv{4Wf;EOMb#{y>g#9+S=Fp$mQxv`)p#SF&5l01A&nhq9wKx>R@(W6G?rso& zqONyUhfTQuY&dkC=QniTSsSXmi}$HFYYLgjeO$L_8-+A$3ZKZe^iE~nKzdY-Hq+fg z){cjCsU;-_(03A70UcEkoft*md4!c+5(`>PR|-$uTvx2=`_H19XMVJdzfCSdEM`7? z1#4D=XeH`JGaucs1(O(S&ac*l&&b6Xz*OHd7R-Go;Ew6D6P0ci+^gdzDF6j{`&B@p z@j6`uP1?xH@NOVs`7WzdXvGXQQ+*pAuaa@WJ97I)r1mSMJ=5rP@jjPAT$O9bU=No zll1f-sPVs4J?z`BDR_m;5Vak0t+@30&bcrucPFS<#T>uYfXPx_k%A*G$Yn+QE5Xz| z&IGiGy$2a06{o*$)a(@Zve7jb`P^vHn&R}n-o6Oc7|ENh)Zv!$k zsVWP+0@zMw9f^jClX>5tWWt+;<7<2o$GJl9)dICyc+ZCLvPvgSYX0y3TAA4-qUhlS z`!%nv(uhy{Fni%er4I7qG+L0VTr*F{XJa5LvGJy>b7X6rmIsL72=66A#ke*Evh1Qk z#$`tK-W;>Y7_R`^KFmsAy*`zBm=|mG>>N{=%~(_+^z(?%xE)a8PaBEsEA00A6WHb9 z+xCRBgLXNP*afmZ0rvAQcfp(hq}zr;N|yXcR!y;J3@H>#5gT&x^*Hk1V3l&Szv76B zH3M(5Yg%T)IvtOCifljbP&mj0C?ztHZHQMxQJ9J`J~WekEhFV&#Nz9H9@@GCWs<5b zrwa|=;}sCw2Q{1rfhn3dW3_-vV|54*)alDZN=MhH_qEu~5-HQQLivg6!E#(i9eg;A zH}gi8%aCqb*3~`@ivFpP0Hz6lIhtLM2oC05hJ#{be(3xADD@CpEf8>w`F@C);P<`V z4<-{TB8{=RiWJQ=G(RA?Lu~9x2R`<$)e_E*aXu$_rW0VvG`%T`9Tz1dV0j)l zI{y`@$5x+a0fP+$#YWz8foz^|n`?)C^!!)w;S1e|SNciVmZ?q_!{iq#r#RIPVBo_=39)YSiq^_bd?Q`on>s0YhjUh563?v7qy#2$9u#%*lVS z05})L({oK^JCKHy}j*e2xK|zwiW$Lmh;p? zhFojt56#G=?$`{X93`94dMOjh=QDehwlcU9TJ=BuliJ?C#kG&EOT}(ud5`Ey4qFM5 zd8?y5+++jC5$$r62Gt0`(D@k-+R5+_1xEU-_Pg%e(ukGf1iJzL|IHC_;%HB0zZw3`PI0UO*WJhW-Egt-t{BS5{W0(~Cs9M@Ah_kDN|k zniS83Ut1iR5a(9TKYB4&C-69#+Klkagge?f0kPKeVM# zu3%vWmjmXKN|&>zwzZ=V#E->4T)sZ#VMLm0iV}B2G}87LsXhJWTY)q6lz0!Ik(~O<*CWAEaXpGgGAQzDcvg%3 zcrxPd#EpUTC1p-8CDWIViT{=ctD7TObn5hwZtxI4N4_-a-=+$j?|FzFQSN_`J|ubl zjMTeWdN0NPsBOv>vVO@#?&j&wpwGFpqOW{2&@W=MU zPA>J50F@e=>efLS*rxV-Iw@8%e~81NguImVFJ^1Qz25BF==OQUUL4b9>^h?0Pl_rT zKB>SB*t3E`m9lcHqjGBk2Ck4cy4-s=(D<}2p!?iEX%xM4W0#GxJhLurcaDD6-89b{ z-r2t&lq&^Y9sHwz_Wbv^n@kO${Pf2z4GTB+K{iTJ_g$z=ag5KUn1T{aUg28zpoM+4 z27pOYAV@z5T6l($%|fZ^-Dr%sU@dYRpl=IH_mp}uD}(!i&t(_wewtA<>?8j*{kHtt zlNt%Vvj(^ykE&B-l+n!t=ZU^P@AV13yZ3ekDc$%RovEkc3%IXWR-WRBb@Fc{9Ew5c z4;;hUa5=jgOlBQ;qu8MW_(4FpEFla84q=|5Jz#WcJ8t~v6ph2Y5>wHXEJ*5+yQ(RSRiHTv9%!m@ zwpT_#z)Y3daO?D;2VStJ{}z_>m4Ti8(kDf$LO*rqDBvqKc8L@PShV(FS^ z;tER1Ms+AgdgUg4*t|<^F0z-3edG^4ri=W9T1@_j=fi=2^7iy=F&`V8a?$c-dL`3Y z>~Bxf>(=6?r;3pY^T(fVMpelh{rtx6y<;KBgwpi1OIOfbw~fqfYv}RS*}COL&fw8j z`VOYV$8xil0ees;p{joa%GptB)?g2A#{HC$fk31fqV4?*OZZqrJD#mYhI zt{x+yDg2GFafKRjT#}b@6NnL|rEFZZgZ2o@O%Sq)uREm}%D)S4F zd%=i7vFA5|FYC=?3gNcRZ)=asN9>1Yq42P$?8N9nPn(v4?}n>#DyZboN5r1=mhZoV zNJG_Bl?%CAq2Biib8BeZz6M6gfqYJEwLRoq#$ktOp+mhroA-lo^QUY-EimHO$F2Ro z8=fLp$#1m+IV|ncT(q#O!(9(GN~A*N^XjVwPCC&n(R_{0q3b8mrYK56hsX>=)7t2} zUvE(v_ME_KQpZ2Mw=VGF6Xv8~Ukm>PJiI}nDjPfm;V6TTA}L7c8!}j1P@L!^h%g6^ zF}Q|INP3BS9S7-%`nm50q>1~hDlEGafX%u=+BHbUC|2OV_i@*sHYblZUjvzam4=>4 zUw%8jD?5a{8Az`;*JK6jV~Atdc`>T+Ef2vRLGDP~fszpJ@2jB2UO*keg&xH-M$;>k zRY0IZP?`RsA)K=ia>c|D=$6DL&pU!R!p1;VlPeH$-G3#uV$Mp#XGq5csL?>5W_z$& z-*_*3pe-^UA0xpS%|TsOfn$%fbXOBVYn*HuTl@x0Ls)z}Fox)2p zg|7#ZvhXNl${|q?{uU%W)i~hofS$a{%6a%~RP&y0s4Rx_(K<8ZzFet!=T+98! z;B<%%DK_o1!Tptk@;Cw%$wr-!zePX5D@-G8SPEhxmM>l9COae+O511;@T!A2v^6@N zLRB@vqjgZLjy_s4G$6JIEB39(7P+W3l~7%!(AF2zDS5iQ3<*xWp06d9Y`WaJZD^-X zB0CYSb19u7uR4e!(2zkN5l~No4`Xzd%k1>m!0uls|20?(9ad?kJA0zNcc;_^LLV=( zHQFHUzqMzEp8L%iVJF&O{j~lqEQ%cP{*7l+hBBYX!~@o?KCT7{Zcb%~D1uNWsP+6% zQ2~Y%l~Q>V1&VTU!c-K6&u=;^pke{uKt7^80Gf+ol}al&-MDj68BOW^s8}3dr`hT0 zuXlDg+}uTYyIroaONTQR1u9-dG8Cupg!-+FB|FLrrab!aCZ4 z{m?NPV6$^Zi@9D2(8F*Z-pxipB2sm*2yjvki^{%2P0p=rsS(Z)mwTO(gs*`ZrDOZ7 zWllpvjtfr-IDN4(i_E-~=ryS)!ox*zVz<1@co6m4ODY>*gQhriiM+93uxg1i55Wf`RzOp|--nnG9$B-zYN-M%;sq_wFvM=;zw z97+a0Vs#=`)EXxYk;I`CuEynKBxLv)F46tc9v9vwFz)kKEiHa4iV|7GI0)XV&02is zk;uQrY`1O4F^HT>b2<3uwESDw=5p})?R@&Aw;cHL=0R01J_3ty8EO+KK3Au=6};es z`sOqqkd5h0m28@R3E(ZTjS{>t59zo-#$__JVtkYDd4P8TDLZ^r;oyojw0j2q7{(dv zIlm~+HSiPNXE!Wr@E{;>S7GfWl$JOfTKj3B!Hu7MuHj5}tgI_0XV^pgc5G$xvqt;1 zy05g*4&>YU9h*?0Lz~Ag7vhDDEmDYuuxFJ{FvBZC*Z&oz>};k+hJ&-)%KNI(frSCh;oq|$%l%7pzp@|A+V&~bBLKeEFlOoU zph~O3kU;eL0tuu1o;N3VVqD4dkDg(H!Sdn;`HAXZdG&4&5PiQ?jGxu~iCiWro!M`BG7w*ig8oZEX&Oq7ykp`P6Cer literal 0 HcmV?d00001 diff --git a/packages/angular/pwa/pwa/files/assets/icons/icon-512x512.png b/packages/angular/pwa/pwa/files/assets/icons/icon-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..51ee297df1cbeb0354814ffe95afa6e4bc86ea23 GIT binary patch literal 5008 zcmcIodpuOz+kf_+vCT{~jFHUfHVi6Vj42V)9$k#^5&pV%)&-1MHtmpe&*IIi|qTJh+ z!!lt30LM+X$OizWSQHpEirl|oUP%%9MyZz+pfGvNw?G|gjBN99b%Co-CbUxnU%996 zV$V&Hm0;Zjl6nx=fcP1RHJEJ^*gOZDCJ<9hBiOtI8%lZ~tSM%6bac4$Q}^XNZ!P7o zeYUo4`|VE)uTE9=z>~(WFWx=3^64*mI8-j2LE-B~`FJmbe?)cn4-YQSHkK@TRiJaI zrjL>^BV;SL0Zekz{*am-gYz2xr1iV@`#BCp1+7`bKN$G`^?kVP)pp$xgKLiqcZGM{ZtAs8SwHvA+Q+YR zUtfRO*PXIL?@oB1y32Wcd0IAQ-_7U-XH&QmAC|Xw9Z;$(hdn`I z5fIoln@*%fgcsLNfaNaHqdl1>n?g5Ha-ZQD2qpLEx~@yfjf!iTl>B>ftr0~&6xY%y zsPwQ*V+txVH1mFkBcgU^EFF%u-I6=;zWd2*1L5O8)_yVJns#Kg9`Wf-T$<3_NOzlP?lcY>%lMQY+E^x|$nOnh zF%)rWD9fS9+h=7>6ls3XzdG=TF4_8P0^4JsruhUNViOn_2eMHjjhi)KK?TM=H;}DE zq=|QSd2lF0Z<}=iroXXkyc2#j+uJxc<3Bsvtus<{k68}8pZtAbZXJ?y=oV}T|N3M@_`748u^ks>QyK6aQS7_;#%RKa1 z*)JQ_uLYqGuCy*(BronhOdkTpRh#Pv-4m7%e+mboB;-IEH-BL7F?@1+SW8G=ysEhS z4t=OH``~Y7QfD+lsrZFv3bX*3U(!xce&I<%HDT>fFKRK^%QkBmCl?lQl43g8rLfSGf!55?+so z0o42iIY*^Jn(3hppT@H-MP^3N$=-DeA8avR>(aL(^8Seh7exX4{5SOv)!!#5A1mxS^0XHyeTO%O(4g8069 zfgH=6*)&|qMu!w*N8XWzwn?ZU{`v@OlJ3k4@F!j2m8?A2VBaIjp$^$s^vA8Bt|560 zh%$@{pSgdQ(i;bIfnG;A;3uR;TxdyFKFRY_2XpK4S#gJnDm{o0&_5Sy{M>{V5=O`U zHyV-Y`Y^#}L446jlgRY&Ol=TK27gtju!h_Z@yBozD&;!r*tGFb#JDX_)O>cGIo59I(x z$imJEazT*}4Wi70w(Ei~mZpGz8gC}kV470XFu6BU)3mD^2VZJ#4+2w_EPJ>VeHK|7ENAM%S!ViogqWiA zj)2m<7#gHXjV3@uvNDL5(-~Dw&Yu7wX86>&3vL(L4iyM7muD8x)VG)#v>-hm?=Z35 z=PN$go4f^0vV;g4KYf>cni3E-54pCb(bjAA4puPLHKqP7?Gp*Nb8IUFA<`LKce2kB zj1Ne1%)r@P{<@SV9~=tO=y4${MU_#6j?f6MvALihW2mJs1reKKX>#k1APvR^p`rPU zzaHtsl4uDd@_VGGDr#)OS7<5z%Tg&s2pj3KFYGVYPP!}1pC5LUp~8W-4r=>zv?mvdq?!3 zu7nE$-#An?5~=E+*YtT3)MbwIuvQL`kY$Wqe`>3?qZqV3SYt4jcrP+t@z?B@6@bl@ zv=J=4BSrPK z;=4>${#aT8WSwE~XIiz`0cNDF&n#ZZrb#s6U9N1pa(e-oPh_TyymoY^De8sFR|-TH zx_?6k>&rwfwvV7FPDhx{JnBxC?Zk+F7hx{DV)baMWscoF?3ON(dOigdr-Zrm^o)<% zobakilutyNDXv{6_Mzg68gix>+LyRE91bJyXcyE~kvu*TWTq%8!ETMw0-mAv7Ew$e zip5HGwc}IlW`w4yrn^~a^1ceRPDlhrx|lGHnVxqQnFL~@hNOuhagwf^ez%7R(MIWx znda~N{gL!;m!QWPL^s&`F=5p^VQ($%Y%s{e6eiR`N>e?cdmV3tWZEL@zxht`|akL1v6HTvGn_9CPl4B2%UMgR7=8<{uc1&F2MYXS`tQ1L_ z3rQ*oV-j)FvaNL&wuhxPcY$ryf+S4U`f?4`!Y#wX-yjM0JjuLFB$Fm|W-dvUS~!8h zV*Df3T!vb}1a14Y@|(WPJ}`-`AnRN5QB~NpY^Sk+pT~xpC>6t zxdB+0A4K3Oc(36qEZi4*P_sCn_Z7<&5r#!Vn%IEQScZh0>vQLD{pl|X5QdfVhC4I` z@5GYC0$(dck$Ike$W&>C5@kqyn$*z(HeXA{4T3alnDFZi3prg7B}egFkEH7_3s1bT z#nq3bhcU23BdV972aZb*n1IVEa-}Y;Z#5B~WZv%ZA5}=&vM}PNr-fW0@XbY9PUg~C zGn50NVE^7KuA-VeZvtz!rs09X8mT_ym$;LpL{>YbD`2jigNTFm@U%QSYpU{4DRMFz z5x4#m=i*5Zh|b%`5cmdj@O(A_l8}oG!mEro^)$PAI@+Qtq_ZrQbE)TsDt}bxm^8iN z^&oYF`m~ z&ZHteORxl*qgde-m1tv1q(qt-WV%tf4z#3!AbPTB${Vx4e8dd$${8Y7K~*4kpsXeBD9 z=Mw{v6d5ef)q}}~$hIC%*Nr zRdI9^Lr}wV@Pt6xAdy za4BTGx-JV*li2NQGS3CJKb=e17yxFg@x#(sNW@rVTPmv!Q}ewrzvqae;O>Bz6|h6e z^X%qnboFEU%eTI`9e9S48C1>b>MFWGMrOO|66MYxER}i`fC=-InICl@d4{&w&gQiA z+gH9nulSe>Nhv`pcko_1mnd^%s>4qIf*DyM5n}1;E37sa;l?@rpE{Uj8IrUdIfID5 z?n$}JcF3ixM%6AGFni7(MWxZx$AN!u?6*iwRyv8>`Wa?@q+%ca|)ROCx&BdNSi#kAu_!{ zA)coYZ?dZ$_x=4?dUJ|7nMpmJ?#W?@yNl>sJ@5sHry%C9Cff74((YOr?uvM>D9Gf6 z!QYl`?;Z`VL|G9f<42%I65>5WU1RHXqUW^X7_q5(yLX}v-$3EGY#qWvH*frNhMItk zDyMy!cDkm-Lo-0q|E7H{wOp-Z!eC%X0aKH z4YOuG)n_OiSx(1qB&<>feETCz)qA*6*tKGiP)|o0$qUwT>SEv8@;l!yFw${(ChVHB zMj6@q+SsC^{$IW*GlsK-zt7Id%dB2O4D6nE+tYO?GW7f7>tU(^!+dG;Po-Gq^H|*t zqZhG_^O3B-t>qM8V8i`<7gQ5F>Zjlu5Cda;l|`Ai&~L5N*HBE%zZPY~2R!4-<|85Z zPTI!|PiDeun1!6l!I9;LGq2MQc4+Y(L7KRhOtB1CZE0qaTnzl$t%`UTN1q{ee6X zHc!XFmvcbs6VFuFCQWO9@HkunwI^Zf@{~iE%sh?)kU%Y FzW_h>Px#R8UM*MNDaN)&Mcn05H@5Fxdbx(FQfk05I49FVg@p z+yF7i059JFFxUVv-2gG&05QV=FaQ7l>y@eERCUfVSLAPs`{wKQ$`jGn?>BzbqhH<{W zKKbNtQUHf}oTF z3K?M;*Yw_?5X(3{vgN@kPam<7%UPO5B_t(-pp1}F_K75<4DkSgZ^u+K7b78Mj^BPl z#(|5Pkg~#)5zE-k6SBin5|a`isF^_xmXa847bIi5%C5%2AYa1gw46>vw zsSoY(fov(sFZKmYMmM7mh&iLW8%%1G&XKYpLAfKNw%3}*kuoAdnJr`M>__H>dq~Mh zP-V-g+(k>-Qs(q}WXssQpxTy_-X}}zK)3Dc*I821%VcWFsJ9?(Nx8HAB~LQ8U>P-a zuTt*pkmh5n)f|ns+Q$5J2qLyN|84E@+#+w#(H$VTc!5HXl|4%iLCo)Vlji%N$p7+I zG8$BzyHCc90G+&N*{z@Jc&GJ~9n-C!?ijTGxE#NGXP;Ytsbkdo&MZ9H)#u-s|CMj0 W+lM#8Z~|xm0000Px#QBX`&MNDaN(FHWq05Hh_FW3Mv%K$LW05R48FxUVw z)c`Tx05I18Fx3Ds+5j=b059DDG5`Pn`|0h?DNx=~ap{et=5mep%+~Lyx#A^H+#^l% zx5S%GFfafB01k9gPE!E&((4(;BUht~-7>L58O~@#00009a7bBm000H6000H60f4@L z=Kuf#+(|@1RA}DqnQ3~1AQVNNP|ScL4oUXE&?Z$Ahc^JBfBJbB;3>Hreb6X6a^%R7 z;3>+#e0pAsnVC28G71@_nt#-0QkgM3T~@)@9nd zZWSG>a#?ZFb**E?A^ZVd{Y>W%C@dE6TmlD>DB#LG-_*Y`3;-|s%mDfk&@%wM<;-dU z%uZG6jBg_vFwB5~1`r-lj=dzaTLJ+PjAV02+0w|grk4Qi z_NdmZY}5-iXC>=8R<8=;$WuTroY=%%5X~{ z0fLsSe@zuVEn7+gB>k4?UVx64Eg=CVDVhGAi(*a6cA+O0QnGd&yjoH==>eE~y^Vl* zry6I^Fw^>X#pCEme%Y8om0EzA0pw0)Cde3FVdcRXGE-Owu z$vO9SV z*n9RAfjlf%zPAXgA1U?(2-|DBO!@#4mz&4@;tEKwkz3Bf3E*?bd_7qMWaO73wgO!I zZ{dNqzw6clvF-Nz|AlPY{=QqFiW35mQK&514$>`EMWAkRM6hnLwgYwxw;i-wsO_-b g0#)SEkt6>uKVW", + "short_name": "<%= title %>", + "theme_color": "#1976d2", + "background_color": "#fafafa", + "display": "browser", + "Scope": "/", + "start_url": "/", + "icons": [ + { + "src": "images/icons/icon-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "images/icons/icon-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "images/icons/icon-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "images/icons/icon-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "images/icons/icon-152x152.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "images/icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "images/icons/icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "images/icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "splash_pages": null +} \ No newline at end of file diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts new file mode 100644 index 0000000000..11b30db275 --- /dev/null +++ b/packages/angular/pwa/pwa/index.ts @@ -0,0 +1,55 @@ +/** +* @license +* Copyright Google Inc. All Rights Reserved. +* +* Use of this source code is governed by an MIT-style license that can be +* found in the LICENSE file at https://angular.io/license +*/ +import { Path, join } from '@angular-devkit/core'; +import { + Rule, + SchematicContext, + Tree, + apply, + branchAndMerge, + chain, + externalSchematic, + mergeWith, + move, + template, + url, +} from '@angular-devkit/schematics'; +import { getWorkspace } from '../utility/config'; +import { Schema as PwaOptions } from './schema'; + + +function addServiceWorker(options: PwaOptions): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.debug('Adding service worker...'); + + return externalSchematic('@schematics/angular', 'service-worker', options)(host, context); + }; +} + +export default function (options: PwaOptions): Rule { + return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + const project = workspace.projects[options.project]; + + const assetPath = join(project.root as Path, 'src', 'assets'); + + const tempalteSource = apply(url('./files/assets'), [ + template({ + ...options, + }), + move(assetPath), + ]); + + return chain([ + addServiceWorker(options), + branchAndMerge(chain([ + mergeWith(tempalteSource), + ])), + ])(host, context); + }; +} diff --git a/packages/angular/pwa/pwa/index_spec.ts b/packages/angular/pwa/pwa/index_spec.ts new file mode 100644 index 0000000000..2e99acb3e5 --- /dev/null +++ b/packages/angular/pwa/pwa/index_spec.ts @@ -0,0 +1,81 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { Schema as PwaOptions } from './schema'; + + +// tslint:disable:max-line-length +describe('PWA Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@angular/pwa', + path.join(__dirname, '../collection.json'), + ); + const defaultOptions: PwaOptions = { + project: 'bar', + target: 'build', + configuration: 'production', + title: 'Fake Title', + }; + + let appTree: UnitTestTree; + + // tslint:disable-next-line:no-any + const workspaceOptions: any = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + // tslint:disable-next-line:no-any + const appOptions: any = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + + beforeEach(() => { + appTree = schematicRunner.runExternalSchematic('@schematics/angular', 'workspace', workspaceOptions); + appTree = schematicRunner.runExternalSchematic('@schematics/angular', 'application', appOptions, appTree); + }); + + it('should run the service worker schematic', () => { + const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); + const configText = tree.readContent('/angular.json'); + const config = JSON.parse(configText); + const swFlag = config.projects.bar.architect.build.configurations.production.serviceWorker; + expect(swFlag).toEqual(true); + }); + + it('should create icon files', () => { + const dimensions = [72, 96, 128, 144, 152, 192, 384, 512]; + const iconPath = '/projects/bar/src/assets/icons/icon-'; + const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); + dimensions.forEach(d => { + const path = `${iconPath}${d}x${d}.png`; + expect(tree.exists(path)).toEqual(true); + }); + }); + + it('should create a manifest file', () => { + const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); + expect(tree.exists('/projects/bar/src/assets/manifest.json')).toEqual(true); + }); + + it('should set the name & short_name in the manifest file', () => { + const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); + const manifestText = tree.readContent('/projects/bar/src/assets/manifest.json'); + const manifest = JSON.parse(manifestText); + expect(manifest.name).toEqual(defaultOptions.title); + expect(manifest.short_name).toEqual(defaultOptions.title); + }); +}); diff --git a/packages/angular/pwa/pwa/schema.d.ts b/packages/angular/pwa/pwa/schema.d.ts new file mode 100644 index 0000000000..1331fdaebf --- /dev/null +++ b/packages/angular/pwa/pwa/schema.d.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export interface Schema { + /** + * The name of the project. + */ + project: string; + /** + * ": "The target to apply service worker to. + */ + target: string; + /** + * The configuration to apply service worker to. + */ + configuration: string; + /** + * The title of the application. + */ + title?: string; +} diff --git a/packages/angular/pwa/pwa/schema.json b/packages/angular/pwa/pwa/schema.json new file mode 100644 index 0000000000..05a34fcbd6 --- /dev/null +++ b/packages/angular/pwa/pwa/schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsAngularPWA", + "title": "Angular PWA Options Schema", + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "The name of the project." + }, + "target": { + "type": "string", + "description": "The target to apply service worker to.", + "default": "build" + }, + "configuration": { + "type": "string", + "description": "The configuration to apply service worker to.", + "default": "production" + }, + "title": { + "type": "string", + "description": "The title of the application." + } + }, + "required": [ + "project" + ] +} \ No newline at end of file diff --git a/packages/angular/pwa/utility/config.ts b/packages/angular/pwa/utility/config.ts new file mode 100644 index 0000000000..3add859083 --- /dev/null +++ b/packages/angular/pwa/utility/config.ts @@ -0,0 +1,487 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { experimental } from '@angular-devkit/core'; +import { SchematicsException, Tree } from '@angular-devkit/schematics'; + + +// The interfaces below are generated from the Angular CLI configuration schema +// https://github.com/angular/angular-cli/blob/master/packages/@angular/cli/lib/config/schema.json +export interface AppConfig { + /** + * Name of the app. + */ + name?: string; + /** + * Directory where app files are placed. + */ + appRoot?: string; + /** + * The root directory of the app. + */ + root?: string; + /** + * The output directory for build results. + */ + outDir?: string; + /** + * List of application assets. + */ + assets?: (string | { + /** + * The pattern to match. + */ + glob?: string; + /** + * The dir to search within. + */ + input?: string; + /** + * The output path (relative to the outDir). + */ + output?: string; + })[]; + /** + * URL where files will be deployed. + */ + deployUrl?: string; + /** + * Base url for the application being built. + */ + baseHref?: string; + /** + * The runtime platform of the app. + */ + platform?: ('browser' | 'server'); + /** + * The name of the start HTML file. + */ + index?: string; + /** + * The name of the main entry-point file. + */ + main?: string; + /** + * The name of the polyfills file. + */ + polyfills?: string; + /** + * The name of the test entry-point file. + */ + test?: string; + /** + * The name of the TypeScript configuration file. + */ + tsconfig?: string; + /** + * The name of the TypeScript configuration file for unit tests. + */ + testTsconfig?: string; + /** + * The prefix to apply to generated selectors. + */ + prefix?: string; + /** + * Experimental support for a service worker from @angular/service-worker. + */ + serviceWorker?: boolean; + /** + * Global styles to be included in the build. + */ + styles?: (string | { + input?: string; + [name: string]: any; // tslint:disable-line:no-any + })[]; + /** + * Options to pass to style preprocessors + */ + stylePreprocessorOptions?: { + /** + * Paths to include. Paths will be resolved to project root. + */ + includePaths?: string[]; + }; + /** + * Global scripts to be included in the build. + */ + scripts?: (string | { + input: string; + [name: string]: any; // tslint:disable-line:no-any + })[]; + /** + * Source file for environment config. + */ + environmentSource?: string; + /** + * Name and corresponding file for environment config. + */ + environments?: { + [name: string]: any; // tslint:disable-line:no-any + }; + appShell?: { + app: string; + route: string; + }; +} + +export interface CliConfig { + $schema?: string; + /** + * The global configuration of the project. + */ + project?: { + /** + * The name of the project. + */ + name?: string; + /** + * Whether or not this project was ejected. + */ + ejected?: boolean; + }; + /** + * Properties of the different applications in this project. + */ + apps?: AppConfig[]; + /** + * Configuration for end-to-end tests. + */ + e2e?: { + protractor?: { + /** + * Path to the config file. + */ + config?: string; + }; + }; + /** + * Properties to be passed to TSLint. + */ + lint?: { + /** + * File glob(s) to lint. + */ + files?: (string | string[]); + /** + * Location of the tsconfig.json project file. + * Will also use as files to lint if 'files' property not present. + */ + project: string; + /** + * Location of the tslint.json configuration. + */ + tslintConfig?: string; + /** + * File glob(s) to ignore. + */ + exclude?: (string | string[]); + }[]; + /** + * Configuration for unit tests. + */ + test?: { + karma?: { + /** + * Path to the karma config file. + */ + config?: string; + }; + codeCoverage?: { + /** + * Globs to exclude from code coverage. + */ + exclude?: string[]; + }; + }; + /** + * Specify the default values for generating. + */ + defaults?: { + /** + * The file extension to be used for style files. + */ + styleExt?: string; + /** + * How often to check for file updates. + */ + poll?: number; + /** + * Use lint to fix files after generation + */ + lintFix?: boolean; + /** + * Options for generating a class. + */ + class?: { + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + }; + /** + * Options for generating a component. + */ + component?: { + /** + * Flag to indicate if a dir is created. + */ + flat?: boolean; + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + /** + * Specifies if the style will be in the ts file. + */ + inlineStyle?: boolean; + /** + * Specifies if the template will be in the ts file. + */ + inlineTemplate?: boolean; + /** + * Specifies the view encapsulation strategy. + */ + viewEncapsulation?: ('Emulated' | 'Native' | 'None'); + /** + * Specifies the change detection strategy. + */ + changeDetection?: ('Default' | 'OnPush'); + }; + /** + * Options for generating a directive. + */ + directive?: { + /** + * Flag to indicate if a dir is created. + */ + flat?: boolean; + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + }; + /** + * Options for generating a guard. + */ + guard?: { + /** + * Flag to indicate if a dir is created. + */ + flat?: boolean; + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + }; + /** + * Options for generating an interface. + */ + interface?: { + /** + * Prefix to apply to interface names. (i.e. I) + */ + prefix?: string; + }; + /** + * Options for generating a module. + */ + module?: { + /** + * Flag to indicate if a dir is created. + */ + flat?: boolean; + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + }; + /** + * Options for generating a pipe. + */ + pipe?: { + /** + * Flag to indicate if a dir is created. + */ + flat?: boolean; + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + }; + /** + * Options for generating a service. + */ + service?: { + /** + * Flag to indicate if a dir is created. + */ + flat?: boolean; + /** + * Specifies if a spec file is generated. + */ + spec?: boolean; + }; + /** + * Properties to be passed to the build command. + */ + build?: { + /** + * Output sourcemaps. + */ + sourcemaps?: boolean; + /** + * Base url for the application being built. + */ + baseHref?: string; + /** + * The ssl key used by the server. + */ + progress?: boolean; + /** + * Enable and define the file watching poll time period (milliseconds). + */ + poll?: number; + /** + * Delete output path before build. + */ + deleteOutputPath?: boolean; + /** + * Do not use the real path when resolving modules. + */ + preserveSymlinks?: boolean; + /** + * Show circular dependency warnings on builds. + */ + showCircularDependencies?: boolean; + /** + * Use a separate bundle containing code used across multiple bundles. + */ + commonChunk?: boolean; + /** + * Use file name for lazy loaded chunks. + */ + namedChunks?: boolean; + }; + /** + * Properties to be passed to the serve command. + */ + serve?: { + /** + * The port the application will be served on. + */ + port?: number; + /** + * The host the application will be served on. + */ + host?: string; + /** + * Enables ssl for the application. + */ + ssl?: boolean; + /** + * The ssl key used by the server. + */ + sslKey?: string; + /** + * The ssl certificate used by the server. + */ + sslCert?: string; + /** + * Proxy configuration file. + */ + proxyConfig?: string; + }; + /** + * Properties about schematics. + */ + schematics?: { + /** + * The schematics collection to use. + */ + collection?: string; + /** + * The new app schematic. + */ + newApp?: string; + }; + }; + /** + * Specify which package manager tool to use. + */ + packageManager?: ('npm' | 'cnpm' | 'yarn' | 'default'); + /** + * Allow people to disable console warnings. + */ + warnings?: { + /** + * Show a warning when the user enabled the --hmr option. + */ + hmrWarning?: boolean; + /** + * Show a warning when the node version is incompatible. + */ + nodeDeprecation?: boolean; + /** + * Show a warning when the user installed angular-cli. + */ + packageDeprecation?: boolean; + /** + * Show a warning when the global version is newer than the local one. + */ + versionMismatch?: boolean; + /** + * Show a warning when the TypeScript version is incompatible + */ + typescriptMismatch?: boolean; + }; +} + +export type WorkspaceSchema = experimental.workspace.WorkspaceSchema; + + +export function getWorkspacePath(host: Tree): string { + const possibleFiles = [ '/angular.json', '/.angular.json' ]; + const path = possibleFiles.filter(path => host.exists(path))[0]; + + return path; +} + +export function getWorkspace(host: Tree): WorkspaceSchema { + const path = getWorkspacePath(host); + const configBuffer = host.read(path); + if (configBuffer === null) { + throw new SchematicsException(`Could not find (${path})`); + } + const config = configBuffer.toString(); + + return JSON.parse(config); +} + +export const configPath = '/.angular-cli.json'; + +export function getConfig(host: Tree): CliConfig { + const configBuffer = host.read(configPath); + if (configBuffer === null) { + throw new SchematicsException('Could not find .angular-cli.json'); + } + + const config = JSON.parse(configBuffer.toString()); + + return config; +} + +export function getAppFromConfig(config: CliConfig, appIndexOrName: string): AppConfig | null { + if (!config.apps) { + return null; + } + + if (parseInt(appIndexOrName) >= 0) { + return config.apps[parseInt(appIndexOrName)]; + } + + return config.apps.filter((app) => app.name === appIndexOrName)[0]; +} diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.ts b/packages/angular_devkit/core/src/workspace/workspace-schema.ts index c3803313b9..3a5583c0e6 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.ts +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.ts @@ -91,11 +91,15 @@ export interface Project { /** * Tool options. */ - architect?: { - /** - * Link to schema. - */ - $schema?: string; - [k: string]: any; - }; + architect?: Architect; +} +/** + * Architect options. + */ +export interface Architect { + /** + * Link to schema. + */ + $schema?: string; + [k: string]: any; } diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 11e61605e0..2513042a06 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize } from '@angular-devkit/core'; +import { JsonObject, normalize } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -15,6 +15,12 @@ import { schematic, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; +import { + Architect, + Project, + WorkspaceSchema, +} from '../../../angular_devkit/core/src/workspace/workspace-schema'; +import { Schema as ComponentOptions } from '../component/schema'; import { addImportToModule, addSymbolToNgModuleMetadata, @@ -24,7 +30,7 @@ import { isImported, } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; -import { AppConfig, getAppFromConfig, getConfig } from '../utility/config'; +import { getWorkspace, getWorkspacePath } from '../utility/config'; import { getAppModulePath } from '../utility/ng-ast-utils'; import { insertImport } from '../utility/route-utils'; import { Schema as AppShellOptions } from './schema'; @@ -40,7 +46,7 @@ function formatMissingAppMsg(label: string, nameOrIndex: string | undefined): st function getSourceFile(host: Tree, path: string): ts.SourceFile { const buffer = host.read(path); if (!buffer) { - throw new SchematicsException(`Could not find bootstrapped module.`); + throw new SchematicsException(`Could not find ${path}.`); } const content = buffer.toString(); const source = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true); @@ -48,8 +54,8 @@ function getSourceFile(host: Tree, path: string): ts.SourceFile { return source; } -function getServerModulePath(host: Tree, app: AppConfig): string | null { - const mainPath = `/${app.root}/${app.main}`; +function getServerModulePath(host: Tree, project: Project, architect: Architect): string | null { + const mainPath = architect.server.options.main; const mainSource = getSourceFile(host, mainPath); const allNodes = getSourceNodes(mainSource); const expNode = allNodes.filter(node => node.kind === ts.SyntaxKind.ExportDeclaration)[0]; @@ -57,7 +63,7 @@ function getServerModulePath(host: Tree, app: AppConfig): string | null { return null; } const relativePath = ( expNode).moduleSpecifier; - const modulePath = normalize(`/${app.root}/${relativePath.text}.ts`); + const modulePath = normalize(`/${project.root}/src/${relativePath.text}.ts`); return modulePath; } @@ -96,8 +102,12 @@ function getComponentTemplate(host: Tree, compPath: string, tmplInfo: TemplateIn return template; } -function getBootstrapComponentPath(host: Tree, appConfig: AppConfig): string { - const modulePath = getAppModulePath(host, appConfig); +function getBootstrapComponentPath(host: Tree, project: Project): string { + if (!project.architect) { + throw new Error('Project architect not found.'); + } + const mainPath = project.architect.build.options.main; + const modulePath = getAppModulePath(host, mainPath); const moduleSource = getSourceFile(host, modulePath); const metadataNode = getDecoratorMetadata(moduleSource, 'NgModule', '@angular/core')[0]; @@ -131,13 +141,8 @@ function validateProject(options: AppShellOptions): Rule { return (host: Tree, context: SchematicContext) => { const routerOutletCheckRegex = /([\s\S]*?)<\/router\-outlet>/; - const config = getConfig(host); - const app = getAppFromConfig(config, options.clientApp || '0'); - if (app === null) { - throw new SchematicsException(formatMissingAppMsg('Client', options.clientApp)); - } - - const componentPath = getBootstrapComponentPath(host, app); + const clientProject = getClientProject(host, options); + const componentPath = getBootstrapComponentPath(host, clientProject); const tmpl = getComponentTemplateInfo(host, componentPath); const template = getComponentTemplate(host, componentPath, tmpl); if (!routerOutletCheckRegex.test(template)) { @@ -149,51 +154,54 @@ function validateProject(options: AppShellOptions): Rule { }; } -function addUniversalApp(options: AppShellOptions): Rule { +function addUniversalTarget(options: AppShellOptions): Rule { return (host: Tree, context: SchematicContext) => { - const config = getConfig(host); - const appConfig = getAppFromConfig(config, options.universalApp); - - if (appConfig && appConfig.platform === 'server') { - return host; - } else if (appConfig && appConfig.platform !== 'server') { - throw new SchematicsException( - `Invalid platform for universal app (${options.universalApp}), value must be "server".`); + const architect = getClientArchitect(host, options); + if (architect !== null) { + if (architect.server !== undefined) { + return host; + } } // Copy options. const universalOptions = { ...options, - name: options.universalApp, + name: options.universalProject, }; // Delete non-universal options. - delete universalOptions.universalApp; + delete universalOptions.universalProject; delete universalOptions.route; return schematic('universal', universalOptions)(host, context); }; } -function addAppShellConfig(options: AppShellOptions): Rule { +function addAppShellConfigToWorkspace(options: AppShellOptions): Rule { return (host: Tree) => { - const config = getConfig(host); - const app = getAppFromConfig(config, options.clientApp || '0'); - - if (!app) { - throw new SchematicsException(formatMissingAppMsg('Client', options.clientApp)); - } - if (!options.route) { throw new SchematicsException(`Route is not defined`); } - app.appShell = { - app: options.universalApp, + const workspace = getWorkspace(host); + const workspacePath = getWorkspacePath(host); + + const appShellTarget: JsonObject = { + browserTarget: `${options.clientProject}:build`, + serverTarget: `${options.clientProject}:server`, route: options.route, }; - host.overwrite('/.angular-cli.json', JSON.stringify(config, null, 2)); + if (!workspace.projects[options.clientProject]) { + throw new SchematicsException(`Client app ${options.clientProject} not found.`); + } + const clientProject = workspace.projects[options.clientProject]; + if (!clientProject.architect) { + throw new Error('Client project architect not found.'); + } + clientProject.architect['app-shell'] = appShellTarget; + + host.overwrite(workspacePath, JSON.stringify(workspace, null, 2)); return host; }; @@ -201,12 +209,9 @@ function addAppShellConfig(options: AppShellOptions): Rule { function addRouterModule(options: AppShellOptions): Rule { return (host: Tree) => { - const config = getConfig(host); - const app = getAppFromConfig(config, options.clientApp || '0'); - if (app === null) { - throw new SchematicsException(formatMissingAppMsg('Client', options.clientApp)); - } - const modulePath = getAppModulePath(host, app); + const clientArchitect = getClientArchitect(host, options); + const mainPath = clientArchitect.build.options.main; + const modulePath = getAppModulePath(host, mainPath); const moduleSource = getSourceFile(host, modulePath); const changes = addImportToModule(moduleSource, modulePath, 'RouterModule', '@angular/router'); const recorder = host.beginUpdate(modulePath); @@ -240,12 +245,10 @@ function getMetadataProperty(metadata: ts.Node, propertyName: string): ts.Proper function addServerRoutes(options: AppShellOptions): Rule { return (host: Tree) => { - const config = getConfig(host); - const app = getAppFromConfig(config, options.universalApp); - if (app === null) { - throw new SchematicsException(formatMissingAppMsg('Universal/server', options.universalApp)); - } - const modulePath = getServerModulePath(host, app); + const clientProject = getClientProject(host, options); + const architect = getClientArchitect(host, options); + // const mainPath = universalArchitect.build.options.main; + const modulePath = getServerModulePath(host, clientProject, architect); if (modulePath === null) { throw new SchematicsException('Universal/server module not found.'); } @@ -301,20 +304,41 @@ function addServerRoutes(options: AppShellOptions): Rule { function addShellComponent(options: AppShellOptions): Rule { return (host: Tree, context: SchematicContext) => { - const componentOptions = { + const componentOptions: ComponentOptions = { name: 'app-shell', module: options.rootModuleFileName, + project: options.clientProject, }; return schematic('component', componentOptions)(host, context); }; } +function getClientProject(host: Tree, options: AppShellOptions): Project { + const workspace = getWorkspace(host); + const clientProject = workspace.projects[options.clientProject]; + if (!clientProject) { + throw new SchematicsException(formatMissingAppMsg('Client', options.clientProject)); + } + + return clientProject; +} + +function getClientArchitect(host: Tree, options: AppShellOptions): Architect { + const clientArchitect = getClientProject(host, options).architect; + + if (!clientArchitect) { + throw new Error('Client project architect not found.'); + } + + return clientArchitect; +} + export default function (options: AppShellOptions): Rule { return chain([ validateProject(options), - addUniversalApp(options), - addAppShellConfig(options), + addUniversalTarget(options), + addAppShellConfigToWorkspace(options), addRouterModule(options), addServerRoutes(options), addShellComponent(options), diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index c670139cc3..ff705f8a84 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -5,43 +5,50 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { Schema as NgNewOptions } from '../ng-new/schema'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as AppShellOptions } from './schema'; -// TODO: fix these tests once workspace is implemented -xdescribe('App Shell Schematic', () => { +describe('App Shell Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', path.join(__dirname, '../collection.json'), ); const defaultOptions: AppShellOptions = { name: 'foo', - universalApp: 'universal', + clientProject: 'bar', + universalProject: 'universal', }; - let appTree: Tree; - const appOptions: NgNewOptions = { - directory: '', - name: 'appshell-app', + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'None', - version: '1.2.3', + viewEncapsulation: 'Emulated', routing: true, style: 'css', skipTests: false, }; + let appTree: UnitTestTree; beforeEach(() => { - appTree = schematicRunner.runSchematic('ng-new', appOptions); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); + it('should ensure the client app has a router-outlet', () => { - appTree = schematicRunner.runSchematic('ng-new', {...appOptions, routing: false}); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', {...appOptions, routing: false}, appTree); expect(() => { schematicRunner.runSchematic('appShell', defaultOptions, appTree); }).toThrowError(); @@ -49,48 +56,30 @@ xdescribe('App Shell Schematic', () => { it('should add a universal app', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const filePath = '/src/app/app.server.module.ts'; - const file = tree.files.filter(f => f === filePath)[0]; - expect(file).toBeDefined(); - }); - - it('should use an existing universal app', () => { - const universalOptions = { - name: defaultOptions.universalApp, - }; - - let tree = schematicRunner.runSchematic('universal', universalOptions, appTree); - const filePath = '/.angular-cli.json'; - let content = tree.readContent(filePath); - let config = JSON.parse(content); - const appCount = config.apps.length; - - tree = schematicRunner.runSchematic('appShell', defaultOptions, tree); - content = tree.readContent(filePath); - config = JSON.parse(content); - expect(config.apps.length).toBe(appCount); + const filePath = '/projects/bar/src/app/app.server.module.ts'; + expect(tree.exists(filePath)).toEqual(true); }); it('should add app shell configuration', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const filePath = '/.angular-cli.json'; + const filePath = '/angular.json'; const content = tree.readContent(filePath); - const config = JSON.parse(content); - const app = config.apps[0]; - expect(app.appShell).toBeDefined(); - expect(app.appShell.app).toEqual('universal'); - expect(app.appShell.route).toEqual('shell'); + const workspace = JSON.parse(content); + const target = workspace.projects.bar.architect['app-shell']; + expect(target.browserTarget).toEqual('bar:build'); + expect(target.serverTarget).toEqual('bar:server'); + expect(target.route).toEqual('shell'); }); it('should add router module to client app module', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const filePath = '/src/app/app.module.ts'; + const filePath = '/projects/bar/src/app/app.module.ts'; const content = tree.readContent(filePath); expect(content).toMatch(/import { RouterModule } from \'@angular\/router\';/); }); describe('Add router-outlet', () => { - function makeInlineTemplate(tree: Tree, template?: string): void { + function makeInlineTemplate(tree: UnitTestTree, template?: string): void { template = template || `

App works! @@ -115,12 +104,12 @@ xdescribe('App Shell Schematic', () => { } `; - tree.overwrite('/src/app/app.component.ts', newText); - tree.delete('/src/app/app.component.html'); + tree.overwrite('/projects/bar/src/app/app.component.ts', newText); + tree.delete('/projects/bar/src/app/app.component.html'); } it('should not re-add the router outlet (external template)', () => { - const htmlPath = '/src/app/app.component.html'; + const htmlPath = '/projects/bar/src/app/app.component.html'; appTree.overwrite(htmlPath, ''); const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); @@ -133,7 +122,7 @@ xdescribe('App Shell Schematic', () => { it('should not re-add the router outlet (inline template)', () => { makeInlineTemplate(appTree, ''); const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const content = tree.readContent('/src/app/app.component.ts'); + const content = tree.readContent('/projects/bar/src/app/app.component.ts'); const matches = content.match(/<\/router\-outlet>/g); const numMatches = matches ? matches.length : 0; expect(numMatches).toEqual(1); @@ -142,22 +131,21 @@ xdescribe('App Shell Schematic', () => { it('should add router imports to server module', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const filePath = '/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.server.module.ts'; const content = tree.readContent(filePath); - // tslint:disable-next-line:max-line-length expect(content).toMatch(/import { Routes, RouterModule } from \'@angular\/router\';/); }); it('should define a server route', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const filePath = '/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.server.module.ts'; const content = tree.readContent(filePath); expect(content).toMatch(/const routes: Routes = \[/); }); it('should import RouterModule with forRoot', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - const filePath = '/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.server.module.ts'; const content = tree.readContent(filePath); expect(content) .toMatch(/const routes: Routes = \[ { path: 'shell', component: AppShellComponent }\];/); @@ -167,8 +155,8 @@ xdescribe('App Shell Schematic', () => { it('should create the shell component', () => { const tree = schematicRunner.runSchematic('appShell', defaultOptions, appTree); - expect(tree.exists('/src/app/app-shell/app-shell.component.ts')); - const content = tree.readContent('/src/app/app.server.module.ts'); + expect(tree.exists('/projects/bar/src/app/app-shell/app-shell.component.ts')); + const content = tree.readContent('/projects/bar/src/app/app.server.module.ts'); expect(content).toMatch(/app\-shell\.component/); }); }); diff --git a/packages/schematics/angular/app-shell/schema.d.ts b/packages/schematics/angular/app-shell/schema.d.ts index c814cd9379..4946258e9b 100644 --- a/packages/schematics/angular/app-shell/schema.d.ts +++ b/packages/schematics/angular/app-shell/schema.d.ts @@ -8,13 +8,13 @@ export interface Schema { /** - * Name or index of related client app. + * Name of related client app. */ - clientApp?: string; + clientProject: string; /** - * Name or index of related universal app. + * Name of related universal app. */ - universalApp: string; + universalProject: string; /** * Route path used to produce the app shell. */ diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index 0d6fcf5ad1..23d2ab69a0 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -4,13 +4,13 @@ "title": "Angular AppShell Options Schema", "type": "object", "properties": { - "clientApp": { + "clientProject": { "type": "string", - "description": "Name or index of related client app." + "description": "Name of related client app." }, - "universalApp": { + "universalProject": { "type": "string", - "description": "Name or index of related universal app." + "description": "Name of related universal app." }, "route": { "type": "string", @@ -99,6 +99,7 @@ } }, "required": [ - "universalApp" + "clientProject", + "universalProject" ] } diff --git a/packages/schematics/angular/application/files/__dot__angular-cli.json b/packages/schematics/angular/application/files/__dot__angular-cli.json deleted file mode 100644 index 29931a61e3..0000000000 --- a/packages/schematics/angular/application/files/__dot__angular-cli.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "<%= utils.dasherize(name) %>" - }, - "apps": [ - { - "root": "<%= sourceDir %>", - "prefix": "<%= prefix %>", - "main": "main.ts", - "styles": [ - "styles.<%= style %>" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "defaults": { - "styleExt": "<%= style %>",<% if (minimal || skipTests) { %> - "class": { - "spec": false - },<% } %> - "component": {<% if (minimal || inlineStyle) { %> - "inlineStyle": true<% } %><% if (minimal || (inlineTemplate && inlineStyle)) { %>,<% } %><% if (minimal || inlineTemplate) { %> - "inlineTemplate": true<% } %><% if (minimal || (skipTests && (inlineStyle || inlineTemplate))) { %>,<% } %><% if (minimal || skipTests) { %> - "spec": false - <% } %>}<% if (minimal || skipTests) { %>, - "directive": { - "spec": false - }, - "guard": { - "spec": false - }, - "module": { - "spec": false - }, - "pipe": { - "spec": false - }, - "service": { - "spec": false - }<% } %> - } -} diff --git a/packages/schematics/angular/application/files/package.json b/packages/schematics/angular/application/files/package.json deleted file mode 100644 index 841b528050..0000000000 --- a/packages/schematics/angular/application/files/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "<%= utils.dasherize(name) %>", - "version": "0.0.0", - "license": "MIT", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build --prod", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "^5.2.0", - "@angular/common": "^5.2.0", - "@angular/compiler": "^5.2.0", - "@angular/core": "^5.2.0", - "@angular/forms": "^5.2.0", - "@angular/http": "^5.2.0", - "@angular/platform-browser": "^5.2.0", - "@angular/platform-browser-dynamic": "^5.2.0", - "@angular/router": "^5.2.0", - "core-js": "^2.4.1", - "rxjs": "^5.5.6", - "zone.js": "^0.8.19" - }, - "devDependencies": { - "@angular/cli": "~<%= version %>", - "@angular/compiler-cli": "^5.2.0", - "@angular/language-service": "^5.2.0",<% if (!minimal) { %> - "@types/jasmine": "~2.8.6", - "@types/jasminewd2": "~2.0.3", - "@types/node": "~8.9.4", - "codelyzer": "~4.1.0", - "jasmine-core": "~2.99.1", - "jasmine-spec-reporter": "~4.2.1", - "karma": "~2.0.0", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~1.4.1", - "karma-jasmine": "~1.1.1", - "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.3.0", - "ts-node": "~5.0.0", - "tslint": "~5.9.1",<% } %> - "typescript": "~2.5.3" - } -} diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 3ee2d1bf26..0690ddd07a 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -10,35 +10,54 @@ import { SchematicContext, SchematicsException, Tree, + UpdateRecorder, chain, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; import { addSymbolToNgModuleMetadata, isImported } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; -import { AppConfig, CliConfig, getAppFromConfig, getConfig } from '../utility/config'; +import { + getWorkspace, + getWorkspacePath, +} from '../utility/config'; import { getAppModulePath } from '../utility/ng-ast-utils'; import { insertImport } from '../utility/route-utils'; import { Schema as ServiceWorkerOptions } from './schema'; -const configFilePath = '/.angular-cli.json'; const packageJsonPath = '/package.json'; -function getAppConfig(config: CliConfig, nameOrIndex: string): AppConfig { - const appConfig = getAppFromConfig(config, nameOrIndex); - if (!appConfig) { - throw new SchematicsException(`App (${nameOrIndex}) not found.`); - } - - return appConfig; -} - function updateConfigFile(options: ServiceWorkerOptions): Rule { return (host: Tree, context: SchematicContext) => { - context.logger.debug(`updating config file (${configFilePath})`); - const config = getConfig(host); - const appConfig = getAppConfig(config, options.app || '0'); - appConfig.serviceWorker = true; - host.overwrite(configFilePath, JSON.stringify(config, null, 2)); + context.logger.debug('updating config file.'); + const workspacePath = getWorkspacePath(host); + + const workspace = getWorkspace(host); + + const project = workspace.projects[options.project]; + + if (!project) { + throw new Error(`Project is not defined in this workspace.`); + } + + if (!project.architect) { + throw new Error(`Architect is not defined for this project.`); + } + + if (!project.architect[options.target]) { + throw new Error(`Target is not defined for this project.`); + } + + let applyTo = project.architect[options.target].options; + + if (options.configuration && + project.architect[options.target].configurations && + project.architect[options.target].configurations[options.configuration]) { + applyTo = project.architect[options.target].configurations[options.configuration]; + } + + applyTo.serviceWorker = true; + + host.overwrite(workspacePath, JSON.stringify(workspace, null, 2)); return host; }; @@ -69,8 +88,13 @@ function updateAppModule(options: ServiceWorkerOptions): Rule { context.logger.debug('Updating appmodule'); // find app module - const appConfig = getAppConfig(getConfig(host), options.app || '0'); - const modulePath = getAppModulePath(host, appConfig); + const workspace = getWorkspace(host); + const project = workspace.projects[options.project]; + if (!project.architect) { + throw new Error('Project architect not found.'); + } + const mainPath = project.architect.build.options.main; + const modulePath = getAppModulePath(host, mainPath); context.logger.debug(`module path: ${modulePath}`); // add import diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index 742f3ee72b..f97ae8b669 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -8,6 +8,7 @@ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ServiceWorkerOptions } from './schema'; @@ -17,33 +18,49 @@ describe('Service Worker Schematic', () => { path.join(__dirname, '../collection.json'), ); const defaultOptions: ServiceWorkerOptions = { - app: '0', + project: 'bar', + target: 'build', + configuration: 'production', }; let appTree: UnitTestTree; + + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + const appOptions: ApplicationOptions = { - directory: '', - name: 'appshell-app', - sourceDir: 'src', + name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'None', - version: '1.2.3', - routing: true, + viewEncapsulation: 'Emulated', + routing: false, style: 'css', skipTests: false, - minimal: false, }; beforeEach(() => { - appTree = schematicRunner.runSchematic('application', appOptions); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); - it('should update the config file', () => { + it('should update the proudction configuration', () => { const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); - const configText = tree.readContent('/.angular-cli.json'); + const configText = tree.readContent('/angular.json'); + const config = JSON.parse(configText); + const swFlag = config.projects.bar.architect.build.configurations.production.serviceWorker; + expect(swFlag).toEqual(true); + }); + + it('should update the target options if no configuration is set', () => { + const options = {...defaultOptions, configuration: ''}; + const tree = schematicRunner.runSchematic('service-worker', options, appTree); + const configText = tree.readContent('/angular.json'); const config = JSON.parse(configText); - expect(config.apps[0].serviceWorker).toEqual(true); + const swFlag = config.projects.bar.architect.build.options.serviceWorker; + expect(swFlag).toEqual(true); }); it('should add the necessary dependency', () => { @@ -55,22 +72,20 @@ describe('Service Worker Schematic', () => { }); it('should import ServiceWorkerModule', () => { - //// import { ServiceWorkerModule } from '@angular/service-worker'; const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); - const pkgText = tree.readContent('/src/app/app.module.ts'); + const pkgText = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(pkgText).toMatch(/import \{ ServiceWorkerModule \} from '@angular\/service-worker'/); }); it('should import environment', () => { - //// import { ServiceWorkerModule } from '@angular/service-worker'; const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); - const pkgText = tree.readContent('/src/app/app.module.ts'); + const pkgText = tree.readContent('/projects/bar/src/app/app.module.ts'); expect(pkgText).toMatch(/import \{ environment \} from '\.\.\/environments\/environment'/); }); it('should add the SW import to the NgModule imports', () => { const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); - const pkgText = tree.readContent('/src/app/app.module.ts'); + const pkgText = tree.readContent('/projects/bar/src/app/app.module.ts'); // tslint:disable-next-line:max-line-length const regex = /ServiceWorkerModule\.register\('\/ngsw-worker.js\', { enabled: environment.production }\)/; expect(pkgText).toMatch(regex); diff --git a/packages/schematics/angular/service-worker/schema.d.ts b/packages/schematics/angular/service-worker/schema.d.ts index 92384e132b..624ffaadde 100644 --- a/packages/schematics/angular/service-worker/schema.d.ts +++ b/packages/schematics/angular/service-worker/schema.d.ts @@ -8,7 +8,15 @@ export interface Schema { /** - * Name or index of related client app. + * The name of the project. */ - app?: string; + project: string; + /** + * ": "The target to apply service worker to. + */ + target: string; + /** + * The configuration to apply service worker to. + */ + configuration: string; } diff --git a/packages/schematics/angular/service-worker/schema.json b/packages/schematics/angular/service-worker/schema.json index 1c17f8b85f..8f84154b17 100644 --- a/packages/schematics/angular/service-worker/schema.json +++ b/packages/schematics/angular/service-worker/schema.json @@ -4,11 +4,22 @@ "title": "Angular Service Worker Options Schema", "type": "object", "properties": { - "app": { + "project": { "type": "string", - "description": "Name or index of related client app.", - "default": "0" + "description": "The name of the project." + }, + "target": { + "type": "string", + "description": "The target to apply service worker to.", + "default": "build" + }, + "configuration": { + "type": "string", + "description": "The configuration to apply service worker to.", + "default": "production" } }, - "required": [] + "required": [ + "project" + ] } \ No newline at end of file diff --git a/packages/schematics/angular/universal/files/__sourceDir__/__tsconfigFileName__.json b/packages/schematics/angular/universal/files/__tsconfigFileName__.json similarity index 89% rename from packages/schematics/angular/universal/files/__sourceDir__/__tsconfigFileName__.json rename to packages/schematics/angular/universal/files/__tsconfigFileName__.json index afd34261c0..552fe89351 100644 --- a/packages/schematics/angular/universal/files/__sourceDir__/__tsconfigFileName__.json +++ b/packages/schematics/angular/universal/files/__tsconfigFileName__.json @@ -1,7 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "../<%= outDir %>", + "outDir": "<%= outDir %>-server", "baseUrl": "./", "module": "commonjs", "types": [] diff --git a/packages/schematics/angular/universal/files/__sourceDir__/__main@stripTsExtension__.ts b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts similarity index 60% rename from packages/schematics/angular/universal/files/__sourceDir__/__main@stripTsExtension__.ts rename to packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts index d6f593e235..5f82b3e53a 100644 --- a/packages/schematics/angular/universal/files/__sourceDir__/__main@stripTsExtension__.ts +++ b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts @@ -6,4 +6,4 @@ if (environment.production) { enableProdMode(); } -export { <%= rootModuleClassName %> } from './<%= appDir %>/<%= stripTsExtension(rootModuleFileName) %>'; +export { <%= rootModuleClassName %> } from './app/<%= stripTsExtension(rootModuleFileName) %>'; diff --git a/packages/schematics/angular/universal/files/__sourceDir__/__appDir__/__rootModuleFileName__ b/packages/schematics/angular/universal/files/src/app/__rootModuleFileName__ similarity index 100% rename from packages/schematics/angular/universal/files/__sourceDir__/__appDir__/__rootModuleFileName__ rename to packages/schematics/angular/universal/files/src/app/__rootModuleFileName__ diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 17ee3094f1..0b6847b588 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, strings } from '@angular-devkit/core'; +import { JsonObject, normalize, parseJson, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -14,52 +14,69 @@ import { apply, chain, mergeWith, + move, template, url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; +import { getWorkspacePath } from '../../../angular/pwa/utility/config'; +import { + Architect, + Project, + WorkspaceSchema, +} from '../../../angular_devkit/core/src/workspace/workspace-schema'; import { findNode, getDecoratorMetadata } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; -import { AppConfig, getAppFromConfig, getConfig } from '../utility/config'; +import { getWorkspace } from '../utility/config'; import { findBootstrapModuleCall, findBootstrapModulePath } from '../utility/ng-ast-utils'; import { Schema as UniversalOptions } from './schema'; +function getClientProject(host: Tree, options: UniversalOptions): Project { + const workspace = getWorkspace(host); + const clientProject = workspace.projects[options.clientProject]; + if (!clientProject) { + throw new SchematicsException(`Client app ${options.clientProject} not found.`); + } + + return clientProject; +} + +function getClientArchitect(host: Tree, options: UniversalOptions): Architect { + const clientArchitect = getClientProject(host, options).architect; + + if (!clientArchitect) { + throw new Error('Client project architect not found.'); + } + + return clientArchitect; +} + function updateConfigFile(options: UniversalOptions): Rule { return (host: Tree) => { - const config = getConfig(host); - const clientApp = getAppFromConfig(config, options.clientApp || '0'); - if (clientApp === null) { - throw new SchematicsException('Client app not found.'); - } - options.test = options.test || clientApp.test; - - const tsCfg = options.tsconfigFileName && options.tsconfigFileName.endsWith('.json') - ? options.tsconfigFileName : `${options.tsconfigFileName}.json`; - const testTsCfg = options.testTsconfigFileName && options.testTsconfigFileName.endsWith('.json') - ? options.testTsconfigFileName : `${options.testTsconfigFileName}.json`; - - const serverApp: AppConfig = { - ...clientApp, - platform: 'server', - root: options.root, - outDir: options.outDir, - index: options.index, - main: options.main, - test: options.test, - tsconfig: tsCfg, - testTsconfig: testTsCfg, - polyfills: undefined, + const builderOptions: JsonObject = { + outputPath: `dist/${options.clientProject}-server`, + main: `projects/${options.clientProject}/src/main.server.ts`, + tsConfig: `projects/${options.clientProject}/tsconfig.server.json`, + }; + const serverTarget: JsonObject = { + builder: '@angular-devkit/build-webpack:server', + options: builderOptions, }; - if (options.name) { - serverApp.name = options.name; + const workspace = getWorkspace(host); + + if (!workspace.projects[options.clientProject]) { + throw new SchematicsException(`Client app ${options.clientProject} not found.`); } - if (!config.apps) { - config.apps = []; + const clientProject = workspace.projects[options.clientProject]; + if (!clientProject.architect) { + throw new Error('Client project architect not found.'); } - config.apps.push(serverApp); + clientProject.architect.server = serverTarget; + + const workspacePath = getWorkspacePath(host); - host.overwrite('/.angular-cli.json', JSON.stringify(config, null, 2)); + host.overwrite(workspacePath, JSON.stringify(workspace, null, 2)); return host; }; @@ -86,12 +103,8 @@ function findBrowserModuleImport(host: Tree, modulePath: string): ts.Node { function wrapBootstrapCall(options: UniversalOptions): Rule { return (host: Tree) => { - const config = getConfig(host); - const clientApp = getAppFromConfig(config, options.clientApp || '0'); - if (clientApp === null) { - throw new SchematicsException('Client app not found.'); - } - const mainPath = normalize(`/${clientApp.root}/${clientApp.main}`); + const clientArchitect = getClientArchitect(host, options); + const mainPath = normalize('/' + clientArchitect.build.options.main); let bootstrapCall: ts.Node | null = findBootstrapModuleCall(host, mainPath); if (bootstrapCall === null) { throw new SchematicsException('Bootstrap module not found.'); @@ -118,15 +131,13 @@ function wrapBootstrapCall(options: UniversalOptions): Rule { function addServerTransition(options: UniversalOptions): Rule { return (host: Tree) => { - const config = getConfig(host); - const clientApp = getAppFromConfig(config, options.clientApp || '0'); - if (clientApp === null) { - throw new SchematicsException('Client app not found.'); - } - const mainPath = normalize(`/${clientApp.root}/${clientApp.main}`); + const clientProject = getClientProject(host, options); + const clientArchitect = getClientArchitect(host, options); + const mainPath = normalize('/' + clientArchitect.build.options.main); const bootstrapModuleRelativePath = findBootstrapModulePath(host, mainPath); - const bootstrapModulePath = normalize(`/${clientApp.root}/${bootstrapModuleRelativePath}.ts`); + const bootstrapModulePath = normalize( + `/${clientProject.root}/src/${bootstrapModuleRelativePath}.ts`); const browserModuleImport = findBrowserModuleImport(host, bootstrapModulePath); const appId = options.appId; @@ -160,30 +171,37 @@ function addDependencies(): Rule { }; } -function updateGitignore(options: UniversalOptions): Rule { - return (host: Tree) => { - const ignorePath = normalize('/.gitignore'); - const buffer = host.read(ignorePath); - if (buffer === null) { - // Assumption is made that there is no git repository. - return host; - } else { - const content = buffer.toString(); - host.overwrite(ignorePath, `${content}\n${options.outDir}`); - } +function getTsConfigOutDir(host: Tree, architect: Architect): string { + const tsConfigPath = architect.build.options.tsConfig; + const tsConfigBuffer = host.read(tsConfigPath); + if (!tsConfigBuffer) { + throw new SchematicsException(`Could not read ${tsConfigPath}`); + } + const tsConfigContent = tsConfigBuffer.toString(); + const tsConfig = parseJson(tsConfigContent); + if (tsConfig === null || typeof tsConfig !== 'object' || Array.isArray(tsConfig) || + tsConfig.compilerOptions === null || typeof tsConfig.compilerOptions !== 'object' || + Array.isArray(tsConfig.compilerOptions)) { + throw new SchematicsException(`Invalid tsconfig - ${tsConfigPath}`); + } + const outDir = tsConfig.compilerOptions.outDir; - return host; - }; + return outDir as string; } export default function (options: UniversalOptions): Rule { return (host: Tree, context: SchematicContext) => { + const clientProject = getClientProject(host, options); + const clientArchitect = getClientArchitect(host, options); + const outDir = getTsConfigOutDir(host, clientArchitect); const templateSource = apply(url('./files'), [ template({ ...strings, ...options as object, stripTsExtension: (s: string) => { return s.replace(/\.ts$/, ''); }, + outDir, }), + move(clientProject.root), ]); return chain([ @@ -192,7 +210,6 @@ export default function (options: UniversalOptions): Rule { updateConfigFile(options), wrapBootstrapCall(options), addServerTransition(options), - updateGitignore(options), ])(host, context); }; } diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index c0a1c5b808..47f5f74483 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -5,62 +5,64 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree } from '@angular-devkit/schematics'; -import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; -import { Schema as NgNewOptions } from '../ng-new/schema'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as UniversalOptions } from './schema'; -// TODO: fix these tests once workspace is implemented -xdescribe('Universal Schematic', () => { +describe('Universal Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', path.join(__dirname, '../collection.json'), ); const defaultOptions: UniversalOptions = { - name: 'foo', + clientProject: 'bar', }; - let appTree: Tree; + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + viewEncapsulation: 'Emulated', + routing: false, + style: 'css', + skipTests: false, + }; + + let appTree: UnitTestTree; beforeEach(() => { - const ngNewOptions: NgNewOptions = { - directory: '', - name: 'universal-app', - inlineStyle: false, - inlineTemplate: false, - viewEncapsulation: 'None', - version: '1.2.3', - routing: false, - style: 'css', - skipTests: false, - }; - appTree = schematicRunner.runSchematic('ng-new', ngNewOptions); + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); it('should create a root module file', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/src/app/app.server.module.ts'; - const file = tree.files.filter(f => f === filePath)[0]; - expect(file).toBeDefined(); + const filePath = '/projects/bar/src/app/app.server.module.ts'; + expect(tree.exists(filePath)).toEqual(true); }); it('should create a main file', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/src/main.server.ts'; - const file = tree.files.filter(f => f === filePath)[0]; - expect(file).toBeDefined(); + const filePath = '/projects/bar/src/main.server.ts'; + expect(tree.exists(filePath)).toEqual(true); const contents = tree.readContent(filePath); expect(contents).toMatch(/export { AppServerModule } from '\.\/app\/app\.server\.module'/); }); it('should create a tsconfig file', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/src/tsconfig.server.json'; - const file = tree.files.filter(f => f === filePath)[0]; - expect(file).toBeDefined(); + const filePath = '/projects/bar/tsconfig.server.json'; + expect(tree.exists(filePath)).toEqual(true); const contents = tree.readContent(filePath); - expect(contents).toMatch(/\"outDir\": \"\.\.\/dist-server\"/); + expect(contents).toMatch('../../out-tsc/app-server'); }); it('should add dependency: @angular/platform-server', () => { @@ -70,49 +72,31 @@ xdescribe('Universal Schematic', () => { expect(contents).toMatch(/\"@angular\/platform-server\": \"/); }); - it('should update .angular-cli.json with a server app', () => { + it('should update workspace with a server target', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/.angular-cli.json'; + const filePath = '/angular.json'; const contents = tree.readContent(filePath); - const config = JSON.parse(contents.toString()); - expect(config.apps.length).toEqual(2); - const app = config.apps[1]; - expect(app.platform).toEqual('server'); - expect(app.root).toEqual('src'); - expect(app.outDir).toEqual('dist-server'); - expect(app.index).toEqual('index.html'); - expect(app.main).toEqual('main.server.ts'); - // // TODO: re-add this check when updating this schematic to use workspace. - // expect(app.test).toEqual('test.ts'); - expect(app.tsconfig).toEqual('tsconfig.server.json'); - expect(app.testTsconfig).toEqual('tsconfig.spec.json'); - // TODO: re-add this check when updating this schematic to use workspace. - // expect(app.environmentSource).toEqual('environments/environment.ts'); - expect(app.polyfills).not.toBeDefined(); + const arch = config.projects.bar.architect; + expect(arch.server).toBeDefined(); + expect(arch.server.builder).toBeDefined(); + const opts = arch.server.options; + expect(opts.outputPath).toEqual('dist/bar-server'); + expect(opts.main).toEqual('projects/bar/src/main.server.ts'); + expect(opts.tsConfig).toEqual('projects/bar/tsconfig.server.json'); }); it('should add a server transition to BrowerModule import', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/src/app/app.module.ts'; + const filePath = '/projects/bar/src/app/app.module.ts'; const contents = tree.readContent(filePath); expect(contents).toMatch(/BrowserModule\.withServerTransition\({ appId: 'serverApp' }\)/); }); it('should wrap the bootstrap call in a DOMContentLoaded event handler', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/src/main.ts'; + const filePath = '/projects/bar/src/main.ts'; const contents = tree.readContent(filePath); expect(contents).toMatch(/document.addEventListener\('DOMContentLoaded', \(\) => {/); }); - - it('should update .gitignore with the server outDir', () => { - const outDir = 'my-out-dir'; - const options = {...defaultOptions, outDir: outDir}; - const tree = schematicRunner.runSchematic('universal', options, appTree); - const filePath = '/.gitignore'; - const contents = tree.readContent(filePath); - - expect(contents).toMatch(outDir); - }); }); diff --git a/packages/schematics/angular/universal/schema.d.ts b/packages/schematics/angular/universal/schema.d.ts index 33b023c73f..119fae33ea 100644 --- a/packages/schematics/angular/universal/schema.d.ts +++ b/packages/schematics/angular/universal/schema.d.ts @@ -7,30 +7,14 @@ */ export interface Schema { - /** - * Name of the universal app - */ - name?: string; /** * Name or index of related client app. */ - clientApp?: string; + clientProject: string; /** * The appId to use withServerTransition. */ appId?: string; - /** - * The output directory for build results. - */ - outDir?: string; - /** - * The root directory of the app. - */ - root?: string; - /** - * Name of the index file - */ - index?: string; /** * The name of the main entry-point file. */ @@ -59,5 +43,4 @@ export interface Schema { * The name of the root module class. */ rootModuleClassName?: string; - sourceDir?: string; } diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index e579eaefa9..e289ff3670 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -4,14 +4,9 @@ "title": "Angular Universal App Options Schema", "type": "object", "properties": { - "name": { + "clientProject": { "type": "string", - "description": "Name of the universal app." - }, - "clientApp": { - "type": "string", - "description": "Name or index of related client app.", - "default": "0" + "description": "Name of related client app." }, "appId": { "type": "string", @@ -19,24 +14,6 @@ "description": "The appId to use withServerTransition.", "default": "serverApp" }, - "outDir": { - "type": "string", - "format": "path", - "description": "The output directory for build results.", - "default": "dist-server" - }, - "root": { - "type": "string", - "format": "path", - "description": "The root directory of the app.", - "default": "src" - }, - "index": { - "type": "string", - "format": "path", - "description": "Name of the index file", - "default": "index.html" - }, "main": { "type": "string", "format": "path", @@ -75,15 +52,9 @@ "type": "string", "description": "The name of the root module class.", "default": "AppServerModule" - }, - "sourceDir": { - "type": "string", - "format": "path", - "description": "The path of the source directory.", - "default": "src", - "alias": "D" } }, "required": [ + "clientProject" ] } diff --git a/packages/schematics/angular/utility/ng-ast-utils.ts b/packages/schematics/angular/utility/ng-ast-utils.ts index 67cb3e619f..615b6e89da 100644 --- a/packages/schematics/angular/utility/ng-ast-utils.ts +++ b/packages/schematics/angular/utility/ng-ast-utils.ts @@ -7,9 +7,9 @@ */ import { normalize } from '@angular-devkit/core'; import { SchematicsException, Tree } from '@angular-devkit/schematics'; +import { dirname } from 'path'; import * as ts from 'typescript'; import { findNode, getSourceNodes } from '../utility/ast-utils'; -import { AppConfig } from '../utility/config'; export function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null { const mainBuffer = host.read(mainPath); @@ -75,10 +75,10 @@ export function findBootstrapModulePath(host: Tree, mainPath: string): string { return bootstrapModuleRelativePath; } -export function getAppModulePath(host: Tree, app: AppConfig) { - const mainPath = normalize(`/${app.root}/${app.main}`); +export function getAppModulePath(host: Tree, mainPath: string): string { const moduleRelativePath = findBootstrapModulePath(host, mainPath); - const modulePath = normalize(`/${app.root}/${moduleRelativePath}.ts`); + const mainDir = dirname(mainPath); + const modulePath = normalize(`/${mainDir}/${moduleRelativePath}.ts`); return modulePath; } From e04185843eb2ba9148083fb710b17fb6793104c6 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 28 Mar 2018 14:30:47 -0700 Subject: [PATCH 313/724] ci: add snapshots for missing repos --- .monorepo.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index edff52e6fb..61d0496a3f 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -95,7 +95,8 @@ } ], "version": "0.0.2", - "hash": "5b9d0ea3a961a7c58ba5312f689cf137" + "hash": "5b9d0ea3a961a7c58ba5312f689cf137", + "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-webpack": { "name": "Build Webpack", @@ -157,7 +158,8 @@ "name": "Schematics Schematics", "version": "0.4.6", "section": "Schematics", - "hash": "85f50de4da92597ef8adb1d484107825" + "hash": "85f50de4da92597ef8adb1d484107825", + "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", @@ -171,7 +173,7 @@ "version": "0.4.7", "section": "Schematics", "hash": "adef93c50dbfc2a2bffa797b12c29141", - "snapshotRepo": "" + "snapshotRepo": "angular/schematics-update-builds" } } } From 3ca795628645d04ad079465e97f2b41f19591f10 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 22:43:55 +0100 Subject: [PATCH 314/724] test: fix missing property on application opts --- packages/schematics/angular/app-shell/index_spec.ts | 1 + packages/schematics/angular/service-worker/index_spec.ts | 1 + packages/schematics/angular/universal/index_spec.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index ff705f8a84..db7754a837 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -37,6 +37,7 @@ describe('App Shell Schematic', () => { routing: true, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index f97ae8b669..94a36a3c3e 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -39,6 +39,7 @@ describe('Service Worker Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; beforeEach(() => { diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 47f5f74483..6aa12e5152 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -34,6 +34,7 @@ describe('Universal Schematic', () => { routing: false, style: 'css', skipTests: false, + skipPackageJson: false, }; let appTree: UnitTestTree; From 9a8fa66a3229966ae1e2ab241ace8efed1a1e97b Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 14 Mar 2018 11:34:03 -0400 Subject: [PATCH 315/724] feat(@schematics/angular): Add schematic for ng udpate migrations --- .../migrations/migration-collection.json | 9 + .../angular/migrations/update-6/index.ts | 430 ++++++++++++ .../angular/migrations/update-6/index_spec.ts | 652 ++++++++++++++++++ 3 files changed, 1091 insertions(+) create mode 100644 packages/schematics/angular/migrations/migration-collection.json create mode 100644 packages/schematics/angular/migrations/update-6/index.ts create mode 100644 packages/schematics/angular/migrations/update-6/index_spec.ts diff --git a/packages/schematics/angular/migrations/migration-collection.json b/packages/schematics/angular/migrations/migration-collection.json new file mode 100644 index 0000000000..3bf8a51436 --- /dev/null +++ b/packages/schematics/angular/migrations/migration-collection.json @@ -0,0 +1,9 @@ +{ + "schematics": { + "migration-01": { + "version": "6", + "factory": "./update-6", + "description": "Update an Angular CLI project to version 6." + } + } +} \ No newline at end of file diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts new file mode 100644 index 0000000000..56fc4ac77a --- /dev/null +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -0,0 +1,430 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject, Path, join, normalize } from '@angular-devkit/core'; +import { + Rule, + SchematicContext, + SchematicsException, + Tree, + chain, +} from '@angular-devkit/schematics'; +import { AppConfig, CliConfig } from '../../utility/config'; +import { latestVersions } from '../../utility/latest-versions'; + +const defaults = { + appRoot: 'src', + index: 'index.html', + main: 'main.ts', + polyfills: 'polyfills.ts', + tsConfig: 'tsconfig.app.json', + test: 'test.ts', + outDir: 'dist/', + karma: 'karma.conf.js', + protractor: 'protractor.conf.js', + testTsConfig: 'tsconfig.spec.json', +}; + +function getConfigPath(tree: Tree): Path { + let possiblePath = normalize('.angular-cli.json'); + if (tree.exists(possiblePath)) { + return possiblePath; + } + possiblePath = normalize('angular-cli.json'); + if (tree.exists(possiblePath)) { + return possiblePath; + } + + throw new SchematicsException('Could not find configuration file'); +} + +function migrateKarmaConfiguration(config: CliConfig): Rule { + return (host: Tree, context: SchematicContext) => { + context.logger.info(`Updating karma configuration`); + try { + const karmaPath = config && config.test && config.test.karma && config.test.karma.config + ? config.test.karma.config + : defaults.karma; + const buffer = host.read(karmaPath); + if (buffer !== null) { + let content = buffer.toString(); + content = content.replace( /@angular\/cli/g, '@angular-devkit/build-webpack'); + content = content.replace('reports', + `dir: require('path').join(__dirname, 'coverage'), reports`); + host.overwrite(karmaPath, content); + } + } catch (e) { } + + return host; + }; +} + +function migrateConfiguration(oldConfig: CliConfig): Rule { + return (host: Tree, context: SchematicContext) => { + const oldConfigPath = getConfigPath(host); + const configPath = normalize('angular.json'); + context.logger.info(`Updating configuration`); + const config: JsonObject = { + version: 1, + newProjectRoot: 'projects', + projects: extractProjectsConfig(oldConfig), + }; + const cliConfig = extractCliConfig(oldConfig); + if (cliConfig !== null) { + config.cli = cliConfig; + } + const schematicsConfig = extractSchematicsConfig(oldConfig); + if (schematicsConfig !== null) { + config.schematics = schematicsConfig; + } + const architectConfig = extractArchitectConfig(oldConfig); + if (architectConfig !== null) { + config.architect = architectConfig; + } + + context.logger.info(`Removing old config file (${oldConfigPath})`); + host.delete(oldConfigPath); + context.logger.info(`Writing config file (${configPath})`); + host.create(configPath, JSON.stringify(config, null, 2)); + + return host; + }; +} + +function extractCliConfig(_config: CliConfig): JsonObject | null { + return null; +} + +function extractSchematicsConfig(config: CliConfig): JsonObject | null { + let collectionName = '@schematics/angular'; + if (!config || !config.defaults) { + return null; + } + // const configDefaults = config.defaults; + if (config.defaults && config.defaults.schematics && config.defaults.schematics.collection) { + collectionName = config.defaults.schematics.collection; + } + + /** + * For each schematic + * - get the config + * - filter one's without config + * - combine them into an object + */ + // tslint:disable-next-line:no-any + const schematicConfigs: any = ['class', 'component', 'directive', 'guard', + 'interface', 'module', 'pipe', 'service'] + .map(schematicName => { + // tslint:disable-next-line:no-any + const schematicDefaults: JsonObject = (config.defaults as any)[schematicName] || null; + + return { + schematicName, + config: schematicDefaults, + }; + }) + .filter(schematic => schematic.config !== null) + .reduce((all: JsonObject, schematic) => { + all[collectionName + ':' + schematic.schematicName] = schematic.config; + + return all; + }, {}); + + const componentUpdate: JsonObject = {}; + componentUpdate.prefix = ''; + + const componentKey = collectionName + ':component'; + const directiveKey = collectionName + ':directive'; + if (!schematicConfigs[componentKey]) { + schematicConfigs[componentKey] = {}; + } + if (!schematicConfigs[directiveKey]) { + schematicConfigs[directiveKey] = {}; + } + if (config.apps && config.apps[0]) { + schematicConfigs[componentKey].prefix = config.apps[0].prefix; + schematicConfigs[directiveKey].prefix = config.apps[0].prefix; + } + if (config.defaults) { + schematicConfigs[componentKey].styleext = config.defaults.styleExt; + } + + return schematicConfigs; +} + +function extractArchitectConfig(_config: CliConfig): JsonObject | null { + return null; +} + +function extractProjectsConfig(config: CliConfig): JsonObject { + const builderPackage = '@angular-devkit/build-webpack'; + let defaultAppNamePrefix = 'app'; + if (config.project && config.project.name) { + defaultAppNamePrefix = config.project.name; + } + + const apps = config.apps || []; + // convert the apps to projects + const projectMap = apps + .map((app: AppConfig, idx: number) => { + const defaultAppName = idx === 0 ? defaultAppNamePrefix : `${defaultAppNamePrefix}${idx}`; + const name = app.name || defaultAppName; + const outDir = app.outDir || defaults.outDir; + const appRoot = app.root || defaults.appRoot; + + const project: JsonObject = { + root: '', + projectType: 'application', + cli: {}, + schematics: {}, + }; + + const extraEntryMapper = (extraEntry: string | JsonObject) => { + let entry: JsonObject; + if (typeof extraEntry === 'string') { + entry = { input: extraEntry }; + } else { + entry = extraEntry; + } + entry.input = join(app.root as Path, entry.input || ''); + + return entry; + }; + + const architect: JsonObject = {}; + project.architect = architect; + + // Browser target + const buildOptions: JsonObject = { + // Make outputPath relative to root. + outputPath: outDir, + index: appRoot + '/' + app.index || defaults.index, + main: appRoot + '/' + app.main || defaults.main, + polyfills: appRoot + '/' + app.polyfills || defaults.polyfills, + tsConfig: appRoot + '/' + app.tsconfig || defaults.tsConfig, + }; + + buildOptions.assets = (app.assets || []).map((asset: string | JsonObject) => + typeof asset === 'string' + ? { glob: appRoot + '/' + asset } + : appRoot + '/' + asset); + buildOptions.styles = (app.styles || []).map(extraEntryMapper); + buildOptions.scripts = (app.scripts || []).map(extraEntryMapper); + architect.build = { + builder: `${builderPackage}:browser`, + options: buildOptions, + configurations: { + production: { + optimization: true, + outputHashing: 'all', + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + }, + }, + }; + + // Serve target + const serveOptions: JsonObject = { + browserTarget: `${name}:build`, + }; + architect.serve = { + builder: `${builderPackage}:dev-server`, + options: serveOptions, + configurations: { + production: { + browserTarget: `${name}:build`, + }, + }, + }; + + // Extract target + const extractI18nOptions: JsonObject = { browserTarget: `${name}:build` }; + architect['extract-i18n'] = { + builder: `${builderPackage}:extract-i18n`, + options: extractI18nOptions, + }; + + const karmaConfig = config.test && config.test.karma + ? config.test.karma.config || '' + : ''; + // Test target + const testOptions: JsonObject = { + main: appRoot + '/' + app.test || defaults.test, + polyfills: appRoot + '/' + app.polyfills || defaults.polyfills, + // Make karmaConfig relative to root. + karmaConfig, + }; + if (app.testTsconfig) { + testOptions.tsConfig = appRoot + '/' + app.testTsconfig; + } + testOptions.scripts = (app.scripts || []).map(extraEntryMapper); + testOptions.styles = (app.styles || []).map(extraEntryMapper); + testOptions.assets = (app.assets || []).map((asset: string | JsonObject) => + typeof asset === 'string' + ? { glob: appRoot + '/' + asset } + : appRoot + '/' + asset); + + if (karmaConfig) { + architect.test = { + builder: `${builderPackage}:karma`, + options: testOptions, + }; + } + + const tsConfigs: string[] = []; + const excludes: string[] = []; + if (config && config.lint && Array.isArray(config.lint)) { + config.lint.forEach(lint => { + tsConfigs.push(lint.project); + if (lint.exclude) { + if (typeof lint.exclude === 'string') { + excludes.push(lint.exclude); + } else { + lint.exclude.forEach(ex => excludes.push(ex)); + } + } + }); + } + + const removeDupes = (items: string[]) => items.reduce((newItems, item) => { + if (newItems.indexOf(item) === -1) { + newItems.push(item); + } + + return newItems; + }, []); + + // Tslint target + const lintOptions: JsonObject = { + tsConfig: removeDupes(tsConfigs).filter(t => t.indexOf('e2e') === -1), + exclude: removeDupes(excludes), + }; + architect.lint = { + builder: `${builderPackage}:tslint`, + options: lintOptions, + }; + + const e2eProject: JsonObject = { + root: project.root, + projectType: 'application', + cli: {}, + schematics: {}, + }; + + const e2eArchitect: JsonObject = {}; + + // tslint:disable-next-line:max-line-length + const protractorConfig = config && config.e2e && config.e2e.protractor && config.e2e.protractor.config + ? config.e2e.protractor.config + : ''; + const e2eOptions: JsonObject = { + protractorConfig: protractorConfig, + devServerTarget: `${name}:serve`, + }; + const e2eTarget: JsonObject = { + builder: `${builderPackage}:protractor`, + options: e2eOptions, + }; + + e2eArchitect.e2e = e2eTarget; + const e2eLintOptions: JsonObject = { + tsConfig: removeDupes(tsConfigs).filter(t => t.indexOf('e2e') !== -1), + exclude: removeDupes(excludes), + }; + const e2eLintTarget: JsonObject = { + builder: `${builderPackage}:tslint`, + options: e2eLintOptions, + }; + e2eArchitect.lint = e2eLintTarget; + if (protractorConfig) { + e2eProject.architect = e2eArchitect; + } + + return { name, project, e2eProject }; + }) + .reduce((projects, mappedApp) => { + const {name, project, e2eProject} = mappedApp; + projects[name] = project; + projects[name + '-e2e'] = e2eProject; + + return projects; + }, {} as JsonObject); + + return projectMap; +} + +function updateSpecTsConfig(config: CliConfig): Rule { + return (host: Tree, context: SchematicContext) => { + const apps = config.apps || []; + apps.forEach((app: AppConfig, idx: number) => { + const tsSpecConfigPath = + join(app.root as Path, app.testTsconfig || defaults.testTsConfig); + const buffer = host.read(tsSpecConfigPath); + if (!buffer) { + return; + } + const tsCfg = JSON.parse(buffer.toString()); + if (!tsCfg.files) { + tsCfg.files = []; + } + + // Ensure the spec tsconfig contains the polyfills file + if (tsCfg.files.indexOf(app.polyfills || defaults.polyfills) === -1) { + tsCfg.files.push(app.polyfills || defaults.polyfills); + host.overwrite(tsSpecConfigPath, JSON.stringify(tsCfg, null, 2)); + } + }); + }; +} + +function updatePackageJson() { + return (host: Tree, context: SchematicContext) => { + const pkgPath = '/package.json'; + const buffer = host.read(pkgPath); + if (buffer == null) { + throw new SchematicsException('Could not read package.json'); + } + const content = buffer.toString(); + const pkg = JSON.parse(content); + + if (pkg === null || typeof pkg !== 'object' || Array.isArray(pkg)) { + throw new SchematicsException('Error reading package.json'); + } + if (!pkg.devDependencies) { + pkg.devDependencies = {}; + } + + pkg.devDependencies['@angular-devkit/build-webpack'] = latestVersions.DevkitBuildWebpack; + + host.overwrite(pkgPath, JSON.stringify(pkg, null, 2)); + + return host; + }; +} + +export default function (): Rule { + return (host: Tree, context: SchematicContext) => { + const configPath = getConfigPath(host); + const configBuffer = host.read(normalize(configPath)); + if (configBuffer == null) { + throw new SchematicsException(`Could not find configuration file (${configPath})`); + } + const config = JSON.parse(configBuffer.toString()); + + return chain([ + migrateKarmaConfiguration(config), + migrateConfiguration(config), + updateSpecTsConfig(config), + updatePackageJson(), + ])(host, context); + }; +} diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts new file mode 100644 index 0000000000..ae0156d079 --- /dev/null +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -0,0 +1,652 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject } from '@angular-devkit/core'; +import { EmptyTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; + + +// tslint:disable:max-line-length +describe('Migration to v6', () => { + const schematicRunner = new SchematicTestRunner( + 'migrations', + path.join(__dirname, '../migration-collection.json'), + ); + + // tslint:disable-next-line:no-any + let baseConfig: any; + const defaultOptions = {}; + let tree: UnitTestTree; + const oldConfigPath = `/.angular-cli.json`; + const configPath = `/angular.json`; + + beforeEach(() => { + baseConfig = { + schema: './node_modules/@angular/cli/lib/config/schema.json', + project: { + name: 'foo', + }, + apps: [ + { + root: 'src', + outDir: 'dist', + assets: [ + 'assets', + 'favicon.ico', + ], + index: 'index.html', + main: 'main.ts', + polyfills: 'polyfills.ts', + test: 'test.ts', + tsconfig: 'tsconfig.app.json', + testTsconfig: 'tsconfig.spec.json', + prefix: 'app', + styles: [ + 'styles.css', + ], + scripts: [], + environmentSource: 'environments/environment.ts', + environments: { + dev: 'environments/environment.ts', + prod: 'environments/environment.prod.ts', + }, + }, + ], + e2e: { + protractor: { + config: './protractor.conf.js', + }, + }, + lint: [ + { + project: 'src/tsconfig.app.json', + exclude: '**/node_modules/**', + }, + { + project: 'src/tsconfig.spec.json', + exclude: '**/node_modules/**', + }, + { + project: 'e2e/tsconfig.e2e.json', + exclude: '**/node_modules/**', + }, + ], + test: { + karma: { + config: './karma.conf.js', + }, + }, + defaults: { + styleExt: 'css', + }, + }; + tree = new UnitTestTree(new EmptyTree()); + const packageJson = { + devDependencies: {}, + }; + tree.create('/package.json', JSON.stringify(packageJson, null, 2)); + }); + + describe('file creation/deletion', () => { + it('should delete the old config file', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + expect(tree.exists(oldConfigPath)).toEqual(false); + }); + + it('should create the new config file', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + expect(tree.exists(configPath)).toEqual(true); + }); + + }); + + describe('config file contents', () => { + // tslint:disable-next-line:no-any + function getConfig(tree: UnitTestTree): any { + return JSON.parse(tree.readContent(configPath)); + } + + it('should set root values', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(config.version).toEqual(1); + expect(config.newProjectRoot).toEqual('projects'); + }); + + describe('schematics', () => { + it('should define schematics collection root', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(config.schematics['@schematics/angular:component']).toBeDefined(); + }); + + function getSchematicConfig(host: UnitTestTree, name: string): JsonObject { + return getConfig(host).schematics['@schematics/angular:' + name]; + } + + describe('component config', () => { + it('should move prefix', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.prefix).toEqual('app'); + }); + + it('should move styleExt to component', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.styleext).toEqual('css'); + }); + + it('should move inlineStyle', () => { + baseConfig.defaults.component = { inlineStyle: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.inlineStyle).toEqual(true); + }); + + it('should not move inlineStyle if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.inlineStyle).toBeUndefined(); + }); + + it('should move inlineTemplate', () => { + baseConfig.defaults.component = { inlineTemplate: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.inlineTemplate).toEqual(true); + }); + + it('should not move inlineTemplate if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.inlineTemplate).toBeUndefined(); + }); + + it('should move flat', () => { + baseConfig.defaults.component = { flat: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.flat).toEqual(true); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.flat).toBeUndefined(); + }); + + it('should move spec', () => { + baseConfig.defaults.component = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.spec).toBeUndefined(); + }); + + it('should move viewEncapsulation', () => { + baseConfig.defaults.component = { viewEncapsulation: 'Native' }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.viewEncapsulation).toEqual('Native'); + }); + + it('should not move viewEncapsulation if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.viewEncapsulation).toBeUndefined(); + }); + + it('should move changeDetection', () => { + baseConfig.defaults.component = { changeDetection: 'OnPush' }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.changeDetection).toEqual('OnPush'); + }); + + it('should not move changeDetection if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'component'); + expect(config.changeDetection).toBeUndefined(); + }); + }); + + describe('directive config', () => { + it('should move prefix', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'directive'); + expect(config.prefix).toEqual('app'); + }); + + it('should move flat', () => { + baseConfig.defaults.directive = { flat: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'directive'); + expect(config.flat).toEqual(true); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'directive'); + expect(config.flat).toBeUndefined(); + }); + + it('should move spec', () => { + baseConfig.defaults.directive = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'directive'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'directive'); + expect(config.spec).toBeUndefined(); + }); + }); + + describe('class config', () => { + it('should move spec', () => { + baseConfig.defaults.class = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'class'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'class'); + expect(config).toBeUndefined(); + }); + }); + + describe('guard config', () => { + it('should move flat', () => { + baseConfig.defaults.guard = { flat: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'guard'); + expect(config.flat).toEqual(true); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'guard'); + expect(config).toBeUndefined(); + }); + + it('should move spec', () => { + baseConfig.defaults.guard = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'guard'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'guard'); + expect(config).toBeUndefined(); + }); + }); + + describe('interface config', () => { + it('should move flat', () => { + baseConfig.defaults.interface = { prefix: 'I' }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'interface'); + expect(config.prefix).toEqual('I'); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'interface'); + expect(config).toBeUndefined(); + }); + }); + + describe('module config', () => { + it('should move flat', () => { + baseConfig.defaults.module = { flat: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'module'); + expect(config.flat).toEqual(true); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'module'); + expect(config).toBeUndefined(); + }); + + it('should move spec', () => { + baseConfig.defaults.module = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'module'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'module'); + expect(config).toBeUndefined(); + }); + }); + + describe('pipe config', () => { + it('should move flat', () => { + baseConfig.defaults.pipe = { flat: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'pipe'); + expect(config.flat).toEqual(true); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'pipe'); + expect(config).toBeUndefined(); + }); + + it('should move spec', () => { + baseConfig.defaults.pipe = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'pipe'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'pipe'); + expect(config).toBeUndefined(); + }); + }); + + describe('service config', () => { + it('should move flat', () => { + baseConfig.defaults.service = { flat: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'service'); + expect(config.flat).toEqual(true); + }); + + it('should not move flat if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'service'); + expect(config).toBeUndefined(); + }); + + it('should move spec', () => { + baseConfig.defaults.service = { spec: true }; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'service'); + expect(config.spec).toEqual(true); + }); + + it('should not move spec if not defined', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getSchematicConfig(tree, 'service'); + expect(config).toBeUndefined(); + }); + }); + }); + + describe('architect', () => { + it('should exist', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(config.architect).not.toBeDefined(); + }); + }); + + describe('app projects', () => { + it('should create two projects per app', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(Object.keys(config.projects).length).toEqual(2); + }); + + it('should create two projects per app', () => { + baseConfig.apps.push(baseConfig.apps[0]); + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(Object.keys(config.projects).length).toEqual(4); + }); + + it('should use the app name if defined', () => { + baseConfig.apps[0].name = 'foo'; + baseConfig.apps.push(baseConfig.apps[0]); + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(config.projects.foo).toBeDefined(); + expect(config.projects['foo-e2e']).toBeDefined(); + }); + + it('should set the project root values', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const project = getConfig(tree).projects.foo; + expect(project.root).toEqual(''); + expect(project.projectType).toEqual('application'); + }); + + it('should set build target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const build = getConfig(tree).projects.foo.architect.build; + expect(build.builder).toEqual('@angular-devkit/build-webpack:browser'); + expect(build.options.scripts).toEqual([]); + expect(build.options.styles).toEqual([{ input: 'src/styles.css' }]); + expect(build.options.assets).toEqual([{ glob: 'src/assets' }, { glob: 'src/favicon.ico' }]); + const prodConfig = build.configurations.production; + expect(prodConfig.outputHashing).toEqual('all'); + expect(prodConfig.sourceMap).toEqual(false); + expect(prodConfig.extractCss).toEqual(true); + expect(prodConfig.namedChunks).toEqual(false); + expect(prodConfig.aot).toEqual(true); + expect(prodConfig.extractLicenses).toEqual(true); + expect(prodConfig.vendorChunk).toEqual(false); + expect(prodConfig.buildOptimizer).toEqual(true); + }); + + it('should set the serve target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const serve = getConfig(tree).projects.foo.architect.serve; + expect(serve.builder).toEqual('@angular-devkit/build-webpack:dev-server'); + expect(serve.options).toEqual({ browserTarget: 'foo:build' }); + const prodConfig = serve.configurations.production; + expect(prodConfig.browserTarget).toEqual('foo:build'); + }); + + it('should set the test target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const test = getConfig(tree).projects.foo.architect['test']; + expect(test.builder).toEqual('@angular-devkit/build-webpack:karma'); + expect(test.options.main).toEqual('src/test.ts'); + expect(test.options.polyfills).toEqual('src/polyfills.ts'); + expect(test.options.tsConfig).toEqual('src/tsconfig.spec.json'); + expect(test.options.karmaConfig).toEqual('./karma.conf.js'); + expect(test.options.scripts).toEqual([]); + expect(test.options.styles).toEqual([{ input: 'src/styles.css' }]); + expect(test.options.assets).toEqual([{ glob: 'src/assets' }, { glob: 'src/favicon.ico' }]); + }); + + it('should set the serve target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const serve = getConfig(tree).projects.foo.architect.serve; + expect(serve.builder).toEqual('@angular-devkit/build-webpack:dev-server'); + expect(serve.options).toEqual({ browserTarget: 'foo:build' }); + const prodConfig = serve.configurations.production; + expect(prodConfig.browserTarget).toEqual('foo:build'); + }); + + it('should set the extract i18n target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const extract = getConfig(tree).projects.foo.architect['extract-i18n']; + expect(extract.builder).toEqual('@angular-devkit/build-webpack:extract-i18n'); + expect(extract.options).toBeDefined(); + expect(extract.options.browserTarget).toEqual(`foo:build` ); + }); + + it('should set the lint target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = getConfig(tree).projects.foo.architect['lint']; + expect(tslint.builder).toEqual('@angular-devkit/build-webpack:tslint'); + expect(tslint.options).toBeDefined(); + expect(tslint.options.tsConfig).toEqual(['src/tsconfig.app.json', 'src/tsconfig.spec.json']); + expect(tslint.options.exclude).toEqual([ '**/node_modules/**' ]); + }); + }); + + describe('e2e projects', () => { + it('should set the project root values', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const e2e = getConfig(tree).projects['foo-e2e'].architect.e2e; + expect(e2e.builder).toEqual('@angular-devkit/build-webpack:protractor'); + const options = e2e.options; + expect(options.protractorConfig).toEqual('./protractor.conf.js'); + expect(options.devServerTarget).toEqual('foo:serve'); + }); + + it('should set the lint target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = getConfig(tree).projects['foo-e2e'].architect.lint; + expect(tslint.builder).toEqual('@angular-devkit/build-webpack:tslint'); + expect(tslint.options).toBeDefined(); + expect(tslint.options.tsConfig).toEqual(['e2e/tsconfig.e2e.json']); + expect(tslint.options.exclude).toEqual([ '**/node_modules/**' ]); + }); + }); + }); + + describe('karma config', () => { + const karmaPath = '/karma.conf.js'; + beforeEach(() => { + tree.create(karmaPath, ` + // @angular/cli + // reports + `); + }); + + it('should replace references to "@angular/cli"', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent(karmaPath); + expect(content).not.toContain('@angular/cli'); + expect(content).toContain('@angular-devkit/build-webpack'); + }); + + it('should replace references to "reports"', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent(karmaPath); + expect(content).toContain(`dir: require('path').join(__dirname, 'coverage'), reports`); + }); + }); + + describe('spec ts config', () => { + const testTsconfigPath = '/src/tsconfig.spec.json'; + beforeEach(() => { + tree.create(testTsconfigPath, ` + { + "files": [ "test.ts" ] + } + `); + }); + + it('should add polyfills', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent(testTsconfigPath); + expect(content).toContain('polyfills.ts'); + const config = JSON.parse(content); + expect(config.files.length).toEqual(2); + expect(config.files[1]).toEqual('polyfills.ts'); + }); + + it('should not add polyfills it if it already exists', () => { + tree.overwrite(testTsconfigPath, ` + { + "files": [ "test.ts", "polyfills.ts" ] + } + `); + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent(testTsconfigPath); + expect(content).toContain('polyfills.ts'); + const config = JSON.parse(content); + expect(config.files.length).toEqual(2); + }); + }); + + describe('package.json', () => { + it('should add a dev dependency to @angular-devkit/build-webpack', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent('/package.json'); + const pkg = JSON.parse(content); + expect(pkg.devDependencies['@angular-devkit/build-webpack']).toBeDefined(); + }); + }); +}); From e253c7bd06df9ade57fee6fd492708573e46b177 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 23:09:41 +0100 Subject: [PATCH 316/724] ci: remove broken snapshot url --- .monorepo.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 61d0496a3f..b089476162 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -53,8 +53,7 @@ "name": "Angular PWA Schematics", "section": "Schematics", "version": "0.0.0", - "hash": "f2f1253db8e7a01eb0e5a945dd08979c", - "snapshotRepo": "angular/pwa" + "hash": "f2f1253db8e7a01eb0e5a945dd08979c" }, "@angular-devkit/architect": { "name": "Architect", From 7d432085c3c93d95048b7448ba4fd9d85a1472be Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 28 Mar 2018 19:00:49 -0400 Subject: [PATCH 317/724] fix(@schematics/angular): Remove workspace messages --- packages/schematics/angular/application/index.ts | 1 - packages/schematics/angular/e2e/index.ts | 1 - packages/schematics/angular/library/index.ts | 1 - 3 files changed, 3 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 6dbd2b0a02..b2708d125c 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -86,7 +86,6 @@ function addDependenciesToPackageJson() { function addAppToWorkspaceFile(options: ApplicationOptions, workspace: WorkspaceSchema): Rule { return (host: Tree, context: SchematicContext) => { - context.logger.info(`Updating workspace file`); // TODO: use JsonAST // const workspacePath = '/angular.json'; // const workspaceBuffer = host.read(workspacePath); diff --git a/packages/schematics/angular/e2e/index.ts b/packages/schematics/angular/e2e/index.ts index facc071390..a32d86fe72 100644 --- a/packages/schematics/angular/e2e/index.ts +++ b/packages/schematics/angular/e2e/index.ts @@ -50,7 +50,6 @@ type WorkspaceSchema = experimental.workspace.WorkspaceSchema; function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): Rule { return (host: Tree, context: SchematicContext) => { - context.logger.info(`Updating workspace file`); // TODO: use JsonAST // const workspacePath = '/angular.json'; // const workspaceBuffer = host.read(workspacePath); diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 36399026ed..9618178f2e 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -120,7 +120,6 @@ function addDependenciesToPackageJson() { function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSchema): Rule { return (host: Tree, context: SchematicContext) => { - context.logger.info(`Updating workspace file`); const projectRoot = `${workspace.newProjectRoot}/${options.name}`; // tslint:disable-next-line:no-any From 15b3914a86516b5116461e78a1944088a761606a Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 28 Mar 2018 16:00:52 -0700 Subject: [PATCH 318/724] build: dont kill the process on fatal --- bin/devkit-admin | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bin/devkit-admin b/bin/devkit-admin index 5a2f0460cb..477aa4ae82 100755 --- a/bin/devkit-admin +++ b/bin/devkit-admin @@ -50,13 +50,6 @@ try { output.write(color(entry.message) + '\n'); }); - - logger - .pipe(filter(entry => entry.level === 'fatal')) - .subscribe(() => { - process.stderr.write('A fatal error happened. See details above.\n'); - process.exit(100); - }); } catch (e) { console.error(red(`Reverting to manual console logging.\nReason: ${e.message}.`)); logger = { From 8f8473bf3ddd0ecf1fbcc870dd3cc7e7c587e65f Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 28 Mar 2018 16:01:22 -0700 Subject: [PATCH 319/724] ci: snapshots should not fail if repo is empty --- scripts/snapshots.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/snapshots.ts b/scripts/snapshots.ts index 2d3ff953a3..2592317a85 100644 --- a/scripts/snapshots.ts +++ b/scripts/snapshots.ts @@ -33,10 +33,15 @@ function _copy(from: string, to: string) { function _exec(command: string, args: string[], opts: { cwd?: string }, logger: logging.Logger) { - const { status, error } = spawnSync(command, args, { ...opts }); + const { status, error, stderr } = spawnSync(command, args, { ...opts }); if (status != 0) { - logger.fatal(error.message); + logger.error(`Command failed: ${command} ${args.map(x => JSON.stringify(x)).join(', ')}`); + if (error) { + logger.error('Error: ' + (error ? error.message : 'undefined')); + } else { + logger.error(`STDERR:\n${stderr}`); + } throw error; } } @@ -93,7 +98,11 @@ export default function(opts: SnapshotsOptions, logger: logging.Logger) { const destPath = path.join(root, path.basename(pkg.snapshotRepo)); // Clear snapshot directory before publishing to remove deleted build files. - _exec('git', ['rm', '-rf', './'], { cwd: destPath }, publishLogger); + try { + _exec('git', ['rm', '-rf', './'], {cwd: destPath}, publishLogger); + } catch (e) { + // Ignore errors on delete. :shrug: + } _copy(pkg.dist, destPath); if (githubToken) { From 779e8fca59e6b4d3f4df6269fe76773224841c4f Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 28 Mar 2018 16:01:32 -0700 Subject: [PATCH 320/724] ci: add snapshot for @angular/pwa --- .monorepo.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.monorepo.json b/.monorepo.json index b089476162..14c771f2e7 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -53,7 +53,8 @@ "name": "Angular PWA Schematics", "section": "Schematics", "version": "0.0.0", - "hash": "f2f1253db8e7a01eb0e5a945dd08979c" + "hash": "f2f1253db8e7a01eb0e5a945dd08979c", + "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { "name": "Architect", From 3633431818d1ce22be60abd7dd3f0e0292f3788d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 28 Mar 2018 22:01:14 +0100 Subject: [PATCH 321/724] feat(@angular-devkit/build-angular): rename from build-webpack --- .monorepo.json | 8 ++-- README.md | 2 +- .../README.md | 0 .../builders.json | 0 .../package.json | 2 +- .../plugins/karma.ts | 0 .../base-href-webpack-plugin.ts | 0 .../base-href-webpack-plugin_spec.ts | 0 .../lib/base-href-webpack/index.ts | 0 .../angular-cli-files/models/build-options.ts | 0 .../models/webpack-configs/browser.ts | 0 .../models/webpack-configs/common.ts | 0 .../models/webpack-configs/index.ts | 0 .../models/webpack-configs/server.ts | 0 .../models/webpack-configs/styles.ts | 0 .../models/webpack-configs/test.ts | 0 .../models/webpack-configs/typescript.ts | 0 .../models/webpack-configs/utils.ts | 0 .../plugins/bundle-budget.ts | 0 .../plugins/cleancss-webpack-plugin.ts | 0 .../plugins/index-html-webpack-plugin.ts | 0 .../plugins/karma-context.html | 0 .../plugins/karma-debug.html | 0 .../plugins/karma-webpack-failure-cb.ts | 0 .../src/angular-cli-files/plugins/karma.ts | 14 +++---- .../plugins/postcss-cli-resources.ts | 0 .../plugins/raw-css-loader.ts | 0 .../plugins/scripts-webpack-plugin.ts | 0 .../suppress-entry-chunks-webpack-plugin.ts | 0 .../src/angular-cli-files/plugins/webpack.ts | 0 .../utilities/bundle-calculator.ts | 0 .../angular-cli-files/utilities/check-port.ts | 0 .../angular-cli-files/utilities/find-up.ts | 0 .../utilities/is-directory.ts | 0 .../utilities/package-chunk-sort.ts | 0 .../utilities/read-tsconfig.ts | 0 .../utilities/require-project-module.ts | 0 .../utilities/service-worker/index.ts | 0 .../src/angular-cli-files/utilities/stats.ts | 0 .../angular-cli-files/utilities/strip-bom.ts | 0 .../src/app-shell/index.ts | 0 .../src/app-shell/schema.d.ts | 0 .../src/app-shell/schema.json | 0 .../src/browser/index.ts | 0 .../src/browser/schema.json | 0 .../src/dev-server/index.ts | 0 .../src/dev-server/schema.json | 0 .../src/extract-i18n/index.ts | 0 .../src/extract-i18n/schema.json | 0 .../src/index.ts | 0 .../src/karma/index.ts | 0 .../src/karma/schema.json | 0 .../src/protractor/index.ts | 0 .../src/protractor/schema.json | 0 .../src/server/index.ts | 0 .../src/server/schema.d.ts | 0 .../src/server/schema.json | 0 .../src/tslint/index.ts | 0 .../src/tslint/schema.json | 0 .../src/utils/index.ts | 0 .../utils/run-module-as-observable-fork.ts | 0 .../src/utils/run-module-worker.js | 0 .../utils/webpack-file-system-host-adapter.ts | 0 .../test/app-shell/app-shell_spec_large.ts | 0 .../test/browser/allow-js_spec_large.ts | 0 .../test/browser/aot_spec_large.ts | 0 .../test/browser/assets_spec_large.ts | 0 .../test/browser/base-href_spec_large.ts | 0 .../browser/build-optimizer_spec_large.ts | 0 .../test/browser/bundle-budgets_spec_large.ts | 0 .../browser/circular-dependency_spec_large.ts | 0 .../browser/custom-lazy-modules_spec_large.ts | 0 .../test/browser/deploy-url_spec_large.ts | 0 .../test/browser/errors_spec_large.ts | 0 .../test/browser/i18n_spec_large.ts | 0 .../test/browser/lazy-module_spec_large.ts | 0 .../browser/license-extraction_spec_large.ts | 0 .../browser/no-entry-module_spec_large.ts | 0 .../browser/optimization-level_spec_large.ts | 0 .../test/browser/output-hashing_spec_large.ts | 0 .../test/browser/output-path_spec_large.ts | 0 .../test/browser/poll_spec_large.ts | 0 .../test/browser/rebuild_spec_large.ts | 0 .../test/browser/replacements_spec_large.ts | 0 .../test/browser/scripts-array_spec_large.ts | 0 .../test/browser/service-worker_spec_large.ts | 0 .../test/browser/source-map_spec_large.ts | 0 .../test/browser/stats-json_spec_large.ts | 0 .../test/browser/styles_spec_large.ts | 0 .../subresource-integrity_spec_large.ts | 0 .../test/browser/tsconfig-paths_spec_large.ts | 0 .../test/browser/vendor-chunk_spec_large.ts | 0 .../test/browser/works_spec_large.ts | 0 .../test/dev-server/proxy_spec_large.ts | 0 .../test/dev-server/public-host_spec_large.ts | 0 .../test/dev-server/serve-path_spec_large.ts | 0 .../test/dev-server/ssl_spec_large.ts | 0 .../test/dev-server/works_spec_large.ts | 0 .../test/extract-i18n/works_spec_large.ts | 0 .../test/karma/assets_spec_large.ts | 0 .../test/karma/code-coverage_spec_large.ts | 0 .../test/karma/rebuilds_spec_large.ts | 0 .../test/karma/replacements_spec_large.ts | 0 .../test/karma/works_spec_large.ts | 0 .../test/protractor/works_spec_large.ts | 0 .../test/server/base_spec_large.ts | 0 .../test/tslint/works_spec_large.ts | 0 .../test/utils/index.ts | 0 .../test/utils/request.ts | 0 .../test/utils/run-target-spec.ts | 2 +- .../test/utils/test-logger.ts | 0 .../test/utils/test-project-host.ts | 0 .../src/build/index_spec_large.ts | 2 +- .../core/src/workspace/workspace_spec.ts | 2 +- .../angular/application/files/karma.conf.js | 4 +- .../schematics/angular/application/index.ts | 12 +++--- .../angular/application/index_spec.ts | 6 +-- packages/schematics/angular/e2e/index.ts | 4 +- .../files/__projectRoot__/karma.conf.js | 4 +- packages/schematics/angular/library/index.ts | 6 +-- .../schematics/angular/library/index_spec.ts | 2 +- .../angular/migrations/update-6/index.ts | 6 +-- .../angular/migrations/update-6/index_spec.ts | 22 +++++------ .../schematics/angular/universal/index.ts | 2 +- .../hello-world-app/.angular.json | 20 +++++----- .../hello-world-app/.editorconfig | 0 .../hello-world-app/.gitignore | 0 .../hello-world-app/README.md | 0 .../hello-world-app/browserslist | 0 .../hello-world-app/e2e/app.e2e-spec.ts | 0 .../hello-world-app/e2e/app.po.ts | 0 .../hello-world-app/e2e/tsconfig.e2e.json | 0 .../hello-world-app/karma.conf.js | 36 ++++++++++++++++++ .../hello-world-app/package.json | 0 .../hello-world-app/protractor.conf.js | 0 .../hello-world-app/src/app/app.component.css | 0 .../src/app/app.component.html | 0 .../src/app/app.component.spec.ts | 0 .../hello-world-app/src/app/app.component.ts | 0 .../hello-world-app/src/app/app.module.ts | 0 .../src/app/app.server.module.ts | 0 .../hello-world-app/src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 0 .../src/environments/environment.ts | 0 .../hello-world-app/src/favicon.ico | Bin .../hello-world-app/src/index.html | 0 .../hello-world-app/src/main.server.ts | 0 .../hello-world-app/src/main.ts | 0 .../hello-world-app/src/polyfills.ts | 0 .../hello-world-app/src/spectrum.png | Bin .../src/src/locale/messages.xlf | 0 .../hello-world-app/src/styles.css | 0 .../hello-world-app/src/test.ts | 0 .../hello-world-app/src/tsconfig.app.json | 0 .../hello-world-app/src/tsconfig.server.json | 0 .../hello-world-app/src/tsconfig.spec.json | 0 .../hello-world-app/src/typings.d.ts | 0 .../hello-world-app/tsconfig.json | 0 .../hello-world-app/tslint.json | 0 .../build_ng_packagr/ng-packaged/angular.json | 4 +- .../ng-packaged/projects/lib/karma.conf.js | 4 +- .../hello-world-app/karma.conf.js | 4 +- .../core/workspace/angular-workspace.json | 2 +- 163 files changed, 103 insertions(+), 67 deletions(-) rename packages/angular_devkit/{build_webpack => build_angular}/README.md (100%) rename packages/angular_devkit/{build_webpack => build_angular}/builders.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/package.json (97%) rename packages/angular_devkit/{build_webpack => build_angular}/plugins/karma.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/lib/base-href-webpack/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/build-options.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/browser.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/common.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/server.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/styles.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/test.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/typescript.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/models/webpack-configs/utils.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/bundle-budget.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/index-html-webpack-plugin.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/karma-context.html (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/karma-debug.html (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/karma.ts (95%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/postcss-cli-resources.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/raw-css-loader.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/scripts-webpack-plugin.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/plugins/webpack.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/bundle-calculator.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/check-port.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/find-up.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/is-directory.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/package-chunk-sort.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/read-tsconfig.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/require-project-module.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/service-worker/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/stats.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/angular-cli-files/utilities/strip-bom.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/app-shell/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/app-shell/schema.d.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/app-shell/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/browser/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/browser/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/dev-server/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/dev-server/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/extract-i18n/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/extract-i18n/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/karma/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/karma/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/protractor/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/protractor/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/server/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/server/schema.d.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/server/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/tslint/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/tslint/schema.json (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/utils/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/utils/run-module-as-observable-fork.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/utils/run-module-worker.js (100%) rename packages/angular_devkit/{build_webpack => build_angular}/src/utils/webpack-file-system-host-adapter.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/app-shell/app-shell_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/allow-js_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/aot_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/assets_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/base-href_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/build-optimizer_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/bundle-budgets_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/circular-dependency_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/custom-lazy-modules_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/deploy-url_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/errors_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/i18n_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/lazy-module_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/license-extraction_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/no-entry-module_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/optimization-level_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/output-hashing_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/output-path_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/poll_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/rebuild_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/replacements_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/scripts-array_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/service-worker_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/source-map_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/stats-json_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/styles_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/subresource-integrity_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/tsconfig-paths_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/vendor-chunk_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/browser/works_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/dev-server/proxy_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/dev-server/public-host_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/dev-server/serve-path_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/dev-server/ssl_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/dev-server/works_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/extract-i18n/works_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/karma/assets_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/karma/code-coverage_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/karma/rebuilds_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/karma/replacements_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/karma/works_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/protractor/works_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/server/base_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/tslint/works_spec_large.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/utils/index.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/utils/request.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/utils/run-target-spec.ts (96%) rename packages/angular_devkit/{build_webpack => build_angular}/test/utils/test-logger.ts (100%) rename packages/angular_devkit/{build_webpack => build_angular}/test/utils/test-project-host.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/.angular.json (96%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/.editorconfig (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/.gitignore (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/README.md (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/browserslist (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/e2e/app.e2e-spec.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/e2e/app.po.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/e2e/tsconfig.e2e.json (100%) create mode 100644 tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/package.json (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/protractor.conf.js (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/app/app.component.css (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/app/app.component.html (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/app/app.component.spec.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/app/app.component.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/app/app.module.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/app/app.server.module.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/assets/.gitkeep (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/environments/environment.prod.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/environments/environment.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/favicon.ico (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/index.html (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/main.server.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/main.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/polyfills.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/spectrum.png (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/src/locale/messages.xlf (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/styles.css (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/test.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/tsconfig.app.json (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/tsconfig.server.json (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/tsconfig.spec.json (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/src/typings.d.ts (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/tsconfig.json (100%) rename tests/@angular_devkit/{build_webpack => build_angular}/hello-world-app/tslint.json (100%) diff --git a/.monorepo.json b/.monorepo.json index 14c771f2e7..006478ab43 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -98,17 +98,17 @@ "hash": "5b9d0ea3a961a7c58ba5312f689cf137", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, - "@angular-devkit/build-webpack": { - "name": "Build Webpack", + "@angular-devkit/build-angular": { + "name": "Build Angular", "links": [ { "label": "README", - "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md" + "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], "version": "0.0.8", "hash": "cb56150be7e0ec5ad40d0851029ed271", - "snapshotRepo": "angular/angular-devkit-build-webpack-builds" + "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { "name": "Core", diff --git a/README.md b/README.md index f663fa87a7..b5cc60b434 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ This is a monorepo which contains many packages: |---|---|---|---| **Architect** | [`@angular-devkit/architect`](http://npmjs.com/packages/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) **Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/packages/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect-cli) | +**Build Angular** | [`@angular-devkit/build-angular`](http://npmjs.com/packages/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) **Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](http://npmjs.com/packages/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) **Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) -**Build Webpack** | [`@angular-devkit/build-webpack`](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-webpack/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-webpack) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_webpack/README.md) **Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) **Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) **Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | diff --git a/packages/angular_devkit/build_webpack/README.md b/packages/angular_devkit/build_angular/README.md similarity index 100% rename from packages/angular_devkit/build_webpack/README.md rename to packages/angular_devkit/build_angular/README.md diff --git a/packages/angular_devkit/build_webpack/builders.json b/packages/angular_devkit/build_angular/builders.json similarity index 100% rename from packages/angular_devkit/build_webpack/builders.json rename to packages/angular_devkit/build_angular/builders.json diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_angular/package.json similarity index 97% rename from packages/angular_devkit/build_webpack/package.json rename to packages/angular_devkit/build_angular/package.json index 154f664c25..43a7789e27 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -1,5 +1,5 @@ { - "name": "@angular-devkit/build-webpack", + "name": "@angular-devkit/build-angular", "version": "0.0.0", "description": "Angular Webpack Build Facade", "main": "src/index.js", diff --git a/packages/angular_devkit/build_webpack/plugins/karma.ts b/packages/angular_devkit/build_angular/plugins/karma.ts similarity index 100% rename from packages/angular_devkit/build_webpack/plugins/karma.ts rename to packages/angular_devkit/build_angular/plugins/karma.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/lib/base-href-webpack/index.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/index.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/build-options.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/browser.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/common.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/index.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/server.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/server.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/styles.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/test.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/typescript.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/models/webpack-configs/utils.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/bundle-budget.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/bundle-budget.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/bundle-budget.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/cleancss-webpack-plugin.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/index-html-webpack-plugin.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-context.html similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-context.html rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-context.html diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-debug.html similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-debug.html rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-debug.html diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts similarity index 95% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index 28dc63c782..bb6d8b9f4f 100644 --- a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -53,10 +53,10 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { successCb = config.buildWebpack.successCb; failureCb = config.buildWebpack.failureCb; - config.reporters.unshift('@angular-devkit/build-webpack--event-reporter'); + config.reporters.unshift('@angular-devkit/build-angular--event-reporter'); // Add a reporter that fixes sourcemap urls. if (options.sourceMap) { - config.reporters.unshift('@angular-devkit/build-webpack--sourcemap-reporter'); + config.reporters.unshift('@angular-devkit/build-angular--sourcemap-reporter'); // Code taken from https://github.com/tschaub/karma-source-map-support. // We can't use it directly because we need to add it conditionally in this file, and karma @@ -122,7 +122,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { // Add the request blocker. config.beforeMiddleware = config.beforeMiddleware || []; - config.beforeMiddleware.push('@angular-devkit/build-webpack--blocker'); + config.beforeMiddleware.push('@angular-devkit/build-angular--blocker'); // Delete global styles entry, we don't want to load them. delete webpackConfig.entry.styles; @@ -267,8 +267,8 @@ const sourceMapReporter: any = function (this: any, baseReporterDecorator: any, sourceMapReporter.$inject = ['baseReporterDecorator', 'config']; module.exports = { - 'framework:@angular-devkit/build-webpack': ['factory', init], - 'reporter:@angular-devkit/build-webpack--sourcemap-reporter': ['type', sourceMapReporter], - 'reporter:@angular-devkit/build-webpack--event-reporter': ['type', eventReporter], - 'middleware:@angular-devkit/build-webpack--blocker': ['factory', requestBlocker] + 'framework:@angular-devkit/build-angular': ['factory', init], + 'reporter:@angular-devkit/build-angular--sourcemap-reporter': ['type', sourceMapReporter], + 'reporter:@angular-devkit/build-angular--event-reporter': ['type', eventReporter], + 'middleware:@angular-devkit/build-angular--blocker': ['factory', requestBlocker] }; diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/postcss-cli-resources.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/postcss-cli-resources.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/postcss-cli-resources.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/postcss-cli-resources.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/raw-css-loader.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/raw-css-loader.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/raw-css-loader.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/raw-css-loader.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/scripts-webpack-plugin.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/scripts-webpack-plugin.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/scripts-webpack-plugin.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/plugins/webpack.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/bundle-calculator.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/bundle-calculator.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/check-port.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/check-port.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/check-port.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/check-port.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/find-up.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/find-up.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/find-up.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/find-up.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/is-directory.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/is-directory.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/package-chunk-sort.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/read-tsconfig.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/read-tsconfig.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/require-project-module.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/require-project-module.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/require-project-module.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/service-worker/index.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/stats.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts diff --git a/packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/strip-bom.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/angular-cli-files/utilities/strip-bom.ts rename to packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts diff --git a/packages/angular_devkit/build_webpack/src/app-shell/index.ts b/packages/angular_devkit/build_angular/src/app-shell/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/app-shell/index.ts rename to packages/angular_devkit/build_angular/src/app-shell/index.ts diff --git a/packages/angular_devkit/build_webpack/src/app-shell/schema.d.ts b/packages/angular_devkit/build_angular/src/app-shell/schema.d.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/app-shell/schema.d.ts rename to packages/angular_devkit/build_angular/src/app-shell/schema.d.ts diff --git a/packages/angular_devkit/build_webpack/src/app-shell/schema.json b/packages/angular_devkit/build_angular/src/app-shell/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/app-shell/schema.json rename to packages/angular_devkit/build_angular/src/app-shell/schema.json diff --git a/packages/angular_devkit/build_webpack/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/browser/index.ts rename to packages/angular_devkit/build_angular/src/browser/index.ts diff --git a/packages/angular_devkit/build_webpack/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/browser/schema.json rename to packages/angular_devkit/build_angular/src/browser/schema.json diff --git a/packages/angular_devkit/build_webpack/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/dev-server/index.ts rename to packages/angular_devkit/build_angular/src/dev-server/index.ts diff --git a/packages/angular_devkit/build_webpack/src/dev-server/schema.json b/packages/angular_devkit/build_angular/src/dev-server/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/dev-server/schema.json rename to packages/angular_devkit/build_angular/src/dev-server/schema.json diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/extract-i18n/index.ts rename to packages/angular_devkit/build_angular/src/extract-i18n/index.ts diff --git a/packages/angular_devkit/build_webpack/src/extract-i18n/schema.json b/packages/angular_devkit/build_angular/src/extract-i18n/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/extract-i18n/schema.json rename to packages/angular_devkit/build_angular/src/extract-i18n/schema.json diff --git a/packages/angular_devkit/build_webpack/src/index.ts b/packages/angular_devkit/build_angular/src/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/index.ts rename to packages/angular_devkit/build_angular/src/index.ts diff --git a/packages/angular_devkit/build_webpack/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/karma/index.ts rename to packages/angular_devkit/build_angular/src/karma/index.ts diff --git a/packages/angular_devkit/build_webpack/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/karma/schema.json rename to packages/angular_devkit/build_angular/src/karma/schema.json diff --git a/packages/angular_devkit/build_webpack/src/protractor/index.ts b/packages/angular_devkit/build_angular/src/protractor/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/protractor/index.ts rename to packages/angular_devkit/build_angular/src/protractor/index.ts diff --git a/packages/angular_devkit/build_webpack/src/protractor/schema.json b/packages/angular_devkit/build_angular/src/protractor/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/protractor/schema.json rename to packages/angular_devkit/build_angular/src/protractor/schema.json diff --git a/packages/angular_devkit/build_webpack/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/server/index.ts rename to packages/angular_devkit/build_angular/src/server/index.ts diff --git a/packages/angular_devkit/build_webpack/src/server/schema.d.ts b/packages/angular_devkit/build_angular/src/server/schema.d.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/server/schema.d.ts rename to packages/angular_devkit/build_angular/src/server/schema.d.ts diff --git a/packages/angular_devkit/build_webpack/src/server/schema.json b/packages/angular_devkit/build_angular/src/server/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/server/schema.json rename to packages/angular_devkit/build_angular/src/server/schema.json diff --git a/packages/angular_devkit/build_webpack/src/tslint/index.ts b/packages/angular_devkit/build_angular/src/tslint/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/tslint/index.ts rename to packages/angular_devkit/build_angular/src/tslint/index.ts diff --git a/packages/angular_devkit/build_webpack/src/tslint/schema.json b/packages/angular_devkit/build_angular/src/tslint/schema.json similarity index 100% rename from packages/angular_devkit/build_webpack/src/tslint/schema.json rename to packages/angular_devkit/build_angular/src/tslint/schema.json diff --git a/packages/angular_devkit/build_webpack/src/utils/index.ts b/packages/angular_devkit/build_angular/src/utils/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/utils/index.ts rename to packages/angular_devkit/build_angular/src/utils/index.ts diff --git a/packages/angular_devkit/build_webpack/src/utils/run-module-as-observable-fork.ts b/packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/utils/run-module-as-observable-fork.ts rename to packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts diff --git a/packages/angular_devkit/build_webpack/src/utils/run-module-worker.js b/packages/angular_devkit/build_angular/src/utils/run-module-worker.js similarity index 100% rename from packages/angular_devkit/build_webpack/src/utils/run-module-worker.js rename to packages/angular_devkit/build_angular/src/utils/run-module-worker.js diff --git a/packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts b/packages/angular_devkit/build_angular/src/utils/webpack-file-system-host-adapter.ts similarity index 100% rename from packages/angular_devkit/build_webpack/src/utils/webpack-file-system-host-adapter.ts rename to packages/angular_devkit/build_angular/src/utils/webpack-file-system-host-adapter.ts diff --git a/packages/angular_devkit/build_webpack/test/app-shell/app-shell_spec_large.ts b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/app-shell/app-shell_spec_large.ts rename to packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/allow-js_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/allow-js_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/allow-js_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/aot_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/assets_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/base-href_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/base-href_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/base-href_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/build-optimizer_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/build-optimizer_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/build-optimizer_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/bundle-budgets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/bundle-budgets_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/circular-dependency_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/circular-dependency_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/circular-dependency_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/custom-lazy-modules_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/custom-lazy-modules_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/custom-lazy-modules_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/deploy-url_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/deploy-url_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/deploy-url_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/errors_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/i18n_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/lazy-module_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/license-extraction_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/no-entry-module_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/optimization-level_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/optimization-level_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/optimization-level_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/output-hashing_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/output-path_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/poll_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/poll_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/poll_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/rebuild_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/replacements_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/scripts-array_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/service-worker_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/source-map_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/source-map_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/source-map_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/stats-json_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/stats-json_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/stats-json_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/styles_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/subresource-integrity_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/tsconfig-paths_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/tsconfig-paths_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/tsconfig-paths_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/vendor-chunk_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/vendor-chunk_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/vendor-chunk_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/browser/works_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/proxy_spec_large.ts rename to packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/public-host_spec_large.ts rename to packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/serve-path_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/serve-path_spec_large.ts rename to packages/angular_devkit/build_angular/test/dev-server/serve-path_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/ssl_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/ssl_spec_large.ts rename to packages/angular_devkit/build_angular/test/dev-server/ssl_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/dev-server/works_spec_large.ts rename to packages/angular_devkit/build_angular/test/dev-server/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts b/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/extract-i18n/works_spec_large.ts rename to packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/assets_spec_large.ts rename to packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/code-coverage_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/code-coverage_spec_large.ts rename to packages/angular_devkit/build_angular/test/karma/code-coverage_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/rebuilds_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/rebuilds_spec_large.ts rename to packages/angular_devkit/build_angular/test/karma/rebuilds_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/replacements_spec_large.ts rename to packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/karma/works_spec_large.ts rename to packages/angular_devkit/build_angular/test/karma/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts b/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/protractor/works_spec_large.ts rename to packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/server/base_spec_large.ts rename to packages/angular_devkit/build_angular/test/server/base_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/tslint/works_spec_large.ts rename to packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts diff --git a/packages/angular_devkit/build_webpack/test/utils/index.ts b/packages/angular_devkit/build_angular/test/utils/index.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/utils/index.ts rename to packages/angular_devkit/build_angular/test/utils/index.ts diff --git a/packages/angular_devkit/build_webpack/test/utils/request.ts b/packages/angular_devkit/build_angular/test/utils/request.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/utils/request.ts rename to packages/angular_devkit/build_angular/test/utils/request.ts diff --git a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts b/packages/angular_devkit/build_angular/test/utils/run-target-spec.ts similarity index 96% rename from packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts rename to packages/angular_devkit/build_angular/test/utils/run-target-spec.ts index f35cbd5444..a2dee96f2a 100644 --- a/packages/angular_devkit/build_webpack/test/utils/run-target-spec.ts +++ b/packages/angular_devkit/build_angular/test/utils/run-target-spec.ts @@ -17,7 +17,7 @@ const workspaceFile = normalize('.angular.json'); const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any export const workspaceRoot = join(devkitRoot, - 'tests/@angular_devkit/build_webpack/hello-world-app/'); + 'tests/@angular_devkit/build_angular/hello-world-app/'); export const host = new TestProjectHost(workspaceRoot); export const outputPath = normalize('dist'); export const browserTargetSpec = { project: 'app', target: 'build' }; diff --git a/packages/angular_devkit/build_webpack/test/utils/test-logger.ts b/packages/angular_devkit/build_angular/test/utils/test-logger.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/utils/test-logger.ts rename to packages/angular_devkit/build_angular/test/utils/test-logger.ts diff --git a/packages/angular_devkit/build_webpack/test/utils/test-project-host.ts b/packages/angular_devkit/build_angular/test/utils/test-project-host.ts similarity index 100% rename from packages/angular_devkit/build_webpack/test/utils/test-project-host.ts rename to packages/angular_devkit/build_angular/test/utils/test-project-host.ts diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index f9a63e8391..212fb654b9 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -18,7 +18,7 @@ describe('NgPackagr Builder', () => { const workspaceRoot = join(devkitRoot, 'tests/@angular_devkit/build_ng_packagr/ng-packaged/'); - // TODO: move TestProjectHost from build-webpack to architect, or somewhere else, where it + // TODO: move TestProjectHost from build-angular to architect, or somewhere else, where it // can be imported from. const host = new NodeJsSyncHost(); const workspace = new experimental.workspace.Workspace(workspaceRoot, host); diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index f65fcd417a..3a656f895f 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -61,7 +61,7 @@ describe('Workspace', () => { }, architect: { build: { - builder: '@angular-devkit/build-webpack:browser', + builder: '@angular-devkit/build-angular:browser', transforms: [ { plugin: '@angular-devkit/architect-transforms:replacement', diff --git a/packages/schematics/angular/application/files/karma.conf.js b/packages/schematics/angular/application/files/karma.conf.js index a0566de9f7..15b5b0d5f7 100644 --- a/packages/schematics/angular/application/files/karma.conf.js +++ b/packages/schematics/angular/application/files/karma.conf.js @@ -4,13 +4,13 @@ module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-webpack'], + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-webpack/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma') ], client: { clearContext: false // leave Jasmine Spec Runner output visible in browser diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index b2708d125c..5684ab52ff 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -72,7 +72,7 @@ function addDependenciesToPackageJson() { json.devDependencies = { '@angular/compiler-cli': latestVersions.Angular, - '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, + '@angular-devkit/build-angular': latestVersions.DevkitBuildWebpack, 'typescript': latestVersions.TypeScript, // De-structure last keeps existing user dependencies. ...json.devDependencies, @@ -103,7 +103,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace projectType: 'application', architect: { build: { - builder: '@angular-devkit/build-webpack:browser', + builder: '@angular-devkit/build-angular:browser', options: { outputPath: `dist/${options.name}`, index: `${projectRoot}/src/index.html`, @@ -148,7 +148,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, }, serve: { - builder: '@angular-devkit/build-webpack:dev-server', + builder: '@angular-devkit/build-angular:dev-server', options: { browserTarget: `${options.name}:build`, }, @@ -159,13 +159,13 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, }, 'extract-i18n': { - builder: '@angular-devkit/build-webpack:extract-i18n', + builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: `${options.name}:build`, }, }, test: { - builder: '@angular-devkit/build-webpack:karma', + builder: '@angular-devkit/build-angular:karma', options: { main: `${projectRoot}/src/test.ts`, polyfills: `${projectRoot}/src/polyfills.ts`, @@ -192,7 +192,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, }, lint: { - builder: '@angular-devkit/build-webpack:tslint', + builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ `${projectRoot}/tsconfig.app.json`, diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index f65d7232e9..d45aad67c6 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -106,11 +106,11 @@ describe('Application Schematic', () => { }); describe(`update package.json`, () => { - it(`should add build-webpack to devDependencies`, () => { + it(`should add build-angular to devDependencies`, () => { const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); const packageJson = JSON.parse(tree.readContent('package.json')); - expect(packageJson.devDependencies['@angular-devkit/build-webpack']) + expect(packageJson.devDependencies['@angular-devkit/build-angular']) .toEqual(latestVersions.DevkitBuildWebpack); }); @@ -140,7 +140,7 @@ describe('Application Schematic', () => { }, workspaceTree); const packageJson = JSON.parse(tree.readContent('package.json')); - expect(packageJson.devDependencies['@angular-devkit/build-webpack']).toBeUndefined(); + expect(packageJson.devDependencies['@angular-devkit/build-angular']).toBeUndefined(); }); }); }); diff --git a/packages/schematics/angular/e2e/index.ts b/packages/schematics/angular/e2e/index.ts index a32d86fe72..fedb996027 100644 --- a/packages/schematics/angular/e2e/index.ts +++ b/packages/schematics/angular/e2e/index.ts @@ -67,14 +67,14 @@ function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): projectType: 'application', architect: { e2e: { - builder: '@angular-devkit/build-webpack:protractor', + builder: '@angular-devkit/build-angular:protractor', options: { protractorConfig: `projects/${options.name}/protractor.conf.js`, devServerTarget: `${options.relatedAppName}:serve`, }, }, lint: { - builder: '@angular-devkit/build-webpack:tslint', + builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: `projects/${options.name}/tsconfig.e2e.json`, exclude: [ diff --git a/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js index 85874a9222..d5fd42ec88 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js +++ b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js @@ -4,13 +4,13 @@ module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-webpack'], + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-webpack/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma') ], client: { clearContext: false // leave Jasmine Spec Runner output visible in browser diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 9618178f2e..df49bd0ba4 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -106,7 +106,7 @@ function addDependenciesToPackageJson() { json.devDependencies = { '@angular/compiler-cli': latestVersions.Angular, '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, - '@angular-devkit/build-webpack': latestVersions.DevkitBuildNgPackagr, + '@angular-devkit/build-angular': latestVersions.DevkitBuildNgPackagr, 'ng-packagr': '^2.4.1', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', @@ -139,7 +139,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche }, }, test: { - builder: '@angular-devkit/build-webpack:karma', + builder: '@angular-devkit/build-angular:karma', options: { main: `${projectRoot}/src/test.ts`, tsConfig: `${projectRoot}/tsconfig.spec.json`, @@ -147,7 +147,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche }, }, lint: { - builder: '@angular-devkit/build-webpack:lint', + builder: '@angular-devkit/build-angular:lint', options: { tsConfig: [ 'projects/lib/tsconfig.lint.json', diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index a61e38aaf5..efce390697 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -125,7 +125,7 @@ describe('Library Schematic', () => { const packageJson = getJsonFileContent(tree, 'package.json'); expect(packageJson.devDependencies['ng-packagr']).toBeUndefined(); - expect(packageJson.devDependencies['@angular-devkit/build-webpack']).toBeUndefined(); + expect(packageJson.devDependencies['@angular-devkit/build-angular']).toBeUndefined(); }); }); diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 56fc4ac77a..eaf74206d4 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -52,7 +52,7 @@ function migrateKarmaConfiguration(config: CliConfig): Rule { const buffer = host.read(karmaPath); if (buffer !== null) { let content = buffer.toString(); - content = content.replace( /@angular\/cli/g, '@angular-devkit/build-webpack'); + content = content.replace( /@angular\/cli/g, '@angular-devkit/build-angular'); content = content.replace('reports', `dir: require('path').join(__dirname, 'coverage'), reports`); host.overwrite(karmaPath, content); @@ -161,7 +161,7 @@ function extractArchitectConfig(_config: CliConfig): JsonObject | null { } function extractProjectsConfig(config: CliConfig): JsonObject { - const builderPackage = '@angular-devkit/build-webpack'; + const builderPackage = '@angular-devkit/build-angular'; let defaultAppNamePrefix = 'app'; if (config.project && config.project.name) { defaultAppNamePrefix = config.project.name; @@ -403,7 +403,7 @@ function updatePackageJson() { pkg.devDependencies = {}; } - pkg.devDependencies['@angular-devkit/build-webpack'] = latestVersions.DevkitBuildWebpack; + pkg.devDependencies['@angular-devkit/build-angular'] = latestVersions.DevkitBuildWebpack; host.overwrite(pkgPath, JSON.stringify(pkg, null, 2)); diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index ae0156d079..dc338e3cdd 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -488,7 +488,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const build = getConfig(tree).projects.foo.architect.build; - expect(build.builder).toEqual('@angular-devkit/build-webpack:browser'); + expect(build.builder).toEqual('@angular-devkit/build-angular:browser'); expect(build.options.scripts).toEqual([]); expect(build.options.styles).toEqual([{ input: 'src/styles.css' }]); expect(build.options.assets).toEqual([{ glob: 'src/assets' }, { glob: 'src/favicon.ico' }]); @@ -507,7 +507,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const serve = getConfig(tree).projects.foo.architect.serve; - expect(serve.builder).toEqual('@angular-devkit/build-webpack:dev-server'); + expect(serve.builder).toEqual('@angular-devkit/build-angular:dev-server'); expect(serve.options).toEqual({ browserTarget: 'foo:build' }); const prodConfig = serve.configurations.production; expect(prodConfig.browserTarget).toEqual('foo:build'); @@ -517,7 +517,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const test = getConfig(tree).projects.foo.architect['test']; - expect(test.builder).toEqual('@angular-devkit/build-webpack:karma'); + expect(test.builder).toEqual('@angular-devkit/build-angular:karma'); expect(test.options.main).toEqual('src/test.ts'); expect(test.options.polyfills).toEqual('src/polyfills.ts'); expect(test.options.tsConfig).toEqual('src/tsconfig.spec.json'); @@ -531,7 +531,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const serve = getConfig(tree).projects.foo.architect.serve; - expect(serve.builder).toEqual('@angular-devkit/build-webpack:dev-server'); + expect(serve.builder).toEqual('@angular-devkit/build-angular:dev-server'); expect(serve.options).toEqual({ browserTarget: 'foo:build' }); const prodConfig = serve.configurations.production; expect(prodConfig.browserTarget).toEqual('foo:build'); @@ -541,7 +541,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const extract = getConfig(tree).projects.foo.architect['extract-i18n']; - expect(extract.builder).toEqual('@angular-devkit/build-webpack:extract-i18n'); + expect(extract.builder).toEqual('@angular-devkit/build-angular:extract-i18n'); expect(extract.options).toBeDefined(); expect(extract.options.browserTarget).toEqual(`foo:build` ); }); @@ -550,7 +550,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const tslint = getConfig(tree).projects.foo.architect['lint']; - expect(tslint.builder).toEqual('@angular-devkit/build-webpack:tslint'); + expect(tslint.builder).toEqual('@angular-devkit/build-angular:tslint'); expect(tslint.options).toBeDefined(); expect(tslint.options.tsConfig).toEqual(['src/tsconfig.app.json', 'src/tsconfig.spec.json']); expect(tslint.options.exclude).toEqual([ '**/node_modules/**' ]); @@ -562,7 +562,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const e2e = getConfig(tree).projects['foo-e2e'].architect.e2e; - expect(e2e.builder).toEqual('@angular-devkit/build-webpack:protractor'); + expect(e2e.builder).toEqual('@angular-devkit/build-angular:protractor'); const options = e2e.options; expect(options.protractorConfig).toEqual('./protractor.conf.js'); expect(options.devServerTarget).toEqual('foo:serve'); @@ -572,7 +572,7 @@ describe('Migration to v6', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const tslint = getConfig(tree).projects['foo-e2e'].architect.lint; - expect(tslint.builder).toEqual('@angular-devkit/build-webpack:tslint'); + expect(tslint.builder).toEqual('@angular-devkit/build-angular:tslint'); expect(tslint.options).toBeDefined(); expect(tslint.options.tsConfig).toEqual(['e2e/tsconfig.e2e.json']); expect(tslint.options.exclude).toEqual([ '**/node_modules/**' ]); @@ -594,7 +594,7 @@ describe('Migration to v6', () => { tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const content = tree.readContent(karmaPath); expect(content).not.toContain('@angular/cli'); - expect(content).toContain('@angular-devkit/build-webpack'); + expect(content).toContain('@angular-devkit/build-angular'); }); it('should replace references to "reports"', () => { @@ -641,12 +641,12 @@ describe('Migration to v6', () => { }); describe('package.json', () => { - it('should add a dev dependency to @angular-devkit/build-webpack', () => { + it('should add a dev dependency to @angular-devkit/build-angular', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const content = tree.readContent('/package.json'); const pkg = JSON.parse(content); - expect(pkg.devDependencies['@angular-devkit/build-webpack']).toBeDefined(); + expect(pkg.devDependencies['@angular-devkit/build-angular']).toBeDefined(); }); }); }); diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 0b6847b588..525c9c56e2 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -60,7 +60,7 @@ function updateConfigFile(options: UniversalOptions): Rule { tsConfig: `projects/${options.clientProject}/tsconfig.server.json`, }; const serverTarget: JsonObject = { - builder: '@angular-devkit/build-webpack:server', + builder: '@angular-devkit/build-angular:server', options: builderOptions, }; const workspace = getWorkspace(host); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json similarity index 96% rename from tests/@angular_devkit/build_webpack/hello-world-app/.angular.json rename to tests/@angular_devkit/build_angular/hello-world-app/.angular.json index 7bd61d84af..7bb44ce494 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -12,7 +12,7 @@ "schematics": {}, "architect": { "build": { - "builder": "../../../../packages/angular_devkit/build_webpack:browser", + "builder": "../../../../packages/angular_devkit/build_angular:browser", "options": { "outputPath": "dist", "index": "src/index.html", @@ -60,7 +60,7 @@ } }, "server": { - "builder": "../../../../packages/angular_devkit/build_webpack:server", + "builder": "../../../../packages/angular_devkit/build_angular:server", "options": { "outputPath": "dist-server", "main": "src/main.server.ts", @@ -68,14 +68,14 @@ } }, "app-shell": { - "builder": "../../../../packages/angular_devkit/build_webpack:app-shell", + "builder": "../../../../packages/angular_devkit/build_angular:app-shell", "options": { "browserTarget": "app:build", "serverTarget": "app:server" } }, "serve": { - "builder": "../../../../packages/angular_devkit/build_webpack:dev-server", + "builder": "../../../../packages/angular_devkit/build_angular:dev-server", "options": { "browserTarget": "app:build", "watch": false @@ -87,13 +87,13 @@ } }, "extract-i18n": { - "builder": "../../../../packages/angular_devkit/build_webpack:extract-i18n", + "builder": "../../../../packages/angular_devkit/build_angular:extract-i18n", "options": { "browserTarget": "app:build" } }, "test": { - "builder": "../../../../packages/angular_devkit/build_webpack:karma", + "builder": "../../../../packages/angular_devkit/build_angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", @@ -123,7 +123,7 @@ } }, "lint": { - "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "builder": "../../../../packages/angular_devkit/build_angular:tslint", "options": { "tsConfig": "src/tsconfig.app.json", "exclude": [ @@ -132,7 +132,7 @@ } }, "lint-test": { - "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "builder": "../../../../packages/angular_devkit/build_angular:tslint", "options": { "tsConfig": "src/tsconfig.spec.json", "exclude": [ @@ -147,7 +147,7 @@ "projectType": "application", "architect": { "e2e": { - "builder": "../../../../packages/angular_devkit/build_webpack:protractor", + "builder": "../../../../packages/angular_devkit/build_angular:protractor", "options": { "protractorConfig": "protractor.conf.js", "devServerTarget": "app:serve", @@ -155,7 +155,7 @@ } }, "lint": { - "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "builder": "../../../../packages/angular_devkit/build_angular:tslint", "options": { "tsConfig": "e2e/tsconfig.e2e.json", "exclude": [ diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.editorconfig b/tests/@angular_devkit/build_angular/hello-world-app/.editorconfig similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/.editorconfig rename to tests/@angular_devkit/build_angular/hello-world-app/.editorconfig diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/.gitignore b/tests/@angular_devkit/build_angular/hello-world-app/.gitignore similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/.gitignore rename to tests/@angular_devkit/build_angular/hello-world-app/.gitignore diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/README.md b/tests/@angular_devkit/build_angular/hello-world-app/README.md similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/README.md rename to tests/@angular_devkit/build_angular/hello-world-app/README.md diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/browserslist b/tests/@angular_devkit/build_angular/hello-world-app/browserslist similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/browserslist rename to tests/@angular_devkit/build_angular/hello-world-app/browserslist diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.e2e-spec.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.e2e-spec.ts rename to tests/@angular_devkit/build_angular/hello-world-app/e2e/app.e2e-spec.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.po.ts b/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.po.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/e2e/app.po.ts rename to tests/@angular_devkit/build_angular/hello-world-app/e2e/app.po.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json b/tests/@angular_devkit/build_angular/hello-world-app/e2e/tsconfig.e2e.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/e2e/tsconfig.e2e.json rename to tests/@angular_devkit/build_angular/hello-world-app/e2e/tsconfig.e2e.json diff --git a/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js new file mode 100644 index 0000000000..3aaab1c2f0 --- /dev/null +++ b/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js @@ -0,0 +1,36 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +const path = require('path'); + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: path.join(__dirname, 'coverage'), + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/package.json b/tests/@angular_devkit/build_angular/hello-world-app/package.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/package.json rename to tests/@angular_devkit/build_angular/hello-world-app/package.json diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/protractor.conf.js b/tests/@angular_devkit/build_angular/hello-world-app/protractor.conf.js similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/protractor.conf.js rename to tests/@angular_devkit/build_angular/hello-world-app/protractor.conf.js diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.css b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.css similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.css rename to tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.css diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.html b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.html similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.html rename to tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.html diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.spec.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.spec.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.spec.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.spec.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.component.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.module.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.module.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.module.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/app/app.module.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.server.module.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/app/app.server.module.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/assets/.gitkeep b/tests/@angular_devkit/build_angular/hello-world-app/src/assets/.gitkeep similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/assets/.gitkeep rename to tests/@angular_devkit/build_angular/hello-world-app/src/assets/.gitkeep diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.prod.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.prod.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/environments/environment.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/favicon.ico b/tests/@angular_devkit/build_angular/hello-world-app/src/favicon.ico similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/favicon.ico rename to tests/@angular_devkit/build_angular/hello-world-app/src/favicon.ico diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/index.html b/tests/@angular_devkit/build_angular/hello-world-app/src/index.html similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/index.html rename to tests/@angular_devkit/build_angular/hello-world-app/src/index.html diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/main.server.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/main.server.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/main.server.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/main.server.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/main.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/main.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/main.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/main.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/polyfills.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/polyfills.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/polyfills.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/polyfills.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/spectrum.png b/tests/@angular_devkit/build_angular/hello-world-app/src/spectrum.png similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/spectrum.png rename to tests/@angular_devkit/build_angular/hello-world-app/src/spectrum.png diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/src/locale/messages.xlf b/tests/@angular_devkit/build_angular/hello-world-app/src/src/locale/messages.xlf similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/src/locale/messages.xlf rename to tests/@angular_devkit/build_angular/hello-world-app/src/src/locale/messages.xlf diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/styles.css b/tests/@angular_devkit/build_angular/hello-world-app/src/styles.css similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/styles.css rename to tests/@angular_devkit/build_angular/hello-world-app/src/styles.css diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/test.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/test.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/test.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/test.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json b/tests/@angular_devkit/build_angular/hello-world-app/src/tsconfig.app.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.app.json rename to tests/@angular_devkit/build_angular/hello-world-app/src/tsconfig.app.json diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.server.json b/tests/@angular_devkit/build_angular/hello-world-app/src/tsconfig.server.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.server.json rename to tests/@angular_devkit/build_angular/hello-world-app/src/tsconfig.server.json diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json b/tests/@angular_devkit/build_angular/hello-world-app/src/tsconfig.spec.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/tsconfig.spec.json rename to tests/@angular_devkit/build_angular/hello-world-app/src/tsconfig.spec.json diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/src/typings.d.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/typings.d.ts similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/src/typings.d.ts rename to tests/@angular_devkit/build_angular/hello-world-app/src/typings.d.ts diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json b/tests/@angular_devkit/build_angular/hello-world-app/tsconfig.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/tsconfig.json rename to tests/@angular_devkit/build_angular/hello-world-app/tsconfig.json diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/tslint.json b/tests/@angular_devkit/build_angular/hello-world-app/tslint.json similarity index 100% rename from tests/@angular_devkit/build_webpack/hello-world-app/tslint.json rename to tests/@angular_devkit/build_angular/hello-world-app/tslint.json diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json index bea384833c..f316e25c26 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json @@ -13,7 +13,7 @@ } }, "test": { - "builder": "../../../../packages/angular_devkit/build_webpack:karma", + "builder": "../../../../packages/angular_devkit/build_angular:karma", "options": { "main": "projects/lib/src/test.ts", "tsConfig": "projects/lib/tsconfig.spec.json", @@ -24,7 +24,7 @@ } }, "lint": { - "builder": "../../../../packages/angular_devkit/build_webpack:tslint", + "builder": "../../../../packages/angular_devkit/build_angular:tslint", "options": { "tsConfig": [ "projects/lib/tsconfig.lint.json", diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js index 85874a9222..d5fd42ec88 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js @@ -4,13 +4,13 @@ module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-webpack'], + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-webpack/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma') ], client: { clearContext: false // leave Jasmine Spec Runner output visible in browser diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js index 4430fdc8d9..3aaab1c2f0 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js +++ b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js @@ -6,13 +6,13 @@ const path = require('path'); module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-webpack'], + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-webpack/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma') ], client:{ clearContext: false // leave Jasmine Spec Runner output visible in browser diff --git a/tests/@angular_devkit/core/workspace/angular-workspace.json b/tests/@angular_devkit/core/workspace/angular-workspace.json index e9302b6be9..46c20948ac 100644 --- a/tests/@angular_devkit/core/workspace/angular-workspace.json +++ b/tests/@angular_devkit/core/workspace/angular-workspace.json @@ -36,7 +36,7 @@ }, "architect": { "build": { - "builder": "@angular-devkit/build-webpack:browser", + "builder": "@angular-devkit/build-angular:browser", "transforms": [ { "plugin": "@angular-devkit/architect-transforms:replacement", From 59956c3d1c4761c208226c476a1f06a0cd9f108f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 28 Mar 2018 22:10:43 -0700 Subject: [PATCH 322/724] release: patch --- .monorepo.json | 52 +++++++++---------- .../angular/utility/latest-versions.ts | 4 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 006478ab43..6e220a103e 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.6", + "version": "0.4.8", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.4.6", + "version": "0.4.8", "hash": "f48bf7e6bb335235b32ba8b93871ea40" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.0.0", - "hash": "f2f1253db8e7a01eb0e5a945dd08979c", + "version": "0.0.1", + "hash": "33517259a69299488fc1a47c0c57dd8d", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.8", - "hash": "52f21956121f83d7bf01328995df988c", + "version": "0.0.9", + "hash": "2f8a1770ac3a45d9bea36966bb365302", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.8", - "hash": "b899b0a5bbd38674efb366ab6f05d148", + "version": "0.0.9", + "hash": "ec33d923851ba374e3342c071bdfb972", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.7", + "version": "0.4.8", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.0.2", - "hash": "5b9d0ea3a961a7c58ba5312f689cf137", + "version": "0.0.3", + "hash": "48268252dea50b651822a0e4da35e5fa", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.0.8", - "hash": "cb56150be7e0ec5ad40d0851029ed271", + "version": "0.0.9", + "hash": "3f718ca4e4281ba7ade2845b8332aae4", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.7", - "hash": "8dd264f0af0e96024f525bf1ae900d51", + "version": "0.4.8", + "hash": "9596234c8481d58633a524851cccc7cb", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.7", + "version": "0.4.8", "hash": "ee6ab5f074ea6402e78f3c8e24148040", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.7", - "hash": "4028af94bb8b25304064decdb91ed8eb", + "version": "0.4.8", + "hash": "adddc7c4a339188e81e28958ba36036a", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-beta.7", + "version": "6.0.0-beta.8", "section": "Misc", - "hash": "8ceb0098b4d60ed0948b613a3d829262", + "hash": "71aaa1e7b33d9ff7de93f8fc9c82a50a", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.7", - "hash": "a4e0ab1e42a5b031581f1192a2f52321", + "version": "0.4.8", + "hash": "fc2e49159b6b6559580e98b2d90f76ea", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.6", + "version": "0.4.8", "section": "Schematics", "hash": "85f50de4da92597ef8adb1d484107825", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.7", + "version": "0.4.8", "section": "Schematics", "hash": "e4366dd236a21a125ebac55a20363aa6", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.4.7", + "version": "0.4.8", "section": "Schematics", - "hash": "adef93c50dbfc2a2bffa797b12c29141", + "hash": "3fe934face6f6b6baeea3b96c4611191", "snapshotRepo": "angular/schematics-update-builds" } } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 08bc718890..c424aa6317 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -11,6 +11,6 @@ export const latestVersions = { RxJs: '^5.5.8', ZoneJs: '^0.8.20', TypeScript: '~2.6.2', - DevkitBuildWebpack: '~0.0.8', - DevkitBuildNgPackagr: '~0.0.2', + DevkitBuildWebpack: '~0.0.9', + DevkitBuildNgPackagr: '~0.0.3', }; From d499b1bf20981dcaa1bae714b2978c169ed14918 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 29 Mar 2018 12:56:22 -0400 Subject: [PATCH 323/724] fix(@schematics/angular): Add file generation for service worker schematic --- .../schematics/angular/service-worker/index.ts | 17 +++++++++++++++++ .../angular/service-worker/index_spec.ts | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 0690ddd07a..4a24189427 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -11,7 +11,12 @@ import { SchematicsException, Tree, UpdateRecorder, + apply, chain, + mergeWith, + move, + template, + url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; import { addSymbolToNgModuleMetadata, isImported } from '../utility/ast-utils'; @@ -158,7 +163,19 @@ function getTsSourceFile(host: Tree, path: string): ts.SourceFile { export default function (options: ServiceWorkerOptions): Rule { return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + const project = workspace.projects[options.project]; + if (!project) { + throw new SchematicsException(`Invalid project name (${options.project})`); + } + + const templateSource = apply(url('./files'), [ + template({...options}), + move(project.root), + ]); + return chain([ + mergeWith(templateSource), updateConfigFile(options), addDependencies(), updateAppModule(options), diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index 94a36a3c3e..cf3a6b0b25 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -90,6 +90,11 @@ describe('Service Worker Schematic', () => { // tslint:disable-next-line:max-line-length const regex = /ServiceWorkerModule\.register\('\/ngsw-worker.js\', { enabled: environment.production }\)/; expect(pkgText).toMatch(regex); + }); + it('should put the ngsw-config.json file in the project root', () => { + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const path = '/projects/bar/ngsw-config.json'; + expect(tree.exists(path)).toEqual(true); }); }); From e14dae5f94dac7ce598203e013753ecffd8a0e3f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 29 Mar 2018 11:35:51 -0700 Subject: [PATCH 324/724] fix(@schematics/update): allow for rc/beta migrations --- packages/schematics/update/migrate/index.ts | 15 +++-- .../schematics/update/migrate/index_spec.ts | 58 +++++++++++++++++++ .../update/migrate/test/migration.json | 25 ++++++++ packages/schematics/update/migrate/test/t1.ts | 31 ++++++++++ 4 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 packages/schematics/update/migrate/index_spec.ts create mode 100644 packages/schematics/update/migrate/test/migration.json create mode 100644 packages/schematics/update/migrate/test/t1.ts diff --git a/packages/schematics/update/migrate/index.ts b/packages/schematics/update/migrate/index.ts index 6ad8098ed7..82849539d2 100644 --- a/packages/schematics/update/migrate/index.ts +++ b/packages/schematics/update/migrate/index.ts @@ -20,7 +20,7 @@ import { PostUpdateSchema } from './schema'; export default function(options: PostUpdateSchema): Rule { return (tree: Tree, context: SchematicContext) => { - const schematicsToRun: string[] = []; + const schematicsToRun: { name: string; version: string; }[] = []; // Create the collection for the package. const collection = context.engine.createCollection(options.collection); @@ -37,20 +37,27 @@ export default function(options: PostUpdateSchema): Rule { if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}$/)) { version += '.0'; } - if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}$/)) { + if (!semver.valid(version)) { throw new SchematicsException( `Invalid migration version: ${JSON.stringify(description['version'])}`, ); } if (semver.gt(version, options.from) && semver.lte(version, options.to)) { - schematicsToRun.push(name); + schematicsToRun.push({ name, version }); } } } + schematicsToRun.sort((a, b) => { + const cmp = semver.compare(a.version, b.version); + + // Revert to comparing the names of the collection if the versions are equal. + return cmp == 0 ? a.name.localeCompare(b.name) : cmp; + }); + if (schematicsToRun.length > 0) { - const rules = schematicsToRun.map(name => externalSchematic(options.collection, name, {})); + const rules = schematicsToRun.map(x => externalSchematic(options.collection, x.name, {})); return chain(rules)(tree, context); } diff --git a/packages/schematics/update/migrate/index_spec.ts b/packages/schematics/update/migrate/index_spec.ts new file mode 100644 index 0000000000..65a944d7ca --- /dev/null +++ b/packages/schematics/update/migrate/index_spec.ts @@ -0,0 +1,58 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { virtualFs } from '@angular-devkit/core'; +import { HostTree, VirtualTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import { map } from 'rxjs/operators'; + + +describe('@schematics/update:migrate', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/update', __dirname + '/../collection.json', + ); + let host: virtualFs.test.TestHost; + let appTree: UnitTestTree = new UnitTestTree(new VirtualTree()); + + beforeEach(() => { + host = new virtualFs.test.TestHost({}); + appTree = new UnitTestTree(new HostTree(host)); + }); + + it('sorts and understand RC', done => { + // Since we cannot run tasks in unit tests, we need to validate that the default + // update schematic updates the package.json appropriately, AND validate that the + // migrate schematic actually do work appropriately, in a separate test. + schematicRunner.runSchematicAsync('migrate', { + package: 'test', + collection: __dirname + '/test/migration.json', + from: '1.0.0', + to: '2.0.0', + }, appTree).pipe( + map(tree => { + const resultJson = JSON.parse(tree.readContent('/migrations')); + + expect(resultJson).toEqual([ + 'migration-03', // "1.0.5" + 'migration-05', // "1.1.0-beta.0" + 'migration-04', // "1.1.0-beta.1" + 'migration-02', // "1.1.0" + 'migration-13', // "1.1.0" + 'migration-19', // "1.1" + 'migration-06', // "1.4.0" + 'migration-17', // "2.0.0-alpha" + 'migration-16', // "2.0.0-alpha.5" + 'migration-08', // "2.0.0-beta.0" + 'migration-07', // "2.0.0-rc.0" + 'migration-12', // "2.0.0-rc.4" + 'migration-14', // "2.0.0" + 'migration-20', // "2" + ]); + }), + ).subscribe(undefined, done.fail, done); + }); +}); diff --git a/packages/schematics/update/migrate/test/migration.json b/packages/schematics/update/migrate/test/migration.json new file mode 100644 index 0000000000..22e886c078 --- /dev/null +++ b/packages/schematics/update/migrate/test/migration.json @@ -0,0 +1,25 @@ +{ + "schematics": { + "migration-00": { "version": "0.1.0", "factory": "./t1", "description": "." }, + "migration-01": { "version": "1.0.0", "factory": "./t1", "description": "." }, + "migration-02": { "version": "1.1.0", "factory": "./t1", "description": "." }, + "migration-03": { "version": "1.0.5", "factory": "./t1", "description": "." }, + "migration-04": { "version": "1.1.0-beta.1", "factory": "./t1", "description": "." }, + "migration-05": { "version": "1.1.0-beta.0", "factory": "./t1", "description": "." }, + "migration-06": { "version": "1.4.0", "factory": "./t1", "description": "." }, + "migration-07": { "version": "2.0.0-rc.0", "factory": "./t1", "description": "." }, + "migration-08": { "version": "2.0.0-beta.0", "factory": "./t1", "description": "." }, + "migration-09": { "version": "4.0.0", "factory": "./t1", "description": "." }, + "migration-10": { "version": "0.1.0", "factory": "./t1", "description": "." }, + "migration-11": { "version": "2.1.0", "factory": "./t1", "description": "." }, + "migration-12": { "version": "2.0.0-rc.4", "factory": "./t1", "description": "." }, + "migration-13": { "version": "1.1.0", "factory": "./t1", "description": "." }, + "migration-14": { "version": "2.0.0", "factory": "./t1", "description": "." }, + "migration-15": { "version": "2.0.1", "factory": "./t1", "description": "." }, + "migration-16": { "version": "2.0.0-alpha.5", "factory": "./t1", "description": "." }, + "migration-17": { "version": "2.0.0-alpha", "factory": "./t1", "description": "." }, + "migration-18": { "version": "1", "factory": "./t1", "description": "." }, + "migration-19": { "version": "1.1", "factory": "./t1", "description": "." }, + "migration-20": { "version": "2", "factory": "./t1", "description": "." } + } +} \ No newline at end of file diff --git a/packages/schematics/update/migrate/test/t1.ts b/packages/schematics/update/migrate/test/t1.ts new file mode 100644 index 0000000000..9122c812c2 --- /dev/null +++ b/packages/schematics/update/migrate/test/t1.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Rule, SchematicsException } from '@angular-devkit/schematics'; + +export default function(): Rule { + return (tree, context) => { + let content = tree.read('/migrations'); + + // Append the information to migration file. We then verify the order of execution. + if (!content) { + tree.create('/migrations', '[]'); + content = tree.read('/migrations'); + + if (!content) { + throw new SchematicsException(); + } + } + + const json = JSON.parse(content.toString('utf-8')); + json.push(context.schematic.description.name); + + tree.overwrite('/migrations', JSON.stringify(json)); + + return tree; + }; +} From 2d6fd2d51edaf304a064b2d55af4feb8ce9f0964 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 29 Mar 2018 11:36:18 -0700 Subject: [PATCH 325/724] feat(@schematics/angular): the update migration is for beta.8, not final We need it for RC0. --- .../schematics/angular/migrations/migration-collection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/migration-collection.json b/packages/schematics/angular/migrations/migration-collection.json index 3bf8a51436..eaf1c49670 100644 --- a/packages/schematics/angular/migrations/migration-collection.json +++ b/packages/schematics/angular/migrations/migration-collection.json @@ -1,7 +1,7 @@ { "schematics": { "migration-01": { - "version": "6", + "version": "6.0.0-beta.8", "factory": "./update-6", "description": "Update an Angular CLI project to version 6." } From cfc954ff8738bfa1f6bbb2255bf94c1c20e7c6f2 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 29 Mar 2018 21:06:05 +0100 Subject: [PATCH 326/724] docs: update README.md links (#589) All links in to nmp in the README.md file were going to http://npmjs.com/packages/**/** so all lead to 404 pages on npm. They should be http://npmjs.com/package/**/** so this PR removes the s in link urls to npm. --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b5cc60b434..90c2d609de 100644 --- a/README.md +++ b/README.md @@ -50,29 +50,29 @@ This is a monorepo which contains many packages: | Project | Package | Version | Links | |---|---|---|---| -**Architect** | [`@angular-devkit/architect`](http://npmjs.com/packages/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) -**Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/packages/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/architect-cli) | -**Build Angular** | [`@angular-devkit/build-angular`](http://npmjs.com/packages/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) -**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](http://npmjs.com/packages/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) -**Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/packages/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) -**Core** | [`@angular-devkit/core`](http://npmjs.com/packages/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/packages/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) -**Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/packages/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) -**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/packages/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/packages/@angular-devkit/schematics-cli) | +**Architect** | [`@angular-devkit/architect`](http://npmjs.com/package/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/package/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) +**Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/package/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/package/@angular-devkit/architect-cli) | +**Build Angular** | [`@angular-devkit/build-angular`](http://npmjs.com/package/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](http://npmjs.com/package/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) +**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](http://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](http://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) +**Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/package/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/package/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) +**Core** | [`@angular-devkit/core`](http://npmjs.com/package/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/package/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) +**Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/package/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/package/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) +**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/package/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/package/@angular-devkit/schematics-cli) | #### Schematics | Project | Package | Version | Links | |---|---|---|---| -**Angular PWA Schematics** | [`@angular/pwa`](http://npmjs.com/packages/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](http://npmjs.com/packages/@angular/pwa) | -**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/packages/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/packages/@schematics/angular) | -**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/packages/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/packages/@schematics/package-update) | -**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/packages/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/packages/@schematics/schematics) | -**Package Update Schematics** | [`@schematics/update`](http://npmjs.com/packages/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](http://npmjs.com/packages/@schematics/update) | +**Angular PWA Schematics** | [`@angular/pwa`](http://npmjs.com/package/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](http://npmjs.com/package/@angular/pwa) | +**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/package/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/package/@schematics/angular) | +**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/package/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/package/@schematics/package-update) | +**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/package/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/package/@schematics/schematics) | +**Package Update Schematics** | [`@schematics/update`](http://npmjs.com/package/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](http://npmjs.com/package/@schematics/update) | #### Misc | Project | Package | Version | Links | |---|---|---|---| -**Webpack Angular Plugin** | [`@ngtools/webpack`](http://npmjs.com/packages/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](http://npmjs.com/packages/@ngtools/webpack) | +**Webpack Angular Plugin** | [`@ngtools/webpack`](http://npmjs.com/package/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](http://npmjs.com/package/@ngtools/webpack) | From a6e38d07fa6655905a6040d5bb1aab4f03bdbbbd Mon Sep 17 00:00:00 2001 From: clydin <19598772+clydin@users.noreply.github.com> Date: Thu, 29 Mar 2018 18:27:25 -0400 Subject: [PATCH 327/724] fix(@angular-devkit/build-angular): resolve with baseUrl instead of root (#590) --- .../src/angular-cli-files/models/webpack-configs/common.ts | 5 ++++- .../src/angular-cli-files/utilities/read-tsconfig.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index abb5a2964d..33eec157a5 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -222,7 +222,10 @@ export function getCommonConfig(wco: WebpackConfigOptions) { resolve: { extensions: ['.ts', '.js'], symlinks: !buildOptions.preserveSymlinks, - modules: [projectRoot, 'node_modules'], + modules: [ + wco.tsConfig.baseUrl || projectRoot, + 'node_modules', + ], alias }, resolveLoader: { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts index c8638cd1d6..6ff083a719 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts @@ -1,11 +1,11 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. - +import * as ts from 'typescript'; import * as path from 'path'; import { requireProjectModule } from '../utilities/require-project-module'; export function readTsconfig(tsconfigPath: string) { - const projectTs = requireProjectModule(path.dirname(tsconfigPath), 'typescript'); + const projectTs = requireProjectModule(path.dirname(tsconfigPath), 'typescript') as typeof ts; const configResult = projectTs.readConfigFile(tsconfigPath, projectTs.sys.readFile); const tsConfig = projectTs.parseJsonConfigFileContent(configResult.config, projectTs.sys, path.dirname(tsconfigPath), undefined, tsconfigPath); From f441edc4d4b98fd704c50f12a079088e43162ff2 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 29 Mar 2018 17:51:26 -0700 Subject: [PATCH 328/724] docs: fix templates script for npmjs links --- README.md | 28 ++++++++++++++-------------- scripts/templates/readme.ejs | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 90c2d609de..a96f3614bb 100644 --- a/README.md +++ b/README.md @@ -50,29 +50,29 @@ This is a monorepo which contains many packages: | Project | Package | Version | Links | |---|---|---|---| -**Architect** | [`@angular-devkit/architect`](http://npmjs.com/package/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](http://npmjs.com/package/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) -**Architect CLI** | [`@angular-devkit/architect-cli`](http://npmjs.com/package/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](http://npmjs.com/package/@angular-devkit/architect-cli) | -**Build Angular** | [`@angular-devkit/build-angular`](http://npmjs.com/package/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](http://npmjs.com/package/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) -**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](http://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](http://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) -**Build Optimizer** | [`@angular-devkit/build-optimizer`](http://npmjs.com/package/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](http://npmjs.com/package/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) -**Core** | [`@angular-devkit/core`](http://npmjs.com/package/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](http://npmjs.com/package/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) -**Schematics** | [`@angular-devkit/schematics`](http://npmjs.com/package/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](http://npmjs.com/package/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) -**Schematics CLI** | [`@angular-devkit/schematics-cli`](http://npmjs.com/package/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](http://npmjs.com/package/@angular-devkit/schematics-cli) | +**Architect** | [`@angular-devkit/architect`](https://npmjs.com/package/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](https://npmjs.com/package/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) +**Architect CLI** | [`@angular-devkit/architect-cli`](https://npmjs.com/package/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](https://npmjs.com/package/@angular-devkit/architect-cli) | +**Build Angular** | [`@angular-devkit/build-angular`](https://npmjs.com/package/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](https://npmjs.com/package/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) +**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) +**Build Optimizer** | [`@angular-devkit/build-optimizer`](https://npmjs.com/package/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](https://npmjs.com/package/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) +**Core** | [`@angular-devkit/core`](https://npmjs.com/package/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](https://npmjs.com/package/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) +**Schematics** | [`@angular-devkit/schematics`](https://npmjs.com/package/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](https://npmjs.com/package/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) +**Schematics CLI** | [`@angular-devkit/schematics-cli`](https://npmjs.com/package/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](https://npmjs.com/package/@angular-devkit/schematics-cli) | #### Schematics | Project | Package | Version | Links | |---|---|---|---| -**Angular PWA Schematics** | [`@angular/pwa`](http://npmjs.com/package/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](http://npmjs.com/package/@angular/pwa) | -**Angular Schematics** | [`@schematics/angular`](http://npmjs.com/package/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](http://npmjs.com/package/@schematics/angular) | -**Package JSON Update Schematics** | [`@schematics/package-update`](http://npmjs.com/package/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](http://npmjs.com/package/@schematics/package-update) | -**Schematics Schematics** | [`@schematics/schematics`](http://npmjs.com/package/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](http://npmjs.com/package/@schematics/schematics) | -**Package Update Schematics** | [`@schematics/update`](http://npmjs.com/package/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](http://npmjs.com/package/@schematics/update) | +**Angular PWA Schematics** | [`@angular/pwa`](https://npmjs.com/package/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](https://npmjs.com/package/@angular/pwa) | +**Angular Schematics** | [`@schematics/angular`](https://npmjs.com/package/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](https://npmjs.com/package/@schematics/angular) | +**Package JSON Update Schematics** | [`@schematics/package-update`](https://npmjs.com/package/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](https://npmjs.com/package/@schematics/package-update) | +**Schematics Schematics** | [`@schematics/schematics`](https://npmjs.com/package/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](https://npmjs.com/package/@schematics/schematics) | +**Package Update Schematics** | [`@schematics/update`](https://npmjs.com/package/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](https://npmjs.com/package/@schematics/update) | #### Misc | Project | Package | Version | Links | |---|---|---|---| -**Webpack Angular Plugin** | [`@ngtools/webpack`](http://npmjs.com/package/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](http://npmjs.com/package/@ngtools/webpack) | +**Webpack Angular Plugin** | [`@ngtools/webpack`](https://npmjs.com/package/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](https://npmjs.com/package/@ngtools/webpack) | diff --git a/scripts/templates/readme.ejs b/scripts/templates/readme.ejs index dea310189c..8732ef3a83 100644 --- a/scripts/templates/readme.ejs +++ b/scripts/templates/readme.ejs @@ -78,8 +78,8 @@ for (const pkgName of Object.keys(packages)) { } %>**<%= mrPkg.name%>**<% - %> | [`<%= pkgName %>`](http://npmjs.com/packages/<%= pkgName %>)<% - %> | [![latest](https://img.shields.io/npm/v/<%= encode(pkgName) %>/latest.svg)](http://npmjs.com/packages/<%= pkgName %>)<% + %> | [`<%= pkgName %>`](https://npmjs.com/package/<%= pkgName %>)<% + %> | [![latest](https://img.shields.io/npm/v/<%= encode(pkgName) %>/latest.svg)](https://npmjs.com/package/<%= pkgName %>)<% %> | <% for (const link of mrPkg.links || []) { %>[![<%= link.label %>](https://img.shields.io/badge/<%= link.label %>--<%= link.color || 'green' %>.svg)](<%= link.url %>)<% } %> From 8241f875bf5e0c8058b13f20db6a0f299d47ff53 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 22 Mar 2018 11:20:51 -0400 Subject: [PATCH 329/724] refactor: update to rxjs 6.0.0-beta.3 --- package.json | 2 +- .../angular_devkit/architect/package.json | 2 +- .../angular_devkit/architect/src/architect.ts | 9 +-- .../angular_devkit/architect/src/builder.ts | 2 +- .../architect/test/browser/index.ts | 2 +- .../architect/test/package.json | 2 +- .../architect_cli/bin/architect.ts | 4 +- .../angular_devkit/architect_cli/package.json | 2 +- .../angular_devkit/build_angular/package.json | 2 +- .../angular-cli-files/utilities/check-port.ts | 2 +- .../utilities/service-worker/index.ts | 4 +- .../build_angular/src/app-shell/index.ts | 11 +-- .../build_angular/src/browser/index.ts | 7 +- .../build_angular/src/dev-server/index.ts | 2 +- .../build_angular/src/extract-i18n/index.ts | 2 +- .../build_angular/src/karma/index.ts | 2 +- .../build_angular/src/protractor/index.ts | 6 +- .../build_angular/src/server/index.ts | 7 +- .../build_angular/src/tslint/index.ts | 2 +- .../utils/run-module-as-observable-fork.ts | 2 +- .../utils/webpack-file-system-host-adapter.ts | 3 +- .../test/dev-server/proxy_spec_large.ts | 4 +- .../test/dev-server/public-host_spec_large.ts | 8 +-- .../test/dev-server/serve-path_spec_large.ts | 6 +- .../test/dev-server/ssl_spec_large.ts | 6 +- .../test/dev-server/works_spec_large.ts | 4 +- .../test/utils/run-target-spec.ts | 2 +- .../test/utils/test-project-host.ts | 5 +- .../build_ng_packagr/package.json | 2 +- .../build_ng_packagr/src/build/index.ts | 2 +- packages/angular_devkit/core/node/host.ts | 34 ++++----- .../angular_devkit/core/node/host_spec.ts | 3 +- packages/angular_devkit/core/package.json | 2 +- .../core/src/json/schema/interface.ts | 2 +- .../core/src/json/schema/registry.ts | 18 ++--- .../core/src/json/schema/registry_spec.ts | 2 +- .../core/src/json/schema/visitor.ts | 71 ++++++++++--------- .../core/src/json/schema/visitor_spec.ts | 3 +- .../angular_devkit/core/src/logger/logger.ts | 6 +- .../core/src/logger/null-logger.ts | 4 +- .../core/src/logger/transform-logger.ts | 2 +- .../angular_devkit/core/src/utils/index.ts | 1 + .../angular_devkit/core/src/utils/lang.ts | 27 +++++++ .../core/src/virtual-fs/host/alias.ts | 2 +- .../core/src/virtual-fs/host/interface.ts | 2 +- .../core/src/virtual-fs/host/memory.ts | 3 +- .../core/src/virtual-fs/host/scoped.ts | 2 +- .../core/src/virtual-fs/host/sync.ts | 2 +- .../core/src/workspace/workspace.ts | 6 +- .../angular_devkit/schematics/package.json | 2 +- .../schematics/src/engine/engine.ts | 3 +- .../schematics/src/engine/interface.ts | 2 +- .../schematics/src/engine/schematic.ts | 7 +- .../schematics/src/engine/schematic_spec.ts | 2 +- .../schematics/src/engine/task.ts | 2 +- .../src/formats/format-validator.ts | 2 +- .../schematics/src/rules/base.ts | 3 +- .../schematics/src/rules/base_spec.ts | 2 +- .../schematics/src/rules/call.ts | 25 +++---- .../schematics/src/rules/call_spec.ts | 2 +- .../schematics/src/rules/move_spec.ts | 2 +- .../schematics/src/rules/schematic.ts | 2 +- .../schematics/src/sink/dryrun.ts | 4 +- .../schematics/src/sink/host.ts | 22 +++--- .../schematics/src/sink/sink.ts | 69 +++++++++--------- .../schematics/src/workflow/interface.ts | 2 +- .../schematics/tasks/node-package/executor.ts | 2 +- .../testing/schematic-test-runner.ts | 10 ++- .../schematics/tools/fallback-engine-host.ts | 8 +-- .../tools/file-system-engine-host-base.ts | 24 +++---- .../tools/file-system-engine-host_spec.ts | 2 +- .../tools/schema-option-transform.ts | 7 +- .../tools/workflow/node-workflow.ts | 57 ++++++++------- .../schematics_cli/package.json | 2 +- .../schematics/package_update/package.json | 2 +- .../schematics/package_update/utility/npm.ts | 36 +++++----- packages/schematics/update/package.json | 2 +- packages/schematics/update/update/index.ts | 4 +- packages/schematics/update/update/npm.ts | 3 +- tslint.json | 4 -- 80 files changed, 302 insertions(+), 322 deletions(-) create mode 100644 packages/angular_devkit/core/src/utils/lang.ts diff --git a/package.json b/package.json index 5d721ffd11..73c60fbbb2 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^5.5.8", + "rxjs": "^6.0.0-beta.3", "sass-loader": "^6.0.7", "semver": "^5.3.0", "semver-intersect": "^1.1.2", diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json index a5afda8cc1..b963d8fffb 100644 --- a/packages/angular_devkit/architect/package.json +++ b/packages/angular_devkit/architect/package.json @@ -8,7 +8,7 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "dependencies": { - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" }, "peerDependencies": { "@angular-devkit/core": "0.0.0" diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 7e3b7e0e43..00d8b0981b 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -21,10 +21,7 @@ import { virtualFs, } from '@angular-devkit/core'; import { resolve as nodeResolve } from '@angular-devkit/core/node'; -import { Observable } from 'rxjs/Observable'; -import { forkJoin } from 'rxjs/observable/forkJoin'; -import { of } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; +import { Observable, forkJoin, of, throwError } from 'rxjs'; import { concatMap, map, tap } from 'rxjs/operators'; import { BuildEvent, @@ -248,7 +245,7 @@ export class Architect { concatMap((pkgJson: JsonObject) => { const pkgJsonBuildersentry = pkgJson['builders'] as string; if (!pkgJsonBuildersentry) { - return _throw(new BuilderCannotBeResolvedException(builderConfig.builder)); + return throwError(new BuilderCannotBeResolvedException(builderConfig.builder)); } buildersJsonPath = join(dirname(normalize(pkgJsonPath)), pkgJsonBuildersentry); @@ -262,7 +259,7 @@ export class Architect { builderPaths = builderPathsMap.builders[builderName]; if (!builderPaths) { - return _throw(new BuilderCannotBeResolvedException(builderConfig.builder)); + return throwError(new BuilderCannotBeResolvedException(builderConfig.builder)); } // Resolve paths in the builder paths. diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts index e90bbcb0e9..525e03a41e 100644 --- a/packages/angular_devkit/architect/src/builder.ts +++ b/packages/angular_devkit/architect/src/builder.ts @@ -7,7 +7,7 @@ */ import { JsonObject, Path, experimental, logging, virtualFs } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { Architect, BuilderConfiguration } from './architect'; diff --git a/packages/angular_devkit/architect/test/browser/index.ts b/packages/angular_devkit/architect/test/browser/index.ts index c390a731f9..9c553f3cc3 100644 --- a/packages/angular_devkit/architect/test/browser/index.ts +++ b/packages/angular_devkit/architect/test/browser/index.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { BuildEvent, Builder, BuilderConfiguration } from '../../src'; diff --git a/packages/angular_devkit/architect/test/package.json b/packages/angular_devkit/architect/test/package.json index ba27998e12..ae8e52521e 100644 --- a/packages/angular_devkit/architect/test/package.json +++ b/packages/angular_devkit/architect/test/package.json @@ -1,6 +1,6 @@ { "builders": "builders.json", "dependencies": { - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" } } diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index 222b607a16..cd9530c01a 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -13,7 +13,7 @@ import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; import { existsSync, readFileSync } from 'fs'; import * as minimist from 'minimist'; import * as path from 'path'; -import { _throw } from 'rxjs/observable/throw'; +import { throwError } from 'rxjs'; import { concatMap } from 'rxjs/operators'; @@ -124,7 +124,7 @@ workspace.loadWorkspaceFromJson(workspaceJson).pipe( // TODO: better logging of what's happening. if (argv.help) { // TODO: add target help - return _throw('Target help NYI.'); + return throwError('Target help NYI.'); // architect.help(targetOptions, logger); } else { const builderConfig = architect.getBuilderConfiguration(targetSpec); diff --git a/packages/angular_devkit/architect_cli/package.json b/packages/angular_devkit/architect_cli/package.json index 1ab31bae82..7208a0f3fe 100644 --- a/packages/angular_devkit/architect_cli/package.json +++ b/packages/angular_devkit/architect_cli/package.json @@ -18,6 +18,6 @@ "@angular-devkit/core": "0.0.0", "@angular-devkit/architect": "0.0.0", "minimist": "^1.2.0", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" } } diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 43a7789e27..6b65a99a43 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -43,7 +43,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^5.5.8", + "rxjs": "^6.0.0-beta.3", "sass-loader": "^6.0.7", "silent-error": "^1.1.0", "source-map-support": "^0.5.0", diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/check-port.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/check-port.ts index 6f5478da19..316dac751e 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/check-port.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/check-port.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; const portfinder = require('portfinder'); diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts index aeadcf3dc5..f0427f0d21 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts @@ -8,9 +8,7 @@ import * as semver from 'semver'; import { resolveProjectModule } from '../require-project-module'; import { map, reduce, switchMap } from "rxjs/operators"; -import { Observable } from "rxjs"; -import { merge } from "rxjs/observable/merge"; -import { of } from "rxjs/observable/of"; +import { Observable, merge, of } from "rxjs"; export const NEW_SW_VERSION = '5.0.0-rc.0'; diff --git a/packages/angular_devkit/build_angular/src/app-shell/index.ts b/packages/angular_devkit/build_angular/src/app-shell/index.ts index 739668886f..4064551d2b 100644 --- a/packages/angular_devkit/build_angular/src/app-shell/index.ts +++ b/packages/angular_devkit/build_angular/src/app-shell/index.ts @@ -12,12 +12,7 @@ import { BuilderContext, } from '@angular-devkit/architect'; import { Path, getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { forkJoin } from 'rxjs/observable/forkJoin'; -import { fromPromise } from 'rxjs/observable/fromPromise'; -import { merge } from 'rxjs/observable/merge'; -import { of } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; +import { Observable, forkJoin, from, merge, of, throwError } from 'rxjs'; import { concatMap, map, switchMap } from 'rxjs/operators'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; import { BuildWebpackServerSchema } from '../server/schema'; @@ -102,7 +97,7 @@ export class AppShellBuilder implements Builder { const maybeMain = files.filter(x => re.test(x))[0]; if (!maybeMain) { - return _throw(new Error('Could not find the main bundle.')); + return throwError(new Error('Could not find the main bundle.')); } else { return of(join(outputPath, maybeMain)); } @@ -159,7 +154,7 @@ export class AppShellBuilder implements Builder { const outputPath = join(root, options.outputIndexPath || browserIndexOutputPath); // Render to HTML and overwrite the client index file. - return fromPromise( + return from( renderModuleFactory(AppServerModuleNgFactory, { document: indexHtml, url: options.route, diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index cf2e3898ff..3cf48c2826 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -13,9 +13,8 @@ import { } from '@angular-devkit/architect'; import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; -import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; -import { concat, concatMap } from 'rxjs/operators'; +import { Observable, concat, of } from 'rxjs'; +import { concatMap, last } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import * as webpack from 'webpack'; import { @@ -308,7 +307,7 @@ export class BrowserBuilder implements Builder { return host.exists(resolvedOutputPath).pipe( concatMap(exists => exists // TODO: remove this concat once host ops emit an event. - ? host.delete(resolvedOutputPath).pipe(concat(of(null))) + ? concat(host.delete(resolvedOutputPath), of(null)).pipe(last()) // ? of(null) : of(null)), ); diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 3e508a3db3..aa3e066e83 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -15,7 +15,7 @@ import { import { Path, getSystemPath, resolve, tags } from '@angular-devkit/core'; import { existsSync, readFileSync } from 'fs'; import * as path from 'path'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; import * as url from 'url'; import * as webpack from 'webpack'; diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index bf0390b87e..b20732b0d8 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -14,7 +14,7 @@ import { } from '@angular-devkit/architect'; import { resolve } from '@angular-devkit/core'; import * as path from 'path'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; import * as webpack from 'webpack'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index e443fed7a5..b620e6a758 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -14,7 +14,7 @@ import { } from '@angular-devkit/architect'; import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { getCommonConfig, diff --git a/packages/angular_devkit/build_angular/src/protractor/index.ts b/packages/angular_devkit/build_angular/src/protractor/index.ts index c4447742de..5af4b7fd2f 100644 --- a/packages/angular_devkit/build_angular/src/protractor/index.ts +++ b/packages/angular_devkit/build_angular/src/protractor/index.ts @@ -14,9 +14,7 @@ import { BuilderDescription, } from '@angular-devkit/architect'; import { Path, getSystemPath, normalize, resolve, tags } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { fromPromise } from 'rxjs/observable/fromPromise'; -import { of } from 'rxjs/observable/of'; +import { Observable, from, of } from 'rxjs'; import { concatMap, take, tap } from 'rxjs/operators'; import * as url from 'url'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; @@ -122,7 +120,7 @@ export class ProtractorBuilder implements Builder { // run `webdriver-manager update --standalone false --gecko false --quiet` // if you change this, update the command comment in prev line, and in `eject` task - return fromPromise(webdriverUpdate.program.run({ + return from(webdriverUpdate.program.run({ standalone: false, gecko: false, quiet: true, diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index c54ec7f446..13952472f4 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -14,9 +14,8 @@ import { } from '@angular-devkit/architect'; import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; import { Stats } from 'fs'; -import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; -import { concat, concatMap } from 'rxjs/operators'; +import { Observable, concat, of } from 'rxjs'; +import { concatMap, last } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import * as webpack from 'webpack'; import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; @@ -168,7 +167,7 @@ export class ServerBuilder implements Builder { return this.context.host.exists(resolvedOutputPath).pipe( concatMap(exists => exists // TODO: remove this concat once host ops emit an event. - ? this.context.host.delete(resolvedOutputPath).pipe(concat(of(null))) + ? concat(this.context.host.delete(resolvedOutputPath), of(null)).pipe(last()) // ? of(null) : of(null)), ); diff --git a/packages/angular_devkit/build_angular/src/tslint/index.ts b/packages/angular_devkit/build_angular/src/tslint/index.ts index 0e8da3c01e..77e29ef17f 100644 --- a/packages/angular_devkit/build_angular/src/tslint/index.ts +++ b/packages/angular_devkit/build_angular/src/tslint/index.ts @@ -17,7 +17,7 @@ import { readFileSync } from 'fs'; import * as glob from 'glob'; import { Minimatch } from 'minimatch'; import * as path from 'path'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import * as tslint from 'tslint'; // tslint:disable-line:no-implicit-dependencies import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; diff --git a/packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts b/packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts index c73ff048d4..7ae29d28e6 100644 --- a/packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts +++ b/packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts @@ -8,7 +8,7 @@ import { BuildEvent } from '@angular-devkit/architect'; import { ForkOptions, fork } from 'child_process'; import { resolve } from 'path'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; const treeKill = require('tree-kill'); diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-file-system-host-adapter.ts b/packages/angular_devkit/build_angular/src/utils/webpack-file-system-host-adapter.ts index 3380c102d6..461d1ce88d 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-file-system-host-adapter.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-file-system-host-adapter.ts @@ -8,8 +8,7 @@ import { FileDoesNotExistException, JsonObject, normalize, virtualFs } from '@angular-devkit/core'; import { Callback, InputFileSystem } from '@ngtools/webpack/src/webpack'; import { Stats } from 'fs'; -import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; +import { Observable, of } from 'rxjs'; import { map, mergeMap, switchMap } from 'rxjs/operators'; diff --git a/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts index a55ed00209..d3744c4ac7 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts @@ -8,7 +8,7 @@ import * as express from 'express'; // tslint:disable-line:no-implicit-dependencies import * as http from 'http'; -import { fromPromise } from 'rxjs/observable/fromPromise'; +import { from } from 'rxjs'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; @@ -41,7 +41,7 @@ describe('Dev Server Builder proxy', () => { runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('http://localhost:4200/api/test'))), + concatMap(() => from(request('http://localhost:4200/api/test'))), tap(response => { expect(response).toContain('TEST_API_RETURN'); server.close(); diff --git a/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts index 8a461a62ef..3d1b3eaa5a 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { fromPromise } from 'rxjs/observable/fromPromise'; +import { from } from 'rxjs'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; @@ -23,7 +23,7 @@ describe('Dev Server Builder public host', () => { it('works', (done) => { runTargetSpec(host, devServerTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('http://localhost:4200/', headers))), + concatMap(() => from(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('Invalid Host header')), take(1), ).subscribe(undefined, done.fail, done); @@ -34,7 +34,7 @@ describe('Dev Server Builder public host', () => { runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('http://localhost:4200/', headers))), + concatMap(() => from(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('HelloWorldApp')), take(1), ).subscribe(undefined, done.fail, done); @@ -45,7 +45,7 @@ describe('Dev Server Builder public host', () => { runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('http://localhost:4200/', headers))), + concatMap(() => from(request('http://localhost:4200/', headers))), tap(response => expect(response).toContain('HelloWorldApp')), take(1), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_angular/test/dev-server/serve-path_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/serve-path_spec_large.ts index 9d42e0a217..f0e16dbf8c 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/serve-path_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/serve-path_spec_large.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { fromPromise } from 'rxjs/observable/fromPromise'; +import { from } from 'rxjs'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; @@ -22,9 +22,9 @@ describe('Dev Server Builder serve path', () => { runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('http://localhost:4200/test/'))), + concatMap(() => from(request('http://localhost:4200/test/'))), tap(response => expect(response).toContain('HelloWorldApp')), - concatMap(() => fromPromise(request('http://localhost:4200/test/abc/'))), + concatMap(() => from(request('http://localhost:4200/test/abc/'))), tap(response => expect(response).toContain('HelloWorldApp')), take(1), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_angular/test/dev-server/ssl_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/ssl_spec_large.ts index 567cd9c1b7..cbc7e82817 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/ssl_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/ssl_spec_large.ts @@ -7,7 +7,7 @@ */ import { tags } from '@angular-devkit/core'; -import { fromPromise } from 'rxjs/observable/fromPromise'; +import { from } from 'rxjs'; import { concatMap, take, tap } from 'rxjs/operators'; import { DevServerBuilderOptions } from '../../src'; import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; @@ -22,7 +22,7 @@ describe('Dev Server Builder ssl', () => { runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), + concatMap(() => from(request('https://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), take(1), ).subscribe(undefined, done.fail, done); @@ -94,7 +94,7 @@ describe('Dev Server Builder ssl', () => { runTargetSpec(host, devServerTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('https://localhost:4200/index.html'))), + concatMap(() => from(request('https://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), take(1), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_angular/test/dev-server/works_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/works_spec_large.ts index 40a8819f96..da5e4bc0ec 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/works_spec_large.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { fromPromise } from 'rxjs/observable/fromPromise'; +import { from } from 'rxjs'; import { concatMap, take, tap } from 'rxjs/operators'; import { devServerTargetSpec, host, request, runTargetSpec } from '../utils'; @@ -18,7 +18,7 @@ describe('Dev Server Builder', () => { it('works', (done) => { runTargetSpec(host, devServerTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - concatMap(() => fromPromise(request('http://localhost:4200/index.html'))), + concatMap(() => from(request('http://localhost:4200/index.html'))), tap(response => expect(response).toContain('HelloWorldApp')), take(1), ).subscribe(undefined, done.fail, done); diff --git a/packages/angular_devkit/build_angular/test/utils/run-target-spec.ts b/packages/angular_devkit/build_angular/test/utils/run-target-spec.ts index a2dee96f2a..4d4197d0d6 100644 --- a/packages/angular_devkit/build_angular/test/utils/run-target-spec.ts +++ b/packages/angular_devkit/build_angular/test/utils/run-target-spec.ts @@ -8,7 +8,7 @@ import { Architect, BuildEvent, TargetSpecifier } from '@angular-devkit/architect'; import { experimental, join, logging, normalize } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { concatMap } from 'rxjs/operators'; import { TestProjectHost } from '../utils/test-project-host'; diff --git a/packages/angular_devkit/build_angular/test/utils/test-project-host.ts b/packages/angular_devkit/build_angular/test/utils/test-project-host.ts index e55c19c1ff..512d7a1f7c 100644 --- a/packages/angular_devkit/build_angular/test/utils/test-project-host.ts +++ b/packages/angular_devkit/build_angular/test/utils/test-project-host.ts @@ -15,8 +15,7 @@ import { import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { SpawnOptions, spawn } from 'child_process'; import { Stats } from 'fs'; -import { Observable } from 'rxjs/Observable'; -import { empty } from 'rxjs/observable/empty'; +import { EMPTY, Observable } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; @@ -39,7 +38,7 @@ export class TestProjectHost extends NodeJsSyncHost { initialize(): Observable { return this.exists(normalize('.git')).pipe( - concatMap(exists => !exists ? this._gitInit() : empty()), + concatMap(exists => !exists ? this._gitInit() : EMPTY), ); } diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 0704eae144..15c8441625 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -12,7 +12,7 @@ "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", "resolve": "^1.5.0", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" }, "peerDependencies": { "ng-packagr": "^2.2.0" diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index.ts b/packages/angular_devkit/build_ng_packagr/src/build/index.ts index 1771f1732c..20a3d672e3 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index.ts @@ -14,7 +14,7 @@ import { } from '@angular-devkit/architect'; import { getSystemPath, normalize, resolve } from '@angular-devkit/core'; import * as ngPackagr from 'ng-packagr'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; // TODO move this function to architect or somewhere else where it can be imported from. // Blatantly copy-pasted from 'require-project-module.ts'. diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 046aa9a92e..7cdcf6ca6f 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -6,16 +6,15 @@ * found in the LICENSE file at https://angular.io/license */ import * as fs from 'fs'; -import { Observable } from 'rxjs/Observable'; -import { empty } from 'rxjs/observable/empty'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { concat } from 'rxjs/operators/concat'; -import { concatMap } from 'rxjs/operators/concatMap'; -import { ignoreElements } from 'rxjs/operators/ignoreElements'; -import { map } from 'rxjs/operators/map'; -import { mergeMap } from 'rxjs/operators/mergeMap'; -import { publish } from 'rxjs/operators/publish'; -import { refCount } from 'rxjs/operators/refCount'; +import { EMPTY, Observable, concat, from as observableFrom } from 'rxjs'; +import { + concatMap, + ignoreElements, + map, + mergeMap, + publish, + refCount, +} from 'rxjs/operators'; import { Path, PathFragment, @@ -122,15 +121,16 @@ export class NodeJsAsyncHost implements virtualFs.Host { }; _recurseList(path); - return observableFrom(allFiles) - .pipe( + return concat( + observableFrom(allFiles).pipe( mergeMap(p => _callFs(fs.unlink, getSystemPath(p))), ignoreElements(), - concat(observableFrom(allDirs).pipe( - concatMap(p => _callFs(fs.rmdir, getSystemPath(p))), - )), + ), + observableFrom(allDirs).pipe( + concatMap(p => _callFs(fs.rmdir, getSystemPath(p))), map(() => {}), - ); + ), + ); } else { return _callFs(fs.unlink, getSystemPath(path)); } @@ -262,7 +262,7 @@ export class NodeJsSyncHost implements virtualFs.Host { fs.unlinkSync(getSystemPath(path)); } - return empty(); + return EMPTY; }), ); } diff --git a/packages/angular_devkit/core/node/host_spec.ts b/packages/angular_devkit/core/node/host_spec.ts index 4b98b3d062..f25e66fe51 100644 --- a/packages/angular_devkit/core/node/host_spec.ts +++ b/packages/angular_devkit/core/node/host_spec.ts @@ -11,8 +11,7 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { NodeJsAsyncHost, NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; -import { Observable } from 'rxjs/Observable'; -import { Subscription } from 'rxjs/Subscription'; +import { Observable, Subscription } from 'rxjs'; const temp = require('temp'); diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 6d9b37569e..c1c3589339 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -14,6 +14,6 @@ "ajv": "~5.5.1", "chokidar": "^1.7.0", "source-map": "^0.5.6", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" } } diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index a17211ec93..2e0c24c718 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { JsonArray, JsonObject, JsonValue } from '..'; export type JsonPointer = string & { diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 5db8ccdd03..fc0ad642eb 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -7,12 +7,9 @@ */ import * as ajv from 'ajv'; import * as http from 'http'; -import { Observable } from 'rxjs/Observable'; -import { fromPromise } from 'rxjs/observable/fromPromise'; -import { of as observableOf } from 'rxjs/observable/of'; -import { concat, concatMap, ignoreElements, map, switchMap } from 'rxjs/operators'; -import { observable } from 'rxjs/symbol/observable'; -import { PartiallyOrderedSet } from '../../utils'; +import { Observable, from, of as observableOf } from 'rxjs'; +import { concatMap, map, switchMap } from 'rxjs/operators'; +import { PartiallyOrderedSet, isObservable } from '../../utils'; import { JsonObject, JsonValue } from '../interface'; import { SchemaFormat, @@ -182,7 +179,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { return typeof result == 'boolean' ? observableOf([updatedData, result]) - : fromPromise((result as PromiseLike) + : from((result as PromiseLike) .then(result => [updatedData, result])); }), switchMap(([data, valid]) => { @@ -360,7 +357,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { } let value = source(schema); - if (typeof value != 'object' || !(observable in value)) { + if (!isObservable(value)) { value = observableOf(value); } @@ -369,9 +366,8 @@ export class CoreSchemaRegistry implements SchemaRegistry { map(x => _set(data, fragments, x)), )), ); - }, observableOf(undefined)).pipe( - ignoreElements(), - concat(observableOf(data)), + }, + observableOf(data), ); } } diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index a9d0833ca9..aaf3f20f08 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -7,7 +7,7 @@ */ // tslint:disable:no-any // tslint:disable:non-null-operator -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; import { CoreSchemaRegistry } from './registry'; diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index 03e467628f..0fd2f7cbf1 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -5,12 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { from } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; -import { concat, concatMap, ignoreElements, mergeMap, tap } from 'rxjs/operators'; -import { observable } from 'rxjs/symbol/observable'; +import { Observable, concat, from, of as observableOf } from 'rxjs'; +import { concatMap, ignoreElements, mergeMap, tap } from 'rxjs/operators'; import { JsonArray, JsonObject, JsonValue } from '..'; +import { isObservable } from '../../utils'; import { JsonPointer } from './interface'; import { buildJsonPointer, joinJsonPointer } from './pointer'; @@ -85,43 +83,46 @@ function _visitJsonRecursive( const value = visitor(json, ptr, schema, root); - return ( - (typeof value == 'object' && value != null && observable in value) + return (isObservable(value) ? value as Observable : observableOf(value as JsonValue | undefined) ).pipe( concatMap((value: JsonValue | undefined) => { if (Array.isArray(value)) { - return from(value).pipe( - mergeMap((item, i) => { - return _visitJsonRecursive( - item, - visitor, - joinJsonPointer(ptr, '' + i), - _getObjectSubSchema(schema, '' + i), - refResolver, - context, - root || value, - ).pipe(tap(x => value[i] = x)); - }), - ignoreElements(), - concat(observableOf(value)), + return concat( + from(value).pipe( + mergeMap((item, i) => { + return _visitJsonRecursive( + item, + visitor, + joinJsonPointer(ptr, '' + i), + _getObjectSubSchema(schema, '' + i), + refResolver, + context, + root || value, + ).pipe(tap(x => value[i] = x)); + }), + ignoreElements(), + ), + observableOf(value), ); } else if (typeof value == 'object' && value !== null) { - return from(Object.getOwnPropertyNames(value)).pipe( - mergeMap(key => { - return _visitJsonRecursive( - value[key], - visitor, - joinJsonPointer(ptr, key), - _getObjectSubSchema(schema, key), - refResolver, - context, - root || value, - ).pipe(tap(x => value[key] = x)); - }), - ignoreElements(), - concat(observableOf(value)), + return concat( + from(Object.getOwnPropertyNames(value)).pipe( + mergeMap(key => { + return _visitJsonRecursive( + value[key], + visitor, + joinJsonPointer(ptr, key), + _getObjectSubSchema(schema, key), + refResolver, + context, + root || value, + ).pipe(tap(x => value[key] = x)); + }), + ignoreElements(), + ), + observableOf(value), ); } else { return observableOf(value); diff --git a/packages/angular_devkit/core/src/json/schema/visitor_spec.ts b/packages/angular_devkit/core/src/json/schema/visitor_spec.ts index 3d6f10cbc8..ffe9389100 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor_spec.ts @@ -5,8 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { from } from 'rxjs/observable/from'; +import { Observable, from } from 'rxjs'; import { JsonObject, JsonValue } from '..'; import { visitJson } from './visitor'; diff --git a/packages/angular_devkit/core/src/logger/logger.ts b/packages/angular_devkit/core/src/logger/logger.ts index 231999d0ec..e31cc7ce89 100644 --- a/packages/angular_devkit/core/src/logger/logger.ts +++ b/packages/angular_devkit/core/src/logger/logger.ts @@ -5,11 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { PartialObserver } from 'rxjs/Observer'; -import { Operator } from 'rxjs/Operator'; -import { Subject } from 'rxjs/Subject'; -import { Subscription } from 'rxjs/Subscription'; +import { Observable, Operator, PartialObserver, Subject, Subscription } from 'rxjs'; import { JsonObject } from '../json/interface'; diff --git a/packages/angular_devkit/core/src/logger/null-logger.ts b/packages/angular_devkit/core/src/logger/null-logger.ts index 8136303019..4a687840a1 100644 --- a/packages/angular_devkit/core/src/logger/null-logger.ts +++ b/packages/angular_devkit/core/src/logger/null-logger.ts @@ -5,14 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { empty } from 'rxjs/observable/empty'; +import { EMPTY } from 'rxjs'; import { Logger, LoggerApi } from './logger'; export class NullLogger extends Logger { constructor(parent: Logger | null = null) { super('', parent); - this._observable = empty(); + this._observable = EMPTY; } asApi(): LoggerApi { diff --git a/packages/angular_devkit/core/src/logger/transform-logger.ts b/packages/angular_devkit/core/src/logger/transform-logger.ts index 14fd29605d..4d024fd2ff 100644 --- a/packages/angular_devkit/core/src/logger/transform-logger.ts +++ b/packages/angular_devkit/core/src/logger/transform-logger.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { LogEntry, Logger } from './logger'; diff --git a/packages/angular_devkit/core/src/utils/index.ts b/packages/angular_devkit/core/src/utils/index.ts index 5af3460efb..10b1855602 100644 --- a/packages/angular_devkit/core/src/utils/index.ts +++ b/packages/angular_devkit/core/src/utils/index.ts @@ -13,5 +13,6 @@ export * from './object'; export * from './template'; export * from './partially-ordered-set'; export * from './priority-queue'; +export * from './lang'; export { tags, strings }; diff --git a/packages/angular_devkit/core/src/utils/lang.ts b/packages/angular_devkit/core/src/utils/lang.ts new file mode 100644 index 0000000000..a2faa8605d --- /dev/null +++ b/packages/angular_devkit/core/src/utils/lang.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// Borrowed from @angular/core +import { Observable } from 'rxjs'; + +/** + * Determine if the argument is shaped like a Promise + */ +// tslint:disable-next-line:no-any +export function isPromise(obj: any): obj is Promise { + // allow any Promise/A+ compliant thenable. + // It's up to the caller to ensure that obj.then conforms to the spec + return !!obj && typeof obj.then === 'function'; +} + +/** + * Determine if the argument is an Observable + */ +// tslint:disable-next-line:no-any +export function isObservable(obj: any | Observable): obj is Observable { + return !!obj && (Symbol.observable in obj || typeof obj.subscribe === 'function'); +} diff --git a/packages/angular_devkit/core/src/virtual-fs/host/alias.ts b/packages/angular_devkit/core/src/virtual-fs/host/alias.ts index 6fefaec917..c90e293a37 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/alias.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/alias.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { NormalizedRoot, Path, PathFragment, join, split } from '../path'; import { FileBuffer, diff --git a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts index 7916daa798..bcd83d7b4d 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { Path, PathFragment } from '../path'; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index fcc6fc95dd..83e0bba3c1 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -5,8 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { Subject } from 'rxjs/Subject'; +import { Observable, Subject } from 'rxjs'; import { FileAlreadyExistException, FileDoesNotExistException, diff --git a/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts b/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts index e476d98513..d50be7636c 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/scoped.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { NormalizedRoot, Path, PathFragment, join } from '../path'; import { FileBuffer, diff --git a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts index 8cd0b5cd45..cd3eaf035b 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { BaseException } from '../../exception/exception'; import { Path, PathFragment } from '../path'; import { diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 34550e8683..d1474dbe27 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -6,9 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; +import { Observable, of, throwError } from 'rxjs'; import { concatMap, map, tap } from 'rxjs/operators'; import { JsonObject, @@ -224,7 +222,7 @@ export class Workspace { if (validatorResult.success) { return of(contentJsonCopy as T); } else { - return _throw(new SchemaValidationException(validatorResult.errors as string[])); + return throwError(new SchemaValidationException(validatorResult.errors as string[])); } }), ); diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index f8f68e2008..2b85cf6c44 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,7 +17,7 @@ ], "dependencies": { "@ngtools/json-schema": "^1.1.0", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" }, "peerDependencies": { "@angular-devkit/core": "0.0.0" diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index 1ecd83552d..f168e47261 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException, logging } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { from as observableFrom } from 'rxjs/observable/from'; +import { Observable, from as observableFrom } from 'rxjs'; import { concatMap } from 'rxjs/operators'; import { Url } from 'url'; import { MergeStrategy } from '../tree/interface'; diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 6fe9b72f0f..25ba5812f5 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { logging } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { Url } from 'url'; import { FileEntry, MergeStrategy, Tree } from '../tree/interface'; import { Workflow } from '../workflow'; diff --git a/packages/angular_devkit/schematics/src/engine/schematic.ts b/packages/angular_devkit/schematics/src/engine/schematic.ts index ed385cbeea..932fdd7628 100644 --- a/packages/angular_devkit/schematics/src/engine/schematic.ts +++ b/packages/angular_devkit/schematics/src/engine/schematic.ts @@ -6,11 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; -import { concatMap } from 'rxjs/operators/concatMap'; -import { first } from 'rxjs/operators/first'; -import { map } from 'rxjs/operators/map'; +import { Observable, of as observableOf } from 'rxjs'; +import { concatMap, first, map } from 'rxjs/operators'; import { callRule } from '../rules/call'; import { Tree } from '../tree/interface'; import { diff --git a/packages/angular_devkit/schematics/src/engine/schematic_spec.ts b/packages/angular_devkit/schematics/src/engine/schematic_spec.ts index 5f4c2a341f..5507e8e90e 100644 --- a/packages/angular_devkit/schematics/src/engine/schematic_spec.ts +++ b/packages/angular_devkit/schematics/src/engine/schematic_spec.ts @@ -7,7 +7,7 @@ */ // tslint:disable:non-null-operator import { logging } from '@angular-devkit/core'; -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; import { MergeStrategy, Tree } from '../tree/interface'; import { branch, empty } from '../tree/static'; import { CollectionDescription, Engine, Rule, Schematic, SchematicDescription } from './interface'; diff --git a/packages/angular_devkit/schematics/src/engine/task.ts b/packages/angular_devkit/schematics/src/engine/task.ts index 51029bf6c2..bff301f8d6 100644 --- a/packages/angular_devkit/schematics/src/engine/task.ts +++ b/packages/angular_devkit/schematics/src/engine/task.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { BaseException, PriorityQueue } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { SchematicContext } from './interface'; export class UnknownTaskDependencyException extends BaseException { diff --git a/packages/angular_devkit/schematics/src/formats/format-validator.ts b/packages/angular_devkit/schematics/src/formats/format-validator.ts index 2bf673772d..863a5b3e21 100644 --- a/packages/angular_devkit/schematics/src/formats/format-validator.ts +++ b/packages/angular_devkit/schematics/src/formats/format-validator.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { JsonObject, JsonValue, schema } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; diff --git a/packages/angular_devkit/schematics/src/rules/base.ts b/packages/angular_devkit/schematics/src/rules/base.ts index 9598251ca5..347d2ba833 100644 --- a/packages/angular_devkit/schematics/src/rules/base.ts +++ b/packages/angular_devkit/schematics/src/rules/base.ts @@ -5,8 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; +import { Observable, of as observableOf } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; import { FileOperator, Rule, SchematicContext, Source } from '../engine/interface'; import { FilteredTree } from '../tree/filtered'; diff --git a/packages/angular_devkit/schematics/src/rules/base_spec.ts b/packages/angular_devkit/schematics/src/rules/base_spec.ts index 8bf8d9becc..f425bfd327 100644 --- a/packages/angular_devkit/schematics/src/rules/base_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/base_spec.ts @@ -13,7 +13,7 @@ import { MergeStrategy, partitionApplyMerge, } from '@angular-devkit/schematics'; -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; import { Rule, SchematicContext, Source } from '../engine/interface'; import { Tree } from '../tree/interface'; import { empty } from '../tree/static'; diff --git a/packages/angular_devkit/schematics/src/rules/call.ts b/packages/angular_devkit/schematics/src/rules/call.ts index d155c34edc..6a94a9b32e 100644 --- a/packages/angular_devkit/schematics/src/rules/call.ts +++ b/packages/angular_devkit/schematics/src/rules/call.ts @@ -5,22 +5,13 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; -import { last } from 'rxjs/operators/last'; -import { mergeMap } from 'rxjs/operators/mergeMap'; -import { tap } from 'rxjs/operators/tap'; +import { BaseException, isObservable } from '@angular-devkit/core'; +import { Observable, of as observableOf, throwError } from 'rxjs'; +import { last, mergeMap, tap } from 'rxjs/operators'; import { Rule, SchematicContext, Source } from '../engine/interface'; import { Tree, TreeSymbol } from '../tree/interface'; -declare const Symbol: Symbol & { - readonly observable: symbol; -}; - - function _getTypeOfResult(value?: {}): string { if (value === undefined) { return 'undefined'; @@ -63,10 +54,10 @@ export function callSource(source: Source, context: SchematicContext): Observabl const result = source(context) as object; if (result === undefined) { - return _throw(new InvalidSourceResultException(result)); + return throwError(new InvalidSourceResultException(result)); } else if (TreeSymbol in result) { return observableOf(result as Tree); - } else if (Symbol.observable in result) { + } else if (isObservable(result)) { // Only return the last Tree, and make sure it's a Tree. return (result as Observable).pipe( last(), @@ -77,7 +68,7 @@ export function callSource(source: Source, context: SchematicContext): Observabl }), ); } else { - return _throw(new InvalidSourceResultException(result)); + return throwError(new InvalidSourceResultException(result)); } } @@ -92,7 +83,7 @@ export function callRule(rule: Rule, return observableOf(inputTree); } else if (TreeSymbol in result) { return observableOf(result as Tree); - } else if (Symbol.observable in result) { + } else if (isObservable(result)) { const obs = result as Observable; // Only return the last Tree, and make sure it's a Tree. @@ -107,7 +98,7 @@ export function callRule(rule: Rule, } else if (result === undefined) { return observableOf(inputTree); } else { - return _throw(new InvalidRuleResultException(result)); + return throwError(new InvalidRuleResultException(result)); } })); } diff --git a/packages/angular_devkit/schematics/src/rules/call_spec.ts b/packages/angular_devkit/schematics/src/rules/call_spec.ts index 743a394608..4d97a21c2d 100644 --- a/packages/angular_devkit/schematics/src/rules/call_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/call_spec.ts @@ -9,7 +9,7 @@ // tslint:disable:no-any // tslint:disable:no-implicit-dependencies import { MergeStrategy } from '@angular-devkit/schematics'; -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; import { Rule, SchematicContext, Source } from '../engine/interface'; import { Tree } from '../tree/interface'; import { empty } from '../tree/static'; diff --git a/packages/angular_devkit/schematics/src/rules/move_spec.ts b/packages/angular_devkit/schematics/src/rules/move_spec.ts index e54d7d448a..c6ceaab66c 100644 --- a/packages/angular_devkit/schematics/src/rules/move_spec.ts +++ b/packages/angular_devkit/schematics/src/rules/move_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ // tslint:disable:non-null-operator -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; import { SchematicContext } from '../engine/interface'; import { VirtualTree } from '../tree/virtual'; import { callRule } from './call'; diff --git a/packages/angular_devkit/schematics/src/rules/schematic.ts b/packages/angular_devkit/schematics/src/rules/schematic.ts index 2aabae9ef2..32d7492f90 100644 --- a/packages/angular_devkit/schematics/src/rules/schematic.ts +++ b/packages/angular_devkit/schematics/src/rules/schematic.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; import { Rule, SchematicContext } from '../engine/interface'; import { Tree } from '../tree/interface'; import { branch } from '../tree/static'; diff --git a/packages/angular_devkit/schematics/src/sink/dryrun.ts b/packages/angular_devkit/schematics/src/sink/dryrun.ts index d969040222..4c52b33701 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun.ts @@ -7,9 +7,7 @@ */ import { normalize, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { Observable } from 'rxjs/Observable'; -import { Subject } from 'rxjs/Subject'; -import { of } from 'rxjs/observable/of'; +import { Observable, Subject, of } from 'rxjs'; import { HostSink } from './host'; diff --git a/packages/angular_devkit/schematics/src/sink/host.ts b/packages/angular_devkit/schematics/src/sink/host.ts index bd0c9a845e..aa498ea2a6 100644 --- a/packages/angular_devkit/schematics/src/sink/host.ts +++ b/packages/angular_devkit/schematics/src/sink/host.ts @@ -6,11 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ import { Path, virtualFs } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { concat as concatObservables } from 'rxjs/observable/concat'; -import { empty } from 'rxjs/observable/empty'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; +import { + EMPTY, + Observable, + concat as concatObservables, + from as observableFrom, + of as observableOf, +} from 'rxjs'; import { concatMap, reduce } from 'rxjs/operators'; import { CreateFileAction } from '../tree/action'; import { UpdateBuffer } from '../utility/update-buffer'; @@ -26,7 +28,7 @@ export class HostSink extends SimpleSinkBase { constructor(protected _host: virtualFs.Host, protected _force = false) { super(); } protected _validateCreateAction(action: CreateFileAction): Observable { - return this._force ? empty() : super._validateCreateAction(action); + return this._force ? EMPTY : super._validateCreateAction(action); } protected _validateFileExists(p: Path): Observable { @@ -44,17 +46,17 @@ export class HostSink extends SimpleSinkBase { protected _overwriteFile(path: Path, content: Buffer): Observable { this._filesToUpdate.set(path, new UpdateBuffer(content)); - return empty(); + return EMPTY; } protected _createFile(path: Path, content: Buffer): Observable { this._filesToCreate.set(path, new UpdateBuffer(content)); - return empty(); + return EMPTY; } protected _renameFile(from: Path, to: Path): Observable { this._filesToRename.add([from, to]); - return empty(); + return EMPTY; } protected _deleteFile(path: Path): Observable { if (this._filesToCreate.has(path)) { @@ -64,7 +66,7 @@ export class HostSink extends SimpleSinkBase { this._filesToDelete.add(path); } - return empty(); + return EMPTY; } _done() { diff --git a/packages/angular_devkit/schematics/src/sink/sink.ts b/packages/angular_devkit/schematics/src/sink/sink.ts index 1329603b8d..30f0c53175 100644 --- a/packages/angular_devkit/schematics/src/sink/sink.ts +++ b/packages/angular_devkit/schematics/src/sink/sink.ts @@ -5,18 +5,18 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { defer as deferObservable } from 'rxjs/observable/defer'; -import { empty } from 'rxjs/observable/empty'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; import { + Observable, concat, + defer as deferObservable, + from as observableFrom, + of as observableOf, +} from 'rxjs'; +import { concatMap, ignoreElements, map, mergeMap, - reduce, } from 'rxjs/operators'; import { FileAlreadyExistException, FileDoesNotExistException } from '../exception/exception'; import { @@ -98,11 +98,9 @@ export abstract class SimpleSinkBase implements Sink { } commitSingleAction(action: Action): Observable { - return empty().pipe( - concat(new Observable(observer => { - return this.validateSingleAction(action).subscribe(observer); - })), - concat(new Observable(observer => { + return concat( + this.validateSingleAction(action), + new Observable(observer => { let committed = null; switch (action.kind) { case 'o': committed = this._overwriteFile(action.path, action.content); break; @@ -116,33 +114,36 @@ export abstract class SimpleSinkBase implements Sink { } else { observer.complete(); } - }))); + }), + ).pipe(ignoreElements()); } commit(tree: Tree): Observable { const actions = observableFrom(tree.actions); - return (this.preCommit() || empty()).pipe( - concat(deferObservable(() => actions)), - concatMap((action: Action) => { - const maybeAction = this.preCommitAction(action); - if (!maybeAction) { - return observableOf(action); - } else if (isAction(maybeAction)) { - return observableOf(maybeAction); - } else { - return maybeAction; - } - }), - concatMap((action: Action) => { - return this.commitSingleAction(action).pipe( - ignoreElements(), - concat([action])); - }), - concatMap((action: Action) => this.postCommitAction(action) || empty()), - concat(deferObservable(() => this._done())), - concat(deferObservable(() => this.postCommit() || empty())), - reduce(() => {}), - ); + return concat( + (this.preCommit() || observableOf(null)), + deferObservable(() => actions).pipe( + concatMap(action => { + const maybeAction = this.preCommitAction(action); + if (!maybeAction) { + return observableOf(action); + } else if (isAction(maybeAction)) { + return observableOf(maybeAction); + } else { + return maybeAction; + } + }), + concatMap(action => { + return concat( + this.commitSingleAction(action).pipe(ignoreElements()), + observableOf(action), + ); + }), + concatMap(action => this.postCommitAction(action) || observableOf(null)), + ), + deferObservable(() => this._done()), + deferObservable(() => this.postCommit() || observableOf(null)), + ).pipe(ignoreElements()); } } diff --git a/packages/angular_devkit/schematics/src/workflow/interface.ts b/packages/angular_devkit/schematics/src/workflow/interface.ts index 991dfd5d38..3179c82814 100644 --- a/packages/angular_devkit/schematics/src/workflow/interface.ts +++ b/packages/angular_devkit/schematics/src/workflow/interface.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { logging } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; export interface RequiredWorkflowExecutionContext { collection: string; diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index 4f6af9f5fa..c1e114c46d 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -8,7 +8,7 @@ import { BaseException } from '@angular-devkit/core'; import { SpawnOptions, spawn } from 'child_process'; import * as path from 'path'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { TaskExecutor } from '../../src'; import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options'; diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 457dfadf6e..39f319bee7 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -6,8 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { logging, schema } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; +import { Observable, of as observableOf } from 'rxjs'; import { map } from 'rxjs/operators'; import { Collection, @@ -91,11 +90,16 @@ export class SchematicTestRunner { const schematic = this._collection.createSchematic(schematicName, true); let result: UnitTestTree | null = null; + let error; const host = observableOf(tree || new VirtualTree); this._engineHost.clearTasks(); schematic.call(opts || {}, host, { logger: this._logger }) - .subscribe(t => result = new UnitTestTree(t)); + .subscribe(t => result = new UnitTestTree(t), e => error = e); + + if (error) { + throw error; + } if (result === null) { throw new Error('Schematic is async, please use runSchematicAsync'); diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index 735f469e76..a9c327cbc7 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -5,10 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; -import { mergeMap } from 'rxjs/operators/mergeMap'; +import { Observable, of as observableOf, throwError } from 'rxjs'; +import { mergeMap } from 'rxjs/operators'; import { Url } from 'url'; import { Collection, @@ -138,7 +136,7 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { } } - return _throw(new UnregisteredTaskException(name)); + return throwError(new UnregisteredTaskException(name)); } hasTaskExecutor(name: string): boolean { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 46ccb14fe3..284325eabc 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -5,14 +5,17 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException, JsonObject, normalize, virtualFs } from '@angular-devkit/core'; +import { + BaseException, + JsonObject, + isObservable, + normalize, + virtualFs, +} from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { dirname, isAbsolute, join, resolve } from 'path'; -import { Observable } from 'rxjs/Observable'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; -import { mergeMap } from 'rxjs/operators/mergeMap'; +import { Observable, from as observableFrom, of as observableOf, throwError } from 'rxjs'; +import { mergeMap } from 'rxjs/operators'; import { Url } from 'url'; import { EngineHost, @@ -34,11 +37,6 @@ import { import { readJsonFile } from './file-system-utility'; -declare const Symbol: Symbol & { - readonly observable: symbol; -}; - - export declare type OptionTransform = (schematic: FileSystemSchematicDescription, options: T) => Observable; @@ -268,7 +266,7 @@ export abstract class FileSystemEngineHostBase implements .pipe( ...this._transforms.map(tFn => mergeMap(opt => { const newOptions = tFn(schematic, opt); - if (Symbol.observable in newOptions) { + if (isObservable(newOptions)) { return newOptions; } else { return observableOf(newOptions); @@ -297,7 +295,7 @@ export abstract class FileSystemEngineHostBase implements return factory(); } - return _throw(new UnregisteredTaskException(name)); + return throwError(new UnregisteredTaskException(name)); } hasTaskExecutor(name: string): boolean { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts index b88c2e0bc6..7d21f4dbfe 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host_spec.ts @@ -11,7 +11,7 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { FileSystemTree, HostSink, SchematicEngine } from '@angular-devkit/schematics'; import { FileSystemEngineHost } from '@angular-devkit/schematics/tools'; import * as path from 'path'; -import { of as observableOf } from 'rxjs/observable/of'; +import { of as observableOf } from 'rxjs'; describe('FileSystemEngineHost', () => { diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index 8282121f5f..63b0e4137f 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -9,11 +9,8 @@ import { BaseException, schema, } from '@angular-devkit/core'; -import { Observable } from 'rxjs/Observable'; -import { of as observableOf } from 'rxjs/observable/of'; -import { first } from 'rxjs/operators/first'; -import { map } from 'rxjs/operators/map'; -import { mergeMap } from 'rxjs/operators/mergeMap'; +import { Observable, of as observableOf } from 'rxjs'; +import { first, map, mergeMap } from 'rxjs/operators'; import { SchematicDescription } from '../src'; import { FileSystemCollectionDescription, FileSystemSchematicDescription } from './description'; diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 7694707fb9..1b96703f9a 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -16,12 +16,8 @@ import { formats, workflow, } from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies -import { Observable } from 'rxjs/Observable'; -import { Subject } from 'rxjs/Subject'; -import { empty } from 'rxjs/observable/empty'; -import { of } from 'rxjs/observable/of'; -import { _throw } from 'rxjs/observable/throw'; -import { concat, concatMap, ignoreElements, map, reduce } from 'rxjs/operators'; +import { EMPTY, Observable, Subject, concat, of, throwError } from 'rxjs'; +import { concatMap, ignoreElements, map } from 'rxjs/operators'; import { NodeModulesEngineHost, validateOptionsWithSchema } from '..'; import { DryRunEvent } from '../../src/sink/dryrun'; import { BuiltinTaskExecutor } from '../../tasks/node'; @@ -106,27 +102,31 @@ export class NodeWorkflow implements workflow.Workflow { }; this._context.push(context); - return schematic.call(options.options, of(new HostTree(this._host)), { - logger: context.logger, - }).pipe( - map(tree => Tree.optimize(tree)), - concatMap((tree: Tree) => { - return dryRunSink.commit(tree).pipe( - ignoreElements(), - concat(of(tree)), - ); - }), - concatMap((tree: Tree) => { - dryRunSubscriber.unsubscribe(); - if (error) { - return _throw(new UnsuccessfulWorkflowExecution()); - } - if (this._options.dryRun) { - return empty(); - } - - return fsSink.commit(tree); - }), + return concat( + schematic.call(options.options, of(new HostTree(this._host)), { + logger: context.logger, + }).pipe( + map(tree => Tree.optimize(tree)), + concatMap((tree: Tree) => { + return concat( + dryRunSink.commit(tree).pipe( + ignoreElements(), + ), + of(tree), + ); + }), + concatMap((tree: Tree) => { + dryRunSubscriber.unsubscribe(); + if (error) { + return throwError(new UnsuccessfulWorkflowExecution()); + } + if (this._options.dryRun) { + return EMPTY; + } + + return fsSink.commit(tree); + }), + ), concat(new Observable(obs => { if (!this._options.dryRun) { this._engine.executePostTasks().subscribe(obs); @@ -138,7 +138,6 @@ export class NodeWorkflow implements workflow.Workflow { this._context.pop(); obs.complete(); })), - reduce(() => {}), - ); + ).pipe(ignoreElements()); } } diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index 79252b3e46..016eb916b2 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -25,6 +25,6 @@ "@angular-devkit/schematics": "0.0.0", "@schematics/schematics": "0.0.0", "minimist": "^1.2.0", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" } } diff --git a/packages/schematics/package_update/package.json b/packages/schematics/package_update/package.json index da765a6308..5399a61168 100644 --- a/packages/schematics/package_update/package.json +++ b/packages/schematics/package_update/package.json @@ -15,7 +15,7 @@ "dependencies": { "semver": "^5.3.0", "semver-intersect": "^1.1.2", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" }, "peerDependencies": { "@angular-devkit/core": "0.0.0", diff --git a/packages/schematics/package_update/utility/npm.ts b/packages/schematics/package_update/utility/npm.ts index 57b7bb3c2a..852e13f854 100644 --- a/packages/schematics/package_update/utility/npm.ts +++ b/packages/schematics/package_update/utility/npm.ts @@ -15,12 +15,15 @@ import { } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import * as http from 'http'; -import { Observable } from 'rxjs/Observable'; -import { ReplaySubject } from 'rxjs/ReplaySubject'; -import { empty } from 'rxjs/observable/empty'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { of as observableOf } from 'rxjs/observable/of'; -import { concat, ignoreElements, map, mergeMap } from 'rxjs/operators'; +import { + EMPTY, + Observable, + ReplaySubject, + concat, + from as observableFrom, + of as observableOf, +} from 'rxjs'; +import { ignoreElements, map, mergeMap } from 'rxjs/operators'; import * as semver from 'semver'; const semverIntersect = require('semver-intersect'); @@ -136,29 +139,29 @@ function _getRecursiveVersions( .filter(x => !!x), ); } else { - return empty(); + return EMPTY; } }), mergeMap(([depName, depVersion]: [string, string]) => { if (!packages[depName] || packages[depName] === depVersion) { - return empty(); + return EMPTY; } if (allVersions[depName] && semver.intersects(allVersions[depName], depVersion)) { allVersions[depName] = semverIntersect.intersect(allVersions[depName], depVersion); - return empty(); + return EMPTY; } return _getNpmPackageJson(depName, logger).pipe( - map(json => [packages[depName], depName, depVersion, json]), + map(json => ({ version: packages[depName], depName, depVersion, npmPackageJson: json })), ); }), - mergeMap(([version, depName, depVersion, npmPackageJson]) => { + mergeMap(({version, depName, depVersion, npmPackageJson}) => { const updateVersion = _getVersionFromNpmPackage(npmPackageJson, version, loose); const npmPackageVersions = Object.keys(npmPackageJson['versions'] as JsonObject); const match = semver.maxSatisfying(npmPackageVersions, updateVersion); if (!match) { - return empty(); + return EMPTY; } if (semver.lt( semverIntersect.parseRange(updateVersion).version, @@ -236,10 +239,11 @@ export function updatePackageJson( packages[name] = version; } - return _getRecursiveVersions(packageJson, packages, allVersions, context.logger, loose).pipe( - ignoreElements(), - concat(observableOf(tree)), - map(_ => tree), // Just to get the TypeScript typesystem fixed. + return concat( + _getRecursiveVersions(packageJson, packages, allVersions, context.logger, loose).pipe( + ignoreElements(), + ), + observableOf(tree), ); }, (tree: Tree) => { diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index 151c8311c7..b0eb62e25b 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "dependencies": { "semver": "^5.3.0", "semver-intersect": "^1.1.2", - "rxjs": "^5.5.8" + "rxjs": "^6.0.0-beta.3" }, "peerDependencies": { "@angular-devkit/core": "0.0.0", diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 3ba6836c4b..933da33f1c 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -8,9 +8,7 @@ import { logging } from '@angular-devkit/core'; import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics'; import { NodePackageInstallTask, RunSchematicTask } from '@angular-devkit/schematics/tasks'; -import { Observable } from 'rxjs/Observable'; -import { from as observableFrom } from 'rxjs/observable/from'; -import { of } from 'rxjs/observable/of'; +import { Observable, from as observableFrom, of } from 'rxjs'; import { map, mergeMap, reduce, switchMap } from 'rxjs/operators'; import * as semver from 'semver'; import { getNpmPackageJson } from './npm'; diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index ce61602000..d5edf0fa61 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -7,8 +7,7 @@ */ import { logging } from '@angular-devkit/core'; import * as http from 'http'; -import { Observable } from 'rxjs/Observable'; -import { ReplaySubject } from 'rxjs/ReplaySubject'; +import { Observable, ReplaySubject } from 'rxjs'; import { NpmRepositoryPackageJson } from './npm-package-json'; diff --git a/tslint.json b/tslint.json index cf19229e9d..5ac13c834d 100644 --- a/tslint.json +++ b/tslint.json @@ -11,10 +11,6 @@ "no-implicit-dependencies": true, - "import-blacklist": [ - true, - "rxjs" - ], "no-import-side-effect": [true, {"ignore-module": "^(?!rxjs\/)"}], "align": [ true, From a0681fff1e4a34dc87a88722b4f71166208bb741 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 22 Mar 2018 11:22:00 -0400 Subject: [PATCH 330/724] build: remove old rxjs dependency patching --- package.json | 1 - scripts/patch-dependencies.ts | 18 ------------------ scripts/patches/rxjs-typings.patch | 10 ---------- 3 files changed, 29 deletions(-) delete mode 100644 scripts/patch-dependencies.ts delete mode 100644 scripts/patches/rxjs-typings.patch diff --git a/package.json b/package.json index 73c60fbbb2..d5f955e2c1 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "integration:build-optimizer": "npm run integration:build-optimizer:simple && npm run integration:build-optimizer:aio", "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q --no-save && npm run e2e && npm run benchmark", "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q --no-save && npm run e2e && npm run benchmark", - "postinstall": "npm run admin -- patch-dependencies", "prepush": "node ./bin/devkit-admin hooks/pre-push", "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.33" }, diff --git a/scripts/patch-dependencies.ts b/scripts/patch-dependencies.ts deleted file mode 100644 index a3eda95bb1..0000000000 --- a/scripts/patch-dependencies.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { execSync } from 'child_process'; -import { existsSync, writeFileSync } from 'fs'; - -const PATCH_LOCK = 'node_modules/rxjs/.patched'; - -export default function () { - if (!existsSync(PATCH_LOCK)) { - execSync('patch -p0 -i scripts/patches/rxjs-typings.patch'); - writeFileSync(PATCH_LOCK, ''); - } -} diff --git a/scripts/patches/rxjs-typings.patch b/scripts/patches/rxjs-typings.patch deleted file mode 100644 index 19431748cf..0000000000 --- a/scripts/patches/rxjs-typings.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- node_modules/rxjs/Observable.d.ts 2018-02-20 11:24:56.000000000 -0500 -+++ node_modules/rxjs/Observable.d.ts 2018-02-20 11:25:21.000000000 -0500 -@@ -69,6 +69,7 @@ - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction): Observable; -+ pipe(...operations: OperatorFunction[]): Observable; - toPromise(this: Observable): Promise; - toPromise(this: Observable, PromiseCtor: typeof Promise): Promise; - toPromise(this: Observable, PromiseCtor: PromiseConstructorLike): Promise; From f582909c439738d2710e79cc375feeda48ba9267 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 23 Mar 2018 13:47:21 -0400 Subject: [PATCH 331/724] refactor: polyfill symbol-observable in utilities --- package-lock.json | 34 +++++++++++++++---- package.json | 1 + .../architect_cli/bin/architect.ts | 3 ++ .../angular_devkit/architect_cli/package.json | 1 + .../angular_devkit/core/src/utils/lang.ts | 10 +++++- .../schematics_cli/bin/schematics.ts | 4 +++ .../schematics_cli/package.json | 1 + 7 files changed, 46 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 27eeffb85e..f1f453de62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7419,6 +7419,14 @@ "glob": "7.1.2" } }, + "rxjs": { + "version": "5.5.8", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.8.tgz", + "integrity": "sha512-Bz7qou7VAIoGiglJZbzbXa4vpX5BmTTN2Dj/se6+SwADtw4SihqBIiEa7VmTXJ8pynvq0iFr5Gx9VLyye1rIxQ==", + "requires": { + "symbol-observable": "1.0.1" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -7432,6 +7440,11 @@ "has-flag": "3.0.0" } }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + }, "tar": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", @@ -9474,11 +9487,18 @@ } }, "rxjs": { - "version": "5.5.8", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.8.tgz", - "integrity": "sha512-Bz7qou7VAIoGiglJZbzbXa4vpX5BmTTN2Dj/se6+SwADtw4SihqBIiEa7VmTXJ8pynvq0iFr5Gx9VLyye1rIxQ==", + "version": "6.0.0-beta.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0-beta.3.tgz", + "integrity": "sha512-Rkc4BDr75zsX4ozYOra9E0uAn8jDlnNvE7ISx/w6P7fkREmJH3Y0Zsz0FKRdo/AjWVzqytvjN1umHlTv/Ozayg==", "requires": { - "symbol-observable": "1.0.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "safe-buffer": { @@ -10734,9 +10754,9 @@ } }, "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" }, "syntax-error": { "version": "1.3.0", diff --git a/package.json b/package.json index d5f955e2c1..40ae24d972 100644 --- a/package.json +++ b/package.json @@ -143,6 +143,7 @@ "style-loader": "^0.20.2", "stylus": "^0.54.5", "stylus-loader": "^3.0.2", + "symbol-observable": "^1.2.0", "tar": "^3.1.5", "temp": "^0.8.3", "tree-kill": "^1.2.0", diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index cd9530c01a..36aa58b7f5 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -7,6 +7,9 @@ * found in the LICENSE file at https://angular.io/license */ +import 'symbol-observable'; +// symbol polyfill must go first +// tslint:disable-next-line:ordered-imports import-groups import { Architect } from '@angular-devkit/architect'; import { dirname, experimental, normalize, tags } from '@angular-devkit/core'; import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; diff --git a/packages/angular_devkit/architect_cli/package.json b/packages/angular_devkit/architect_cli/package.json index 7208a0f3fe..16ffb9972e 100644 --- a/packages/angular_devkit/architect_cli/package.json +++ b/packages/angular_devkit/architect_cli/package.json @@ -18,6 +18,7 @@ "@angular-devkit/core": "0.0.0", "@angular-devkit/architect": "0.0.0", "minimist": "^1.2.0", + "symbol-observable": "^1.2.0", "rxjs": "^6.0.0-beta.3" } } diff --git a/packages/angular_devkit/core/src/utils/lang.ts b/packages/angular_devkit/core/src/utils/lang.ts index a2faa8605d..1fc0b09cbe 100644 --- a/packages/angular_devkit/core/src/utils/lang.ts +++ b/packages/angular_devkit/core/src/utils/lang.ts @@ -23,5 +23,13 @@ export function isPromise(obj: any): obj is Promise { */ // tslint:disable-next-line:no-any export function isObservable(obj: any | Observable): obj is Observable { - return !!obj && (Symbol.observable in obj || typeof obj.subscribe === 'function'); + if (!obj || typeof obj !== 'object') { + return false; + } + + if (Symbol.observable && Symbol.observable in obj) { + return true; + } + + return typeof obj.subscribe === 'function'; } diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index a2593cff45..6181866597 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -6,6 +6,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ + +import 'symbol-observable'; +// symbol polyfill must go first +// tslint:disable-next-line:ordered-imports import-groups import { JsonObject, normalize, diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index 016eb916b2..6aaa5c332f 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -25,6 +25,7 @@ "@angular-devkit/schematics": "0.0.0", "@schematics/schematics": "0.0.0", "minimist": "^1.2.0", + "symbol-observable": "^1.2.0", "rxjs": "^6.0.0-beta.3" } } From 22e6a241b1a6837608728c1efa3d949cca49ff1d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sat, 24 Mar 2018 17:41:48 -0400 Subject: [PATCH 332/724] test: update angular packages to 6.0.0-rc.0 --- package-lock.json | 178 ++++++++++++------ package.json | 25 ++- .../test/browser/styles_spec_large.ts | 2 +- .../hello-world-app/package.json | 24 +-- 4 files changed, 145 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1f453de62..2c7c380538 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,41 +16,54 @@ } }, "@angular/animations": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.9.tgz", - "integrity": "sha512-H/3fMs4PhYjKoA81II6D0PHifDrqlKet2u/EXzUBq3ehXby+N/0GBzqsBYwPeU5pTye7WPFfW+5sgoJpN8Ye6Q==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.0.tgz", + "integrity": "sha512-0OeClBhZzLvHv86DrsnVnCml7PObgTjLfWMgmkjil9GX8R5P7Ha8CmSkFqw01btvwYEW1IiIAODufFL+/Rm48Q==", "requires": { - "tslib": "1.8.1" - } - }, - "@angular/cdk": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-5.2.4.tgz", - "integrity": "sha1-wKQpqHENj+2xV/VG4hy0nUM19/c=", - "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/common": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.9.tgz", - "integrity": "sha512-g2hPcI0fnT4TV+Fd+1IohjuqBxPvxwyH9IzTn8PkU9X2M+F6cHCUvHxL1sWI2sF8pYcaHzVjq9WClym10X36Lg==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.0.tgz", + "integrity": "sha512-zmsy34fmdL4Moj3zQL2C4YKBBEKUiSmYyK7GeiuvnOqQcHuom3hR/Bcg6P7dCwkkonUDtWSN+YcL7Yb5TmY0lg==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/compiler": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.9.tgz", - "integrity": "sha512-mN+ofInk8y/tk2TCJZx8RrGdOKdrfunoCair7tfDy4XoQJE90waGfaYWo07hYU+UYwLhrg19m2Czy6rIDciUJA==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.0.tgz", + "integrity": "sha512-KEWTUduV0fHsVdHm34PaqVTxSohpXDQtNplsAd2U+3/2gkrQNW83CWR5Ec4fbJyZmq0RrRhycHomYks8J+KLWA==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/compiler-cli": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.9.tgz", - "integrity": "sha512-LAEpL/6PAev3zwTow/43Atzv9AtKLAiLoS285X3EV1f80yQpYAmFRrPUtDlrIZdhZHBBv7CxnyCVpOLU3T8ohw==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.0.tgz", + "integrity": "sha512-BTCZEAc/XSywiesuVS1mxRxryvngdG6hjNV396qas61+h/D9JItOTZ5nb0oHs81IPMUZg5Gv53uUG4GdrTuu0g==", "requires": { "chokidar": "1.7.0", "minimist": "1.2.0", @@ -59,69 +72,118 @@ } }, "@angular/core": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.9.tgz", - "integrity": "sha512-cvHBJGtasrIoARvbLFyHaOsiWKVwMNrrSTZLwrlyHP8oYzkDrE0qKGer6QCqyKt+51hF53cgWEffGzM/u/0wYg==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.0.tgz", + "integrity": "sha512-hDvP9XX7ypkK8iumvShlOGeQXTCCLpLSPGMSc9bYuaFiqC11lLmX8KVfoMbR/IYHoB1skPmeWncUMe8cTChRyQ==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/http": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.9.tgz", - "integrity": "sha512-DKjgIk+Dp0Xv1ieG8LawvUnL4dYZp1KroAq5cfKuO9EojP0zM3tUvBtw2vbPLsHYma7g7ZMjOoAbzVxtmTBZqw==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.0.tgz", + "integrity": "sha512-I1OLtuH5Bh27zMnl8ZX7o3cIM1wIqJwXXxRz+S0jmpPTT0suh0PrmYGi6kgwTssXx5m4/cAPtj8eDJoC9gii4w==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/material": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-5.2.4.tgz", - "integrity": "sha1-noI3mDJCg9I+qDkVb6xby3NEPVU=", + "version": "6.0.0-beta-0", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-beta-0.tgz", + "integrity": "sha512-DEfnVALypdLGQnJazCuc+R8oORWPD2Utj1AJHL+ffFTjumNVY3Rp/MeToW4MaGw2MvYQ13MhnudNzThV423DdQ==", "requires": { "tslib": "1.8.1" } }, "@angular/platform-browser": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.9.tgz", - "integrity": "sha512-P6iviRTuLsLRuqtZNOO0fd4cjTo8DWsDCecwntUlI08R3kH5qeqvqarTzlw/4oD+wBzZY6bfb89JyY+n5XbX3Q==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.0.tgz", + "integrity": "sha512-ydjCNG18PVXhtBOxJTNJ2/fELT7IDrN7fpUZh5idnyJhevc0hiFSil0PGb1LYnLyXVLLb633R9ZDfuOfrJednA==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/platform-browser-dynamic": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.9.tgz", - "integrity": "sha512-8C3MtyguJKDTT8FcHIRDlBxswcIdpfugOf4S2t94pVedCr4h9w2da/lcfwJKUISw1aKjfA77Sl8TDUhoS8ymmQ==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.0.tgz", + "integrity": "sha512-nQ4yVl+6lifFm246NZgZ0ceZGJtk+4yBRFCLxdIpNVC1NYsfIOtJn0PDpojmiN8lxE1yEpCJLJ2hMSikDGB8Hg==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/platform-server": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-5.2.9.tgz", - "integrity": "sha512-BXal5+cltR0Qo8xuum5SHkDYaChBrf1ygJUU58nGVn7SptweI9z3B6woRAJxfij8aobf5uDEL9jaAygxUfQECg==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.0.tgz", + "integrity": "sha512-roJnke7VV4ryR/nsiqyOiV2UzdJnySN2u7lTuniHTKZbCSe9ZNoOT3OJMHhfakMD6hc9/mDIFHTB4ghP4Iw9wA==", "requires": { - "domino": "1.0.30", - "tslib": "1.8.1", + "domino": "2.0.2", + "tslib": "1.9.0", "xhr2": "0.1.4" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/router": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.9.tgz", - "integrity": "sha512-NtDbFK0EA1rfFc+5Dqd5mIv8E1Wcc5rDUnSty4cX2V+HxTEZvQ9DRdpO2Q0abWU5siXyqponuPHJzF08OVGyNA==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.0.tgz", + "integrity": "sha512-7NZ34xZCEUdiPXaNaa9MeMIsggMW4GjVpiR+T5ZJ5r4Mcv3ltq+4Av+ugO7/hx6QyNMYOX1IJSr4mogp2Wt9Qg==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@angular/service-worker": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.9.tgz", - "integrity": "sha512-gni6t7rU8wGoRsCoXkQBO1p3cfPjpRXWxef1VeMnlRVL5EYhasLalR2zVSTqHJGQ1IPAw52bHhivGTVaLlErqQ==", + "version": "6.0.0-rc.0", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.0.tgz", + "integrity": "sha512-oHMkbnh7ZeWl00uKN8noeaA77IKL3LuEvqJnFBedZfILJ6Idrs8JaTmdajA50mALDUu6BGft+qRP50oh0CUfHA==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + } } }, "@ngtools/json-schema": { @@ -2766,9 +2828,9 @@ } }, "domino": { - "version": "1.0.30", - "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz", - "integrity": "sha512-ikq8WiDSkICdkElud317F2Sigc6A3EDpWsxWBwIZqOl95km4p/Vc9Rj98id7qKgsjDmExj0AVM7JOd4bb647Xg==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/domino/-/domino-2.0.2.tgz", + "integrity": "sha512-vzykUakUw5s1p0RrN/vI2sShYo3pLRy/z7PM1PuOIZIlMOJ0XfOnrckGE5f4MxIQVe5XcrH7yG9mR+l77mgLVA==" }, "domutils": { "version": "1.5.1", diff --git a/package.json b/package.json index 40ae24d972..b8d3adece4 100644 --- a/package.json +++ b/package.json @@ -52,19 +52,18 @@ "homepage": "https://github.com/angular/devkit", "dependencies": { "@angular-devkit/build-optimizer": "^0.4.2", - "@angular/animations": "5.2.9", - "@angular/common": "5.2.9", - "@angular/compiler": "5.2.9", - "@angular/compiler-cli": "5.2.9", - "@angular/core": "5.2.9", - "@angular/http": "5.2.9", - "@angular/material": "5.2.4", - "@angular/cdk": "5.2.4", - "@angular/platform-browser": "5.2.9", - "@angular/platform-browser-dynamic": "5.2.9", - "@angular/platform-server": "5.2.9", - "@angular/router": "5.2.9", - "@angular/service-worker": "5.2.9", + "@angular/animations": "^6.0.0-rc.0", + "@angular/common": "^6.0.0-rc.0", + "@angular/compiler": "^6.0.0-rc.0", + "@angular/compiler-cli": "^6.0.0-rc.0", + "@angular/core": "^6.0.0-rc.0", + "@angular/http": "^6.0.0-rc.0", + "@angular/material": "^6.0.0-beta.5", + "@angular/platform-browser": "^6.0.0-rc.0", + "@angular/platform-browser-dynamic": "^6.0.0-rc.0", + "@angular/platform-server": "^6.0.0-rc.0", + "@angular/router": "^6.0.0-rc.0", + "@angular/service-worker": "^6.0.0-rc.0", "@ngtools/json-schema": "^1.0.9", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index d58ce0f971..6f0caeb784 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -519,7 +519,7 @@ describe('Browser Builder styles', () => { expect(main).toContain(`url('/base/assets/component-img-absolute.svg')`); }), ).subscribe(undefined, done.fail, done); - }, 60000); + }, 90000); it(`supports bootstrap@4`, (done) => { const overrides = { diff --git a/tests/@angular_devkit/build_angular/hello-world-app/package.json b/tests/@angular_devkit/build_angular/hello-world-app/package.json index 18e425a6de..1c11bcc465 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/package.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/package.json @@ -12,23 +12,23 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.2.0", - "@angular/common": "^5.2.0", - "@angular/compiler": "^5.2.0", - "@angular/core": "^5.2.0", - "@angular/forms": "^5.2.0", - "@angular/http": "^5.2.0", - "@angular/platform-browser": "^5.2.0", - "@angular/platform-browser-dynamic": "^5.2.0", - "@angular/router": "^5.2.0", + "@angular/animations": "^6.0.0-rc.0", + "@angular/common": "^6.0.0-rc.0", + "@angular/compiler": "^6.0.0-rc.0", + "@angular/core": "^6.0.0-rc.0", + "@angular/forms": "^6.0.0-rc.0", + "@angular/http": "^6.0.0-rc.0", + "@angular/platform-browser": "^6.0.0-rc.0", + "@angular/platform-browser-dynamic": "^6.0.0-rc.0", + "@angular/router": "^6.0.0-rc.0", "core-js": "^2.4.1", - "rxjs": "^5.5.8", + "rxjs": "^6.0.0-beta.3", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "1.7.0-beta.1", - "@angular/compiler-cli": "^5.2.0", - "@angular/language-service": "^5.2.0", + "@angular/compiler-cli": "^6.0.0-rc.0", + "@angular/language-service": "^6.0.0-rc.0", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", From 6a5c306f0fc035b4f137802cbd6d9b9f56b44dd4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 30 Mar 2018 12:17:47 +0100 Subject: [PATCH 333/724] fix(@angular-devkit/build-angular): make asset output absolute without builder output. --- .../models/webpack-configs/common.ts | 60 +++++-------------- .../models/webpack-configs/utils.ts | 7 --- .../src/angular-cli-files/plugins/karma.ts | 54 ++++++++--------- .../build_angular/src/browser/index.ts | 3 - .../build_angular/src/browser/schema.json | 17 +++--- .../build_angular/src/karma/schema.json | 17 +++--- .../test/browser/assets_spec_large.ts | 46 +++----------- .../test/karma/assets_spec_large.ts | 6 +- .../schematics/angular/application/index.ts | 8 +-- .../hello-world-app/.angular.json | 8 +-- 10 files changed, 73 insertions(+), 153 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 33eec157a5..9b8aceb71d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { HashedModuleIdsPlugin } from 'webpack'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; -import { extraEntryParser, getOutputHashFormat, AssetPattern } from './utils'; +import { extraEntryParser, getOutputHashFormat } from './utils'; import { isDirectory } from '../../utilities/is-directory'; import { requireProjectModule } from '../../utilities/require-project-module'; import { WebpackConfigOptions } from '../build-options'; @@ -12,6 +12,7 @@ import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; import { findUp } from '../../utilities/find-up'; +import { AssetPattern } from '../../../browser'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); @@ -92,54 +93,21 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // process asset entries if (appConfig.assets) { const copyWebpackPluginPatterns = appConfig.assets.map((asset: AssetPattern) => { - // Add defaults. - // Input is always resolved relative to the projectRoot. - // TODO: add smart defaults to schema to use project root as default. - asset.input = path.resolve(root, asset.input || projectRoot).replace(/\\/g, '/'); - asset.output = asset.output || ''; - asset.glob = asset.glob || ''; - // Prevent asset configurations from writing outside of the output path, except if the user - // specify a configuration flag. - // Also prevent writing outside the project path. That is not overridable. - const absoluteOutputPath = path.resolve(projectRoot, buildOptions.outputPath as string); - const absoluteAssetOutput = path.resolve(absoluteOutputPath, asset.output); - const outputRelativeOutput = path.relative(absoluteOutputPath, absoluteAssetOutput); + // Resolve input paths relative to workspace root and add slash at the end. + asset.input = path.resolve(root, asset.input).replace(/\\/g, '/'); + asset.input = asset.input.endsWith('/') ? asset.input : asset.input + '/'; + asset.output = asset.output.endsWith('/') ? asset.output : asset.output + '/'; - if (outputRelativeOutput.startsWith('..') || path.isAbsolute(outputRelativeOutput)) { - - // TODO: This check doesn't make a lot of sense anymore with multiple project. Review it. - // const projectRelativeOutput = path.relative(projectRoot, absoluteAssetOutput); - // if (projectRelativeOutput.startsWith('..') || path.isAbsolute(projectRelativeOutput)) { - // const message = 'An asset cannot be written to a location outside the project.'; - // throw new SilentError(message); - // } - - if (!asset.allowOutsideOutDir) { - const message = 'An asset cannot be written to a location outside of the output path. ' - + 'You can override this message by setting the `allowOutsideOutDir` ' - + 'property on the asset to true in the CLI configuration.'; - throw new SilentError(message); - } + if (!asset.output.startsWith('/')) { + const message = 'An asset cannot be written to a location outside of the . ' + + 'You can override this message by setting the `allowOutsideOutDir` ' + + 'property on the asset to true in the CLI configuration.'; + throw new Error(message); } - // TODO: This check doesn't make a lot of sense anymore with multiple project. Review it. - // Prevent asset configurations from reading files outside of the project. - // const projectRelativeInput = path.relative(projectRoot, asset.input); - // if (projectRelativeInput.startsWith('..') || path.isAbsolute(projectRelativeInput)) { - // const message = 'An asset cannot be read from a location outside the project.'; - // throw new SilentError(message); - // } - - // Ensure trailing slash. - if (isDirectory(path.resolve(asset.input))) { - asset.input += '/'; - } - - // Convert dir patterns to globs. - if (isDirectory(path.resolve(asset.input, asset.glob))) { - asset.glob = asset.glob + '/**/*'; - } + // Now we remove starting slash to make Webpack place it from the output root. + asset.output = asset.output.slice(1); return { context: asset.input, @@ -217,7 +185,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } catch (e) { } return { - mode: buildOptions.optimization ? 'production': 'development', + mode: buildOptions.optimization ? 'production' : 'development', devtool: false, resolve: { extensions: ['.ts', '.js'], diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts index 080493c793..9acd9e8093 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts @@ -95,10 +95,3 @@ export function getOutputHashFormat(option: string, length = 20): HashFormat { /* tslint:enable:max-line-length */ return hashFormats[option] || hashFormats['none']; } - -export interface AssetPattern { - glob: string; - input?: string; - output: string; - allowOutsideOutDir: boolean; -} diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index bb6d8b9f4f..45d4177bd1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -7,7 +7,7 @@ import * as glob from 'glob'; import * as webpack from 'webpack'; const webpackDevMiddleware = require('webpack-dev-middleware'); -import { AssetPattern } from '../models/webpack-configs/utils'; +import { AssetPattern } from '../../browser'; import { KarmaWebpackFailureCb } from './karma-webpack-failure-cb'; /** @@ -21,6 +21,7 @@ import { KarmaWebpackFailureCb } from './karma-webpack-failure-cb'; let blocked: any[] = []; let isBlocked = false; +let webpackMiddleware: any; let successCb: () => void; let failureCb: () => void; @@ -70,33 +71,10 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { ], true); } - // Add assets. This logic is mimics the one present in GlobCopyWebpackPlugin, but proxies - // asset requests to the Webpack server. - if (options.assets) { - config.proxies = config.proxies || {}; - options.assets.forEach((pattern: AssetPattern) => { - // TODO: use smart defaults in schema to do this instead. - // Default input to be projectRoot. - pattern.input = pattern.input || projectRoot; - - // Determine Karma proxy path. - let proxyPath: string; - if (fs.existsSync(path.join(pattern.input, pattern.glob))) { - proxyPath = path.join(pattern.output, pattern.glob); - } else { - // For globs (paths that don't exist), proxy pattern.output to pattern.input. - proxyPath = path.join(pattern.output); - } - // Proxy paths must have only forward slashes. - proxyPath = proxyPath.replace(/\\/g, '/'); - config.proxies['/' + proxyPath] = '/_karma_webpack_/' + proxyPath; - }); - } - // Add webpack config. const webpackConfig = config.buildWebpack.webpackConfig; const webpackMiddlewareConfig = { - logLevel: 'error', // Hide webpack output because its noisy. + // logLevel: 'error', // Hide webpack output because its noisy. watchOptions: { poll: options.poll }, publicPath: '/_karma_webpack_/', }; @@ -120,9 +98,11 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { config.customContextFile = `${__dirname}/karma-context.html`; config.customDebugFile = `${__dirname}/karma-debug.html`; - // Add the request blocker. + // Add the request blocker and the webpack server fallback. config.beforeMiddleware = config.beforeMiddleware || []; config.beforeMiddleware.push('@angular-devkit/build-angular--blocker'); + config.middleware = config.middleware || []; + config.middleware.push('@angular-devkit/build-angular--fallback'); // Delete global styles entry, we don't want to load them. delete webpackConfig.entry.styles; @@ -175,13 +155,13 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { } }); - const middleware = new webpackDevMiddleware(compiler, webpackMiddlewareConfig); + webpackMiddleware = new webpackDevMiddleware(compiler, webpackMiddlewareConfig); // Forward requests to webpack server. customFileHandlers.push({ urlRegex: /^\/_karma_webpack_\/.*/, handler: function handler(req: any, res: any) { - middleware(req, res, function () { + webpackMiddleware(req, res, function () { // Ensure script and style bundles are served. // They are mentioned in the custom karma context page and we don't want them to 404. const alwaysServe = [ @@ -202,7 +182,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { }); emitter.on('exit', (done: any) => { - middleware.close(); + webpackMiddleware.close(); done(); }); }; @@ -266,9 +246,23 @@ const sourceMapReporter: any = function (this: any, baseReporterDecorator: any, sourceMapReporter.$inject = ['baseReporterDecorator', 'config']; +// When a request is not found in the karma server, try looking for it from the webpack server root. +function fallbackMiddleware() { + return function (req: any, res: any, next: () => void) { + if (webpackMiddleware) { + const webpackUrl = '/_karma_webpack_' + req.url; + const webpackReq = { ...req, url: webpackUrl } + webpackMiddleware(webpackReq, res, next); + } else { + next(); + } + }; +} + module.exports = { 'framework:@angular-devkit/build-angular': ['factory', init], 'reporter:@angular-devkit/build-angular--sourcemap-reporter': ['type', sourceMapReporter], 'reporter:@angular-devkit/build-angular--event-reporter': ['type', eventReporter], - 'middleware:@angular-devkit/build-angular--blocker': ['factory', requestBlocker] + 'middleware:@angular-devkit/build-angular--blocker': ['factory', requestBlocker], + 'middleware:@angular-devkit/build-angular--fallback': ['factory', fallbackMiddleware] }; diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 3cf48c2826..06da2f8440 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -97,7 +97,6 @@ export interface AssetPattern { glob: string; input: string; output: string; - allowOutsideOutDir: boolean; } export interface ExtraEntryPoint { @@ -138,8 +137,6 @@ export class BrowserBuilder implements Builder { try { webpackConfig = this.buildWebpackConfig(root, projectRoot, options); } catch (e) { - // TODO: why do I have to catch this error? I thought throwing inside an observable - // always got converted into an error. obs.error(e); return; diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index 58c5b5efb4..af35db09ff 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -255,20 +255,19 @@ }, "input": { "type": "string", - "description": "The input path dir in which to apply 'glob'." + "description": "The input path dir in which to apply 'glob'. Defaults to the project root." }, "output": { "type": "string", - "description": "The output path, relative to 'outputPath'.", - "default": "./" - }, - "allowOutsideOutDir": { - "type": "boolean", - "description": "Allow assets to be copied outside the outDir.", - "default": false + "description": "Absolute path within the output." } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "glob", + "input", + "output" + ] }, "extraEntryPoint": { "type": "object", diff --git a/packages/angular_devkit/build_angular/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json index b21cc4ec86..51a1ad7ba1 100644 --- a/packages/angular_devkit/build_angular/src/karma/schema.json +++ b/packages/angular_devkit/build_angular/src/karma/schema.json @@ -136,20 +136,19 @@ }, "input": { "type": "string", - "description": "The input path dir in which to apply 'glob'." + "description": "The input path dir in which to apply 'glob'. Defaults to the project root." }, "output": { "type": "string", - "description": "The output path, relative to 'outputPath'.", - "default": "./" - }, - "allowOutsideOutDir": { - "type": "boolean", - "description": "Allow assets to be copied outside the outDir.", - "default": false + "description": "Absolute path within the output." } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "glob", + "input", + "output" + ] }, "extraEntryPoint": { "type": "object", diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index 8c598033e6..9708576e4e 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -31,9 +31,9 @@ describe('Browser Builder assets', () => { const overrides = { assets: [ - { glob: 'glob-asset.txt' }, - { glob: 'output-asset.txt', output: 'output-folder' }, - { glob: '**/*', input: 'src/folder', output: 'folder' }, + { glob: 'glob-asset.txt', input: 'src/', output: '/' }, + { glob: 'output-asset.txt', input: 'src/', output: '/output-folder' }, + { glob: '**/*', input: 'src/folder', output: '/folder' }, ], }; @@ -51,47 +51,17 @@ describe('Browser Builder assets', () => { ).subscribe(undefined, done.fail, done); }, 30000); - // TODO: this test isn't working correctly, fix it. - // It throws a weird jasmine error: - // Error: Spies must be created in a before function or a spec - // it('allowOutsideOutDir false with outside throws error', (done) => { - // const assets: { [path: string]: string } = { - // './node_modules/some-package/node_modules-asset.txt': 'node_modules-asset.txt', - // }; - // host.writeMultipleFiles(assets); - - // const overrides = { - // assets: [ - // { glob: '**/*', input: '../node_modules/some-package/', output: '../temp' }, - // ], - // }; - - // architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( - // concatMap(() => architect.run(architect.getTarget({ overrides }))), - // ).subscribe(undefined, (err) => { - // expect(err.message) - // .toContain('An asset cannot be written to a location outside of the output path'); - // expect(err.message).toContain('You can override this message by'); - // done(); - // }, done.fail); - // }, 30000); - - it('allowOutsideOutDir true with outside does not throw error', (done) => { + it('fails with non-absolute output path', (done) => { const assets: { [path: string]: string } = { './node_modules/some-package/node_modules-asset.txt': 'node_modules-asset.txt', }; host.writeMultipleFiles(assets); const overrides = { - assets: [ - { - glob: '**/*', input: '../node_modules/some-package/', output: '../temp', - allowOutsideOutDir: true, - }, - ], + assets: [{ + glob: '**/*', input: '../node_modules/some-package/', output: '../temp', + }], }; - runTargetSpec(host, browserTargetSpec, overrides).pipe( - tap((buildEvent) => expect(buildEvent.success).toBe(true)), - ).subscribe(undefined, done.fail, done); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts index f3f8417aff..2dd1b5d192 100644 --- a/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts @@ -87,9 +87,9 @@ describe('Karma Builder assets', () => { const overrides = { assets: [ - { glob: 'glob-asset.txt' }, - { glob: 'output-asset.txt', output: 'output-folder' }, - { glob: '**/*', input: 'src/folder', output: 'folder' }, + { glob: 'glob-asset.txt', input: 'src/', output: '/' }, + { glob: 'output-asset.txt', input: 'src/', output: '/output-folder' }, + { glob: '**/*', input: 'src/folder', output: '/folder' }, ], }; diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 5684ab52ff..ce4f329685 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -114,12 +114,12 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace { glob: 'favicon.ico', input: `${projectRoot}/src`, - output: './', + output: '/', }, { glob: '**/*', input: `${projectRoot}/src/assets`, - output: 'assets', + output: '/assets', }, ], styles: [ @@ -181,12 +181,12 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace { glob: 'favicon.ico', input: `${projectRoot}/src/`, - output: './', + output: '/', }, { glob: '**/*', input: `${projectRoot}/src/assets`, - output: 'assets', + output: '/assets', }, ], }, diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index 7bb44ce494..e7e3e7733e 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -24,12 +24,12 @@ { "glob": "favicon.ico", "input": "src/", - "output": "./" + "output": "/" }, { "glob": "**/*", "input": "src/assets", - "output": "assets" + "output": "/assets" } ], "styles": [ @@ -112,12 +112,12 @@ { "glob": "favicon.ico", "input": "src/", - "output": "./" + "output": "/" }, { "glob": "**/*", "input": "src/assets", - "output": "assets" + "output": "/assets" } ] } From ef33488518dae26b6c91131713f0756fe72c8296 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 30 Mar 2018 13:41:23 +0100 Subject: [PATCH 334/724] fix(@angular-devkit/build-angular): rename script/styles output to bundleName --- .../models/webpack-configs/browser.ts | 20 +++++----- .../models/webpack-configs/common.ts | 33 ++++++++++------- .../models/webpack-configs/styles.ts | 28 ++++++++------ .../models/webpack-configs/utils.ts | 37 ------------------- .../utilities/package-chunk-sort.ts | 28 +++++--------- .../build_angular/src/browser/index.ts | 2 +- .../build_angular/src/browser/schema.json | 36 +++++++++++++++--- .../build_angular/src/karma/schema.json | 36 +++++++++++++++--- .../test/browser/scripts-array_spec_large.ts | 6 +-- .../test/browser/styles_spec_large.ts | 6 +-- 10 files changed, 122 insertions(+), 110 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index ba046b8bc2..3d5458502c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -8,7 +8,7 @@ import { LicenseWebpackPlugin } from 'license-webpack-plugin'; import { generateEntryPoints, packageChunkSort } from '../../utilities/package-chunk-sort'; import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; import { IndexHtmlWebpackPlugin } from '../../plugins/index-html-webpack-plugin'; -import { extraEntryParser, lazyChunksFilter } from './utils'; +import { ExtraEntryPoint } from '../../../browser'; import { WebpackConfigOptions } from '../build-options'; /** @@ -24,20 +24,18 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { let extraPlugins: any[] = []; - // figure out which are the lazy loaded entry points - const lazyChunks = lazyChunksFilter([ - ...extraEntryParser(appConfig.scripts, root, 'scripts'), - ...extraEntryParser(appConfig.styles, root, 'styles') - ]); + // Figure out which are the lazy loaded bundle names. + const lazyChunkBundleNames = ([...appConfig.styles, ...appConfig.scripts] as ExtraEntryPoint[]) + .filter(entry => entry.lazy) + .map(entry => entry.bundleName); - // TODO: Enable this once HtmlWebpackPlugin supports Webpack 4 const generateIndexHtml = false; if (generateIndexHtml) { extraPlugins.push(new HtmlWebpackPlugin({ template: path.resolve(root, appConfig.index), filename: path.resolve(buildOptions.outputPath, appConfig.index), chunksSortMode: packageChunkSort(appConfig), - excludeChunks: lazyChunks, + excludeChunks: lazyChunkBundleNames, xhtml: true, minify: buildOptions.optimization ? { caseSensitive: true, @@ -77,8 +75,8 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } - const globalStylesEntries = extraEntryParser(appConfig.styles, root, 'styles') - .map(style => style.entry); + const globalStylesBundleNames = (appConfig.styles as ExtraEntryPoint[]) + .map(style => style.bundleName); return { devtool: sourcemaps, @@ -104,7 +102,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { const moduleName = module.nameForCondition ? module.nameForCondition() : ''; return /[\\/]node_modules[\\/]/.test(moduleName) && !chunks.some(({ name }) => name === 'polyfills' - || globalStylesEntries.includes(name)); + || globalStylesBundleNames.includes(name)); }, }, } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 9b8aceb71d..af5b71aa5d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { HashedModuleIdsPlugin } from 'webpack'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; -import { extraEntryParser, getOutputHashFormat } from './utils'; +import { getOutputHashFormat } from './utils'; import { isDirectory } from '../../utilities/is-directory'; import { requireProjectModule } from '../../utilities/require-project-module'; import { WebpackConfigOptions } from '../build-options'; @@ -12,7 +12,7 @@ import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; import { findUp } from '../../utilities/find-up'; -import { AssetPattern } from '../../../browser'; +import { AssetPattern, ExtraEntryPoint } from '../../../browser'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); @@ -57,19 +57,24 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // process global scripts if (appConfig.scripts.length > 0) { - const globalScripts = extraEntryParser(appConfig.scripts, root, 'scripts'); - const globalScriptsByEntry = globalScripts - .reduce((prev: { entry: string, paths: string[], lazy: boolean }[], curr) => { + const globalScriptsByBundleName = (appConfig.scripts as ExtraEntryPoint[]) + .reduce((prev: { bundleName: string, paths: string[], lazy: boolean }[], curr) => { - let existingEntry = prev.find((el) => el.entry === curr.entry); + const resolvedPath = path.resolve(root, curr.input); + let existingEntry = prev.find((el) => el.bundleName === curr.bundleName); if (existingEntry) { - existingEntry.paths.push(curr.path as string); - // All entries have to be lazy for the bundle to be lazy. - (existingEntry as any).lazy = existingEntry.lazy && curr.lazy; + if (existingEntry.lazy && !curr.lazy) { + // All entries have to be lazy for the bundle to be lazy. + throw new Error(`The ${curr.bundleName} bundle is mixing lazy and non-lazy scripts.`); + } + + existingEntry.paths.push(resolvedPath); + } else { prev.push({ - entry: curr.entry as string, paths: [curr.path as string], - lazy: curr.lazy as boolean + bundleName: curr.bundleName, + paths: [resolvedPath], + lazy: curr.lazy }); } return prev; @@ -77,13 +82,13 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // Add a new asset for each entry. - globalScriptsByEntry.forEach((script) => { + globalScriptsByBundleName.forEach((script) => { // Lazy scripts don't get a hash, otherwise they can't be loaded by name. const hash = script.lazy ? '' : hashFormat.script; extraPlugins.push(new ScriptsWebpackPlugin({ - name: script.entry, + name: script.bundleName, sourceMap: buildOptions.sourceMap, - filename: `${path.basename(script.entry)}${hash}.js`, + filename: `${path.basename(script.bundleName)}${hash}.js`, scripts: script.paths, basePath: projectRoot, })); diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 5f4791c593..378deaedbb 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -4,10 +4,11 @@ import * as webpack from 'webpack'; import * as path from 'path'; import { SuppressExtractedTextChunksWebpackPlugin } from '../../plugins/webpack'; -import { extraEntryParser, getOutputHashFormat } from './utils'; +import { getOutputHashFormat } from './utils'; import { WebpackConfigOptions } from '../build-options'; import { findUp } from '../../utilities/find-up'; import { RawCssLoader } from '../../plugins/webpack'; +import { ExtraEntryPoint } from '../../../browser'; const postcssUrl = require('postcss-url'); const autoprefixer = require('autoprefixer'); @@ -164,17 +165,22 @@ export function getStylesConfig(wco: WebpackConfigOptions) { }; } - // process global styles + // Process global styles. if (appConfig.styles.length > 0) { - const globalStyles = extraEntryParser(appConfig.styles, root, 'styles'); - // add style entry points - globalStyles.forEach(style => - entryPoints[style.entry as any] - ? entryPoints[style.entry as any].push(style.path as string) - : entryPoints[style.entry as any] = [style.path as any] - ); - // add global css paths - globalStylePaths.push(...globalStyles.map((style) => style.path as any)); + (appConfig.styles as ExtraEntryPoint[]).forEach(style => { + + const resolvedPath = path.resolve(root, style.input); + + // Add style entry points. + if (entryPoints[style.bundleName]) { + entryPoints[style.bundleName].push(resolvedPath) + } else { + entryPoints[style.bundleName] = [resolvedPath] + } + + // Add global css paths. + globalStylePaths.push(resolvedPath); + }); } // set base rules to derive final rules from diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts index 9acd9e8093..f5a25ad207 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts @@ -40,43 +40,6 @@ export function getWebpackStatsConfig(verbose = false) { : webpackOutputOptions; } -export interface ExtraEntry { - input: string; - output?: string; - lazy?: boolean; - path?: string; - entry?: string; -} - -// Filter extra entries out of a arran of extraEntries -export function lazyChunksFilter(extraEntries: ExtraEntry[]) { - return extraEntries - .filter(extraEntry => extraEntry.lazy) - .map(extraEntry => extraEntry.entry); -} - -// convert all extra entries into the object representation, fill in defaults -export function extraEntryParser( - extraEntries: (string | ExtraEntry)[], - appRoot: string, - defaultEntry: string -): ExtraEntry[] { - return extraEntries - .map((extraEntry: string | ExtraEntry) => - typeof extraEntry === 'string' ? { input: extraEntry } : extraEntry) - .map((extraEntry: ExtraEntry) => { - extraEntry.path = path.resolve(appRoot, extraEntry.input); - if (extraEntry.output) { - extraEntry.entry = extraEntry.output.replace(/\.(js|css)$/i, ''); - } else if (extraEntry.lazy) { - extraEntry.entry = path.basename(extraEntry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')); - } else { - extraEntry.entry = defaultEntry; - } - return extraEntry; - }); -} - export interface HashFormat { chunk: string; extract: string; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts index 0ec1fd0c37..916b008778 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -1,28 +1,20 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { ExtraEntry, extraEntryParser } from '../models/webpack-configs/utils'; +import { ExtraEntryPoint } from '../../browser'; export function generateEntryPoints(appConfig: any) { let entryPoints = ['polyfills', 'sw-register']; - const pushExtraEntries = (extraEntry: ExtraEntry) => { - if (entryPoints.indexOf(extraEntry.entry as string) === -1) { - entryPoints.push(extraEntry.entry as string); - } - }; - - if (appConfig.styles) { - extraEntryParser(appConfig.styles, './', 'styles') - .filter(entry => !entry.lazy) - .forEach(pushExtraEntries); - } - - if (appConfig.scripts) { - extraEntryParser(appConfig.scripts, './', 'scripts') - .filter(entry => !entry.lazy) - .forEach(pushExtraEntries); - } + // Add all styles/scripts, except lazy-loaded ones. + const lazyChunkBundleNames = ([...appConfig.styles, ...appConfig.scripts] as ExtraEntryPoint[]) + .filter(entry => !entry.lazy) + .map(entry => entry.bundleName) + .forEach(bundleName => { + if (entryPoints.indexOf(bundleName) === -1) { + entryPoints.push(bundleName); + } + }); entryPoints.push('main'); diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 06da2f8440..49d287f1f4 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -101,7 +101,7 @@ export interface AssetPattern { export interface ExtraEntryPoint { input: string; - output?: string; + bundleName: string; lazy: boolean; } diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index af35db09ff..2547def3b2 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -27,7 +27,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/extraEntryPoint" + "$ref": "#/definitions/scriptEntryPoint" } }, "styles": { @@ -35,7 +35,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/extraEntryPoint" + "$ref": "#/definitions/styleEntryPoint" } }, "stylePreprocessorOptions": { @@ -269,20 +269,44 @@ "output" ] }, - "extraEntryPoint": { + "styleEntryPoint": { "type": "object", "properties": { "input": { "type": "string", "description": "The file to include." }, - "output": { + "bundleName": { + "type": "string", + "description": "The bundle name for this extra entry point.", + "default": "styles" + }, + "lazy": { + "type": "boolean", + "description": "If the bundle will be lazy loaded later.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "input" + ] + }, + "scriptEntryPoint": { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include." + }, + "bundleName": { "type": "string", - "description": "The output path and filename, relative to 'outputPath'." + "description": "The bundle name for this extra entry point.", + "default": "scripts" }, "lazy": { "type": "boolean", - "description": "Allow assets to be copied outside the outDir.", + "description": "If the bundle will be lazy loaded later.", "default": false } }, diff --git a/packages/angular_devkit/build_angular/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json index 51a1ad7ba1..ad5d804524 100644 --- a/packages/angular_devkit/build_angular/src/karma/schema.json +++ b/packages/angular_devkit/build_angular/src/karma/schema.json @@ -32,7 +32,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/extraEntryPoint" + "$ref": "#/definitions/scriptEntryPoint" } }, "styles": { @@ -40,7 +40,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/extraEntryPoint" + "$ref": "#/definitions/styleEntryPoint" } }, "stylePreprocessorOptions": { @@ -150,20 +150,44 @@ "output" ] }, - "extraEntryPoint": { + "styleEntryPoint": { "type": "object", "properties": { "input": { "type": "string", "description": "The file to include." }, - "output": { + "bundleName": { + "type": "string", + "description": "The bundle name for this extra entry point.", + "default": "styles" + }, + "lazy": { + "type": "boolean", + "description": "If the bundle will be lazy loaded later.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "input" + ] + }, + "scriptEntryPoint": { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include." + }, + "bundleName": { "type": "string", - "description": "The output path and filename, relative to 'outputPath'." + "description": "The bundle name for this extra entry point.", + "default": "scripts" }, "lazy": { "type": "boolean", - "description": "Allow assets to be copied outside the outDir.", + "description": "If the bundle will be lazy loaded later.", "default": false } }, diff --git a/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts index 8ba9362d01..38aeaad32b 100644 --- a/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts @@ -34,9 +34,9 @@ describe('Browser Builder scripts array', () => { { input: 'src/binput-script.js' }, { input: 'src/ainput-script.js' }, { input: 'src/cinput-script.js' }, - { input: 'src/lazy-script.js', lazy: true }, - { input: 'src/pre-rename-script.js', output: 'renamed-script' }, - { input: 'src/pre-rename-lazy-script.js', output: 'renamed-lazy-script', lazy: true }, + { input: 'src/lazy-script.js', bundleName: 'lazy-script', lazy: true }, + { input: 'src/pre-rename-script.js', bundleName: 'renamed-script' }, + { input: 'src/pre-rename-lazy-script.js', bundleName: 'renamed-lazy-script', lazy: true }, ]; beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index 6f0caeb784..72c1b2ec46 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -33,9 +33,9 @@ describe('Browser Builder styles', () => { }; const getStylesOption = () => [ { input: 'src/input-style.css' }, - { input: 'src/lazy-style.css', lazy: true }, - { input: 'src/pre-rename-style.css', output: 'renamed-style' }, - { input: 'src/pre-rename-lazy-style.css', output: 'renamed-lazy-style', lazy: true }, + { input: 'src/lazy-style.css', bundleName: 'lazy-style', lazy: true }, + { input: 'src/pre-rename-style.css', bundleName: 'renamed-style' }, + { input: 'src/pre-rename-lazy-style.css', bundleName: 'renamed-lazy-style', lazy: true }, ]; const cssMatches: { [path: string]: string } = { './dist/styles.css': '.input-style', From 05dbca968e30f26a9280062ae7f26c6ef728a158 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 30 Mar 2018 13:44:35 +0100 Subject: [PATCH 335/724] fix(@angular-devkit/build-angular): refactor file replacement property names --- .../angular_devkit/build_angular/src/browser/index.ts | 8 ++++---- .../angular_devkit/build_angular/src/browser/schema.json | 4 ++-- packages/angular_devkit/build_angular/src/karma/index.ts | 8 ++++---- .../angular_devkit/build_angular/src/karma/schema.json | 4 ++-- .../build_angular/test/browser/replacements_spec_large.ts | 8 ++++---- .../build_angular/test/karma/replacements_spec_large.ts | 4 ++-- packages/schematics/angular/application/index.ts | 4 ++-- .../build_angular/hello-world-app/.angular.json | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 49d287f1f4..cb7cda2c4f 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -90,7 +90,7 @@ export interface BrowserBuilderOptions { styles: ExtraEntryPoint[]; stylePreprocessorOptions: { includePaths: string[] }; - fileReplacements: { from: string; to: string; }[]; + fileReplacements: { src: string; replaceWith: string; }[]; } export interface AssetPattern { @@ -222,10 +222,10 @@ export class BrowserBuilder implements Builder { const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); - options.fileReplacements.forEach(({ from, to }) => { + options.fileReplacements.forEach(({ src, replaceWith }) => { host.aliases.set( - join(root, normalize(from)), - join(root, normalize(to)), + join(root, normalize(src)), + join(root, normalize(replaceWith)), ); }); diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index 2547def3b2..0ad97e4b7b 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -64,10 +64,10 @@ "items": { "type": "object", "properties": { - "from": { + "src": { "type": "string" }, - "to": { + "replaceWith": { "type": "string" } } diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index b620e6a758..f39cda08a5 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -63,7 +63,7 @@ export interface KarmaBuilderOptions { // logLevel?: string; // same as above // reporters?: string; // same as above - fileReplacements: { from: string; to: string; }[]; + fileReplacements: { src: string; replaceWith: string; }[]; } export class KarmaBuilder implements Builder { @@ -130,10 +130,10 @@ export class KarmaBuilder implements Builder { const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); - options.fileReplacements.forEach(({ from, to }) => { + options.fileReplacements.forEach(({ src, replaceWith }) => { host.aliases.set( - join(root, normalize(from)), - join(root, normalize(to)), + join(root, normalize(src)), + join(root, normalize(replaceWith)), ); }); diff --git a/packages/angular_devkit/build_angular/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json index ad5d804524..79a4d7c80e 100644 --- a/packages/angular_devkit/build_angular/src/karma/schema.json +++ b/packages/angular_devkit/build_angular/src/karma/schema.json @@ -109,10 +109,10 @@ "items": { "type": "object", "properties": { - "from": { + "src": { "type": "string" }, - "to": { + "replaceWith": { "type": "string" } } diff --git a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts index acdb5637d5..042b881025 100644 --- a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts @@ -32,8 +32,8 @@ describe('Browser Builder file replacements', () => { const overrides = { fileReplacements: [ { - from: normalize('/src/meaning.ts'), - to: normalize('/src/meaning-too.ts'), + src: normalize('/src/meaning.ts'), + replaceWith: normalize('/src/meaning-too.ts'), }, ], }; @@ -54,8 +54,8 @@ describe('Browser Builder file replacements', () => { const overrides = { fileReplacements: [ { - from: normalize('/src/meaning.ts'), - to: normalize('/src/meaning-three.ts'), + src: normalize('/src/meaning.ts'), + replaceWith: normalize('/src/meaning-three.ts'), }, ], }; diff --git a/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts index 263ee3e6bc..778a3cb826 100644 --- a/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts @@ -33,8 +33,8 @@ describe('Karma Builder file replacements', () => { const overrides = { fileReplacements: [{ - from: normalize('/src/meaning.ts'), - to: normalize('/src/meaning-too.ts'), + src: normalize('/src/meaning.ts'), + replaceWith: normalize('/src/meaning-too.ts'), }], }; diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index ce4f329685..7235904eb2 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -132,8 +132,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace configurations: { production: { fileReplacements: [{ - from: `${projectRoot}/src/environments/environment.ts`, - to: `${projectRoot}/src/environments/environment.prod.ts`, + src: `${projectRoot}/src/environments/environment.ts`, + replaceWith: `${projectRoot}/src/environments/environment.prod.ts`, }], optimization: true, outputHashing: 'all', diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index e7e3e7733e..7881cfd9e5 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -43,8 +43,8 @@ "production": { "fileReplacements": [ { - "from": "src/environments/environments.ts", - "to": "src/environments/environments.prod.ts" + "src": "src/environments/environments.ts", + "replaceWith": "src/environments/environments.prod.ts" } ], "optimization": true, From 9eb5be4888ae0870eb6288e9104ae0d5dec7501f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 2 Apr 2018 11:48:17 -0400 Subject: [PATCH 336/724] refactor(@ngtools/webpack): remove outdated i18n plugin --- .../webpack/src/extract_i18n_plugin.ts | 193 ------------------ packages/ngtools/webpack/src/index.ts | 1 - 2 files changed, 194 deletions(-) delete mode 100644 packages/ngtools/webpack/src/extract_i18n_plugin.ts diff --git a/packages/ngtools/webpack/src/extract_i18n_plugin.ts b/packages/ngtools/webpack/src/extract_i18n_plugin.ts deleted file mode 100644 index 35ada649ad..0000000000 --- a/packages/ngtools/webpack/src/extract_i18n_plugin.ts +++ /dev/null @@ -1,193 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -// TODO: fix typings. -// tslint:disable-next-line:no-global-tslint-disable -// tslint:disable:no-any -import * as fs from 'fs'; -import * as path from 'path'; -import * as ts from 'typescript'; -import { VERSION, __NGTOOLS_PRIVATE_API_2 } from './ngtools_api'; -import { WebpackResourceLoader } from './resource_loader'; -import { Tapable } from './webpack'; - -export interface ExtractI18nPluginOptions { - tsConfigPath: string; - basePath?: string; - genDir?: string; - i18nFormat?: string; - locale?: string; - outFile?: string; - exclude?: string[]; -} - -export class ExtractI18nPlugin implements Tapable { - private _resourceLoader: WebpackResourceLoader; - - private _tsConfigPath: string; - private _basePath: string; - private _rootFilePath: string[]; - private _compilerOptions: any = null; - private _angularCompilerOptions: any = null; - // private _compilerHost: WebpackCompilerHost; - private _compilerHost: ts.CompilerHost; - private _program: ts.Program; - - private _i18nFormat?: string; - private _locale?: string; - private _outFile?: string; - - constructor(options: ExtractI18nPluginOptions) { - this._setupOptions(options); - } - - private _setupOptions(options: ExtractI18nPluginOptions) { - if (!options.hasOwnProperty('tsConfigPath')) { - throw new Error('Must specify "tsConfigPath" in the configuration of @ngtools/webpack.'); - } - // TS represents paths internally with '/' and expects the tsconfig path to be in this format - this._tsConfigPath = options.tsConfigPath.replace(/\\/g, '/'); - - // Check the base path. - const maybeBasePath = path.resolve(process.cwd(), this._tsConfigPath); - let basePath = maybeBasePath; - if (fs.statSync(maybeBasePath).isFile()) { - basePath = path.dirname(basePath); - } - if (options.hasOwnProperty('basePath')) { - basePath = path.resolve(process.cwd(), options.basePath || ''); - } - - let tsConfigJson: any = null; - try { - tsConfigJson = JSON.parse(fs.readFileSync(this._tsConfigPath, 'utf8')); - } catch (err) { - throw new Error(`An error happened while parsing ${this._tsConfigPath} JSON: ${err}.`); - } - const tsConfig = ts.parseJsonConfigFileContent( - tsConfigJson, ts.sys, basePath, undefined, this._tsConfigPath); - - let fileNames = tsConfig.fileNames; - if (options.hasOwnProperty('exclude')) { - const exclude: string[] = typeof options.exclude == 'string' - ? [options.exclude as string] : (options.exclude as string[]); - - exclude.forEach((pattern: string) => { - const basePathPattern = '(' + basePath.replace(/\\/g, '/') - .replace(/[\-\[\]\/{}()+?.\\^$|*]/g, '\\$&') + ')?'; - pattern = pattern - // Replace windows path separators with forward slashes. - .replace(/\\/g, '/') - // Escape characters that are used normally in regexes, except stars. - .replace(/[\-\[\]{}()+?.\\^$|]/g, '\\$&') - // Two stars replacement. - .replace(/\*\*/g, '(?:.*)') - // One star replacement. - .replace(/\*/g, '(?:[^/]*)') - // Escape characters from the basePath and make sure it's forward slashes. - .replace(/^/, basePathPattern); - - const re = new RegExp('^' + pattern + '$'); - fileNames = fileNames.filter(x => !x.replace(/\\/g, '/').match(re)); - }); - } else { - fileNames = fileNames.filter(fileName => !/\.spec\.ts$/.test(fileName)); - } - this._rootFilePath = fileNames; - - // By default messages will be generated in basePath - let genDir = basePath; - - if (options.genDir) { - genDir = path.resolve(process.cwd(), options.genDir); - } - - this._compilerOptions = tsConfig.options; - this._angularCompilerOptions = Object.assign( - // kept for compatibility with Angular this._make(compilation, cb), - ); - - compiler.hooks.afterEmit.tapAsync('extract-i8n', (compilation: any, cb: any) => { - compilation._ngToolsWebpackXi18nPluginInstance = null; - cb(); - }); - } - - private _make(compilation: any, cb: (err?: any, request?: any) => void) { - if (compilation._ngToolsWebpackXi18nPluginInstance) { - return cb(new Error('An @ngtools/webpack xi18n plugin already exist for ' + - 'this compilation.')); - } - if (!compilation._ngToolsWebpackPluginInstance) { - return cb(new Error('An @ngtools/webpack aot plugin does not exists ' + - 'for this compilation')); - } - - compilation._ngToolsWebpackXi18nPluginInstance = this; - - this._resourceLoader.update(compilation); - - Promise.resolve() - .then(() => { - return __NGTOOLS_PRIVATE_API_2.extractI18n({ - basePath: this._basePath, - compilerOptions: this._compilerOptions, - program: this._program, - host: this._compilerHost, - angularCompilerOptions: this._angularCompilerOptions, - i18nFormat: this._i18nFormat || '', - locale: this._locale, - outFile: this._outFile, - - readResource: (path: string) => this._resourceLoader.get(path), - }); - }) - .then(() => cb(), (err: any) => { - compilation.errors.push(err); - cb(err); - }); - - } -} diff --git a/packages/ngtools/webpack/src/index.ts b/packages/ngtools/webpack/src/index.ts index ffa3449b59..e2df096108 100644 --- a/packages/ngtools/webpack/src/index.ts +++ b/packages/ngtools/webpack/src/index.ts @@ -22,5 +22,4 @@ try { } export * from './angular_compiler_plugin'; -export * from './extract_i18n_plugin'; export { ngcLoader as default } from './loader'; From 77648a6afd09e5269a305d28d1cd342da02139dd Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 2 Apr 2018 12:02:21 -0400 Subject: [PATCH 337/724] refactor(@ngtools/webpack): remove unneeded peer dep hack --- packages/ngtools/webpack/src/index.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packages/ngtools/webpack/src/index.ts b/packages/ngtools/webpack/src/index.ts index e2df096108..0ac24959c8 100644 --- a/packages/ngtools/webpack/src/index.ts +++ b/packages/ngtools/webpack/src/index.ts @@ -5,21 +5,6 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { gte } from 'semver'; - -// Test if typescript is available. This is a hack. We should be using peerDependencies instead -// but can't until we split global and local packages. -// See https://github.com/angular/angular-cli/issues/8107#issuecomment-338185872 -try { - const version = require('typescript').version; - if (!gte(version, '2.4.2')) { - throw new Error(); - } -} catch (e) { - throw new Error('Could not find local "typescript" package.' - + 'The "@ngtools/webpack" package requires a local "typescript@^2.4.2" package to be installed.' - + e); -} export * from './angular_compiler_plugin'; export { ngcLoader as default } from './loader'; From 0dcd527ba95cfb57dea1927ffb164c8d9d3c164a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 30 Mar 2018 22:25:32 -0400 Subject: [PATCH 338/724] fix(@schematics/angular): use karma 1.7.1 to avoid deprecated packages --- packages/schematics/angular/workspace/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index 9591aa3268..f9581dfd6e 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -35,7 +35,7 @@ "codelyzer": "~4.1.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", - "karma": "~2.0.0", + "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~1.4.1", "karma-jasmine": "~1.1.1", From 81535e59d902892af113f71b87bb19429c26b10b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 28 Mar 2018 10:39:12 -0400 Subject: [PATCH 339/724] test(@angular-devkit/build-angular): update/standardize test timeouts --- .../test/app-shell/app-shell_spec_large.ts | 4 ++-- .../test/browser/allow-js_spec_large.ts | 6 ++--- .../test/browser/aot_spec_large.ts | 4 ++-- .../test/browser/assets_spec_large.ts | 6 ++--- .../test/browser/base-href_spec_large.ts | 4 ++-- .../browser/build-optimizer_spec_large.ts | 4 ++-- .../test/browser/bundle-budgets_spec_large.ts | 8 +++---- .../browser/circular-dependency_spec_large.ts | 4 ++-- .../test/browser/deploy-url_spec_large.ts | 6 ++--- .../test/browser/errors_spec_large.ts | 8 +++---- .../test/browser/i18n_spec_large.ts | 10 ++++----- .../test/browser/lazy-module_spec_large.ts | 18 +++++++-------- .../browser/license-extraction_spec_large.ts | 4 ++-- .../browser/no-entry-module_spec_large.ts | 4 ++-- .../browser/optimization-level_spec_large.ts | 6 ++--- .../test/browser/output-hashing_spec_large.ts | 6 ++--- .../test/browser/output-path_spec_large.ts | 6 ++--- .../test/browser/poll_spec_large.ts | 4 ++-- .../test/browser/rebuild_spec_large.ts | 14 ++++++------ .../test/browser/replacements_spec_large.ts | 6 ++--- .../test/browser/scripts-array_spec_large.ts | 8 +++---- .../test/browser/service-worker_spec_large.ts | 8 +++---- .../test/browser/source-map_spec_large.ts | 8 +++---- .../test/browser/stats-json_spec_large.ts | 4 ++-- .../test/browser/styles_spec_large.ts | 22 +++++++++---------- .../subresource-integrity_spec_large.ts | 4 ++-- .../test/browser/tsconfig-paths_spec_large.ts | 6 ++--- .../test/browser/vendor-chunk_spec_large.ts | 4 ++-- .../test/browser/works_spec_large.ts | 4 ++-- .../build_angular/test/utils/index.ts | 1 + .../build_angular/test/utils/timeouts.ts | 14 ++++++++++++ 31 files changed, 115 insertions(+), 100 deletions(-) create mode 100644 packages/angular_devkit/build_angular/test/utils/timeouts.ts diff --git a/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts index 17b358d1bb..b179c54e08 100644 --- a/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts @@ -7,7 +7,7 @@ */ import { normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { host, runTargetSpec } from '../utils'; +import { Timeout, host, runTargetSpec } from '../utils'; describe('AppShell Builder', () => { @@ -46,5 +46,5 @@ describe('AppShell Builder', () => { }), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/allow-js_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/allow-js_spec_large.ts index e824eccc60..b7852103e2 100644 --- a/packages/angular_devkit/build_angular/test/browser/allow-js_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/allow-js_spec_large.ts @@ -7,7 +7,7 @@ */ import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder allow js', () => { @@ -26,7 +26,7 @@ describe('Browser Builder allow js', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('works with aot', (done) => { host.writeMultipleFiles({ @@ -39,5 +39,5 @@ describe('Browser Builder allow js', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts index c384534d0a..856f519eb9 100644 --- a/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder AOT', () => { @@ -28,5 +28,5 @@ describe('Browser Builder AOT', () => { expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Standard); }); diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index 9708576e4e..de672f490e 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -8,7 +8,7 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder assets', () => { @@ -49,7 +49,7 @@ describe('Browser Builder assets', () => { expect(host.scopedSync().exists(normalize('./dist/folder/.gitkeep'))).toBe(false); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('fails with non-absolute output path', (done) => { const assets: { [path: string]: string } = { @@ -63,5 +63,5 @@ describe('Browser Builder assets', () => { }; runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/base-href_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/base-href_spec_large.ts index 19be1668fe..34f457108e 100644 --- a/packages/angular_devkit/build_angular/test/browser/base-href_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/base-href_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder base href', () => { @@ -33,5 +33,5 @@ describe('Browser Builder base href', () => { expect(content).toMatch(//); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/build-optimizer_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/build-optimizer_spec_large.ts index 0c6690c865..1a1d84d862 100644 --- a/packages/angular_devkit/build_angular/test/browser/build-optimizer_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/build-optimizer_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder build optimizer', () => { @@ -27,5 +27,5 @@ describe('Browser Builder build optimizer', () => { expect(content).not.toMatch(/\.decorators =/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts index 68ace905f6..5169b0e7f7 100644 --- a/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts @@ -7,7 +7,7 @@ */ import { tap } from 'rxjs/operators'; -import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; +import { TestLogger, Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder bundle budgets', () => { @@ -27,7 +27,7 @@ describe('Browser Builder bundle budgets', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(logger.includes('WARNING')).toBe(false)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Complex); it('shows errors', (done) => { const overrides = { @@ -38,7 +38,7 @@ describe('Browser Builder bundle budgets', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Standard); it('shows warnings', (done) => { const overrides = { @@ -52,5 +52,5 @@ describe('Browser Builder bundle budgets', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(logger.includes('WARNING')).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Standard); }); diff --git a/packages/angular_devkit/build_angular/test/browser/circular-dependency_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/circular-dependency_spec_large.ts index 76be51e286..f5b85c90ff 100644 --- a/packages/angular_devkit/build_angular/test/browser/circular-dependency_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/circular-dependency_spec_large.ts @@ -7,7 +7,7 @@ */ import { tap } from 'rxjs/operators'; -import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; +import { TestLogger, Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder circular dependency detection', () => { @@ -25,5 +25,5 @@ describe('Browser Builder circular dependency detection', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(logger.includes('Circular dependency detected')).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/deploy-url_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/deploy-url_spec_large.ts index 14a77c616d..060a0cfbac 100644 --- a/packages/angular_devkit/build_angular/test/browser/deploy-url_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/deploy-url_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder deploy url', () => { @@ -36,7 +36,7 @@ describe('Browser Builder deploy url', () => { expect(content).toContain('http://example.com/some/path/main.js'); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('uses deploy url for in webpack runtime', (done) => { const overrides = { deployUrl: 'deployUrl/' }; @@ -49,6 +49,6 @@ describe('Browser Builder deploy url', () => { expect(content).toContain('deployUrl/'); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts index 6a75d37258..6a7941e29d 100644 --- a/packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts @@ -7,7 +7,7 @@ */ import { tap } from 'rxjs/operators'; -import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; +import { TestLogger, Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder errors', () => { @@ -27,7 +27,7 @@ describe('Browser Builder errors', () => { expect(logger.includes('polyfills.ts is missing from the TypeScript')).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('shows TS syntax errors', (done) => { host.appendToFile('src/app/app.component.ts', ']]]'); @@ -39,7 +39,7 @@ describe('Browser Builder errors', () => { expect(logger.includes('Declaration or statement expected.')).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('shows static analysis errors', (done) => { host.replaceInFile('src/app/app.component.ts', `'app-root'`, `(() => 'app-root')()`); @@ -51,6 +51,6 @@ describe('Browser Builder errors', () => { expect(logger.includes('Function expressions are not supported in')).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts index 8b91275f72..db1a61efe1 100644 --- a/packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder i18n', () => { @@ -61,7 +61,7 @@ describe('Browser Builder i18n', () => { expect(content).toMatch(/Bonjour i18n!/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('ignores missing translations', (done) => { const overrides = { @@ -83,7 +83,7 @@ describe('Browser Builder i18n', () => { expect(content).toMatch(/Other content/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('reports errors for missing translations', (done) => { const overrides = { @@ -100,7 +100,7 @@ describe('Browser Builder i18n', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('register locales', (done) => { const overrides = { aot: true, i18nLocale: 'fr_FR' }; @@ -114,5 +114,5 @@ describe('Browser Builder i18n', () => { expect(content).toMatch(/angular_common_locales_fr/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index 4a25d205be..022c8e3f1a 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -9,7 +9,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; import { BrowserBuilderOptions } from '../../src'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; export const lazyModuleFiles: { [path: string]: string } = { @@ -86,7 +86,7 @@ describe('Browser Builder lazy modules', () => { expect(host.scopedSync().exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports lazy bundle for import() calls`, (done) => { host.writeMultipleFiles({ @@ -100,7 +100,7 @@ describe('Browser Builder lazy modules', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports lazy bundle for dynamic import() calls`, (done) => { host.writeMultipleFiles({ @@ -116,7 +116,7 @@ describe('Browser Builder lazy modules', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.scopedSync().exists(join(outputPath, 'lazy-module.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports lazy bundle for System.import() calls`, (done) => { host.writeMultipleFiles({ @@ -128,7 +128,7 @@ describe('Browser Builder lazy modules', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports hiding lazy bundle module name`, (done) => { host.writeMultipleFiles({ @@ -143,7 +143,7 @@ describe('Browser Builder lazy modules', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(host.scopedSync().exists(join(outputPath, '0.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports making a common bundle for shared lazy modules`, (done) => { host.writeMultipleFiles({ @@ -160,7 +160,7 @@ describe('Browser Builder lazy modules', () => { // TODO: the chunk with common modules used to be called `common`, see why that changed. tap(() => expect(host.scopedSync().exists(join(outputPath, '2.js'))).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports disabling the common bundle`, (done) => { host.writeMultipleFiles({ @@ -178,7 +178,7 @@ describe('Browser Builder lazy modules', () => { tap(() => expect(host.scopedSync().exists(join(outputPath, '1.js'))).toBe(true)), tap(() => expect(host.scopedSync().exists(join(outputPath, '2.js'))).toBe(false)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`supports extra lazy modules array`, (done) => { host.writeMultipleFiles(lazyModuleFiles); @@ -210,5 +210,5 @@ describe('Browser Builder lazy modules', () => { tap(() => expect(host.scopedSync().exists(join(outputPath, 'lazy-lazy-module.js'))) .toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts index 4c3efaf9fc..11edc1621c 100644 --- a/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder license extraction', () => { @@ -30,5 +30,5 @@ describe('Browser Builder license extraction', () => { expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 45000); + }, Timeout.Standard); }); diff --git a/packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts index 83de77248e..8eb0fce414 100644 --- a/packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts @@ -7,7 +7,7 @@ */ import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder no entry module', () => { @@ -24,5 +24,5 @@ describe('Browser Builder no entry module', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/optimization-level_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/optimization-level_spec_large.ts index 7a8fb76717..e9c8c9502c 100644 --- a/packages/angular_devkit/build_angular/test/browser/optimization-level_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/optimization-level_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder optimization level', () => { @@ -29,7 +29,7 @@ describe('Browser Builder optimization level', () => { expect(content).not.toContain('AppComponent'); }), ).subscribe(undefined, done.fail, done); - }, 45000); + }, Timeout.Complex); it('tsconfig target changes optimizations to use ES2015', (done) => { host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); @@ -44,5 +44,5 @@ describe('Browser Builder optimization level', () => { expect(content).toMatch(/class \w{constructor\(\){/); }), ).subscribe(undefined, done.fail, done); - }, 45000); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts index 790608bcaf..ae577e8aeb 100644 --- a/packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts @@ -8,7 +8,7 @@ import { normalize } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; @@ -106,7 +106,7 @@ describe('Browser Builder output hashing', () => { validateHashes(oldHashes, newHashes, []); }), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Massive); it('supports options', (done) => { host.writeMultipleFiles({ 'src/styles.css': `h1 { background: url('./spectrum.png')}` }); @@ -159,5 +159,5 @@ describe('Browser Builder output hashing', () => { expect(host.fileMatchExists('dist', /spectrum\.[0-9a-f]{20}\.png/)).toBeFalsy(); }), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts index a32046881e..703f3f646e 100644 --- a/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec, workspaceRoot } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec, workspaceRoot } from '../utils'; describe('Browser Builder output path', () => { @@ -32,11 +32,11 @@ describe('Browser Builder output path', () => { expect(host.scopedSync().exists(outputPath)).toBe(false); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('does not allow output path to be project root', (done) => { const overrides = { outputPath: './' }; runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/poll_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/poll_spec_large.ts index 219808e5a7..61b524c937 100644 --- a/packages/angular_devkit/build_angular/test/browser/poll_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/poll_spec_large.ts @@ -7,7 +7,7 @@ */ import { debounceTime, take, tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder poll', () => { @@ -38,5 +38,5 @@ describe('Browser Builder poll', () => { expect(msAvg).toBeLessThan(2750); done(); }); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts index aff7cdb8d1..05dfa6a17a 100644 --- a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { debounceTime, take, tap } from 'rxjs/operators'; -import { TestLogger, browserTargetSpec, host, runTargetSpec } from '../utils'; +import { TestLogger, Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; @@ -114,7 +114,7 @@ describe('Browser Builder rebuilds', () => { }), take(3), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Massive); it('rebuilds on CSS changes', (done) => { const overrides = { watch: true }; @@ -125,7 +125,7 @@ describe('Browser Builder rebuilds', () => { tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), take(2), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Complex); it('type checks on rebuilds', (done) => { host.writeMultipleFiles({ @@ -184,7 +184,7 @@ describe('Browser Builder rebuilds', () => { }), take(4), ).subscribe(undefined, done.fail, done); - }, 120000); + }, Timeout.Massive); it('rebuilds on type changes', (done) => { host.writeMultipleFiles({ 'src/type.ts': `export type MyType = number;` }); @@ -198,7 +198,7 @@ describe('Browser Builder rebuilds', () => { tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })), take(2), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); // TODO: writing back the original content in build 4 doesn't seem to trigger a rebuild @@ -262,7 +262,7 @@ describe('Browser Builder rebuilds', () => { }), take(5), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Complex); xit('rebuilds AOT factories', (done) => { @@ -348,5 +348,5 @@ describe('Browser Builder rebuilds', () => { }), take(7), ).subscribe(undefined, done.fail, done); - }, 60000); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts index 042b881025..3b295a6d11 100644 --- a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder file replacements', () => { @@ -48,7 +48,7 @@ describe('Browser Builder file replacements', () => { .not.toMatch(/meaning\s*=\s*10/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`fails compilation with missing 'to' file`, (done) => { const overrides = { @@ -63,5 +63,5 @@ describe('Browser Builder file replacements', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts index 38aeaad32b..572f3a5459 100644 --- a/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts @@ -8,7 +8,7 @@ import { PathFragment, join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder scripts array', () => { @@ -73,7 +73,7 @@ describe('Browser Builder scripts array', () => { expect(content).toMatch(matches[fileName]); })), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('uglifies, uses sourcemaps, and adds hashes', (done) => { host.writeMultipleFiles(scripts); @@ -107,7 +107,7 @@ describe('Browser Builder scripts array', () => { .toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 45000); + }, Timeout.Complex); it('preserves script order', (done) => { host.writeMultipleFiles(scripts); @@ -131,5 +131,5 @@ describe('Browser Builder scripts array', () => { expect(content).toMatch(re); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts index ded92ecd3e..c65292c6b5 100644 --- a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts @@ -8,7 +8,7 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder', () => { @@ -48,7 +48,7 @@ describe('Browser Builder', () => { .subscribe(event => { expect(event.success).toBe(false); }, done, done.fail); - }, 30000); + }, Timeout.Basic); it('works with service worker', (done) => { host.writeMultipleFiles({ @@ -62,7 +62,7 @@ describe('Browser Builder', () => { expect(host.scopedSync().exists(normalize('dist/ngsw.json'))); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('works with service worker and baseHref', (done) => { host.writeMultipleFiles({ @@ -79,5 +79,5 @@ describe('Browser Builder', () => { )).toMatch(/"\/foo\/bar\/index.html"/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/source-map_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/source-map_spec_large.ts index 912fa87d2f..305f6bb0a9 100644 --- a/packages/angular_devkit/build_angular/test/browser/source-map_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/source-map_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder source map', () => { @@ -27,7 +27,7 @@ describe('Browser Builder source map', () => { expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('does not output source map when disabled', (done) => { const overrides = { sourceMap: false }; @@ -39,7 +39,7 @@ describe('Browser Builder source map', () => { expect(host.scopedSync().exists(fileName)).toBe(false); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('supports eval source map', (done) => { const overrides = { sourceMap: true, evalSourceMap: true }; @@ -53,5 +53,5 @@ describe('Browser Builder source map', () => { expect(content).toContain('eval("function webpackEmptyAsyncContext'); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/stats-json_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/stats-json_spec_large.ts index e92c4d85d5..f881eeb37e 100644 --- a/packages/angular_devkit/build_angular/test/browser/stats-json_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/stats-json_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder stats json', () => { @@ -27,5 +27,5 @@ describe('Browser Builder stats json', () => { expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index 72c1b2ec46..9622aea375 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -8,7 +8,7 @@ import { normalize, tags, virtualFs } from '@angular-devkit/core'; import { concatMap, tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder styles', () => { @@ -103,7 +103,7 @@ describe('Browser Builder styles', () => { expect(content).toMatch(jsIndexMatches[fileName]); })), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('supports empty styleUrls in components', (done) => { host.writeMultipleFiles({ @@ -126,7 +126,7 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); extensionsWithImportSupport.forEach(ext => { it(`supports imports in ${ext} files`, (done) => { @@ -179,7 +179,7 @@ describe('Browser Builder styles', () => { expect(content).toMatch(matches[fileName]); })), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); extensionsWithImportSupport.forEach(ext => { @@ -205,7 +205,7 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); it(`supports material icons`, (done) => { @@ -220,7 +220,7 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); extensionsWithVariableSupport.forEach(ext => { it(`supports ${ext} includePaths`, (done) => { @@ -273,7 +273,7 @@ describe('Browser Builder styles', () => { expect(content).toMatch(matches[fileName]); })), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Standard); }); it('inlines resources', (done) => { @@ -330,7 +330,7 @@ describe('Browser Builder styles', () => { // throw new Error('Expected no postcss-url file read warnings.'); // } ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); // Disables a test that relies on node_modules. xit(`supports font-awesome imports`, (done) => { @@ -373,7 +373,7 @@ describe('Browser Builder styles', () => { div { -ms-flex: 1; flex: 1 }`); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it(`minimizes css`, (done) => { host.writeMultipleFiles({ @@ -394,7 +394,7 @@ describe('Browser Builder styles', () => { '/*! important-comment */div{-ms-flex:1;flex:1}'); }), ).subscribe(undefined, done.fail, done); - }, 45000); + }, Timeout.Standard); // TODO: consider making this a unit test in the url processing plugins. it(`supports baseHref and deployUrl in resource urls`, (done) => { @@ -531,5 +531,5 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts index fb3f976bff..c619e87f86 100644 --- a/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder subresource integrity', () => { @@ -34,5 +34,5 @@ describe('Browser Builder subresource integrity', () => { expect(content).toMatch(/integrity="\w+-[A-Za-z0-9\/\+=]+"/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/tsconfig-paths_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/tsconfig-paths_spec_large.ts index 7f4a8d8cb9..0ebfdd91bd 100644 --- a/packages/angular_devkit/build_angular/test/browser/tsconfig-paths_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/tsconfig-paths_spec_large.ts @@ -7,7 +7,7 @@ */ import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder tsconfig paths', () => { @@ -28,7 +28,7 @@ describe('Browser Builder tsconfig paths', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); it('works', (done) => { host.writeMultipleFiles({ @@ -70,5 +70,5 @@ describe('Browser Builder tsconfig paths', () => { runTargetSpec(host, browserTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/vendor-chunk_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/vendor-chunk_spec_large.ts index bc00e5322f..63862b161d 100644 --- a/packages/angular_devkit/build_angular/test/browser/vendor-chunk_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/vendor-chunk_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder vendor chunk', () => { @@ -27,5 +27,5 @@ describe('Browser Builder vendor chunk', () => { expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/works_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/works_spec_large.ts index c2ad432c9c..c7e20a5de8 100644 --- a/packages/angular_devkit/build_angular/test/browser/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/works_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { browserTargetSpec, host, runTargetSpec } from '../utils'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; describe('Browser Builder basic test', () => { @@ -31,5 +31,5 @@ describe('Browser Builder basic test', () => { expect(host.scopedSync().exists(join(outputPath, 'index.html'))).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/utils/index.ts b/packages/angular_devkit/build_angular/test/utils/index.ts index 5b60c5339f..807bf9c281 100644 --- a/packages/angular_devkit/build_angular/test/utils/index.ts +++ b/packages/angular_devkit/build_angular/test/utils/index.ts @@ -9,4 +9,5 @@ export * from './request'; export * from './test-project-host'; export * from './test-logger'; +export * from './timeouts'; export * from './run-target-spec'; diff --git a/packages/angular_devkit/build_angular/test/utils/timeouts.ts b/packages/angular_devkit/build_angular/test/utils/timeouts.ts new file mode 100644 index 0000000000..46e0fbfd23 --- /dev/null +++ b/packages/angular_devkit/build_angular/test/utils/timeouts.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export enum Timeout { + Basic = 30000, + Standard = Basic * 1.5, + Complex = Basic * 2, + Massive = Basic * 4, +} From cbc281ed8f89e973e005b0d0c630ab4ac8a03349 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 30 Mar 2018 10:07:53 -0400 Subject: [PATCH 340/724] refactor(@angular-devkit/build-angular): cleanup webpack config types --- .../angular-cli-files/models/build-options.ts | 43 +++++++++-- .../models/webpack-configs/browser.ts | 18 ++--- .../models/webpack-configs/common.ts | 22 +++--- .../models/webpack-configs/styles.ts | 14 ++-- .../models/webpack-configs/test.ts | 4 +- .../models/webpack-configs/typescript.ts | 71 +++---------------- .../build_angular/src/browser/index.ts | 15 ++-- .../build_angular/src/karma/index.ts | 17 ++--- .../build_angular/src/server/index.ts | 19 ++--- 9 files changed, 96 insertions(+), 127 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index 533c6545bd..1f4c2d7246 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -1,6 +1,17 @@ -// tslint:disable +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + // TODO: cleanup this file, it's copied as is from Angular CLI. +// tslint:disable-next-line:no-implicit-dependencies +import * as ts from 'typescript'; +import { Budget } from '../utilities/bundle-calculator'; + export interface BuildOptions { optimization: boolean; environment?: string; @@ -37,18 +48,42 @@ export interface BuildOptions { skipAppShell?: boolean; statsJson: boolean; forkTypeChecker: boolean; + + main: string; + index: string; + polyfills?: string; + budgets: Budget[]; + assets: AssetPattern[]; + scripts: ExtraEntryPoint[]; + styles: ExtraEntryPoint[]; + stylePreprocessorOptions: { includePaths: string[] }; + lazyModules: string[]; + platform?: 'browser' | 'server'; +} + +export interface AssetPattern { + glob: string; + input: string; + output: string; + allowOutsideOutDir?: boolean; +} + +export interface ExtraEntryPoint { + input: string; + output?: string; + lazy: boolean; } export interface WebpackConfigOptions { root: string; projectRoot: string; buildOptions: T; - appConfig: any; - tsConfig: any; + tsConfig: ts.ParsedCommandLine; + tsConfigPath: string; supportES2015: boolean; } export interface WebpackTestOptions extends BuildOptions { codeCoverage?: boolean; - codeCoverageExclude: string[]; + codeCoverageExclude?: string[]; } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index 3d5458502c..57b0cbb54c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -19,22 +19,22 @@ import { WebpackConfigOptions } from '../build-options'; + */ export function getBrowserConfig(wco: WebpackConfigOptions) { - const { root, projectRoot, buildOptions, appConfig } = wco; + const { root, projectRoot, buildOptions } = wco; let extraPlugins: any[] = []; // Figure out which are the lazy loaded bundle names. - const lazyChunkBundleNames = ([...appConfig.styles, ...appConfig.scripts] as ExtraEntryPoint[]) + const lazyChunkBundleNames = ([...buildOptions.styles, ...buildOptions.scripts] as ExtraEntryPoint[]) .filter(entry => entry.lazy) .map(entry => entry.bundleName); const generateIndexHtml = false; if (generateIndexHtml) { extraPlugins.push(new HtmlWebpackPlugin({ - template: path.resolve(root, appConfig.index), - filename: path.resolve(buildOptions.outputPath, appConfig.index), - chunksSortMode: packageChunkSort(appConfig), + template: path.resolve(root, buildOptions.index), + filename: path.resolve(buildOptions.outputPath, buildOptions.index), + chunksSortMode: packageChunkSort(buildOptions), excludeChunks: lazyChunkBundleNames, xhtml: true, minify: buildOptions.optimization ? { @@ -75,7 +75,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } - const globalStylesBundleNames = (appConfig.styles as ExtraEntryPoint[]) + const globalStylesBundleNames = (buildOptions.styles as ExtraEntryPoint[]) .map(style => style.bundleName); return { @@ -110,10 +110,10 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { }, plugins: extraPlugins.concat([ new IndexHtmlWebpackPlugin({ - input: path.resolve(root, appConfig.index), - output: path.basename(appConfig.index), + input: path.resolve(root, buildOptions.index), + output: path.basename(buildOptions.index), baseHref: buildOptions.baseHref, - entrypoints: generateEntryPoints(appConfig), + entrypoints: generateEntryPoints(buildOptions), deployUrl: buildOptions.deployUrl, }), ]), diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index af5b71aa5d..8ee251d7f7 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -34,7 +34,7 @@ const resolve = require('resolve'); */ export function getCommonConfig(wco: WebpackConfigOptions) { - const { root, projectRoot, buildOptions, appConfig } = wco; + const { root, projectRoot, buildOptions } = wco; const nodeModules = findUp('node_modules', projectRoot); if (!nodeModules) { @@ -44,20 +44,20 @@ export function getCommonConfig(wco: WebpackConfigOptions) { let extraPlugins: any[] = []; let entryPoints: { [key: string]: string[] } = {}; - if (appConfig.main) { - entryPoints['main'] = [path.resolve(root, appConfig.main)]; + if (buildOptions.main) { + entryPoints['main'] = [path.resolve(root, buildOptions.main)]; } - if (appConfig.polyfills) { - entryPoints['polyfills'] = [path.resolve(root, appConfig.polyfills)]; + if (buildOptions.polyfills) { + entryPoints['polyfills'] = [path.resolve(root, buildOptions.polyfills)]; } // determine hashing format const hashFormat = getOutputHashFormat(buildOptions.outputHashing as any); // process global scripts - if (appConfig.scripts.length > 0) { - const globalScriptsByBundleName = (appConfig.scripts as ExtraEntryPoint[]) + if (buildOptions.scripts.length > 0) { + const globalScriptsByBundleName = (buildOptions.scripts as ExtraEntryPoint[]) .reduce((prev: { bundleName: string, paths: string[], lazy: boolean }[], curr) => { const resolvedPath = path.resolve(root, curr.input); @@ -96,8 +96,8 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } // process asset entries - if (appConfig.assets) { - const copyWebpackPluginPatterns = appConfig.assets.map((asset: AssetPattern) => { + if (buildOptions.assets) { + const copyWebpackPluginPatterns = buildOptions.assets.map((asset: AssetPattern) => { // Resolve input paths relative to workspace root and add slash at the end. asset.input = path.resolve(root, asset.input).replace(/\\/g, '/'); @@ -196,7 +196,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { extensions: ['.ts', '.js'], symlinks: !buildOptions.preserveSymlinks, modules: [ - wco.tsConfig.baseUrl || projectRoot, + wco.tsConfig.options.baseUrl || projectRoot, 'node_modules', ], alias @@ -250,7 +250,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { minimizer: [ new HashedModuleIdsPlugin(), // TODO: check with Mike what this feature needs. - new BundleBudgetPlugin({ budgets: appConfig.budgets }), + new BundleBudgetPlugin({ budgets: buildOptions.budgets }), new CleanCssWebpackPlugin({ sourceMap: buildOptions.sourceMap, // component styles retain their original file name diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 378deaedbb..5dd513c2f5 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -39,7 +39,7 @@ interface PostcssUrlAsset { } export function getStylesConfig(wco: WebpackConfigOptions) { - const { root, projectRoot, buildOptions, appConfig } = wco; + const { root, projectRoot, buildOptions } = wco; // const appRoot = path.resolve(projectRoot, appConfig.root); const entryPoints: { [key: string]: string[] } = {}; @@ -154,11 +154,11 @@ export function getStylesConfig(wco: WebpackConfigOptions) { const includePaths: string[] = []; let lessPathOptions: { paths: string[] } = { paths: [] }; - if (appConfig.stylePreprocessorOptions - && appConfig.stylePreprocessorOptions.includePaths - && appConfig.stylePreprocessorOptions.includePaths.length > 0 + if (buildOptions.stylePreprocessorOptions + && buildOptions.stylePreprocessorOptions.includePaths + && buildOptions.stylePreprocessorOptions.includePaths.length > 0 ) { - appConfig.stylePreprocessorOptions.includePaths.forEach((includePath: string) => + buildOptions.stylePreprocessorOptions.includePaths.forEach((includePath: string) => includePaths.push(path.resolve(root, includePath))); lessPathOptions = { paths: includePaths, @@ -166,8 +166,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) { } // Process global styles. - if (appConfig.styles.length > 0) { - (appConfig.styles as ExtraEntryPoint[]).forEach(style => { + if (buildOptions.styles.length > 0) { + (buildOptions.styles as ExtraEntryPoint[]).forEach(style => { const resolvedPath = path.resolve(root, style.input); diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts index 373b46707b..a61c4f93d4 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts @@ -18,7 +18,7 @@ import { WebpackConfigOptions, WebpackTestOptions } from '../build-options'; export function getTestConfig(wco: WebpackConfigOptions) { - const { root, buildOptions, appConfig } = wco; + const { root, buildOptions } = wco; const extraRules: any[] = []; const extraPlugins: any[] = []; @@ -58,7 +58,7 @@ export function getTestConfig(wco: WebpackConfigOptions) { }, devtool: buildOptions.sourceMap ? 'inline-source-map' : 'eval', entry: { - main: path.resolve(root, appConfig.main) + main: path.resolve(root, buildOptions.main) }, module: { rules: [].concat(extraRules as any) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index 4516bf6c97..f2eda8ab7b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -25,67 +25,20 @@ function _createAotPlugin( host: virtualFs.Host, useMain = true, ) { - const { appConfig, root, buildOptions } = wco; + const { root, buildOptions } = wco; options.compilerOptions = options.compilerOptions || {}; if (wco.buildOptions.preserveSymlinks) { options.compilerOptions.preserveSymlinks = true; } - // Read the environment, and set it in the compiler host. - let hostReplacementPaths: any = {}; - // process environment file replacement - if (appConfig.environments) { - if (!appConfig.environmentSource) { - let migrationMessage = ''; - if ('source' in appConfig.environments) { - migrationMessage = '\n\n' + tags.stripIndent` - A new environmentSource entry replaces the previous source entry inside environments. - - To migrate angular-cli.json follow the example below: - - Before: - - "environments": { - "source": "environments/environment.ts", - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - - - After: - - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - `; - } - throw new SilentError( - `Environment configuration does not contain "environmentSource" entry.${migrationMessage}` - ); - - } - if (!(buildOptions.environment as any in appConfig.environments)) { - throw new SilentError(`Environment "${buildOptions.environment}" does not exist.`); - } - - const sourcePath = appConfig.environmentSource; - const envFile = appConfig.environments[buildOptions.environment as any]; - - hostReplacementPaths = { - [path.resolve(root, sourcePath)]: path.resolve(root, envFile) - }; - } - let i18nInFile = buildOptions.i18nFile ? path.resolve(root, buildOptions.i18nFile) : undefined; const additionalLazyModules: { [module: string]: string } = {}; - if (appConfig.lazyModules) { - for (const lazyModule of appConfig.lazyModules) { + if (buildOptions.lazyModules) { + for (const lazyModule of buildOptions.lazyModules) { additionalLazyModules[lazyModule] = path.resolve( root, lazyModule, @@ -94,15 +47,14 @@ function _createAotPlugin( } const pluginOptions: AngularCompilerPluginOptions = { - mainPath: useMain ? path.join(root, appConfig.main) : undefined, + mainPath: useMain ? path.join(root, buildOptions.main) : undefined, i18nInFile: i18nInFile, i18nInFormat: buildOptions.i18nFormat, i18nOutFile: buildOptions.i18nOutFile, i18nOutFormat: buildOptions.i18nOutFormat, locale: buildOptions.i18nLocale, - platform: appConfig.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser, + platform: buildOptions.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser, missingTranslation: buildOptions.i18nMissingTranslation, - hostReplacementPaths, sourceMap: buildOptions.sourceMap, additionalLazyModules, nameLazyFiles: buildOptions.namedChunks, @@ -114,8 +66,7 @@ function _createAotPlugin( } export function getNonAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { - const { appConfig, root } = wco; - const tsConfigPath = path.resolve(root, appConfig.tsConfig); + const { tsConfigPath } = wco; return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, @@ -124,8 +75,7 @@ export function getNonAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host< } export function getAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { - const { root, buildOptions, appConfig } = wco; - const tsConfigPath = path.resolve(root, appConfig.tsConfig); + const { tsConfigPath, buildOptions } = wco; const loaders: any[] = [webpackLoader]; if (buildOptions.buildOptimizer) { @@ -144,13 +94,10 @@ export function getAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { - const { root, appConfig } = wco; - const tsConfigPath = path.resolve(root, appConfig.tsConfig); - - let pluginOptions: any = { tsConfigPath, skipCodeGeneration: true }; + const { tsConfigPath } = wco; return { module: { rules: [{ test: /\.ts$/, loader: webpackLoader }] }, - plugins: [_createAotPlugin(wco, pluginOptions, host, false)] + plugins: [_createAotPlugin(wco, { tsConfigPath, skipCodeGeneration: true }, host, false)] }; } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index cb7cda2c4f..93c69c33cb 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -109,8 +109,8 @@ export interface WebpackConfigOptions { root: string; projectRoot: string; buildOptions: BrowserBuilderOptions; - appConfig: BrowserBuilderOptions; tsConfig: ts.ParsedCommandLine; + tsConfigPath: string; supportES2015: boolean; } @@ -232,26 +232,21 @@ export class BrowserBuilder implements Builder { // TODO: make target defaults into configurations instead // options = this.addTargetDefaults(options); - const tsconfigPath = normalize(resolve(root, normalize(options.tsConfig as string))); - const tsConfig = readTsconfig(getSystemPath(tsconfigPath)); + const tsConfigPath = getSystemPath(normalize(resolve(root, normalize(options.tsConfig)))); + const tsConfig = readTsconfig(tsConfigPath); const projectTs = requireProjectModule(getSystemPath(projectRoot), 'typescript') as typeof ts; const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 && tsConfig.options.target !== projectTs.ScriptTarget.ES5; - - // TODO: inside the configs, always use the project root and not the workspace root. - // Until then we have to pretend the app root is relative (``) but the same as `projectRoot`. - (options as any).root = ''; // tslint:disable-line:no-any - wco = { root: getSystemPath(root), projectRoot: getSystemPath(projectRoot), // TODO: use only this.options, it contains all flags and configs items already. buildOptions: options, - appConfig: options, tsConfig, + tsConfigPath, supportES2015, }; @@ -285,7 +280,7 @@ export class BrowserBuilder implements Builder { getStylesConfig(wco), ]; - if (wco.appConfig.main || wco.appConfig.polyfills) { + if (wco.buildOptions.main || wco.buildOptions.polyfills) { const typescriptConfigPartial = wco.buildOptions.aot ? getAotConfig(wco, host) : getNonAotConfig(wco, host); diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index f39cda08a5..510840f451 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -16,6 +16,7 @@ import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angu import * as fs from 'fs'; import { Observable } from 'rxjs'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies +import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; import { getCommonConfig, getNonAotTestConfig, @@ -125,8 +126,7 @@ export class KarmaBuilder implements Builder { } private _buildWebpackConfig(root: Path, projectRoot: Path, options: KarmaBuilderOptions) { - // tslint:disable-next-line:no-any - let wco: any; + let wco: WebpackConfigOptions; const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); @@ -137,19 +137,16 @@ export class KarmaBuilder implements Builder { ); }); - const tsconfigPath = getSystemPath(resolve(root, normalize(options.tsConfig as string))); - const tsConfig = readTsconfig(tsconfigPath); + const tsConfigPath = getSystemPath(resolve(root, normalize(options.tsConfig as string))); + const tsConfig = readTsconfig(tsConfigPath); const projectTs = requireProjectModule(getSystemPath(projectRoot), 'typescript') as typeof ts; const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 && tsConfig.options.target !== projectTs.ScriptTarget.ES5; - const compatOptions = { - ...options, - // TODO: inside the configs, always use the project root and not the workspace root. - // Until then we have to pretend the app root is relative (``) but the same as `projectRoot`. - root: '', + const compatOptions: typeof wco['buildOptions'] = { + ...options as {} as typeof wco['buildOptions'], // Some asset logic inside getCommonConfig needs outputPath to be set. outputPath: '', }; @@ -159,8 +156,8 @@ export class KarmaBuilder implements Builder { projectRoot: getSystemPath(projectRoot), // TODO: use only this.options, it contains all flags and configs items already. buildOptions: compatOptions, - appConfig: compatOptions, tsConfig, + tsConfigPath, supportES2015, }; diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index 13952472f4..c147bb74d6 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -109,36 +109,31 @@ export class ServerBuilder implements Builder { // TODO: make target defaults into configurations instead // options = this.addTargetDefaults(options); - const tsconfigPath = normalize(resolve(root, normalize(options.tsConfig as string))); - const tsConfig = readTsconfig(getSystemPath(tsconfigPath)); + const tsConfigPath = getSystemPath(normalize(resolve(root, normalize(options.tsConfig)))); + const tsConfig = readTsconfig(tsConfigPath); const projectTs = requireProjectModule(getSystemPath(projectRoot), 'typescript') as typeof ts; const supportES2015 = tsConfig.options.target !== projectTs.ScriptTarget.ES3 && tsConfig.options.target !== projectTs.ScriptTarget.ES5; - - // TODO: inside the configs, always use the project root and not the workspace root. - // Until then we have to pretend the app root is relative (``) but the same as `projectRoot`. - (options as any).root = ''; // tslint:disable-line:no-any - const buildOptions: typeof wco['buildOptions'] = { ...options as {} as typeof wco['buildOptions'], - aot: true, }; wco = { root: getSystemPath(root), projectRoot: getSystemPath(projectRoot), // TODO: use only this.options, it contains all flags and configs items already. - buildOptions, - appConfig: { - ...options, + buildOptions: { + ...buildOptions, + aot: true, platform: 'server', scripts: [], styles: [], }, tsConfig, + tsConfigPath, supportES2015, }; @@ -148,7 +143,7 @@ export class ServerBuilder implements Builder { getStylesConfig(wco), ]; - if (wco.appConfig.main || wco.appConfig.polyfills) { + if (wco.buildOptions.main || wco.buildOptions.polyfills) { const typescriptConfigPartial = wco.buildOptions.aot ? getAotConfig(wco, this.context.host as virtualFs.Host) : getNonAotConfig(wco, this.context.host as virtualFs.Host); From a976ebe2163645963e67614b23d1a24d02aa514f Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 2 Apr 2018 11:42:58 -0700 Subject: [PATCH 341/724] fix(@angular-devkit/core): properly chain observables in registry Smart defaults were overwriting some objects with the wrong ones. --- .../core/src/json/schema/registry.ts | 84 ++++++++----------- .../core/src/json/schema/transforms.ts | 4 +- .../core/src/json/schema/visitor.ts | 14 ++-- 3 files changed, 42 insertions(+), 60 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index fc0ad642eb..4455755403 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -8,7 +8,7 @@ import * as ajv from 'ajv'; import * as http from 'http'; import { Observable, from, of as observableOf } from 'rxjs'; -import { concatMap, map, switchMap } from 'rxjs/operators'; +import { concatMap, map, switchMap, tap } from 'rxjs/operators'; import { PartiallyOrderedSet, isObservable } from '../../utils'; import { JsonObject, JsonValue } from '../interface'; import { @@ -162,44 +162,27 @@ export class CoreSchemaRegistry implements SchemaRegistry { return validator .pipe( - // tslint:disable-next-line:no-any - map(validate => (data: any): Observable => { - let dataObs = observableOf(data); - this._pre.forEach(visitor => - dataObs = dataObs.pipe( - concatMap(data => { - return visitJson(data as JsonValue, visitor, schema, this._resolver, validate); - }), - ), - ); - - return dataObs.pipe( + map(validate => (data: JsonValue): Observable => { + return observableOf(data).pipe( + ...[...this._pre].map(visitor => concatMap((data: JsonValue) => { + return visitJson(data, visitor, schema, this._resolver, validate); + })), + ).pipe( switchMap(updatedData => { const result = validate(updatedData); return typeof result == 'boolean' ? observableOf([updatedData, result]) : from((result as PromiseLike) - .then(result => [updatedData, result])); + .then(r => [updatedData, r])); }), switchMap(([data, valid]) => { if (valid) { - let dataObs = this._applySmartDefaults(data); - this._post.forEach(visitor => - dataObs = dataObs.pipe( - concatMap(data => { - return visitJson( - data as JsonValue, - visitor, - schema, - this._resolver, - validate, - ); - }), - ), - ); - - return dataObs.pipe( + return this._applySmartDefaults(data).pipe( + ...[...this._post].map(visitor => concatMap(data => { + return visitJson(data as JsonValue, visitor, schema, this._resolver, validate); + })), + ).pipe( map(data => [data, valid]), ); } else { @@ -208,10 +191,6 @@ export class CoreSchemaRegistry implements SchemaRegistry { }), map(([data, valid]) => { if (valid) { - // tslint:disable-next-line:no-any - const schemaDataMap = new WeakMap(); - schemaDataMap.set(schema, data); - return { data, success: true } as SchemaValidatorResult; } @@ -348,26 +327,29 @@ export class CoreSchemaRegistry implements SchemaRegistry { } } - return [...this._smartDefaultRecord.entries()].reduce((acc, [pointer, schema]) => { - const fragments = JSON.parse(pointer); - const source = this._sourceMap.get((schema as JsonObject).$source as string); + return observableOf(data).pipe( + ...[...this._smartDefaultRecord.entries()].map(([pointer, schema]) => { + return concatMap(data => { + const fragments = JSON.parse(pointer); + const source = this._sourceMap.get((schema as JsonObject).$source as string); - if (!source) { - throw new Error('Invalid source.'); - } + if (!source) { + throw new Error('Invalid source.'); + } - let value = source(schema); - if (!isObservable(value)) { - value = observableOf(value); - } + let value = source(schema); + if (!isObservable(value)) { + value = observableOf(value); + } - return acc.pipe( - concatMap(() => (value as Observable<{}>).pipe( - map(x => _set(data, fragments, x)), - )), - ); - }, - observableOf(data), + return (value as Observable<{}>).pipe( + // Synchronously set the new data at the proper JsonSchema path. + tap(x => _set(data, fragments, x)), + // But return the data object. + map(() => data), + ); + }); + }), ); } } diff --git a/packages/angular_devkit/core/src/json/schema/transforms.ts b/packages/angular_devkit/core/src/json/schema/transforms.ts index b481e7f0e8..31aead4070 100644 --- a/packages/angular_devkit/core/src/json/schema/transforms.ts +++ b/packages/angular_devkit/core/src/json/schema/transforms.ts @@ -14,7 +14,7 @@ export function addUndefinedDefaults( _pointer: JsonPointer, schema?: JsonObject, _root?: JsonObject | JsonArray, -): JsonValue | undefined { +): JsonValue { if (value === undefined && schema) { if (schema.items || schema.type == 'array') { return []; @@ -38,5 +38,5 @@ export function addUndefinedDefaults( } } - return value; + return value as JsonValue; } diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index 0fd2f7cbf1..b898548d18 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -23,11 +23,11 @@ export interface JsonSchemaVisitor { export interface JsonVisitor { ( - value: JsonValue | undefined, + value: JsonValue, pointer: JsonPointer, schema?: JsonObject, root?: JsonObject | JsonArray, - ): Observable | JsonValue | undefined; + ): Observable | JsonValue; } @@ -72,7 +72,7 @@ function _visitJsonRecursive( refResolver?: ReferenceResolver, context?: ContextT, // tslint:disable-line:no-any root?: JsonObject | JsonArray, -): Observable { +): Observable { if (schema && schema.hasOwnProperty('$ref') && typeof schema['$ref'] == 'string') { if (refResolver) { const resolved = refResolver(schema['$ref'] as string, context); @@ -84,10 +84,10 @@ function _visitJsonRecursive( const value = visitor(json, ptr, schema, root); return (isObservable(value) - ? value as Observable - : observableOf(value as JsonValue | undefined) + ? value as Observable + : observableOf(value as JsonValue) ).pipe( - concatMap((value: JsonValue | undefined) => { + concatMap((value: JsonValue) => { if (Array.isArray(value)) { return concat( from(value).pipe( @@ -152,7 +152,7 @@ export function visitJson( schema?: JsonObject, refResolver?: ReferenceResolver, context?: ContextT, // tslint:disable-line:no-any -): Observable { +): Observable { return _visitJsonRecursive(json, visitor, buildJsonPointer([]), schema, refResolver, context); } From 0fb09ed55a5013712538a46bec3d6ba09fa107da Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 29 Mar 2018 15:13:31 -0700 Subject: [PATCH 342/724] fix(@schematics/angular): v6 migration various fixes --- .../angular/migrations/update-6/index.ts | 163 +++++++++++++----- .../angular/migrations/update-6/index_spec.ts | 29 ++-- 2 files changed, 136 insertions(+), 56 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index eaf74206d4..37d2338984 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, Path, join, normalize } from '@angular-devkit/core'; +import { JsonObject, Path, basename, join, normalize } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -71,7 +71,7 @@ function migrateConfiguration(oldConfig: CliConfig): Rule { const config: JsonObject = { version: 1, newProjectRoot: 'projects', - projects: extractProjectsConfig(oldConfig), + projects: extractProjectsConfig(oldConfig, host), }; const cliConfig = extractCliConfig(oldConfig); if (cliConfig !== null) { @@ -160,7 +160,7 @@ function extractArchitectConfig(_config: CliConfig): JsonObject | null { return null; } -function extractProjectsConfig(config: CliConfig): JsonObject { +function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { const builderPackage = '@angular-devkit/build-angular'; let defaultAppNamePrefix = 'app'; if (config.project && config.project.name) { @@ -176,23 +176,122 @@ function extractProjectsConfig(config: CliConfig): JsonObject { const outDir = app.outDir || defaults.outDir; const appRoot = app.root || defaults.appRoot; - const project: JsonObject = { - root: '', - projectType: 'application', - cli: {}, - schematics: {}, - }; + function _mapAssets(asset: string | JsonObject) { + if (typeof asset === 'string') { + return { glob: asset, input: normalize('/' + appRoot + '/'), output: '/' }; + } else { + if (asset.output) { + return { + glob: asset.glob, + input: normalize('/' + appRoot + '/' + asset.input), + output: normalize('/' + + (asset.output as string).startsWith(outDir) + ? (asset.output as string).slice(outDir.length) + : (asset.output as string), + ), + }; + } else { + return { + glob: asset.glob, + input: normalize('/' + appRoot + '/' + asset.input), + output: '/', + }; + } + } + } + + function _buildConfigurations(): JsonObject { + const source = app.environmentSource; + const environments = app.environments; + + if (!environments) { + return {}; + } + + return Object.keys(environments).reduce((acc, environment) => { + let isProduction = false; + + const environmentContent = tree.read(app.root + '/' + environments[environment]); + if (environmentContent) { + isProduction = !!environmentContent.toString('utf-8') + // Allow for `production: true` or `production = true`. Best we can do to guess. + .match(/production['"]?\s*[:=]\s*true/); + } + + // We used to use `prod` by default as the key, instead we now use the full word. + // Try not to override the production key if it's there. + if (environment == 'prod' && !environments['production'] && isProduction) { + environment = 'production'; + } + + acc[environment] = { + ...(isProduction + ? { + optimization: true, + outputHashing: 'all', + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + } + : {} + ), + fileReplacements: [ + { from: `${app.root}/${source}`, to: `${outDir}/${environments[environment]}` }, + ], + }; + + return acc; + }, {} as JsonObject); + } + + function _serveConfigurations(): JsonObject { + const environments = app.environments; + + if (!environments) { + return {}; + } + if (!architect) { + throw new Error(); + } + + const configurations = (architect.build as JsonObject).configurations as JsonObject; + + return Object.keys(configurations).reduce((acc, environment) => { + acc[environment] = { browserTarget: `${name}:build:${environment}` }; - const extraEntryMapper = (extraEntry: string | JsonObject) => { + return acc; + }, {} as JsonObject); + } + + function _extraEntryMapper(extraEntry: string | JsonObject) { let entry: JsonObject; if (typeof extraEntry === 'string') { - entry = { input: extraEntry }; + entry = { input: join(app.root as Path, extraEntry) }; } else { - entry = extraEntry; + const input = join(app.root as Path, extraEntry.input as string || ''); + const lazy = !!extraEntry.lazy; + entry = { input }; + + if (!extraEntry.output && lazy) { + entry.lazy = true; + entry.bundleName = basename( + normalize(input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } else if (extraEntry.output) { + entry.bundleName = extraEntry.output; + } } - entry.input = join(app.root as Path, entry.input || ''); return entry; + } + + const project: JsonObject = { + root: '', + projectType: 'application', }; const architect: JsonObject = {}; @@ -208,28 +307,13 @@ function extractProjectsConfig(config: CliConfig): JsonObject { tsConfig: appRoot + '/' + app.tsconfig || defaults.tsConfig, }; - buildOptions.assets = (app.assets || []).map((asset: string | JsonObject) => - typeof asset === 'string' - ? { glob: appRoot + '/' + asset } - : appRoot + '/' + asset); - buildOptions.styles = (app.styles || []).map(extraEntryMapper); - buildOptions.scripts = (app.scripts || []).map(extraEntryMapper); + buildOptions.assets = (app.assets || []).map(_mapAssets); + buildOptions.styles = (app.styles || []).map(_extraEntryMapper); + buildOptions.scripts = (app.scripts || []).map(_extraEntryMapper); architect.build = { builder: `${builderPackage}:browser`, options: buildOptions, - configurations: { - production: { - optimization: true, - outputHashing: 'all', - sourceMap: false, - extractCss: true, - namedChunks: false, - aot: true, - extractLicenses: true, - vendorChunk: false, - buildOptimizer: true, - }, - }, + configurations: _buildConfigurations(), }; // Serve target @@ -239,11 +323,7 @@ function extractProjectsConfig(config: CliConfig): JsonObject { architect.serve = { builder: `${builderPackage}:dev-server`, options: serveOptions, - configurations: { - production: { - browserTarget: `${name}:build`, - }, - }, + configurations: _serveConfigurations(), }; // Extract target @@ -266,12 +346,9 @@ function extractProjectsConfig(config: CliConfig): JsonObject { if (app.testTsconfig) { testOptions.tsConfig = appRoot + '/' + app.testTsconfig; } - testOptions.scripts = (app.scripts || []).map(extraEntryMapper); - testOptions.styles = (app.styles || []).map(extraEntryMapper); - testOptions.assets = (app.assets || []).map((asset: string | JsonObject) => - typeof asset === 'string' - ? { glob: appRoot + '/' + asset } - : appRoot + '/' + asset); + testOptions.scripts = (app.scripts || []).map(_extraEntryMapper); + testOptions.styles = (app.styles || []).map(_extraEntryMapper); + testOptions.assets = (app.assets || []).map(_mapAssets); if (karmaConfig) { architect.test = { diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index dc338e3cdd..c25c8fcbef 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -90,6 +90,13 @@ describe('Migration to v6', () => { devDependencies: {}, }; tree.create('/package.json', JSON.stringify(packageJson, null, 2)); + + // Create a prod environment. + tree.create('/src/environments/environment.prod.ts', ` + export const environment = { + production: true + }; + `); }); describe('file creation/deletion', () => { @@ -491,7 +498,10 @@ describe('Migration to v6', () => { expect(build.builder).toEqual('@angular-devkit/build-angular:browser'); expect(build.options.scripts).toEqual([]); expect(build.options.styles).toEqual([{ input: 'src/styles.css' }]); - expect(build.options.assets).toEqual([{ glob: 'src/assets' }, { glob: 'src/favicon.ico' }]); + expect(build.options.assets).toEqual([ + { glob: 'assets', input: '/src', output: '/' }, + { glob: 'favicon.ico', input: '/src', output: '/' }, + ]); const prodConfig = build.configurations.production; expect(prodConfig.outputHashing).toEqual('all'); expect(prodConfig.sourceMap).toEqual(false); @@ -510,7 +520,7 @@ describe('Migration to v6', () => { expect(serve.builder).toEqual('@angular-devkit/build-angular:dev-server'); expect(serve.options).toEqual({ browserTarget: 'foo:build' }); const prodConfig = serve.configurations.production; - expect(prodConfig.browserTarget).toEqual('foo:build'); + expect(prodConfig.browserTarget).toEqual('foo:build:production'); }); it('should set the test target', () => { @@ -524,17 +534,10 @@ describe('Migration to v6', () => { expect(test.options.karmaConfig).toEqual('./karma.conf.js'); expect(test.options.scripts).toEqual([]); expect(test.options.styles).toEqual([{ input: 'src/styles.css' }]); - expect(test.options.assets).toEqual([{ glob: 'src/assets' }, { glob: 'src/favicon.ico' }]); - }); - - it('should set the serve target', () => { - tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); - tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); - const serve = getConfig(tree).projects.foo.architect.serve; - expect(serve.builder).toEqual('@angular-devkit/build-angular:dev-server'); - expect(serve.options).toEqual({ browserTarget: 'foo:build' }); - const prodConfig = serve.configurations.production; - expect(prodConfig.browserTarget).toEqual('foo:build'); + expect(test.options.assets).toEqual([ + { glob: 'assets', input: '/src', output: '/' }, + { glob: 'favicon.ico', input: '/src', output: '/' }, + ]); }); it('should set the extract i18n target', () => { From b94768799afecac357aeaef5274506815b5923af Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 2 Apr 2018 20:20:04 -0400 Subject: [PATCH 343/724] refactor(@ngtools/webpack): remove semver & chalk dependencies --- packages/ngtools/webpack/package.json | 2 -- .../webpack/src/transformers/make_transform.ts | 10 +++++----- packages/ngtools/webpack/src/type_checker.ts | 11 +++-------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index f519a3d98a..df7f1bb0a8 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -26,8 +26,6 @@ }, "dependencies": { "tree-kill": "^1.0.0", - "chalk": "~2.2.0", - "semver": "^5.3.0", "webpack-sources": "^1.1.0" }, "peerDependencies": { diff --git a/packages/ngtools/webpack/src/transformers/make_transform.ts b/packages/ngtools/webpack/src/transformers/make_transform.ts index 7c7b2a1b04..1b36d821a0 100644 --- a/packages/ngtools/webpack/src/transformers/make_transform.ts +++ b/packages/ngtools/webpack/src/transformers/make_transform.ts @@ -5,7 +5,6 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { satisfies } from 'semver'; import * as ts from 'typescript'; import { elideImports } from './elide_imports'; import { @@ -18,10 +17,11 @@ import { } from './interfaces'; -// Typescript below 2.5.0 needs a workaround. -const visitEachChild = satisfies(ts.version, '^2.5.0') - ? ts.visitEachChild - : visitEachChildWorkaround; +// Typescript below 2.7.0 needs a workaround. +const tsVersionParts = ts.version.split('.').map(p => Number(p)); +const visitEachChild = tsVersionParts[0] <= 2 && tsVersionParts[1] < 7 + ? visitEachChildWorkaround + : ts.visitEachChild; export function makeTransform( standardTransform: StandardTransform, diff --git a/packages/ngtools/webpack/src/type_checker.ts b/packages/ngtools/webpack/src/type_checker.ts index 05c53d878e..0eeff80ccb 100644 --- a/packages/ngtools/webpack/src/type_checker.ts +++ b/packages/ngtools/webpack/src/type_checker.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import chalk from 'chalk'; +import { terminal } from '@angular-devkit/core'; import * as ts from 'typescript'; import { time, timeEnd } from './benchmark'; import { WebpackCompilerHost } from './compiler_host'; @@ -22,11 +22,6 @@ import { // This file should run in a child process with the AUTO_START_ARG argument -// Force basic color support on terminals with no color support. -// Chalk typings don't have the correct constructor parameters. -const chalkCtx = new (chalk.constructor)(chalk.supportsColor ? {} : { level: 1 }); -const { bold, red, yellow } = chalkCtx; - export enum MESSAGE_KIND { Init, @@ -125,7 +120,7 @@ export class TypeChecker { if (errors.length > 0) { const message = formatDiagnostics(errors); - console.error(bold(red('ERROR in ' + message))); + console.error(terminal.bold(terminal.red('ERROR in ' + message))); } else { // Reset the changed file tracker only if there are no errors. this._compilerHost.resetChangedFileTracker(); @@ -133,7 +128,7 @@ export class TypeChecker { if (warnings.length > 0) { const message = formatDiagnostics(warnings); - console.log(bold(yellow('WARNING in ' + message))); + console.log(terminal.bold(terminal.yellow('WARNING in ' + message))); } } } From c11c6cab2645659c06465cdbeb389e7fdc202953 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 30 Mar 2018 16:32:41 -0400 Subject: [PATCH 344/724] fix(@schematics/angular): Update the new app structure --- packages/angular/pwa/pwa/index_spec.ts | 1 - .../angular/app-shell/index_spec.ts | 1 - .../application/files/{ => root}/browserslist | 0 .../files/{ => root}/karma.conf.js | 0 .../application/files/root/tsconfig.app.json | 12 +++ .../application/files/root/tsconfig.spec.json | 19 ++++ .../application/files/tsconfig.app.json | 12 --- .../application/files/tsconfig.spec.json | 19 ---- .../schematics/angular/application/index.ts | 87 +++++++++++++------ .../angular/application/index_spec.ts | 56 +++++++++++- .../angular/application/schema.d.ts | 4 + .../angular/application/schema.json | 5 ++ .../schematics/angular/class/index_spec.ts | 1 - .../angular/component/index_spec.ts | 1 - .../angular/directive/index_spec.ts | 1 - packages/schematics/angular/e2e/index.ts | 21 +++-- packages/schematics/angular/e2e/index_spec.ts | 8 ++ packages/schematics/angular/e2e/schema.d.ts | 4 + packages/schematics/angular/e2e/schema.json | 5 ++ .../schematics/angular/enum/index_spec.ts | 1 - .../schematics/angular/guard/index_spec.ts | 1 - .../angular/interface/index_spec.ts | 1 - .../schematics/angular/module/index_spec.ts | 1 - packages/schematics/angular/ng-new/index.ts | 1 + .../schematics/angular/ng-new/index_spec.ts | 6 +- .../schematics/angular/pipe/index_spec.ts | 1 - .../angular/service-worker/index_spec.ts | 1 - .../schematics/angular/service/index_spec.ts | 1 - .../angular/universal/index_spec.ts | 1 - 29 files changed, 194 insertions(+), 78 deletions(-) rename packages/schematics/angular/application/files/{ => root}/browserslist (100%) rename packages/schematics/angular/application/files/{ => root}/karma.conf.js (100%) create mode 100644 packages/schematics/angular/application/files/root/tsconfig.app.json create mode 100644 packages/schematics/angular/application/files/root/tsconfig.spec.json delete mode 100644 packages/schematics/angular/application/files/tsconfig.app.json delete mode 100644 packages/schematics/angular/application/files/tsconfig.spec.json diff --git a/packages/angular/pwa/pwa/index_spec.ts b/packages/angular/pwa/pwa/index_spec.ts index 2e99acb3e5..13a995f9f7 100644 --- a/packages/angular/pwa/pwa/index_spec.ts +++ b/packages/angular/pwa/pwa/index_spec.ts @@ -37,7 +37,6 @@ describe('PWA Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index db7754a837..23c72d1749 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -33,7 +33,6 @@ describe('App Shell Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: true, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/application/files/browserslist b/packages/schematics/angular/application/files/root/browserslist similarity index 100% rename from packages/schematics/angular/application/files/browserslist rename to packages/schematics/angular/application/files/root/browserslist diff --git a/packages/schematics/angular/application/files/karma.conf.js b/packages/schematics/angular/application/files/root/karma.conf.js similarity index 100% rename from packages/schematics/angular/application/files/karma.conf.js rename to packages/schematics/angular/application/files/root/karma.conf.js diff --git a/packages/schematics/angular/application/files/root/tsconfig.app.json b/packages/schematics/angular/application/files/root/tsconfig.app.json new file mode 100644 index 0000000000..d4e6e46ada --- /dev/null +++ b/packages/schematics/angular/application/files/root/tsconfig.app.json @@ -0,0 +1,12 @@ +{ + "extends": "<%= relativeTsConfigPath %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= relativeTsConfigPath %>/out-tsc/app", + "module": "es2015", + "types": [] + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/packages/schematics/angular/application/files/root/tsconfig.spec.json b/packages/schematics/angular/application/files/root/tsconfig.spec.json new file mode 100644 index 0000000000..975342957b --- /dev/null +++ b/packages/schematics/angular/application/files/root/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "<%= relativeTsConfigPath %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= relativeTsConfigPath %>/out-tsc/spec", + "module": "commonjs", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "<%= rootInSrc ? '' : 'src/' %>test.ts", + "<%= rootInSrc ? '' : 'src/' %>polyfills.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/packages/schematics/angular/application/files/tsconfig.app.json b/packages/schematics/angular/application/files/tsconfig.app.json deleted file mode 100644 index df0a3ec393..0000000000 --- a/packages/schematics/angular/application/files/tsconfig.app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", - "compilerOptions": { - "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/app", - "module": "es2015", - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/schematics/angular/application/files/tsconfig.spec.json b/packages/schematics/angular/application/files/tsconfig.spec.json deleted file mode 100644 index 04c16e21f4..0000000000 --- a/packages/schematics/angular/application/files/tsconfig.spec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "<%= appDir.split('/').map(x => '..').join('/') %>/tsconfig.json", - "compilerOptions": { - "outDir": "<%= appDir.split('/').map(x => '..').join('/') %>/out-tsc/spec", - "module": "commonjs", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 7235904eb2..cc54cf8710 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { strings, tags } from '@angular-devkit/core'; +import { normalize, relative, strings, tags } from '@angular-devkit/core'; import { experimental } from '@angular-devkit/core'; import { MergeStrategy, @@ -96,7 +96,16 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace // if (workspaceJson.value === null) { // throw new SchematicsException(`Unable to parse configuration file (${workspacePath}).`); // } - const projectRoot = `${workspace.newProjectRoot}/${options.name}`; + let projectRoot = options.projectRoot !== undefined + ? options.projectRoot + : `${workspace.newProjectRoot}/${options.name}`; + if (projectRoot !== '' && !projectRoot.endsWith('/')) { + projectRoot += '/'; + } + const rootFilesRoot = options.projectRoot === undefined + ? projectRoot + : projectRoot + 'src/'; + // tslint:disable-next-line:no-any const project: any = { root: projectRoot, @@ -106,25 +115,25 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace builder: '@angular-devkit/build-angular:browser', options: { outputPath: `dist/${options.name}`, - index: `${projectRoot}/src/index.html`, - main: `${projectRoot}/src/main.ts`, - polyfills: `${projectRoot}/src/polyfills.ts`, - tsConfig: `${projectRoot}/tsconfig.app.json`, + index: `${projectRoot}src/index.html`, + main: `${projectRoot}src/main.ts`, + polyfills: `${projectRoot}src/polyfills.ts`, + tsConfig: `${rootFilesRoot}tsconfig.app.json`, assets: [ { glob: 'favicon.ico', - input: `${projectRoot}/src`, + input: `${projectRoot}src`, output: '/', }, { glob: '**/*', - input: `${projectRoot}/src/assets`, + input: `${projectRoot}src/assets`, output: '/assets', }, ], styles: [ { - input: `${projectRoot}/src/styles.${options.style}`, + input: `${projectRoot}src/styles.${options.style}`, }, ], scripts: [], @@ -132,8 +141,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace configurations: { production: { fileReplacements: [{ - src: `${projectRoot}/src/environments/environment.ts`, - replaceWith: `${projectRoot}/src/environments/environment.prod.ts`, + src: `${projectRoot}src/environments/environment.ts`, + replaceWith: `${projectRoot}src/environments/environment.prod.ts`, }], optimization: true, outputHashing: 'all', @@ -167,25 +176,25 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace test: { builder: '@angular-devkit/build-angular:karma', options: { - main: `${projectRoot}/src/test.ts`, - polyfills: `${projectRoot}/src/polyfills.ts`, - tsConfig: `${projectRoot}/tsconfig.spec.json`, - karmaConfig: `${projectRoot}/karma.conf.js`, + main: `${projectRoot}src/test.ts`, + polyfills: `${projectRoot}src/polyfills.ts`, + tsConfig: `${rootFilesRoot}tsconfig.spec.json`, + karmaConfig: `${rootFilesRoot}karma.conf.js`, styles: [ { - input: `${projectRoot}/styles.${options.style}`, + input: `${projectRoot}styles.${options.style}`, }, ], scripts: [], assets: [ { glob: 'favicon.ico', - input: `${projectRoot}/src/`, + input: `${projectRoot}src/`, output: '/', }, { glob: '**/*', - input: `${projectRoot}/src/assets`, + input: `${projectRoot}src/assets`, output: '/assets', }, ], @@ -195,8 +204,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ - `${projectRoot}/tsconfig.app.json`, - `${projectRoot}/tsconfig.spec.json`, + `${projectRoot}tsconfig.app.json`, + `${projectRoot}tsconfig.spec.json`, ], exclude: [ '**/node_modules/**', @@ -267,29 +276,57 @@ export default function (options: ApplicationOptions): Rule { inlineTemplate: options.inlineTemplate, spec: !options.skipTests, styleext: options.style, + viewEncapsulation: options.viewEncapsulation, }; const workspace = getWorkspace(host); - const newProjectRoot = workspace.newProjectRoot; - const appDir = `${newProjectRoot}/${options.name}`; - const sourceDir = `${appDir}/src/app`; + let newProjectRoot = workspace.newProjectRoot; + let appDir = `${newProjectRoot}/${options.name}`; + let sourceRoot = `${appDir}/src`; + let sourceDir = `${sourceRoot}/app`; + let relativeTsConfigPath = appDir.split('/').map(x => '..').join('/'); + const rootInSrc = options.projectRoot !== undefined; + if (options.projectRoot !== undefined) { + newProjectRoot = options.projectRoot; + appDir = `${newProjectRoot}/src`; + sourceRoot = appDir; + sourceDir = `${sourceRoot}/app`; + relativeTsConfigPath = relative(normalize('/' + sourceRoot), normalize('/')); + if (relativeTsConfigPath === '') { + relativeTsConfigPath = '.'; + } + } const e2eOptions: E2eOptions = { name: `${options.name}-e2e`, relatedAppName: options.name, rootSelector: appRootSelector, }; + if (options.projectRoot !== undefined) { + e2eOptions.projectRoot = 'e2e'; + } return chain([ addAppToWorkspaceFile(options, workspace), options.skipPackageJson ? noop() : addDependenciesToPackageJson(), mergeWith( - apply(url('./files'), [ + apply(url('./files/src'), [ + template({ + utils: strings, + ...options, + 'dot': '.', + relativeTsConfigPath, + }), + move(sourceRoot), + ])), + mergeWith( + apply(url('./files/root'), [ template({ utils: strings, ...options, 'dot': '.', - appDir, + relativeTsConfigPath, + rootInSrc, }), move(appDir), ])), diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index d45aad67c6..828c6b75fe 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -28,7 +28,6 @@ describe('Application Schematic', () => { name: 'foo', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, @@ -57,6 +56,9 @@ describe('Application Schematic', () => { expect(files.indexOf('/projects/foo/src/styles.css')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/test.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app/app.component.css')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app/app.component.html')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/src/app/app.component.spec.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/app/app.component.ts')).toBeGreaterThanOrEqual(0); }); @@ -103,6 +105,8 @@ describe('Application Schematic', () => { path = '/projects/foo/tsconfig.spec.json'; content = tree.readContent(path); expect(content).toMatch('../../tsconfig.json'); + const specTsConfig = JSON.parse(content); + expect(specTsConfig.files).toEqual(['src/test.ts', 'src/polyfills.ts']); }); describe(`update package.json`, () => { @@ -143,4 +147,54 @@ describe('Application Schematic', () => { expect(packageJson.devDependencies['@angular-devkit/build-angular']).toBeUndefined(); }); }); + + describe('custom projectRoot', () => { + it('should put app files in the right spot', () => { + const options = { ...defaultOptions, projectRoot: '' }; + + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const files = tree.files; + expect(files.indexOf('/src/karma.conf.js')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/tsconfig.app.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/tsconfig.spec.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/environments/environment.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/environments/environment.prod.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/favicon.ico')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/index.html')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/main.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/polyfills.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/styles.css')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/test.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/app/app.component.css')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/app/app.component.html')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/app/app.component.spec.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/app/app.component.ts')).toBeGreaterThanOrEqual(0); + }); + + it('should set values in angular.json correctly', () => { + const options = { ...defaultOptions, projectRoot: '' }; + + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const config = JSON.parse(tree.readContent('/angular.json')); + const prj = config.projects.foo; + expect(prj.root).toEqual(''); + const buildOpt = prj.architect.build.options; + expect(buildOpt.index).toEqual('src/index.html'); + expect(buildOpt.main).toEqual('src/main.ts'); + expect(buildOpt.polyfills).toEqual('src/polyfills.ts'); + expect(buildOpt.tsConfig).toEqual('src/tsconfig.app.json'); + }); + + it('should set the relative tsconfig paths', () => { + const options = { ...defaultOptions, projectRoot: '' }; + + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const appTsConfig = JSON.parse(tree.readContent('/src/tsconfig.app.json')); + expect(appTsConfig.extends).toEqual('../tsconfig.json'); + const specTsConfig = JSON.parse(tree.readContent('/src/tsconfig.spec.json')); + expect(specTsConfig.extends).toEqual('../tsconfig.json'); + expect(specTsConfig.files).toEqual(['test.ts', 'polyfills.ts']); + }); + }); }); diff --git a/packages/schematics/angular/application/schema.d.ts b/packages/schematics/angular/application/schema.d.ts index 70b7e840fa..94b4b3faed 100644 --- a/packages/schematics/angular/application/schema.d.ts +++ b/packages/schematics/angular/application/schema.d.ts @@ -7,6 +7,10 @@ */ export interface Schema { + /** + * The root directory of the new application. + */ + projectRoot?: string; /** * The name of the application. */ diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 20626779b2..0bf4bd5469 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -4,6 +4,11 @@ "title": "Angular Application Options Schema", "type": "object", "properties": { + "projectRoot": { + "description": "The root directory of the new application.", + "type": "string", + "visible": false + }, "name": { "description": "The name of the application.", "type": "string", diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index 77b2d22c6c..694e9573ff 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -34,7 +34,6 @@ describe('Class Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 0c7a40ac55..06de849dde 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -42,7 +42,6 @@ describe('Component Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index 6dd2a6268e..95db1ace0b 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -36,7 +36,6 @@ describe('Directive Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/e2e/index.ts b/packages/schematics/angular/e2e/index.ts index fedb996027..8984b30c28 100644 --- a/packages/schematics/angular/e2e/index.ts +++ b/packages/schematics/angular/e2e/index.ts @@ -60,7 +60,12 @@ function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): // if (workspaceJson.value === null) { // throw new SchematicsException(`Unable to parse configuration file (${workspacePath}).`); // } - const projectRoot = `${workspace.newProjectRoot}/${options.name}`; + let projectRoot = options.projectRoot !== undefined + ? options.projectRoot + : `${workspace.newProjectRoot}/${options.name}`; + if (projectRoot !== '' && !projectRoot.endsWith('/')) { + projectRoot += '/'; + } // tslint:disable-next-line:no-any const project: any = { root: projectRoot, @@ -69,14 +74,14 @@ function addAppToWorkspaceFile(options: E2eOptions, workspace: WorkspaceSchema): e2e: { builder: '@angular-devkit/build-angular:protractor', options: { - protractorConfig: `projects/${options.name}/protractor.conf.js`, + protractorConfig: `${projectRoot}protractor.conf.js`, devServerTarget: `${options.relatedAppName}:serve`, }, }, lint: { builder: '@angular-devkit/build-angular:tslint', options: { - tsConfig: `projects/${options.name}/tsconfig.e2e.json`, + tsConfig: `${projectRoot}tsconfig.e2e.json`, exclude: [ '**/node_modules/**', ], @@ -140,8 +145,14 @@ export default function (options: E2eOptions): Rule { validateProjectName(options.name); const workspace = getWorkspace(host); - const newProjectRoot = workspace.newProjectRoot; - const appDir = `${newProjectRoot}/${options.name}`; + let newProjectRoot = workspace.newProjectRoot; + let appDir = `${newProjectRoot}/${options.name}`; + + + if (options.projectRoot !== undefined) { + newProjectRoot = options.projectRoot; + appDir = newProjectRoot; + } return chain([ addAppToWorkspaceFile(options, workspace), diff --git a/packages/schematics/angular/e2e/index_spec.ts b/packages/schematics/angular/e2e/index_spec.ts index 500b94e94b..9d79e29c78 100644 --- a/packages/schematics/angular/e2e/index_spec.ts +++ b/packages/schematics/angular/e2e/index_spec.ts @@ -42,6 +42,14 @@ describe('Application Schematic', () => { expect(files.indexOf('/projects/foo/src/app.po.ts')).toBeGreaterThanOrEqual(0); }); + it('should create all files of an e2e application', () => { + const options = {...defaultOptions, projectRoot: 'e2e'}; + const tree = schematicRunner.runSchematic('e2e', options, workspaceTree); + const files = tree.files; + expect(files.indexOf('/projects/foo/protractor.conf.js')).toEqual(-1); + expect(files.indexOf('/e2e/protractor.conf.js')).toBeGreaterThanOrEqual(0); + }); + it('should set the rootSelector in the app.po.ts', () => { const tree = schematicRunner.runSchematic('e2e', defaultOptions, workspaceTree); const content = tree.readContent('/projects/foo/src/app.po.ts'); diff --git a/packages/schematics/angular/e2e/schema.d.ts b/packages/schematics/angular/e2e/schema.d.ts index 1390fef186..2180f69412 100644 --- a/packages/schematics/angular/e2e/schema.d.ts +++ b/packages/schematics/angular/e2e/schema.d.ts @@ -7,6 +7,10 @@ */ export interface Schema { + /** + * The root directory of the new application. + */ + projectRoot?: string; /** * The name of the application. */ diff --git a/packages/schematics/angular/e2e/schema.json b/packages/schematics/angular/e2e/schema.json index cbede0850d..df166cf4a2 100644 --- a/packages/schematics/angular/e2e/schema.json +++ b/packages/schematics/angular/e2e/schema.json @@ -4,6 +4,11 @@ "title": "Angular e2e Application Options Schema", "type": "object", "properties": { + "projectRoot": { + "description": "The root directory of the new application.", + "type": "string", + "visible": false + }, "name": { "description": "The name of the e2e application.", "type": "string", diff --git a/packages/schematics/angular/enum/index_spec.ts b/packages/schematics/angular/enum/index_spec.ts index d22ef3e982..cf028d9f21 100644 --- a/packages/schematics/angular/enum/index_spec.ts +++ b/packages/schematics/angular/enum/index_spec.ts @@ -31,7 +31,6 @@ describe('Enum Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index 384278e84f..ef5a298759 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -33,7 +33,6 @@ describe('Guard Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/interface/index_spec.ts b/packages/schematics/angular/interface/index_spec.ts index f2bb33b5f3..2f9d8232ba 100644 --- a/packages/schematics/angular/interface/index_spec.ts +++ b/packages/schematics/angular/interface/index_spec.ts @@ -33,7 +33,6 @@ describe('Interface Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts index 005154b9bd..35d02fa277 100644 --- a/packages/schematics/angular/module/index_spec.ts +++ b/packages/schematics/angular/module/index_spec.ts @@ -34,7 +34,6 @@ describe('Module Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index 11055c1019..7e44a9682a 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -42,6 +42,7 @@ export default function (options: NgNewOptions): Rule { newProjectRoot: options.newProjectRoot || 'projects', }; const applicationOptions: ApplicationOptions = { + projectRoot: '', name: options.name, inlineStyle: options.inlineStyle, inlineTemplate: options.inlineTemplate, diff --git a/packages/schematics/angular/ng-new/index_spec.ts b/packages/schematics/angular/ng-new/index_spec.ts index 99113de273..4c75eec0d1 100644 --- a/packages/schematics/angular/ng-new/index_spec.ts +++ b/packages/schematics/angular/ng-new/index_spec.ts @@ -34,8 +34,8 @@ describe('Ng New Schematic', () => { const tree = schematicRunner.runSchematic('ng-new', options); const files = tree.files; - expect(files.indexOf('/bar/projects/foo/tsconfig.app.json')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/bar/projects/foo/src/main.ts')).toBeGreaterThanOrEqual(0); - expect(files.indexOf('/bar/projects/foo/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/bar/src/tsconfig.app.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/bar/src/main.ts')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/bar/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); }); }); diff --git a/packages/schematics/angular/pipe/index_spec.ts b/packages/schematics/angular/pipe/index_spec.ts index f1abe72df8..4991ce809e 100644 --- a/packages/schematics/angular/pipe/index_spec.ts +++ b/packages/schematics/angular/pipe/index_spec.ts @@ -36,7 +36,6 @@ describe('Pipe Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index cf3a6b0b25..bc231aa388 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -35,7 +35,6 @@ describe('Service Worker Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 25ddac8613..1304788064 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -34,7 +34,6 @@ describe('Service Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 6aa12e5152..c783384837 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -30,7 +30,6 @@ describe('Universal Schematic', () => { name: 'bar', inlineStyle: false, inlineTemplate: false, - viewEncapsulation: 'Emulated', routing: false, style: 'css', skipTests: false, From 6c88cf1710cf99803168bd7ad29c7a6e914c74ab Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 2 Apr 2018 22:02:00 -0700 Subject: [PATCH 345/724] fix(@angular-devkit/build-angular): assets cannot start with .. but can be relative --- .../angular-cli-files/models/webpack-configs/common.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 8ee251d7f7..1b2f43e09c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -104,15 +104,17 @@ export function getCommonConfig(wco: WebpackConfigOptions) { asset.input = asset.input.endsWith('/') ? asset.input : asset.input + '/'; asset.output = asset.output.endsWith('/') ? asset.output : asset.output + '/'; - if (!asset.output.startsWith('/')) { + if (asset.output.startsWith('..')) { const message = 'An asset cannot be written to a location outside of the . ' + 'You can override this message by setting the `allowOutsideOutDir` ' + 'property on the asset to true in the CLI configuration.'; throw new Error(message); } - // Now we remove starting slash to make Webpack place it from the output root. - asset.output = asset.output.slice(1); + if (asset.output.startsWith('/')) { + // Now we remove starting slash to make Webpack place it from the output root. + asset.output = asset.output.slice(1); + } return { context: asset.input, From 54b6dc75d3987b4a5e86106d313095a280c53a08 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 2 Apr 2018 23:17:46 -0700 Subject: [PATCH 346/724] fix(@angular-devkit/build-angular): default bundleName logic If lazy, basename of input. If not lazy, just "styles" or "scripts". --- .../models/webpack-configs/browser.ts | 23 +++++++++++++++++-- .../models/webpack-configs/common.ts | 22 ++++++++++++++---- .../models/webpack-configs/styles.ts | 18 ++++++++++++--- .../utilities/package-chunk-sort.ts | 20 +++++++++------- .../build_angular/src/browser/schema.json | 6 ++--- 5 files changed, 68 insertions(+), 21 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index 57b0cbb54c..fb06cc8655 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -1,6 +1,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. +import { basename, normalize } from '@angular-devkit/core'; import * as path from 'path'; const HtmlWebpackPlugin = require('html-webpack-plugin'); const SubresourceIntegrityPlugin = require('webpack-subresource-integrity'); @@ -27,7 +28,15 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { // Figure out which are the lazy loaded bundle names. const lazyChunkBundleNames = ([...buildOptions.styles, ...buildOptions.scripts] as ExtraEntryPoint[]) .filter(entry => entry.lazy) - .map(entry => entry.bundleName); + .map(entry => { + if (!entry.bundleName) { + return basename( + normalize(entry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } else { + return entry.bundleName; + } + }); const generateIndexHtml = false; if (generateIndexHtml) { @@ -76,7 +85,17 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { } const globalStylesBundleNames = (buildOptions.styles as ExtraEntryPoint[]) - .map(style => style.bundleName); + .map(style => { + if (style.bundleName) { + return style.bundleName; + } else if (style.lazy) { + return basename( + normalize(style.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } else { + return 'styles'; + } + }); return { devtool: sourcemaps, diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 1b2f43e09c..61a796a5dc 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -1,6 +1,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. +import { basename, normalize } from '@angular-devkit/core'; import * as path from 'path'; import { HashedModuleIdsPlugin } from 'webpack'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; @@ -59,9 +60,20 @@ export function getCommonConfig(wco: WebpackConfigOptions) { if (buildOptions.scripts.length > 0) { const globalScriptsByBundleName = (buildOptions.scripts as ExtraEntryPoint[]) .reduce((prev: { bundleName: string, paths: string[], lazy: boolean }[], curr) => { + let bundleName = curr.bundleName; + if (!bundleName) { + if (curr.lazy) { + bundleName = basename( + normalize(curr.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } + else { + bundleName = 'scripts'; + } + } const resolvedPath = path.resolve(root, curr.input); - let existingEntry = prev.find((el) => el.bundleName === curr.bundleName); + let existingEntry = prev.find((el) => el.bundleName === bundleName); if (existingEntry) { if (existingEntry.lazy && !curr.lazy) { // All entries have to be lazy for the bundle to be lazy. @@ -72,7 +84,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } else { prev.push({ - bundleName: curr.bundleName, + bundleName, paths: [resolvedPath], lazy: curr.lazy }); @@ -85,10 +97,12 @@ export function getCommonConfig(wco: WebpackConfigOptions) { globalScriptsByBundleName.forEach((script) => { // Lazy scripts don't get a hash, otherwise they can't be loaded by name. const hash = script.lazy ? '' : hashFormat.script; + const bundleName = script.bundleName; + extraPlugins.push(new ScriptsWebpackPlugin({ - name: script.bundleName, + name: bundleName, sourceMap: buildOptions.sourceMap, - filename: `${path.basename(script.bundleName)}${hash}.js`, + filename: `${path.basename(bundleName)}${hash}.js`, scripts: script.paths, basePath: projectRoot, })); diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 5dd513c2f5..2773dc75aa 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -1,6 +1,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. +import { basename, normalize } from '@angular-devkit/core'; import * as webpack from 'webpack'; import * as path from 'path'; import { SuppressExtractedTextChunksWebpackPlugin } from '../../plugins/webpack'; @@ -168,14 +169,25 @@ export function getStylesConfig(wco: WebpackConfigOptions) { // Process global styles. if (buildOptions.styles.length > 0) { (buildOptions.styles as ExtraEntryPoint[]).forEach(style => { + let bundleName = style.bundleName; + if (!bundleName) { + if (style.lazy) { + bundleName = basename( + normalize(style.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } + else { + bundleName = 'styles'; + } + } const resolvedPath = path.resolve(root, style.input); // Add style entry points. - if (entryPoints[style.bundleName]) { - entryPoints[style.bundleName].push(resolvedPath) + if (entryPoints[bundleName]) { + entryPoints[bundleName].push(resolvedPath) } else { - entryPoints[style.bundleName] = [resolvedPath] + entryPoints[bundleName] = [resolvedPath] } // Add global css paths. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts index 916b008778..cb3d6d0fa1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -7,14 +7,18 @@ export function generateEntryPoints(appConfig: any) { let entryPoints = ['polyfills', 'sw-register']; // Add all styles/scripts, except lazy-loaded ones. - const lazyChunkBundleNames = ([...appConfig.styles, ...appConfig.scripts] as ExtraEntryPoint[]) - .filter(entry => !entry.lazy) - .map(entry => entry.bundleName) - .forEach(bundleName => { - if (entryPoints.indexOf(bundleName) === -1) { - entryPoints.push(bundleName); - } - }); + [ + ...(appConfig.styles as ExtraEntryPoint[]) + .filter(entry => !entry.lazy) + .map(entry => entry.bundleName || 'styles'), + ...(appConfig.scripts as ExtraEntryPoint[]) + .filter(entry => !entry.lazy) + .map(entry => entry.bundleName || 'scripts'), + ].forEach(bundleName => { + if (entryPoints.indexOf(bundleName) === -1) { + entryPoints.push(bundleName); + } + }); entryPoints.push('main'); diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index 0ad97e4b7b..b18fbc7e69 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -278,8 +278,7 @@ }, "bundleName": { "type": "string", - "description": "The bundle name for this extra entry point.", - "default": "styles" + "description": "The bundle name for this extra entry point." }, "lazy": { "type": "boolean", @@ -301,8 +300,7 @@ }, "bundleName": { "type": "string", - "description": "The bundle name for this extra entry point.", - "default": "scripts" + "description": "The bundle name for this extra entry point. Default is the basename of the input." }, "lazy": { "type": "boolean", From e597cf6cc859ba12935671f50193713f41e103e7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 3 Apr 2018 09:43:48 +0100 Subject: [PATCH 347/724] fix(@schematics/angular): update new project Angular version --- packages/schematics/angular/utility/latest-versions.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index c424aa6317..6a46d484c3 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -7,10 +7,12 @@ */ export const latestVersions = { - Angular: '^5.2.9', - RxJs: '^5.5.8', - ZoneJs: '^0.8.20', - TypeScript: '~2.6.2', + // These versions should be kept up to date with latest Angular peer dependencies. + Angular: '^6.0.0-rc.1', + RxJs: '^6.0.0-rc.0', + ZoneJs: '^0.8.24', + TypeScript: '~2.7.2', + // The versions below must be manually updated when making a new devkit release. DevkitBuildWebpack: '~0.0.9', DevkitBuildNgPackagr: '~0.0.3', }; From 136fbee28c6e38e5e319cd2eaafef09cd37f4dce Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 3 Apr 2018 02:34:01 -0700 Subject: [PATCH 348/724] fix(@schematics/update): allow for migration only updates --- docs/specifications/update.md | 4 +- .../angular/migrations/update-6/index.ts | 2 + packages/schematics/update/update/index.ts | 59 +++++++++++++++-- .../schematics/update/update/index_spec.ts | 66 +++++++++++++++++++ packages/schematics/update/update/schema.json | 13 ++++ packages/schematics/update/update/schema.ts | 3 + 6 files changed, 139 insertions(+), 8 deletions(-) diff --git a/docs/specifications/update.md b/docs/specifications/update.md index 7535d37b82..79376fb8f4 100644 --- a/docs/specifications/update.md +++ b/docs/specifications/update.md @@ -18,9 +18,9 @@ You can specify more than one package. Each package follows the convention of `[ | `--all` | `boolean` | If true, implies that all dependencies should be updated. Defaults is false, using dependencies from the command line instead. | | `--force` | `boolean` | If true, skip the verification step and perform the update even if some peer dependencies would be invalidated. Peer dependencies errors will still be shown as warning. Defaults to false. | | `--next` | `boolean` | If true, allows version discovery to include Beta and RC. Defaults to false. | -| `--migration-only` | `boolean` | If true, don't change the `package.json` file, only apply migration scripts. | +| `--migrate-only` | `boolean` | If true, don't change the `package.json` file, only apply migration scripts. | | `--from` | `version` | Apply migrations from a certain version number. | -| `--to` | `version` | Apply migrations up to a certain version number (inclusive). By default will update to the tag selected. | +| `--to` | `version` | Apply migrations up to a certain version number (inclusive). By default will update to the installed version. | ## Details diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 37d2338984..7d12553a1b 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -13,6 +13,7 @@ import { Tree, chain, } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { AppConfig, CliConfig } from '../../utility/config'; import { latestVersions } from '../../utility/latest-versions'; @@ -483,6 +484,7 @@ function updatePackageJson() { pkg.devDependencies['@angular-devkit/build-angular'] = latestVersions.DevkitBuildWebpack; host.overwrite(pkgPath, JSON.stringify(pkg, null, 2)); + context.addTask(new NodePackageInstallTask()); return host; }; diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 933da33f1c..930a2162d6 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -6,7 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ import { logging } from '@angular-devkit/core'; -import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics'; +import { + Rule, SchematicContext, SchematicsException, TaskId, + Tree, +} from '@angular-devkit/schematics'; import { NodePackageInstallTask, RunSchematicTask } from '@angular-devkit/schematics/tasks'; import { Observable, from as observableFrom, of } from 'rxjs'; import { map, mergeMap, reduce, switchMap } from 'rxjs/operators'; @@ -149,6 +152,7 @@ function _performUpdate( context: SchematicContext, infoMap: Map, logger: logging.LoggerApi, + migrateOnly: boolean, ): Observable { const packageJsonContent = tree.read('/package.json'); if (!packageJsonContent) { @@ -199,9 +203,12 @@ function _performUpdate( const newContent = JSON.stringify(packageJson, null, 2); if (packageJsonContent.toString() != newContent) { - // If something changed, also hook up the task. - tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2)); - const installTask = context.addTask(new NodePackageInstallTask()); + let installTask: TaskId[] = []; + if (!migrateOnly) { + // If something changed, also hook up the task. + tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2)); + installTask = [context.addTask(new NodePackageInstallTask())]; + } // Run the migrate schematics with the list of packages to use. The collection contains // version information and we need to do this post installation. Please note that the @@ -224,7 +231,7 @@ function _performUpdate( from: installed.version, to: target.version, }), - [installTask], + installTask, ); }); } @@ -232,6 +239,36 @@ function _performUpdate( return of(undefined); } +function _migrate( + info: PackageInfo | undefined, + context: SchematicContext, + from: string, + to?: string, +) { + if (!info) { + return of(); + } + const target = info.target; + if (!target || !target.updateMetadata.migrations) { + return of(undefined); + } + + const collection = ( + target.updateMetadata.migrations.match(/^[./]/) + ? info.name + '/' + : '' + ) + target.updateMetadata.migrations; + + context.addTask(new RunSchematicTask('@schematics/update', 'migrate', { + package: info.name, + collection, + from: from, + to: to || target.version, + }), + ); + + return of(undefined); +} function _getUpdateMetadata( packageJson: JsonSchemaForNpmPackageJsonFiles, @@ -579,6 +616,12 @@ export default function(options: UpdateSchema): Rule { options.packages = options.packages.split(/,/g); } + if (options.migrateOnly && options.from) { + if (options.packages.length !== 1) { + throw new SchematicsException('--from requires that only a single package be passed.'); + } + } + return (tree: Tree, context: SchematicContext) => { const logger = context.logger; const allDependencies = _getAllDependencies(tree); @@ -617,6 +660,10 @@ export default function(options: UpdateSchema): Rule { switchMap(infoMap => { // Now that we have all the information, check the flags. if (packages.size > 0) { + if (options.migrateOnly && options.from && options.packages) { + return _migrate(infoMap.get(options.packages[0]), context, options.from, options.to); + } + const sublog = new logging.LevelCapLogger( 'validation', logger.createChild(''), @@ -624,7 +671,7 @@ export default function(options: UpdateSchema): Rule { ); _validateUpdatePackages(infoMap, options.force, sublog); - return _performUpdate(tree, context, infoMap, logger); + return _performUpdate(tree, context, infoMap, logger, options.migrateOnly); } else { return _usageMessage(options, infoMap, logger); } diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 15ddb5e370..64b06506ec 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -87,4 +87,70 @@ describe('@schematics/update', () => { }), ).subscribe(undefined, done.fail, done); }); + + it('can migrate only', done => { + // Add the basic migration package. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '1.0.0'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { + packages: ['@angular-devkit-tests/update-migrations'], + migrateOnly: true, + }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular-devkit-tests/update-base']).toBe('1.0.0'); + expect(packageJson['dependencies']['@angular-devkit-tests/update-migrations']) + .toBe('1.0.0'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'run-schematic', + options: jasmine.objectContaining({ + name: 'migrate', + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }); + + it('can migrate from only', done => { + // Add the basic migration package. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '1.0.0'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { + packages: ['@angular-devkit-tests/update-migrations'], + migrateOnly: true, + from: '0.1.2', + }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular-devkit-tests/update-migrations']) + .toBe('1.0.0'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'run-schematic', + options: jasmine.objectContaining({ + name: 'migrate', + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }); }); diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json index 79eed258d2..242448e403 100644 --- a/packages/schematics/update/update/schema.json +++ b/packages/schematics/update/update/schema.json @@ -28,6 +28,19 @@ "description": "Use the largest version, including beta and RCs.", "default": false, "type": "boolean" + }, + "migrateOnly": { + "description": "Only perform a migration, does not update the installed version.", + "default": false, + "type": "boolean" + }, + "from": { + "description": "Version from which to migrate from. Only available with a single package being updated, and only on migration only.", + "type": "string" + }, + "to": { + "description": "Version up to which to apply migrations. Only available with a single package being updated, and only on migrations only. Requires from to be specified. Default to the installed version detected.", + "type": "string" } } } diff --git a/packages/schematics/update/update/schema.ts b/packages/schematics/update/update/schema.ts index b62e3bd009..4890f7d3fe 100644 --- a/packages/schematics/update/update/schema.ts +++ b/packages/schematics/update/update/schema.ts @@ -10,4 +10,7 @@ export interface UpdateSchema { force: boolean; all: boolean; next: boolean; + migrateOnly: boolean; + from?: string; + to?: string; } From 2727cec9bcedc79e27446d368a8af9d27599113f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 3 Apr 2018 03:47:29 -0700 Subject: [PATCH 349/724] release: 6.0.0-beta.9 --- .monorepo.json | 56 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 6e220a103e..cbeb8f2730 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.8", + "version": "0.4.9", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.4.8", + "version": "0.4.9", "hash": "f48bf7e6bb335235b32ba8b93871ea40" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.0.1", - "hash": "33517259a69299488fc1a47c0c57dd8d", + "version": "0.0.2", + "hash": "758849010cf775777a28834be6746596", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.9", - "hash": "2f8a1770ac3a45d9bea36966bb365302", + "version": "0.0.10", + "hash": "7e6db51ce50e3f3e0023c43b219a0dc8", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.9", - "hash": "ec33d923851ba374e3342c071bdfb972", + "version": "0.0.10", + "hash": "bd253057d6d10a3ea00cd1a0e195449a", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.8", + "version": "0.4.9", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.0.3", - "hash": "48268252dea50b651822a0e4da35e5fa", + "version": "0.0.4", + "hash": "e5b040b19c8ae58ec8a3a96bb63b31bf", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.0.9", - "hash": "3f718ca4e4281ba7ade2845b8332aae4", + "version": "0.0.10", + "hash": "41ad3f3149fc0efe596d635714bbbf89", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.8", - "hash": "9596234c8481d58633a524851cccc7cb", + "version": "0.4.9", + "hash": "9ab74e20ee3e8862927a9e7871874a5d", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.8", - "hash": "ee6ab5f074ea6402e78f3c8e24148040", + "version": "0.4.9", + "hash": "a16c52ce3f33f8a4615fc6e2fb4d355c", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.8", - "hash": "adddc7c4a339188e81e28958ba36036a", + "version": "0.4.9", + "hash": "56c7ea672dcbbaf7e7834fc1778d29a8", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-beta.8", + "version": "6.0.0-beta.9", "section": "Misc", - "hash": "71aaa1e7b33d9ff7de93f8fc9c82a50a", + "hash": "2234741f124a6478a8f018b0365b2775", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.8", - "hash": "fc2e49159b6b6559580e98b2d90f76ea", + "version": "0.4.9", + "hash": "b833889561a19b82a3764f00e074a2b1", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.8", + "version": "0.4.9", "section": "Schematics", "hash": "85f50de4da92597ef8adb1d484107825", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.8", + "version": "0.4.9", "section": "Schematics", - "hash": "e4366dd236a21a125ebac55a20363aa6", + "hash": "aff7f2d8691124d3e040cbc121171d15", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.4.8", + "version": "0.4.9", "section": "Schematics", - "hash": "3fe934face6f6b6baeea3b96c4611191", + "hash": "0c0ed0f4a2ba76caac3dda5632c80580", "snapshotRepo": "angular/schematics-update-builds" } } From de628c2f0bbb24dd99a4df491cffec028c10db1b Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 3 Apr 2018 04:04:16 -0700 Subject: [PATCH 350/724] fix(@schematics/update): migration only should use installed as target --- packages/schematics/update/update/index.ts | 14 ++++++++++---- packages/schematics/update/update/index_spec.ts | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 930a2162d6..f762762d2b 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -202,7 +202,7 @@ function _performUpdate( }); const newContent = JSON.stringify(packageJson, null, 2); - if (packageJsonContent.toString() != newContent) { + if (packageJsonContent.toString() != newContent || migrateOnly) { let installTask: TaskId[] = []; if (!migrateOnly) { // If something changed, also hook up the task. @@ -239,7 +239,7 @@ function _performUpdate( return of(undefined); } -function _migrate( +function _migrateOnly( info: PackageInfo | undefined, context: SchematicContext, from: string, @@ -248,7 +248,8 @@ function _migrate( if (!info) { return of(); } - const target = info.target; + + const target = info.installed; if (!target || !target.updateMetadata.migrations) { return of(undefined); } @@ -661,7 +662,12 @@ export default function(options: UpdateSchema): Rule { // Now that we have all the information, check the flags. if (packages.size > 0) { if (options.migrateOnly && options.from && options.packages) { - return _migrate(infoMap.get(options.packages[0]), context, options.from, options.to); + return _migrateOnly( + infoMap.get(options.packages[0]), + context, + options.from, + options.to, + ); } const sublog = new logging.LevelCapLogger( diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 64b06506ec..29141de243 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -125,7 +125,7 @@ describe('@schematics/update', () => { // Add the basic migration package. const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); const packageJson = JSON.parse(content); - packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '1.0.0'; + packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '1.6.0'; host.sync.write( normalize('/package.json'), virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), @@ -139,7 +139,7 @@ describe('@schematics/update', () => { map(tree => { const packageJson = JSON.parse(tree.readContent('/package.json')); expect(packageJson['dependencies']['@angular-devkit-tests/update-migrations']) - .toBe('1.0.0'); + .toBe('1.6.0'); // Check install task. expect(schematicRunner.tasks).toEqual([ From 69cb5f36348bf0d33598e00ef3265e10b88acc1f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 3 Apr 2018 04:50:22 -0700 Subject: [PATCH 351/724] release: 6.0.0-rc.0 --- .monorepo.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index cbeb8f2730..b53894b752 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,17 +42,17 @@ }, "packages": { "@_/benchmark": { - "version": "0.4.9", + "version": "0.5.0", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.4.9", + "version": "0.5.0", "hash": "f48bf7e6bb335235b32ba8b93871ea40" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.0.2", + "version": "0.5.0", "hash": "758849010cf775777a28834be6746596", "snapshotRepo": "angular/angular-pwa-builds" }, @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.0.10", + "version": "0.5.0", "hash": "7e6db51ce50e3f3e0023c43b219a0dc8", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.0.10", + "version": "0.5.0", "hash": "bd253057d6d10a3ea00cd1a0e195449a", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.4.9", + "version": "0.5.0", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.0.4", + "version": "0.5.0", "hash": "e5b040b19c8ae58ec8a3a96bb63b31bf", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,7 +106,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.0.10", + "version": "0.5.0", "hash": "41ad3f3149fc0efe596d635714bbbf89", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.4.9", + "version": "0.5.0", "hash": "9ab74e20ee3e8862927a9e7871874a5d", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.4.9", + "version": "0.5.0", "hash": "a16c52ce3f33f8a4615fc6e2fb4d355c", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.4.9", + "version": "0.5.0", "hash": "56c7ea672dcbbaf7e7834fc1778d29a8", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-beta.9", + "version": "6.0.0-rc.0", "section": "Misc", "hash": "2234741f124a6478a8f018b0365b2775", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,29 +150,29 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.4.9", + "version": "0.5.0", "hash": "b833889561a19b82a3764f00e074a2b1", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.4.9", + "version": "0.5.0", "section": "Schematics", "hash": "85f50de4da92597ef8adb1d484107825", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.4.9", + "version": "0.5.0", "section": "Schematics", "hash": "aff7f2d8691124d3e040cbc121171d15", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.4.9", + "version": "0.5.0", "section": "Schematics", - "hash": "0c0ed0f4a2ba76caac3dda5632c80580", + "hash": "f3891f8d61e106cabdd81cf2279fc6bc", "snapshotRepo": "angular/schematics-update-builds" } } From fb2638876728da0f5875fe62b8e297a879d201ab Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 3 Apr 2018 11:32:38 -0400 Subject: [PATCH 352/724] feat(@schematics/angular): update new project utility dependencies --- packages/schematics/angular/workspace/files/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index f9581dfd6e..ee2aad19ec 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -21,7 +21,7 @@ "@angular/platform-browser": "<%= latestVersions.Angular %>", "@angular/platform-browser-dynamic": "<%= latestVersions.Angular %>", "@angular/router": "<%= latestVersions.Angular %>", - "core-js": "^2.4.1", + "core-js": "^2.5.4", "rxjs": "<%= latestVersions.RxJs %>", "zone.js": "<%= latestVersions.ZoneJs %>" }, @@ -32,16 +32,16 @@ "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", - "codelyzer": "~4.1.0", + "codelyzer": "~4.2.1", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~1.4.1", + "karma-coverage-istanbul-reporter": "~1.4.2", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.3.0", - "ts-node": "~5.0.0", + "ts-node": "~5.0.1", "tslint": "~5.9.1", "typescript": "<%= latestVersions.TypeScript %>" } From 9ed1471f9218ff32ba95c0251d1e8e2ae4f206b8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 3 Apr 2018 14:57:17 -0400 Subject: [PATCH 353/724] fix(@angular-devkit/build-angular): make new project versions the latest --- packages/schematics/angular/application/index.ts | 2 +- packages/schematics/angular/application/index_spec.ts | 2 +- packages/schematics/angular/migrations/update-6/index.ts | 2 +- packages/schematics/angular/utility/latest-versions.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index cc54cf8710..26386bef6d 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -72,7 +72,7 @@ function addDependenciesToPackageJson() { json.devDependencies = { '@angular/compiler-cli': latestVersions.Angular, - '@angular-devkit/build-angular': latestVersions.DevkitBuildWebpack, + '@angular-devkit/build-angular': latestVersions.DevkitBuildAngular, 'typescript': latestVersions.TypeScript, // De-structure last keeps existing user dependencies. ...json.devDependencies, diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 828c6b75fe..f3987eb878 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -115,7 +115,7 @@ describe('Application Schematic', () => { const packageJson = JSON.parse(tree.readContent('package.json')); expect(packageJson.devDependencies['@angular-devkit/build-angular']) - .toEqual(latestVersions.DevkitBuildWebpack); + .toEqual(latestVersions.DevkitBuildAngular); }); it('should use the latest known versions in package.json', () => { diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 7d12553a1b..54258ea2a8 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -481,7 +481,7 @@ function updatePackageJson() { pkg.devDependencies = {}; } - pkg.devDependencies['@angular-devkit/build-angular'] = latestVersions.DevkitBuildWebpack; + pkg.devDependencies['@angular-devkit/build-angular'] = latestVersions.DevkitBuildAngular; host.overwrite(pkgPath, JSON.stringify(pkg, null, 2)); context.addTask(new NodePackageInstallTask()); diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 6a46d484c3..bb03fdad13 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -13,6 +13,6 @@ export const latestVersions = { ZoneJs: '^0.8.24', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildWebpack: '~0.0.9', - DevkitBuildNgPackagr: '~0.0.3', + DevkitBuildAngular: '~0.5.0', + DevkitBuildNgPackagr: '~0.5.0', }; From 2b15555dae57efeb2af186e15ec46ec0ead28d28 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 3 Apr 2018 14:28:25 -0400 Subject: [PATCH 354/724] fix(@angular-devkit/build-angular): suppress ajv peer warnings --- packages/angular_devkit/build_angular/package.json | 1 + packages/angular_devkit/build_angular/src/index.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 6b65a99a43..8c6a6b8a21 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -13,6 +13,7 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/core": "0.0.0", "@ngtools/webpack": "0.0.0", + "ajv": "^6.0.0", "autoprefixer": "^8.1.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", diff --git a/packages/angular_devkit/build_angular/src/index.ts b/packages/angular_devkit/build_angular/src/index.ts index f09ed2f04d..909fbed598 100644 --- a/packages/angular_devkit/build_angular/src/index.ts +++ b/packages/angular_devkit/build_angular/src/index.ts @@ -6,6 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ +// TODO: remove this commented AJV require. +// We don't actually require AJV, but there is a bug with NPM and peer dependencies that is +// whose workaround is to depend on AJV. +// See https://github.com/angular/angular-cli/issues/9691#issuecomment-367322703 for details. +// We need to add a require here to satisfy the dependency checker. +// require('ajv'); + export * from './app-shell'; export * from './browser'; export * from './dev-server'; From d75cd2356cca87bf94fcbdcfe7f69ebca5431dc8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 3 Apr 2018 22:32:27 -0400 Subject: [PATCH 355/724] fix(@schematics/angular): correct asset output path migration --- packages/schematics/angular/migrations/update-6/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 54258ea2a8..a992bdbd92 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -186,9 +186,9 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { glob: asset.glob, input: normalize('/' + appRoot + '/' + asset.input), output: normalize('/' - + (asset.output as string).startsWith(outDir) + + ((asset.output as string).startsWith(outDir) ? (asset.output as string).slice(outDir.length) - : (asset.output as string), + : (asset.output as string)), ), }; } else { From 97fe63d41af4cb7d86fa6e3960bd5ed62a2168a7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 13:49:17 +0100 Subject: [PATCH 356/724] fix(@schematics/angular): fix migration asset paths Fix https://github.com/angular/angular-cli/issues/10146 --- .../angular/migrations/update-6/index.ts | 19 +++++++++++-------- .../angular/migrations/update-6/index_spec.ts | 15 +++++++++++---- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index a992bdbd92..80891589a8 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -179,22 +179,25 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { function _mapAssets(asset: string | JsonObject) { if (typeof asset === 'string') { - return { glob: asset, input: normalize('/' + appRoot + '/'), output: '/' }; + if (tree.exists(app.root + '/' + asset)) { + // If it exists in the tree, then it is a file. + return { glob: asset, input: normalize(appRoot + '/'), output: '/' }; + } else { + // If it does not exist, it is either a folder or something we can't statically know. + // Folders must get a recursive star glob. + return { glob: '**/*', input: normalize(appRoot + '/' + asset), output: '/' + asset }; + } } else { if (asset.output) { return { glob: asset.glob, - input: normalize('/' + appRoot + '/' + asset.input), - output: normalize('/' - + ((asset.output as string).startsWith(outDir) - ? (asset.output as string).slice(outDir.length) - : (asset.output as string)), - ), + input: normalize(appRoot + '/' + asset.input), + output: normalize('/' + asset.output as string), }; } else { return { glob: asset.glob, - input: normalize('/' + appRoot + '/' + asset.input), + input: normalize(appRoot + '/' + asset.input), output: '/', }; } diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index c25c8fcbef..6da646c853 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -38,6 +38,8 @@ describe('Migration to v6', () => { assets: [ 'assets', 'favicon.ico', + { glob: '**/*', input: './assets/', output: './assets/' }, + { glob: 'favicon.ico', input: './', output: './' }, ], index: 'index.html', main: 'main.ts', @@ -97,6 +99,7 @@ describe('Migration to v6', () => { production: true }; `); + tree.create('/src/favicon.ico', ''); }); describe('file creation/deletion', () => { @@ -499,8 +502,10 @@ describe('Migration to v6', () => { expect(build.options.scripts).toEqual([]); expect(build.options.styles).toEqual([{ input: 'src/styles.css' }]); expect(build.options.assets).toEqual([ - { glob: 'assets', input: '/src', output: '/' }, - { glob: 'favicon.ico', input: '/src', output: '/' }, + { glob: '**/*', input: 'src/assets', output: '/assets' }, + { glob: 'favicon.ico', input: 'src', output: '/' }, + { glob: '**/*', input: 'src/assets', output: '/assets' }, + { glob: 'favicon.ico', input: 'src', output: '/' }, ]); const prodConfig = build.configurations.production; expect(prodConfig.outputHashing).toEqual('all'); @@ -535,8 +540,10 @@ describe('Migration to v6', () => { expect(test.options.scripts).toEqual([]); expect(test.options.styles).toEqual([{ input: 'src/styles.css' }]); expect(test.options.assets).toEqual([ - { glob: 'assets', input: '/src', output: '/' }, - { glob: 'favicon.ico', input: '/src', output: '/' }, + { glob: '**/*', input: 'src/assets', output: '/assets' }, + { glob: 'favicon.ico', input: 'src', output: '/' }, + { glob: '**/*', input: 'src/assets', output: '/assets' }, + { glob: 'favicon.ico', input: 'src', output: '/' }, ]); }); From cd4e056037b0fcfe7b900b1a601fd8ae1bf1dcb5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 13:52:23 +0100 Subject: [PATCH 357/724] fix(@schematics/angular): fix lint target tsconfig paths Fix https://github.com/angular/angular-cli/issues/10159 --- packages/schematics/angular/application/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 26386bef6d..6bf876884a 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -204,8 +204,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ - `${projectRoot}tsconfig.app.json`, - `${projectRoot}tsconfig.spec.json`, + `${rootFilesRoot}tsconfig.app.json`, + `${rootFilesRoot}tsconfig.spec.json`, ], exclude: [ '**/node_modules/**', From 638cc7299f5dd2878b30b84127eba01505cee145 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 13:58:20 +0100 Subject: [PATCH 358/724] fix(@schematics/angular): fix migration fileReplacement paths --- .../schematics/angular/migrations/update-6/index.ts | 12 +++++++++--- .../angular/migrations/update-6/index_spec.ts | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 80891589a8..bd331e27d0 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -222,13 +222,16 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { .match(/production['"]?\s*[:=]\s*true/); } + let configurationName; // We used to use `prod` by default as the key, instead we now use the full word. // Try not to override the production key if it's there. if (environment == 'prod' && !environments['production'] && isProduction) { - environment = 'production'; + configurationName = 'production'; + } else { + configurationName = environment; } - acc[environment] = { + acc[configurationName] = { ...(isProduction ? { optimization: true, @@ -244,7 +247,10 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { : {} ), fileReplacements: [ - { from: `${app.root}/${source}`, to: `${outDir}/${environments[environment]}` }, + { + src: `${app.root}/${source}`, + replaceWith: `${app.root}/${environments[environment]}`, + }, ], }; diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 6da646c853..1167c65ffd 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -516,6 +516,10 @@ describe('Migration to v6', () => { expect(prodConfig.extractLicenses).toEqual(true); expect(prodConfig.vendorChunk).toEqual(false); expect(prodConfig.buildOptimizer).toEqual(true); + expect(prodConfig.fileReplacements).toEqual([{ + src: 'src/environments/environment.ts', + replaceWith: 'src/environments/environment.prod.ts', + }]); }); it('should set the serve target', () => { From a47102f5b984ad2d6722eee152396b2ed7d195c5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 14:05:15 +0100 Subject: [PATCH 359/724] fix(@schematics/angular): don't add fileReplacements that don't do anything Fix https://github.com/angular/angular-cli/issues/10152 --- .../angular/migrations/update-6/index.ts | 4 +++ .../angular/migrations/update-6/index_spec.ts | 30 +++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index bd331e27d0..91ad3d2d3e 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -213,6 +213,10 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { } return Object.keys(environments).reduce((acc, environment) => { + if (source === environments[environment]) { + return acc; + } + let isProduction = false; const environmentContent = tree.read(app.root + '/' + environments[environment]); diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 1167c65ffd..295d5e0ba4 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -507,19 +507,23 @@ describe('Migration to v6', () => { { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, ]); - const prodConfig = build.configurations.production; - expect(prodConfig.outputHashing).toEqual('all'); - expect(prodConfig.sourceMap).toEqual(false); - expect(prodConfig.extractCss).toEqual(true); - expect(prodConfig.namedChunks).toEqual(false); - expect(prodConfig.aot).toEqual(true); - expect(prodConfig.extractLicenses).toEqual(true); - expect(prodConfig.vendorChunk).toEqual(false); - expect(prodConfig.buildOptimizer).toEqual(true); - expect(prodConfig.fileReplacements).toEqual([{ - src: 'src/environments/environment.ts', - replaceWith: 'src/environments/environment.prod.ts', - }]); + expect(build.configurations).toEqual({ + production: { + optimization: true, + outputHashing: 'all', + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + fileReplacements: [{ + src: 'src/environments/environment.ts', + replaceWith: 'src/environments/environment.prod.ts', + }], + }, + }); }); it('should set the serve target', () => { From f4d050db8e85bf917f31be1a9d69d8b216550f77 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 14:06:32 +0100 Subject: [PATCH 360/724] fix(@angular-devkit/build-angular): hide verbose logging on karma Fix https://github.com/angular/angular-cli/issues/10153 --- .../build_angular/src/angular-cli-files/plugins/karma.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index 45d4177bd1..ef139ec981 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -74,7 +74,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { // Add webpack config. const webpackConfig = config.buildWebpack.webpackConfig; const webpackMiddlewareConfig = { - // logLevel: 'error', // Hide webpack output because its noisy. + logLevel: 'error', // Hide webpack output because its noisy. watchOptions: { poll: options.poll }, publicPath: '/_karma_webpack_/', }; From 3df17819cc645e030172a35d7db32ffcb32bb78c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 14:27:12 +0100 Subject: [PATCH 361/724] refactor(@angular-devkit/build-angular): refactor bundle name logic --- .../models/webpack-configs/browser.ts | 25 +++---------------- .../models/webpack-configs/common.ts | 15 ++--------- .../models/webpack-configs/styles.ts | 15 ++--------- .../models/webpack-configs/utils.ts | 14 +++++++++++ .../utilities/package-chunk-sort.ts | 5 ++-- .../build_angular/src/browser/index.ts | 2 +- 6 files changed, 26 insertions(+), 50 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index fb06cc8655..798198d40e 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -1,7 +1,6 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { basename, normalize } from '@angular-devkit/core'; import * as path from 'path'; const HtmlWebpackPlugin = require('html-webpack-plugin'); const SubresourceIntegrityPlugin = require('webpack-subresource-integrity'); @@ -11,6 +10,7 @@ import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; import { IndexHtmlWebpackPlugin } from '../../plugins/index-html-webpack-plugin'; import { ExtraEntryPoint } from '../../../browser'; import { WebpackConfigOptions } from '../build-options'; +import { computeBundleName } from './utils'; /** + * license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to @@ -28,15 +28,8 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { // Figure out which are the lazy loaded bundle names. const lazyChunkBundleNames = ([...buildOptions.styles, ...buildOptions.scripts] as ExtraEntryPoint[]) .filter(entry => entry.lazy) - .map(entry => { - if (!entry.bundleName) { - return basename( - normalize(entry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), - ); - } else { - return entry.bundleName; - } - }); + // We don't really need a default name because we pre-filtered by lazy only entries. + .map(style => computeBundleName(style, 'not-lazy')); const generateIndexHtml = false; if (generateIndexHtml) { @@ -85,17 +78,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { } const globalStylesBundleNames = (buildOptions.styles as ExtraEntryPoint[]) - .map(style => { - if (style.bundleName) { - return style.bundleName; - } else if (style.lazy) { - return basename( - normalize(style.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), - ); - } else { - return 'styles'; - } - }); + .map(style => computeBundleName(style, 'styles')); return { devtool: sourcemaps, diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 61a796a5dc..ccc4c6453c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -1,7 +1,6 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { basename, normalize } from '@angular-devkit/core'; import * as path from 'path'; import { HashedModuleIdsPlugin } from 'webpack'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; @@ -14,6 +13,7 @@ import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; import { findUp } from '../../utilities/find-up'; import { AssetPattern, ExtraEntryPoint } from '../../../browser'; +import { computeBundleName } from './utils'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); @@ -60,18 +60,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { if (buildOptions.scripts.length > 0) { const globalScriptsByBundleName = (buildOptions.scripts as ExtraEntryPoint[]) .reduce((prev: { bundleName: string, paths: string[], lazy: boolean }[], curr) => { - let bundleName = curr.bundleName; - if (!bundleName) { - if (curr.lazy) { - bundleName = basename( - normalize(curr.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), - ); - } - else { - bundleName = 'scripts'; - } - } - + const bundleName = computeBundleName(curr, 'scripts'); const resolvedPath = path.resolve(root, curr.input); let existingEntry = prev.find((el) => el.bundleName === bundleName); if (existingEntry) { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 2773dc75aa..4529380afd 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -1,7 +1,6 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { basename, normalize } from '@angular-devkit/core'; import * as webpack from 'webpack'; import * as path from 'path'; import { SuppressExtractedTextChunksWebpackPlugin } from '../../plugins/webpack'; @@ -10,6 +9,7 @@ import { WebpackConfigOptions } from '../build-options'; import { findUp } from '../../utilities/find-up'; import { RawCssLoader } from '../../plugins/webpack'; import { ExtraEntryPoint } from '../../../browser'; +import { computeBundleName } from './utils'; const postcssUrl = require('postcss-url'); const autoprefixer = require('autoprefixer'); @@ -169,18 +169,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { // Process global styles. if (buildOptions.styles.length > 0) { (buildOptions.styles as ExtraEntryPoint[]).forEach(style => { - let bundleName = style.bundleName; - if (!bundleName) { - if (style.lazy) { - bundleName = basename( - normalize(style.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), - ); - } - else { - bundleName = 'styles'; - } - } - + const bundleName = computeBundleName(style, 'styles');; const resolvedPath = path.resolve(root, style.input); // Add style entry points. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts index f5a25ad207..041230786d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts @@ -2,6 +2,8 @@ // TODO: cleanup this file, it's copied as is from Angular CLI. import * as path from 'path'; +import { basename, normalize } from '@angular-devkit/core'; +import { ExtraEntryPoint } from '../../../browser'; export const ngAppResolve = (resolvePath: string): string => { return path.resolve(process.cwd(), resolvePath); @@ -58,3 +60,15 @@ export function getOutputHashFormat(option: string, length = 20): HashFormat { /* tslint:enable:max-line-length */ return hashFormats[option] || hashFormats['none']; } + +export function computeBundleName(entry: ExtraEntryPoint, defaultName: string){ + if (entry.bundleName) { + return entry.bundleName; + } else if (entry.lazy) { + return basename( + normalize(entry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } else { + return defaultName; + } +} diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts index cb3d6d0fa1..f0f2a24250 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -2,6 +2,7 @@ // TODO: cleanup this file, it's copied as is from Angular CLI. import { ExtraEntryPoint } from '../../browser'; +import { computeBundleName } from '../models/webpack-configs/utils'; export function generateEntryPoints(appConfig: any) { let entryPoints = ['polyfills', 'sw-register']; @@ -10,10 +11,10 @@ export function generateEntryPoints(appConfig: any) { [ ...(appConfig.styles as ExtraEntryPoint[]) .filter(entry => !entry.lazy) - .map(entry => entry.bundleName || 'styles'), + .map(entry => computeBundleName(entry, 'styles')), ...(appConfig.scripts as ExtraEntryPoint[]) .filter(entry => !entry.lazy) - .map(entry => entry.bundleName || 'scripts'), + .map(entry => computeBundleName(entry, 'scripts')), ].forEach(bundleName => { if (entryPoints.indexOf(bundleName) === -1) { entryPoints.push(bundleName); diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 93c69c33cb..ff00e51466 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -101,7 +101,7 @@ export interface AssetPattern { export interface ExtraEntryPoint { input: string; - bundleName: string; + bundleName?: string; lazy: boolean; } From ea76cb42dad6b2105b58b9c4072b4410de4994f9 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 14:41:53 +0100 Subject: [PATCH 362/724] fix(@schematics/angular): migrate build and serve defaults Fix https://github.com/angular/angular-cli/issues/10173 --- .../angular/migrations/update-6/index.ts | 27 +++++++++++++++++++ .../angular/migrations/update-6/index_spec.ts | 12 ++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 91ad3d2d3e..71447514b5 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -168,6 +168,31 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { defaultAppNamePrefix = config.project.name; } + const buildDefaults: JsonObject = config.defaults && config.defaults.build + ? { + sourceMap: config.defaults.build.sourcemaps, + progress: config.defaults.build.progress, + poll: config.defaults.build.poll, + deleteOutputPath: config.defaults.build.deleteOutputPath, + preserveSymlinks: config.defaults.build.preserveSymlinks, + showCircularDependencies: config.defaults.build.showCircularDependencies, + commonChunk: config.defaults.build.commonChunk, + namedChunks: config.defaults.build.namedChunks, + } as JsonObject + : {}; + + const serveDefaults: JsonObject = config.defaults && config.defaults.serve + ? { + port: config.defaults.serve.port, + host: config.defaults.serve.host, + ssl: config.defaults.serve.ssl, + sslKey: config.defaults.serve.sslKey, + sslCert: config.defaults.serve.sslCert, + proxyConfig: config.defaults.serve.proxyConfig, + } as JsonObject + : {}; + + const apps = config.apps || []; // convert the apps to projects const projectMap = apps @@ -319,6 +344,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { main: appRoot + '/' + app.main || defaults.main, polyfills: appRoot + '/' + app.polyfills || defaults.polyfills, tsConfig: appRoot + '/' + app.tsconfig || defaults.tsConfig, + ...buildDefaults, }; buildOptions.assets = (app.assets || []).map(_mapAssets); @@ -333,6 +359,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { // Serve target const serveOptions: JsonObject = { browserTarget: `${name}:build`, + ...serveDefaults, }; architect.serve = { builder: `${builderPackage}:dev-server`, diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 295d5e0ba4..b587b06231 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -85,6 +85,12 @@ describe('Migration to v6', () => { }, defaults: { styleExt: 'css', + build: { + namedChunks: true, + }, + serve: { + port: 8080, + }, }, }; tree = new UnitTestTree(new EmptyTree()); @@ -507,6 +513,7 @@ describe('Migration to v6', () => { { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, ]); + expect(build.options.namedChunks).toEqual(true); expect(build.configurations).toEqual({ production: { optimization: true, @@ -531,7 +538,10 @@ describe('Migration to v6', () => { tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const serve = getConfig(tree).projects.foo.architect.serve; expect(serve.builder).toEqual('@angular-devkit/build-angular:dev-server'); - expect(serve.options).toEqual({ browserTarget: 'foo:build' }); + expect(serve.options).toEqual({ + browserTarget: 'foo:build', + port: 8080, + }); const prodConfig = serve.configurations.production; expect(prodConfig.browserTarget).toEqual('foo:build:production'); }); From d3fcecbd8ce281b70f0c4128fe365d7f93d24ad7 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 27 Mar 2018 21:10:29 -0400 Subject: [PATCH 363/724] refactor(@angular-devkit/build-angular): update webpack to 4.5 --- package-lock.json | 34 +++++++++++++++---- package.json | 4 +-- .../angular_devkit/build_angular/package.json | 4 +-- .../models/webpack-configs/styles.ts | 4 +-- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c7c380538..3d0559772e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6986,9 +6986,9 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, "mini-css-extract-plugin": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.2.0.tgz", - "integrity": "sha512-rbuOYZCmNT0FW46hbhIKklBJ6ubwpcWnT81RmTsk0BLTQmL6euOH8lr2d7Wlv5ywJgpH3p7vKy5039dkn4YvxQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.3.0.tgz", + "integrity": "sha512-xWifHy3fqq0HZeEZ0WTi22tek85YQqNFlGxtvSXJXBi1O6XgqKMyK6fsupSBaaIsyBdfpr9QsG93hrWu13pruQ==", "requires": { "loader-utils": "1.1.0", "webpack-sources": "1.1.0" @@ -12136,9 +12136,9 @@ } }, "webpack": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.1.0.tgz", - "integrity": "sha512-ZFYcAZ44kOT+xsS5MS2H1fQr0PJkwQdYem/d17wacDkkupzsAkBJ3hDShWHdPVvWluFs6pfhHWw/dVso1m0rsA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.5.0.tgz", + "integrity": "sha512-6GrZsvQJnG7o7mjbfjp6s5CyMfdopjt1A/X8LcYwceis9ySjqBX6Lusso2wNZ06utHj2ZvfL6L3f7hfgVeJP6g==", "requires": { "acorn": "5.5.3", "acorn-dynamic-import": "3.0.0", @@ -12156,7 +12156,7 @@ "node-libs-browser": "2.1.0", "schema-utils": "0.4.5", "tapable": "1.0.0", - "uglifyjs-webpack-plugin": "1.2.2", + "uglifyjs-webpack-plugin": "1.2.4", "watchpack": "1.5.0", "webpack-sources": "1.1.0" }, @@ -12417,6 +12417,26 @@ "ajv": "6.4.0", "ajv-keywords": "3.1.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz", + "integrity": "sha512-z0IbjpW8b3O/OVn+TTZN4pI29RN1zktFBXLIzzfZ+++cUtZ1ERSlLWgpE/5OERuEUs1ijVQnpYAkSlpoVmQmSQ==", + "requires": { + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.4.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.5.4" + } } } }, diff --git a/package.json b/package.json index b8d3adece4..d460c529fd 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "lodash": "^4.17.4", "material-design-icons": "^3.0.1", "memory-fs": "^0.4.1", - "mini-css-extract-plugin": "~0.2.0", + "mini-css-extract-plugin": "~0.3.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", "ng-packagr": "^2.4.1", @@ -151,7 +151,7 @@ "typescript": "~2.7.2", "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^1.0.1", - "webpack": "4.1.0", + "webpack": "~4.5.0", "webpack-dev-middleware": "^3.1.0", "webpack-dev-server": "^3.1.1", "webpack-merge": "^4.1.2", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 8c6a6b8a21..2f4555d536 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -31,7 +31,7 @@ "license-webpack-plugin": "^1.2.3", "lodash": "^4.17.4", "memory-fs": "^0.4.1", - "mini-css-extract-plugin": "~0.2.0", + "mini-css-extract-plugin": "~0.3.0", "minimatch": "^3.0.4", "node-sass": "^4.7.2", "parse5": "^4.0.0", @@ -55,7 +55,7 @@ "tree-kill": "^1.2.0", "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^1.0.1", - "webpack": "4.1.0", + "webpack": "~4.5.0", "webpack-dev-middleware": "^3.1.0", "webpack-dev-server": "^3.1.1", "webpack-merge": "^4.1.2", diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 4529380afd..63425c8796 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -21,10 +21,8 @@ const PostcssCliResources = require('../../plugins/webpack').PostcssCliResources * Enumerate loaders and their dependencies from this file to let the dependency validator * know they are used. * - * require('exports-loader') * require('style-loader') * require('postcss-loader') - * require('css-loader') * require('stylus') * require('stylus-loader') * require('less') @@ -272,7 +270,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { if (buildOptions.extractCss) { // extract global css from js files into own css file extraPlugins.push( - new MiniCssExtractPlugin({ filename: `[name]${hashFormat.script}.css` })); + new MiniCssExtractPlugin({ filename: `[name]${hashFormat.extract}.css` })); // suppress empty .js files in css only entry points extraPlugins.push(new SuppressExtractedTextChunksWebpackPlugin()); } From 8fb544b818fb9acd673f73c644db99c35448fe06 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 4 Apr 2018 16:59:46 -0400 Subject: [PATCH 364/724] feat(@angular-devkit/schematics): add allow private workflow option --- packages/angular_devkit/schematics/src/workflow/interface.ts | 1 + .../angular_devkit/schematics/tools/workflow/node-workflow.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/src/workflow/interface.ts b/packages/angular_devkit/schematics/src/workflow/interface.ts index 3179c82814..14d2d557e9 100644 --- a/packages/angular_devkit/schematics/src/workflow/interface.ts +++ b/packages/angular_devkit/schematics/src/workflow/interface.ts @@ -18,6 +18,7 @@ export interface WorkflowExecutionContext extends RequiredWorkflowExecutionConte debug: boolean; logger: logging.Logger; parentContext?: Readonly; + allowPrivate?: boolean; } export interface Workflow { diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 1b96703f9a..40eadc3629 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -79,7 +79,8 @@ export class NodeWorkflow implements workflow.Workflow { /** Create the collection and the schematic. */ const collection = this._engine.createCollection(options.collection); // Only allow private schematics if called from the same collection. - const allowPrivate = parentContext && parentContext.collection === options.collection; + const allowPrivate = options.allowPrivate + || (parentContext && parentContext.collection === options.collection); const schematic = collection.createSchematic(options.schematic, allowPrivate); // We need two sinks if we want to output what will happen, and actually do the work. From f3ee7250d1113bc11b16502576a1df386881bcc1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 4 Apr 2018 19:02:29 +0100 Subject: [PATCH 365/724] test: manually exit process on windows --- scripts/test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/test.ts b/scripts/test.ts index cc8b5bac22..e13537507a 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -142,6 +142,18 @@ if (process.argv.indexOf('--spec-reporter') != -1) { // Manually set exit code (needed with custom reporters) runner.onComplete((success: boolean) => { process.exitCode = success ? 0 : 1; + if (process.platform.startsWith('win')) { + // TODO(filipesilva): finish figuring out why this happens. + // We should not need to force exit here, but when: + // - on windows + // - running webpack-dev-server + // - with ngtools/webpack on the compilation + // Something seems to hang and the process never exists. + // This does not happen on linux, nor with webpack on watch mode. + // Until this is figured out, we need to exit the process manually after tests finish + // otherwise appveyor will hang until it timeouts. + process.exit(); + } }); From 7bde365e696efcd04a6d784ae3dc3890b0ca5388 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 4 Apr 2018 12:24:47 -0400 Subject: [PATCH 366/724] feat(@angular-devkit/schematics): allow override default package manager --- .../schematics/tasks/node-package/executor.ts | 16 ++++++++--- .../tasks/node-package/install-task.ts | 27 ++++++++++++++++++- .../schematics/tasks/node-package/options.ts | 2 ++ .../tools/workflow/node-workflow.ts | 20 +++++++++++--- 4 files changed, 58 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index c1e114c46d..3b008f7972 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -44,6 +44,16 @@ export default function( const rootDirectory = factoryOptions.rootDirectory || process.cwd(); return (options: NodePackageTaskOptions) => { + let taskPackageManagerProfile = packageManagerProfile; + let taskPackageManagerName = packageManagerName; + if (factoryOptions.allowPackageManagerOverride && options.packageManager) { + taskPackageManagerProfile = packageManagers[options.packageManager]; + if (!taskPackageManagerProfile) { + throw new UnknownPackageManagerException(options.packageManager); + } + taskPackageManagerName = options.packageManager; + } + const outputStream = process.stdout; const errorStream = process.stderr; const spawnOptions: SpawnOptions = { @@ -57,12 +67,12 @@ export default function( args.push(options.packageName); } - if (options.quiet && packageManagerProfile.quietArgument) { - args.push(packageManagerProfile.quietArgument); + if (options.quiet && taskPackageManagerProfile.quietArgument) { + args.push(taskPackageManagerProfile.quietArgument); } return new Observable(obs => { - spawn(packageManagerName, args, spawnOptions) + spawn(taskPackageManagerName, args, spawnOptions) .on('close', (code: number) => { if (code === 0) { obs.next(); diff --git a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts index 60824eca87..d450e7a19b 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts @@ -8,10 +8,34 @@ import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; import { NodePackageName, NodePackageTaskOptions } from './options'; +export class NodePackageInstallTaskOptions { + packageManager: string; + workingDirectory: string; + quiet: boolean; +} + export class NodePackageInstallTask implements TaskConfigurationGenerator { quiet = true; + workingDirectory?: string; + packageManager?: string; - constructor(public workingDirectory?: string) {} + constructor(workingDirectory?: string); + constructor(options: Partial); + constructor(options?: string | Partial) { + if (typeof options === 'string') { + this.workingDirectory = options; + } else if (typeof options === 'object') { + if (options.quiet != undefined) { + this.quiet = options.quiet; + } + if (options.workingDirectory != undefined) { + this.workingDirectory = options.workingDirectory; + } + if (options.packageManager != undefined) { + this.packageManager = options.packageManager; + } + } + } toConfiguration(): TaskConfiguration { return { @@ -20,6 +44,7 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator Date: Wed, 4 Apr 2018 12:36:15 -0400 Subject: [PATCH 367/724] fix(@schematics/angular): use project's package manager when migrating --- .../schematics/angular/migrations/update-6/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 71447514b5..68ba973ba3 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -504,7 +504,7 @@ function updateSpecTsConfig(config: CliConfig): Rule { }; } -function updatePackageJson() { +function updatePackageJson(packageManager?: string) { return (host: Tree, context: SchematicContext) => { const pkgPath = '/package.json'; const buffer = host.read(pkgPath); @@ -524,7 +524,11 @@ function updatePackageJson() { pkg.devDependencies['@angular-devkit/build-angular'] = latestVersions.DevkitBuildAngular; host.overwrite(pkgPath, JSON.stringify(pkg, null, 2)); - context.addTask(new NodePackageInstallTask()); + + if (packageManager && !['npm', 'yarn', 'cnpm'].includes(packageManager)) { + packageManager = undefined; + } + context.addTask(new NodePackageInstallTask({ packageManager })); return host; }; @@ -543,7 +547,7 @@ export default function (): Rule { migrateKarmaConfiguration(config), migrateConfiguration(config), updateSpecTsConfig(config), - updatePackageJson(), + updatePackageJson(config.packageManager), ])(host, context); }; } From 0f4534cd33fc847f34dba6f5ad95f54ac5b2d806 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 4 Apr 2018 17:33:02 -0700 Subject: [PATCH 368/724] feat(@angular-devkit/core): add a Temporary directory NodeJsSyncHost This is useful for testing. Allows to give the system root of the created directory. --- .../angular_devkit/core/node/testing/index.ts | 54 +++++++++++++++++++ tsconfig.json | 1 + 2 files changed, 55 insertions(+) create mode 100644 packages/angular_devkit/core/node/testing/index.ts diff --git a/packages/angular_devkit/core/node/testing/index.ts b/packages/angular_devkit/core/node/testing/index.ts new file mode 100644 index 0000000000..ec9d6fd9e2 --- /dev/null +++ b/packages/angular_devkit/core/node/testing/index.ts @@ -0,0 +1,54 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { Path, PathFragment, getSystemPath, join, normalize, virtualFs } from '../../src'; +import { NodeJsSyncHost } from '../host'; + +/** + * A Sync Scoped Host that creates a temporary directory and scope to it. + */ +export class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost { + protected _sync: virtualFs.SyncDelegateHost; + protected _root: Path; + + constructor() { + const root = normalize(path.join(os.tmpdir(), `devkit-host-${+Date.now()}-${process.pid}`)); + fs.mkdirSync(getSystemPath(root)); + + super(new NodeJsSyncHost(), root); + this._root = root; + } + + get files(): Path[] { + const sync = this.sync; + function _visit(p: Path): Path[] { + return sync.list(p) + .map((fragment: PathFragment) => join(p, fragment)) + .reduce((files: Path[], path: PathFragment) => { + if (sync.isDirectory(path)) { + return files.concat(_visit(path)); + } else { + return files.concat(path); + } + }, [] as Path[]); + } + + return _visit(normalize('/')); + } + + get root() { return this._root; } + get sync() { + if (!this._sync) { + this._sync = new virtualFs.SyncDelegateHost(this); + } + + return this._sync; + } +} diff --git a/tsconfig.json b/tsconfig.json index 405e80d6de..cfcdce05f5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -38,6 +38,7 @@ "@_/benchmark": [ "./packages/_/benchmark/src/index" ], "@angular-devkit/core": [ "./packages/angular_devkit/core/src/index" ], "@angular-devkit/core/node": [ "./packages/angular_devkit/core/node/index" ], + "@angular-devkit/core/node/testing": [ "./packages/angular_devkit/core/node/testing/index" ], "@angular-devkit/schematics": [ "./packages/angular_devkit/schematics/src/index" ], "@angular-devkit/schematics/tasks": [ "./packages/angular_devkit/schematics/tasks/index" ], "@angular-devkit/schematics/tasks/node": [ "./packages/angular_devkit/schematics/tasks/node/index" ], From cf279583508947d4e8838866800766a3a2cf5802 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 16 Mar 2018 14:26:42 -0700 Subject: [PATCH 369/724] feat(@angular-devkit/schematics): add a tslint fix task --- package.json | 1 + .../angular_devkit/schematics/tasks/index.ts | 1 + .../schematics/tasks/node/index.ts | 5 + .../schematics/tasks/tslint-fix/executor.ts | 187 ++++++++++++++++++ .../tasks/tslint-fix/executor_spec.ts | 73 +++++++ .../schematics/tasks/tslint-fix/options.ts | 32 +++ .../schematics/tasks/tslint-fix/task.ts | 31 +++ .../tasks/tslint-fix/test/collection.json | 8 + .../tasks/tslint-fix/test/run-task.ts | 28 +++ .../testing/schematic-test-runner.ts | 2 + .../tools/workflow/node-workflow.ts | 1 + 11 files changed, 369 insertions(+) create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/executor.ts create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/options.ts create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/task.ts create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/test/run-task.ts diff --git a/package.json b/package.json index d460c529fd..8ed25a0923 100644 --- a/package.json +++ b/package.json @@ -148,6 +148,7 @@ "tree-kill": "^1.2.0", "ts-node": "^5.0.0", "tslint": "^5.9.1", + "tsutils": "~2.22.2", "typescript": "~2.7.2", "uglifyjs-webpack-plugin": "^1.2.2", "url-loader": "^1.0.1", diff --git a/packages/angular_devkit/schematics/tasks/index.ts b/packages/angular_devkit/schematics/tasks/index.ts index 64ec0b30cd..880b695666 100644 --- a/packages/angular_devkit/schematics/tasks/index.ts +++ b/packages/angular_devkit/schematics/tasks/index.ts @@ -9,3 +9,4 @@ export { NodePackageInstallTask } from './node-package/install-task'; export { NodePackageLinkTask } from './node-package/link-task'; export { RepositoryInitializerTask } from './repo-init/init-task'; export { RunSchematicTask } from './run-schematic/task'; +export { TslintFixTask } from './tslint-fix/task'; diff --git a/packages/angular_devkit/schematics/tasks/node/index.ts b/packages/angular_devkit/schematics/tasks/node/index.ts index 018e2a32ad..c349c8a499 100644 --- a/packages/angular_devkit/schematics/tasks/node/index.ts +++ b/packages/angular_devkit/schematics/tasks/node/index.ts @@ -12,6 +12,7 @@ import { RepositoryInitializerTaskFactoryOptions, } from '../repo-init/options'; import { RunSchematicName } from '../run-schematic/options'; +import { TslintFixName } from '../tslint-fix/options'; export class BuiltinTaskExecutor { static readonly NodePackage: TaskExecutorFactory = { @@ -27,4 +28,8 @@ export class BuiltinTaskExecutor { name: RunSchematicName, create: () => import('../run-schematic/executor').then(mod => mod.default()), }; + static readonly TslintFix: TaskExecutorFactory<{}> = { + name: TslintFixName, + create: () => import('../tslint-fix/executor').then(mod => mod.default()), + }; } diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/executor.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/executor.ts new file mode 100644 index 0000000000..856d3504d7 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/executor.ts @@ -0,0 +1,187 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { resolve } from '@angular-devkit/core/node'; +import * as fs from 'fs'; +import * as path from 'path'; +import { Observable } from 'rxjs'; +import { + Configuration as ConfigurationNS, + Linter as LinterNS, +} from 'tslint'; // tslint:disable-line:no-implicit-dependencies +import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies +import { SchematicContext, TaskExecutor } from '../../src'; +import { TslintFixTaskOptions } from './options'; + + +type ConfigurationT = typeof ConfigurationNS; +type LinterT = typeof LinterNS; + + +function _loadConfiguration( + Configuration: ConfigurationT, + options: TslintFixTaskOptions, + root: string, + file?: string, +) { + if (options.tslintConfig) { + return Configuration.parseConfigFile(options.tslintConfig, root); + } else if (options.tslintPath) { + const tslintPath = path.join(root, options.tslintPath); + + return Configuration.findConfiguration(tslintPath, file && path.join(root, file)).results; + } else { + throw new Error('Executor must specify a tslint configuration.'); + } +} + + +function _getFileContent( + file: string, + options: TslintFixTaskOptions, + program?: ts.Program, +): string | undefined { + // The linter retrieves the SourceFile TS node directly if a program is used + if (program) { + const source = program.getSourceFile(file); + if (!source) { + const message + = `File '${file}' is not part of the TypeScript project '${options.tsConfigPath}'.`; + throw new Error(message); + } + + return source.getFullText(source); + } + + // NOTE: The tslint CLI checks for and excludes MPEG transport streams; this does not. + try { + // Strip BOM from file data. + // https://stackoverflow.com/questions/24356713 + return fs.readFileSync(file, 'utf-8').replace(/^\uFEFF/, ''); + } catch (e) { + throw new Error(`Could not read file '${file}'.`); + } +} + + +function _listAllFiles(root: string): string[] { + const result: string[] = []; + + function _recurse(location: string) { + const dir = fs.readdirSync(path.join(root, location)); + + dir.forEach(name => { + const loc = path.join(location, name); + if (fs.statSync(path.join(root, loc)).isDirectory()) { + _recurse(loc); + } else { + result.push(loc); + } + }); + } + _recurse(''); + + return result; +} + + +export default function(): TaskExecutor { + return (options: TslintFixTaskOptions, context: SchematicContext) => { + return new Observable(obs => { + const root = process.cwd(); + const tslint = require(resolve('tslint', { + basedir: root, + checkGlobal: true, + checkLocal: true, + })); + const includes = ( + Array.isArray(options.includes) + ? options.includes + : (options.includes ? [options.includes] : []) + ); + + const Linter = tslint.Linter as LinterT; + const Configuration = tslint.Configuration as ConfigurationT; + let program: ts.Program | undefined = undefined; + let filesToLint: string[] = []; + + if (options.tsConfigPath) { + const tsConfigPath = path.join(process.cwd(), options.tsConfigPath); + + if (!fs.existsSync(tsConfigPath)) { + obs.error(new Error('Could not find tsconfig.')); + + return; + } + program = Linter.createProgram(tsConfigPath); + filesToLint = Linter.getFileNames(program); + } + + if (includes.length > 0) { + const allFilesRel = _listAllFiles(root); + const pattern = '^(' + + (includes as string[]) + .map(ex => '(' + + ex.split(/[\/\\]/g).map(f => f + .replace(/[\-\[\]{}()+?.^$|]/g, '\\$&') + .replace(/^\*\*/g, '(.+?)?') + .replace(/\*/g, '[^/\\\\]*')) + .join('[\/\\\\]') + + ')') + .join('|') + + ')($|/|\\\\)'; + const re = new RegExp(pattern); + + filesToLint.push(...allFilesRel + .filter(x => re.test(x)) + .map(x => path.join(root, x)), + ); + } + + const lintOptions = { + fix: true, + formatter: options.format || 'prose', + }; + + const linter = new Linter(lintOptions, program); + const config = _loadConfiguration(Configuration, options, root); + + for (const file of filesToLint) { + const content = _getFileContent(file, options, program); + + if (!content) { + continue; + } + + linter.lint(file, content, config); + } + + const result = linter.getResult(); + + // Format and show the results. + if (!options.silent) { + const Formatter = tslint.findFormatter(options.format || 'prose'); + if (!Formatter) { + throw new Error(`Invalid lint format "${options.format}".`); + } + const formatter = new Formatter(); + + const output = formatter.format(result.failures, result.fixes); + if (output) { + context.logger.info(output); + } + } + + if (!options.ignoreErrors && result.errorCount > 0) { + obs.error(new Error('Lint errors were found.')); + } else { + obs.next(); + obs.complete(); + } + }); + }; +} diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts new file mode 100644 index 0000000000..8c320a6a3c --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts @@ -0,0 +1,73 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +import { getSystemPath, normalize, virtualFs } from '@angular-devkit/core'; +import { TempScopedNodeJsSyncHost } from '@angular-devkit/core/node/testing'; +import { HostTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import * as path from 'path'; +import { Observable, concat } from 'rxjs'; +import { catchError } from 'rxjs/operators'; + +describe('TsLintTaskExecutor', () => { + + it('works with config object', done => { + const testRunner = new SchematicTestRunner( + '@_/test', + path.join(__dirname, 'test/collection.json'), + ); + + const host = new TempScopedNodeJsSyncHost(); + host.write(normalize('/file.ts'), virtualFs.stringToFileBuffer(` + export function() { console.log(1); } + `)).subscribe(); + const tree = new UnitTestTree(new HostTree(host)); + + testRunner.runSchematicAsync('run-task', null, tree) + .subscribe(undefined, done.fail, done); + }); + + it('shows errors with config object', done => { + const testRunner = new SchematicTestRunner( + '@_/test', + path.join(__dirname, 'test/collection.json'), + ); + + const host = new TempScopedNodeJsSyncHost(); + host.write(normalize('/file.ts'), virtualFs.stringToFileBuffer(` + // ${'...MORE_THAN_100'.repeat(10)} + export function() { console.log(1); } + `)).subscribe(); + const tree = new UnitTestTree(new HostTree(host)); + + const messages: string[] = []; + let error = false; + + concat( + testRunner.runSchematicAsync('run-task', null, tree), + new Observable(obs => { + process.chdir(getSystemPath(host.root)); + testRunner.logger.subscribe(x => messages.push(x.message)); + testRunner.engine.executePostTasks().subscribe(obs); + }).pipe( + catchError(() => { + error = true; + + return []; + }), + ), + new Observable(obs => { + expect(messages.find(msg => /\b80\b/.test(msg))).not.toBeUndefined(); + expect(error).toBe(true); + + obs.complete(); + }), + ).subscribe(undefined, done.fail, done); + }); + +}); diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/options.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/options.ts new file mode 100644 index 0000000000..e6b3ac520f --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/options.ts @@ -0,0 +1,32 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject } from '@angular-devkit/core'; + +export const TslintFixName = 'tslint-fix'; + +export interface TslintFixTaskOptionsBase { + silent?: boolean; + format?: string; + tsConfigPath?: string; + + ignoreErrors?: boolean; + + includes?: string | string[]; +} + +export interface TslintFixTaskOptionsPath extends TslintFixTaskOptionsBase { + tslintPath: string; + tslintConfig?: never; +} + +export interface TslintFixTaskOptionsConfig extends TslintFixTaskOptionsBase { + tslintPath?: never; + tslintConfig: JsonObject; +} + +export type TslintFixTaskOptions = TslintFixTaskOptionsPath | TslintFixTaskOptionsConfig; diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/task.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/task.ts new file mode 100644 index 0000000000..3b6eaa000b --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/task.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonObject } from '@angular-devkit/core'; +import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; +import { TslintFixName, TslintFixTaskOptions, TslintFixTaskOptionsBase } from './options'; + + +export class TslintFixTask implements TaskConfigurationGenerator { + constructor(config: JsonObject, options: TslintFixTaskOptionsBase); + constructor(path: string, options: TslintFixTaskOptionsBase); + constructor( + protected _configOrPath: string | JsonObject, + protected _options: TslintFixTaskOptionsBase, + ) {} + + toConfiguration(): TaskConfiguration { + const options = { + ...this._options, + ...((typeof this._configOrPath == 'string' + ? { tslintPath: this._configOrPath } + : { tslintConfig: this._configOrPath })), + }; + + return { name: TslintFixName, options }; + } +} diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json b/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json new file mode 100644 index 0000000000..1cd8606d83 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json @@ -0,0 +1,8 @@ +{ + "schematics": { + "run-task": { + "description": ".", + "factory": "./run-task" + } + } +} diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/test/run-task.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/test/run-task.ts new file mode 100644 index 0000000000..571c08d978 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/test/run-task.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { + Rule, + SchematicContext, + Tree, +} from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies +import { + TslintFixTask, +} from '@angular-devkit/schematics/tasks'; // tslint:disable-line:no-implicit-dependencies + +export default function(): Rule { + return (_: Tree, context: SchematicContext) => { + context.addTask(new TslintFixTask({ + rules: { + 'max-line-length': [true, 80], + }, + }, { + includes: '*.ts', + silent: false, + })); + }; +} diff --git a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts index 39f319bee7..c72458386b 100644 --- a/packages/angular_devkit/schematics/testing/schematic-test-runner.ts +++ b/packages/angular_devkit/schematics/testing/schematic-test-runner.ts @@ -62,10 +62,12 @@ export class SchematicTestRunner { this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.NodePackage); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RepositoryInitializer); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RunSchematic); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.TslintFix); this._collection = this._engine.createCollection(this._collectionName); } + get engine() { return this._engine; } get logger(): logging.Logger { return this._logger; } get tasks(): TaskConfiguration[] { return [...this._engineHost.tasks]; } diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index d22c309557..fe1c0f19b5 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -66,6 +66,7 @@ export class NodeWorkflow implements workflow.Workflow { }, ); this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.RunSchematic); + this._engineHost.registerTaskExecutor(BuiltinTaskExecutor.TslintFix); this._context = []; } From d196b059b5e2b63836642373fb09dded43951695 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Tue, 3 Apr 2018 11:57:57 -0400 Subject: [PATCH 370/724] fix(@schematics/angular): Fix selectors when name contains a path fixes angular/angular-cli#10144 --- packages/schematics/angular/component/index.ts | 5 +++-- packages/schematics/angular/component/index_spec.ts | 7 +++++++ packages/schematics/angular/directive/index.ts | 6 ++++-- packages/schematics/angular/directive/index_spec.ts | 8 ++++++++ packages/schematics/angular/directive/schema.json | 1 - packages/schematics/angular/utility/validation.ts | 11 +++++++++++ 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index a99e4bba02..e95469751d 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -27,7 +27,7 @@ import { InsertChange } from '../utility/change'; import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; -import { validateName } from '../utility/validation'; +import { validateHtmlSelector, validateName } from '../utility/validation'; import { Schema as ComponentOptions } from './schema'; @@ -114,14 +114,15 @@ export default function(options: ComponentOptions): Rule { options.path = `/${project.root}/src/app`; } - options.selector = options.selector || buildSelector(options); options.module = findModuleFromOptions(host, options); const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; + options.selector = options.selector || buildSelector(options); validateName(options.name); + validateHtmlSelector(options.selector); const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 06de849dde..b4cbb6792a 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -264,4 +264,11 @@ describe('Component Schematic', () => { // tslint:disable-next-line:max-line-length /import { TestComponentComponent } from '..\/..\/other\/test-component\/test-component.component'/); }); + + it('should create the right selector with a path in the name', () => { + const options = { ...defaultOptions, name: 'sub/test' }; + appTree = schematicRunner.runSchematic('component', options, appTree); + const content = appTree.readContent('/projects/bar/src/app/sub/test/test.component.ts'); + expect(content).toMatch(/selector: 'app-test'/); + }); }); diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 64d6c25eb4..21f19f579c 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -27,6 +27,7 @@ import { InsertChange } from '../utility/change'; import { getWorkspace } from '../utility/config'; import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; +import { validateHtmlSelector } from '../utility/validation'; import { Schema as DirectiveOptions } from './schema'; @@ -99,8 +100,6 @@ function buildSelector(options: DirectiveOptions) { } export default function (options: DirectiveOptions): Rule { - options.selector = options.selector || buildSelector(options); - return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { @@ -117,6 +116,9 @@ export default function (options: DirectiveOptions): Rule { const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; + options.selector = options.selector || buildSelector(options); + + validateHtmlSelector(options.selector); const templateSource = apply(url('./files'), [ options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')), diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index 95db1ace0b..8d173fc8f8 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -121,4 +121,12 @@ describe('Directive Schematic', () => { const content = tree.readContent('/projects/bar/src/app/my-dir.directive.ts'); expect(content).toMatch(/selector: '\[appMyDir\]'/); }); + + it('should create the right selector with a path in the name', () => { + const options = { ...defaultOptions, name: 'sub/test' }; + appTree = schematicRunner.runSchematic('directive', options, appTree); + + const content = appTree.readContent('/projects/bar/src/app/sub/test.directive.ts'); + expect(content).toMatch(/selector: '\[appTest\]'/); + }); }); diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index 033ea89d59..d0f0353313 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -7,7 +7,6 @@ "name": { "type": "string", "description": "The name of the directive.", - "format": "html-selector", "$default": { "$source": "argv", "index": 0 diff --git a/packages/schematics/angular/utility/validation.ts b/packages/schematics/angular/utility/validation.ts index dc80585efa..0578d18948 100644 --- a/packages/schematics/angular/utility/validation.ts +++ b/packages/schematics/angular/utility/validation.ts @@ -14,3 +14,14 @@ export function validateName(name: string): void { can not start with a digit.`); } } + +// Must start with a letter, and must contain only alphanumeric characters or dashes. +// When adding a dash the segment after the dash must also start with a letter. +export const htmlSelectorRe = /^[a-zA-Z][.0-9a-zA-Z]*(:?-[a-zA-Z][.0-9a-zA-Z]*)*$/; + +export function validateHtmlSelector(selector: string): void { + if (selector && !htmlSelectorRe.test(selector)) { + throw new SchematicsException(tags.oneLine`Selector (${selector}) + is invalid.`); + } +} From 17b33c276d2fee6c15db6a32695d7f63b6f3cb74 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 4 Apr 2018 20:52:58 -0700 Subject: [PATCH 371/724] release: 6.0.0-rc.1 --- .monorepo.json | 48 +++++++++++++++++++++++----------------------- scripts/release.ts | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index b53894b752..9fbf10a3d6 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.0", + "version": "0.5.1", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.0", + "version": "0.5.1", "hash": "f48bf7e6bb335235b32ba8b93871ea40" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.0", - "hash": "758849010cf775777a28834be6746596", + "version": "0.5.1", + "hash": "bff5cf1a5c24f3b2e6ae77b7f914eab1", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.0", + "version": "0.5.1", "hash": "7e6db51ce50e3f3e0023c43b219a0dc8", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.0", - "hash": "bd253057d6d10a3ea00cd1a0e195449a", + "version": "0.5.1", + "hash": "f676219d440fb0f6a8aa8a15e3a3966b", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.0", + "version": "0.5.1", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.0", - "hash": "e5b040b19c8ae58ec8a3a96bb63b31bf", + "version": "0.5.1", + "hash": "6d023ba1e763ae19df7a3ab6449a124b", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.0", - "hash": "41ad3f3149fc0efe596d635714bbbf89", + "version": "0.5.1", + "hash": "ed902de362dd11885d52f18b309eccf2", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.0", - "hash": "9ab74e20ee3e8862927a9e7871874a5d", + "version": "0.5.1", + "hash": "4f78f23e3b3a8fcf1578869d090612ba", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.0", - "hash": "a16c52ce3f33f8a4615fc6e2fb4d355c", + "version": "0.5.1", + "hash": "5806d6a0edb65bd57912ba3080dd564f", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.0", - "hash": "56c7ea672dcbbaf7e7834fc1778d29a8", + "version": "0.5.1", + "hash": "93c99a2cf4385a312fa88a000d700f76", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.0", + "version": "6.0.0-rc.1", "section": "Misc", "hash": "2234741f124a6478a8f018b0365b2775", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,27 +150,27 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.0", - "hash": "b833889561a19b82a3764f00e074a2b1", + "version": "0.5.1", + "hash": "2d2d1acff699c616ef62a4140845cca0", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.0", + "version": "0.5.1", "section": "Schematics", "hash": "85f50de4da92597ef8adb1d484107825", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.0", + "version": "0.5.1", "section": "Schematics", "hash": "aff7f2d8691124d3e040cbc121171d15", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.0", + "version": "0.5.1", "section": "Schematics", "hash": "f3891f8d61e106cabdd81cf2279fc6bc", "snapshotRepo": "angular/schematics-update-builds" diff --git a/scripts/release.ts b/scripts/release.ts index 6afc2179c8..21d3a13bde 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -26,7 +26,7 @@ function _showVersions(logger: logging.Logger) { const diff = pkg.dirty ? '!' : ''; const pad1 = ' '.slice(pkgName.length); - const pad2 = ' '.slice(version.length); + const pad2 = ' '.slice(version.length); const message = `${pkgName} ${pad1}v${version}${pad2}${hash} ${diff}`; if (pkg.private) { logger.debug(message); From 334151c2ae7b9bf0daa6ad817420cf1e8f91b41d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 5 Apr 2018 11:18:21 -0400 Subject: [PATCH 372/724] fix(@schematics/angular): only migrate polyfills option if present --- .../schematics/angular/migrations/update-6/index.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 68ba973ba3..1472bfb5e4 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -342,11 +342,14 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { outputPath: outDir, index: appRoot + '/' + app.index || defaults.index, main: appRoot + '/' + app.main || defaults.main, - polyfills: appRoot + '/' + app.polyfills || defaults.polyfills, tsConfig: appRoot + '/' + app.tsconfig || defaults.tsConfig, ...buildDefaults, }; + if (app.polyfills) { + buildOptions.polyfills = appRoot + '/' + app.polyfills; + } + buildOptions.assets = (app.assets || []).map(_mapAssets); buildOptions.styles = (app.styles || []).map(_extraEntryMapper); buildOptions.scripts = (app.scripts || []).map(_extraEntryMapper); @@ -380,10 +383,14 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { // Test target const testOptions: JsonObject = { main: appRoot + '/' + app.test || defaults.test, - polyfills: appRoot + '/' + app.polyfills || defaults.polyfills, // Make karmaConfig relative to root. karmaConfig, }; + + if (app.polyfills) { + testOptions.polyfills = appRoot + '/' + app.polyfills; + } + if (app.testTsconfig) { testOptions.tsConfig = appRoot + '/' + app.testTsconfig; } From b9704dc16efcbdfa3ccad59056709331bb2c4f50 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 07:48:33 -0700 Subject: [PATCH 373/724] fix(@schematics/angular): default to non prod builds on new application The current behaviour is risky if the user does not realize he is using a prod environment. It could have potential disastrous effects. By contrast, if the user build a dev build by default, it is trivial for her to change the package.json to her liking. This PR reduces the risk while inducing minimal pain on most people. Fix https://github.com/angular/angular-cli/issues/10191 --- packages/schematics/angular/workspace/files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index ee2aad19ec..4bda57221d 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -5,7 +5,7 @@ "scripts": { "ng": "ng", "start": "ng serve", - "build": "ng build --prod", + "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" From 321e1fadda56ddc0bc666c2fd374401a6cb0647f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 07:13:27 -0700 Subject: [PATCH 374/724] fix(@schematics/angular): remove broken imports Fixes https://github.com/angular/angular-cli/issues/10190 --- .../schematics/angular/universal/index.ts | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 525c9c56e2..1f2bd165c9 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, normalize, parseJson, strings } from '@angular-devkit/core'; +import { JsonObject, experimental, normalize, parseJson, strings } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -19,12 +19,6 @@ import { url, } from '@angular-devkit/schematics'; import * as ts from 'typescript'; -import { getWorkspacePath } from '../../../angular/pwa/utility/config'; -import { - Architect, - Project, - WorkspaceSchema, -} from '../../../angular_devkit/core/src/workspace/workspace-schema'; import { findNode, getDecoratorMetadata } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { getWorkspace } from '../utility/config'; @@ -32,7 +26,13 @@ import { findBootstrapModuleCall, findBootstrapModulePath } from '../utility/ng- import { Schema as UniversalOptions } from './schema'; -function getClientProject(host: Tree, options: UniversalOptions): Project { +function getWorkspacePath(host: Tree): string { + const possibleFiles = [ '/angular.json', '/.angular.json' ]; + + return possibleFiles.filter(path => host.exists(path))[0]; +} + +function getClientProject(host: Tree, options: UniversalOptions): experimental.workspace.Project { const workspace = getWorkspace(host); const clientProject = workspace.projects[options.clientProject]; if (!clientProject) { @@ -42,7 +42,10 @@ function getClientProject(host: Tree, options: UniversalOptions): Project { return clientProject; } -function getClientArchitect(host: Tree, options: UniversalOptions): Architect { +function getClientArchitect( + host: Tree, + options: UniversalOptions, +): experimental.workspace.Architect { const clientArchitect = getClientProject(host, options).architect; if (!clientArchitect) { @@ -171,7 +174,7 @@ function addDependencies(): Rule { }; } -function getTsConfigOutDir(host: Tree, architect: Architect): string { +function getTsConfigOutDir(host: Tree, architect: experimental.workspace.Architect): string { const tsConfigPath = architect.build.options.tsConfig; const tsConfigBuffer = host.read(tsConfigPath); if (!tsConfigBuffer) { From c4939c9b79d1f6aabae24b7ec0684704c04f6728 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 09:03:28 -0700 Subject: [PATCH 375/724] feat(@angular-devkit/schematics): add lifecycle hooks to workflow This will allow us to show logs at each new phases, for example, instead of only at the end. Reference: https://github.com/angular/angular-cli/issues/10155 --- .../schematics/src/workflow/interface.ts | 6 ++++ .../tools/workflow/node-workflow.ts | 28 +++++++++++++++++-- .../schematics_cli/bin/schematics.ts | 21 ++++++++++++-- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/schematics/src/workflow/interface.ts b/packages/angular_devkit/schematics/src/workflow/interface.ts index 14d2d557e9..01de696707 100644 --- a/packages/angular_devkit/schematics/src/workflow/interface.ts +++ b/packages/angular_devkit/schematics/src/workflow/interface.ts @@ -21,6 +21,12 @@ export interface WorkflowExecutionContext extends RequiredWorkflowExecutionConte allowPrivate?: boolean; } +export interface LifeCycleEvent { + kind: 'start' | 'end' // Start and end of the full workflow execution. + | 'workflow-start' | 'workflow-end' // Start and end of a workflow execution. Can be more. + | 'post-tasks-start' | 'post-tasks-end'; // Start and end of the post tasks execution. +} + export interface Workflow { readonly context: Readonly; diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index fe1c0f19b5..c7b6ea5e66 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -17,6 +17,7 @@ import { workflow, } from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies import { EMPTY, Observable, Subject, concat, of, throwError } from 'rxjs'; +import { reduce, tap } from 'rxjs/internal/operators'; import { concatMap, ignoreElements, map } from 'rxjs/operators'; import { NodeModulesEngineHost, validateOptionsWithSchema } from '..'; import { DryRunEvent } from '../../src/sink/dryrun'; @@ -28,6 +29,7 @@ export class NodeWorkflow implements workflow.Workflow { protected _registry: schema.CoreSchemaRegistry; protected _reporter: Subject = new Subject(); + protected _lifeCycle: Subject = new Subject(); protected _context: workflow.WorkflowExecutionContext[]; @@ -85,12 +87,19 @@ export class NodeWorkflow implements workflow.Workflow { get reporter(): Observable { return this._reporter.asObservable(); } + get lifeCycle(): Observable { + return this._lifeCycle.asObservable(); + } execute( options: Partial & workflow.RequiredWorkflowExecutionContext, ): Observable { const parentContext = this._context[this._context.length - 1]; + if (!parentContext) { + this._lifeCycle.next({ kind: 'start' }); + } + /** Create the collection and the schematic. */ const collection = this._engine.createCollection(options.collection); // Only allow private schematics if called from the same collection. @@ -110,6 +119,8 @@ export class NodeWorkflow implements workflow.Workflow { error = error || (event.kind == 'error'); }); + this._lifeCycle.next({ kind: 'workflow-start' }); + const context = { ...options, debug: options.debug || false, @@ -145,15 +156,28 @@ export class NodeWorkflow implements workflow.Workflow { ), concat(new Observable(obs => { if (!this._options.dryRun) { - this._engine.executePostTasks().subscribe(obs); + this._lifeCycle.next({ kind: 'post-tasks-start' }); + this._engine.executePostTasks() + .pipe( + reduce(() => {}), + tap(() => this._lifeCycle.next({ kind: 'post-tasks-end' })), + ) + .subscribe(obs); } else { obs.complete(); } })), concat(new Observable(obs => { + this._lifeCycle.next({ kind: 'workflow-end' }); this._context.pop(); + + if (this._context.length == 0) { + this._lifeCycle.next({ kind: 'end' }); + } + obs.complete(); })), - ).pipe(ignoreElements()); + reduce(() => {}), + ); } } diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 6181866597..7a54f6acc2 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -138,6 +138,7 @@ let nothingDone = true; // Logging queue that receives all the messages to show the users. This only get shown when no // errors happened. const loggingQueue: string[] = []; +let error = false; /** * Logs out dry run events. @@ -154,6 +155,8 @@ workflow.reporter.subscribe((event: DryRunEvent) => { switch (event.kind) { case 'error': + error = true; + const desc = event.description == 'alreadyExist' ? 'already exists' : 'does not exist.'; logger.warn(`ERROR! ${event.path} ${desc}.`); break; @@ -177,6 +180,21 @@ workflow.reporter.subscribe((event: DryRunEvent) => { }); +/** + * Listen to lifecycle events of the workflow to flush the logs between each phases. + */ +workflow.lifeCycle.subscribe(event => { + if (event.kind == 'workflow-end' || event.kind == 'post-tasks-start') { + if (!error) { + // Flush the log queue and clean the error state. + loggingQueue.forEach(log => logger.info(log)); + } + + error = false; + } +}); + + /** * Remove every options from argv that we support in schematics itself. */ @@ -235,9 +253,6 @@ workflow.execute({ process.exit(1); }, complete() { - // Output the logging queue, no error happened. - loggingQueue.forEach(log => logger.info(log)); - if (nothingDone) { logger.info('Nothing to be done.'); } From 80457f524cc487783c47d3f59eef1c2006f24f56 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 5 Apr 2018 18:56:22 +0100 Subject: [PATCH 376/724] build: standardize peerdeps on devkit packages --- packages/_/devkit/package.json | 2 +- .../_/devkit/package/project-files/__path__/package.json | 2 -- packages/angular/pwa/package.json | 8 +++----- packages/angular_devkit/architect/package.json | 4 +--- packages/angular_devkit/schematics/package.json | 4 +--- packages/ngtools/webpack/package.json | 2 +- packages/schematics/angular/package.json | 6 ++---- packages/schematics/package_update/package.json | 8 +++----- packages/schematics/schematics/package.json | 2 +- packages/schematics/update/package.json | 8 +++----- 10 files changed, 16 insertions(+), 30 deletions(-) diff --git a/packages/_/devkit/package.json b/packages/_/devkit/package.json index 89f4bd3cab..23b4a671ac 100644 --- a/packages/_/devkit/package.json +++ b/packages/_/devkit/package.json @@ -7,7 +7,7 @@ }, "schematics": "./collection.json", "private": true, - "peerDependencies": { + "dependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0" } diff --git a/packages/_/devkit/package/project-files/__path__/package.json b/packages/_/devkit/package/project-files/__path__/package.json index c99ab58a80..7126e5f406 100644 --- a/packages/_/devkit/package/project-files/__path__/package.json +++ b/packages/_/devkit/package/project-files/__path__/package.json @@ -11,8 +11,6 @@ ], "license": "MIT", "dependencies": { - }, - "peerDependencies": { "@angular-devkit/core": "0.0.0" } } diff --git a/packages/angular/pwa/package.json b/packages/angular/pwa/package.json index 3abd668d0a..946e0afd70 100644 --- a/packages/angular/pwa/package.json +++ b/packages/angular/pwa/package.json @@ -12,11 +12,9 @@ }, "schematics": "./collection.json", "dependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0", "@schematics/angular": "0.0.0", "typescript": "~2.6.2" - }, - "peerDependencies": { - "@angular-devkit/core": "0.0.0", - "@angular-devkit/schematics": "0.0.0" } -} +} \ No newline at end of file diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json index b963d8fffb..a9c0d5004b 100644 --- a/packages/angular_devkit/architect/package.json +++ b/packages/angular_devkit/architect/package.json @@ -8,9 +8,7 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "dependencies": { + "@angular-devkit/core": "0.0.0", "rxjs": "^6.0.0-beta.3" - }, - "peerDependencies": { - "@angular-devkit/core": "0.0.0" } } \ No newline at end of file diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 2b85cf6c44..c3cfde8549 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -16,10 +16,8 @@ "schematics" ], "dependencies": { + "@angular-devkit/core": "0.0.0", "@ngtools/json-schema": "^1.1.0", "rxjs": "^6.0.0-beta.3" - }, - "peerDependencies": { - "@angular-devkit/core": "0.0.0" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index df7f1bb0a8..da193a9e50 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -25,11 +25,11 @@ "npm": ">= 5.5.1" }, "dependencies": { + "@angular-devkit/core": "0.0.0", "tree-kill": "^1.0.0", "webpack-sources": "^1.1.0" }, "peerDependencies": { - "@angular-devkit/core": "0.0.0", "typescript": "~2.5.0 || ~2.6.0 || ~2.7.0", "webpack": "^4.0.0" } diff --git a/packages/schematics/angular/package.json b/packages/schematics/angular/package.json index 9cf10dc6fd..1fa4e032fd 100644 --- a/packages/schematics/angular/package.json +++ b/packages/schematics/angular/package.json @@ -12,10 +12,8 @@ }, "schematics": "./collection.json", "dependencies": { - "typescript": "~2.6.2" - }, - "peerDependencies": { "@angular-devkit/core": "0.0.0", - "@angular-devkit/schematics": "0.0.0" + "@angular-devkit/schematics": "0.0.0", + "typescript": "~2.6.2" } } diff --git a/packages/schematics/package_update/package.json b/packages/schematics/package_update/package.json index 5399a61168..32b74ab808 100644 --- a/packages/schematics/package_update/package.json +++ b/packages/schematics/package_update/package.json @@ -13,12 +13,10 @@ }, "schematics": "./collection.json", "dependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0", "semver": "^5.3.0", "semver-intersect": "^1.1.2", "rxjs": "^6.0.0-beta.3" - }, - "peerDependencies": { - "@angular-devkit/core": "0.0.0", - "@angular-devkit/schematics": "0.0.0" } -} +} \ No newline at end of file diff --git a/packages/schematics/schematics/package.json b/packages/schematics/schematics/package.json index 7be96e5c32..0a9ec071fb 100644 --- a/packages/schematics/schematics/package.json +++ b/packages/schematics/schematics/package.json @@ -12,7 +12,7 @@ "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" }, "schematics": "./collection.json", - "peerDependencies": { + "dependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0" } diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index b0eb62e25b..d8f65c409a 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -13,12 +13,10 @@ }, "schematics": "./collection.json", "dependencies": { + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0", "semver": "^5.3.0", "semver-intersect": "^1.1.2", "rxjs": "^6.0.0-beta.3" - }, - "peerDependencies": { - "@angular-devkit/core": "0.0.0", - "@angular-devkit/schematics": "0.0.0" } -} +} \ No newline at end of file From 46cf2b2a2ad886bda4bdbf069e162e059e4c4c9f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 17:47:28 -0700 Subject: [PATCH 377/724] fix(@angular-devkit/build-angular): add alias for --open on dev-server Fix https://github.com/angular/angular-cli/issues/10196 --- .../angular_devkit/build_angular/src/dev-server/schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/schema.json b/packages/angular_devkit/build_angular/src/dev-server/schema.json index 56d6902bd2..7cff55f8a6 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/schema.json +++ b/packages/angular_devkit/build_angular/src/dev-server/schema.json @@ -37,7 +37,8 @@ "open": { "type": "boolean", "description": "Opens the url in default browser.", - "default": false + "default": false, + "alias": "o" }, "liveReload": { "type": "boolean", From 947274f38b9d0a88292c35801eb08c34f3786512 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 17:05:18 -0700 Subject: [PATCH 378/724] fix(@schematics/angular): update serviceWorker flag It is only added if it was specified AND for production configurations. Fix https://github.com/angular/angular-cli/issues/10198 --- .../angular/migrations/update-6/index.ts | 8 +++++--- .../angular/migrations/update-6/index_spec.ts | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 1472bfb5e4..6fc75e8abd 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -232,6 +232,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { function _buildConfigurations(): JsonObject { const source = app.environmentSource; const environments = app.environments; + const serviceWorker = app.serviceWorker; if (!environments) { return {}; @@ -275,6 +276,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { } : {} ), + ...(isProduction && serviceWorker ? { serviceWorker: true } : {}), fileReplacements: [ { src: `${app.root}/${source}`, @@ -340,9 +342,9 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { const buildOptions: JsonObject = { // Make outputPath relative to root. outputPath: outDir, - index: appRoot + '/' + app.index || defaults.index, - main: appRoot + '/' + app.main || defaults.main, - tsConfig: appRoot + '/' + app.tsconfig || defaults.tsConfig, + index: `${appRoot}/${app.index || defaults.index}`, + main: `${appRoot}/${app.main || defaults.main}`, + tsConfig: `${appRoot}/${app.tsconfig || defaults.tsConfig}`, ...buildDefaults, }; diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index b587b06231..be715b557d 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -11,7 +11,6 @@ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/te import * as path from 'path'; -// tslint:disable:max-line-length describe('Migration to v6', () => { const schematicRunner = new SchematicTestRunner( 'migrations', @@ -533,6 +532,17 @@ describe('Migration to v6', () => { }); }); + it('should add serviceWorker to production configuration', () => { + baseConfig.apps[0].serviceWorker = true; + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + expect(config.projects.foo.architect.build.options.serviceWorker).toBeUndefined(); + expect( + config.projects.foo.architect.build.configurations.production.serviceWorker, + ).toBe(true); + }); + it('should set the serve target', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); @@ -580,7 +590,8 @@ describe('Migration to v6', () => { const tslint = getConfig(tree).projects.foo.architect['lint']; expect(tslint.builder).toEqual('@angular-devkit/build-angular:tslint'); expect(tslint.options).toBeDefined(); - expect(tslint.options.tsConfig).toEqual(['src/tsconfig.app.json', 'src/tsconfig.spec.json']); + expect(tslint.options.tsConfig) + .toEqual(['src/tsconfig.app.json', 'src/tsconfig.spec.json']); expect(tslint.options.exclude).toEqual([ '**/node_modules/**' ]); }); }); From e0b69a8e24cb8fe22ad2cc32878f074d90987750 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 16:41:46 -0700 Subject: [PATCH 379/724] feat(@angular-devkit/core): Add a Pattern Matchin and replacement Host This compliments the AliasHost, and cover the usecase that is blocking NativeScript. --- .../core/src/virtual-fs/host/index.ts | 1 + .../core/src/virtual-fs/host/pattern.ts | 96 +++++++++++++++++++ .../core/src/virtual-fs/host/pattern_spec.ts | 44 +++++++++ 3 files changed, 141 insertions(+) create mode 100644 packages/angular_devkit/core/src/virtual-fs/host/pattern.ts create mode 100644 packages/angular_devkit/core/src/virtual-fs/host/pattern_spec.ts diff --git a/packages/angular_devkit/core/src/virtual-fs/host/index.ts b/packages/angular_devkit/core/src/virtual-fs/host/index.ts index a1973c868f..a49abead81 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/index.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/index.ts @@ -10,6 +10,7 @@ export * from './alias'; export * from './buffer'; export * from './interface'; export * from './memory'; +export * from './pattern'; export * from './scoped'; export * from './sync'; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/pattern.ts b/packages/angular_devkit/core/src/virtual-fs/host/pattern.ts new file mode 100644 index 0000000000..8b6304f5d8 --- /dev/null +++ b/packages/angular_devkit/core/src/virtual-fs/host/pattern.ts @@ -0,0 +1,96 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Observable } from 'rxjs'; +import { Path, PathFragment } from '../path'; +import { + FileBuffer, + Host, + HostCapabilities, + HostWatchEvent, + HostWatchOptions, + Stats, +} from './interface'; + + +export type ReplacementFunction = (path: Path) => Path; + + +/** + */ +export class PatternMatchingHost implements Host { + protected _patterns = new Map(); + + constructor(protected _delegate: Host) {} + + addPattern(pattern: string | string[], replacementFn: ReplacementFunction) { + // Simple GLOB pattern replacement. + const reString = '^(' + + (Array.isArray(pattern) ? pattern : [pattern]) + .map(ex => '(' + + ex.split(/[\/\\]/g).map(f => f + .replace(/[\-\[\]{}()+?.^$|]/g, '\\$&') + .replace(/^\*\*/g, '(.+?)?') + .replace(/\*/g, '[^/\\\\]*')) + .join('[\/\\\\]') + + ')') + .join('|') + + ')($|/|\\\\)'; + + this._patterns.set(new RegExp(reString), replacementFn); + } + + protected _resolve(path: Path) { + let newPath = path; + this._patterns.forEach((fn, re) => { + if (re.test(path)) { + newPath = fn(newPath); + } + }); + + return newPath; + } + + get capabilities(): HostCapabilities { return this._delegate.capabilities; } + + write(path: Path, content: FileBuffer): Observable { + return this._delegate.write(this._resolve(path), content); + } + read(path: Path): Observable { + return this._delegate.read(this._resolve(path)); + } + delete(path: Path): Observable { + return this._delegate.delete(this._resolve(path)); + } + rename(from: Path, to: Path): Observable { + return this._delegate.rename(this._resolve(from), this._resolve(to)); + } + + list(path: Path): Observable { + return this._delegate.list(this._resolve(path)); + } + + exists(path: Path): Observable { + return this._delegate.exists(this._resolve(path)); + } + isDirectory(path: Path): Observable { + return this._delegate.isDirectory(this._resolve(path)); + } + isFile(path: Path): Observable { + return this._delegate.isFile(this._resolve(path)); + } + + // Some hosts may not support stat. + stat(path: Path): Observable> | null { + return this._delegate.stat(this._resolve(path)); + } + + // Some hosts may not support watching. + watch(path: Path, options?: HostWatchOptions): Observable | null { + return this._delegate.watch(this._resolve(path), options); + } +} diff --git a/packages/angular_devkit/core/src/virtual-fs/host/pattern_spec.ts b/packages/angular_devkit/core/src/virtual-fs/host/pattern_spec.ts new file mode 100644 index 0000000000..23d2fcfd06 --- /dev/null +++ b/packages/angular_devkit/core/src/virtual-fs/host/pattern_spec.ts @@ -0,0 +1,44 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { normalize } from '..'; +import { stringToFileBuffer } from './buffer'; +import { SimpleMemoryHost } from './memory'; +import { PatternMatchingHost } from './pattern'; + +describe('PatternMatchingHost', () => { + it('works for NativeScript', () => { + const content = stringToFileBuffer('hello world'); + const content2 = stringToFileBuffer('hello world 2'); + + const host = new SimpleMemoryHost(); + host.write(normalize('/some/file.tns.ts'), content).subscribe(); + + const pHost = new PatternMatchingHost(host); + pHost.read(normalize('/some/file.tns.ts')) + .subscribe(x => expect(x).toBe(content)); + + pHost.addPattern('**/*.tns.ts', path => { + return normalize(path.replace(/\.tns\.ts$/, '.ts')); + }); + + // This file will not exist because /some/file.ts does not exist. + try { + pHost.read(normalize('/some/file.tns.ts')) + .subscribe(undefined, err => { + expect(err.message).toMatch(/does not exist/); + }); + } catch (e) { + // Ignore it. RxJS <6 still throw errors when they happen synchronously. + } + + // Create the file, it should exist now. + pHost.write(normalize('/some/file.ts'), content2).subscribe(); + pHost.read(normalize('/some/file.tns.ts')) + .subscribe(x => expect(x).toBe(content2)); + }); +}); From 667ed43e80a444050880abfdbf04a55a28c79f04 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 16:42:39 -0700 Subject: [PATCH 380/724] test(@angular-devkit/schematics): add an example and test for custom tslint rules Material and RxJS were asking for those. This Spec is used as an example until we get proper documentation. --- .../tasks/tslint-fix/executor_spec.ts | 61 +++++++++++++++++++ .../tasks/tslint-fix/test/collection.json | 4 ++ .../tasks/tslint-fix/test/custom-rule.ts | 30 +++++++++ .../tslint-fix/test/rules/customRuleRule.js | 34 +++++++++++ 4 files changed, 129 insertions(+) create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/test/custom-rule.ts create mode 100644 packages/angular_devkit/schematics/tasks/tslint-fix/test/rules/customRuleRule.js diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts index 8c320a6a3c..467d953bb2 100644 --- a/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/executor_spec.ts @@ -70,4 +70,65 @@ describe('TsLintTaskExecutor', () => { ).subscribe(undefined, done.fail, done); }); + it('supports custom rules in the project (pass)', done => { + const testRunner = new SchematicTestRunner( + '@_/test', + path.join(__dirname, 'test/collection.json'), + ); + + const host = new TempScopedNodeJsSyncHost(); + host.write(normalize('/file.ts'), virtualFs.stringToFileBuffer(` + console.log('hello world'); + `)).subscribe(); + const tree = new UnitTestTree(new HostTree(host)); + + const messages: string[] = []; + + concat( + testRunner.runSchematicAsync('custom-rule', { shouldPass: true }, tree), + new Observable(obs => { + process.chdir(getSystemPath(host.root)); + testRunner.logger.subscribe(x => messages.push(x.message)); + testRunner.engine.executePostTasks().subscribe(obs); + }), + ).subscribe(undefined, done.fail, done); + }); + + it('supports custom rules in the project (fail)', done => { + const testRunner = new SchematicTestRunner( + '@_/test', + path.join(__dirname, 'test/collection.json'), + ); + + const host = new TempScopedNodeJsSyncHost(); + host.write(normalize('/file.ts'), virtualFs.stringToFileBuffer(` + console.log('hello world'); + `)).subscribe(); + const tree = new UnitTestTree(new HostTree(host)); + + const messages: string[] = []; + let error = false; + + concat( + testRunner.runSchematicAsync('custom-rule', { shouldPass: false }, tree), + new Observable(obs => { + process.chdir(getSystemPath(host.root)); + testRunner.logger.subscribe(x => messages.push(x.message)); + testRunner.engine.executePostTasks().subscribe(obs); + }).pipe( + catchError(() => { + error = true; + + return []; + }), + ), + new Observable(obs => { + expect(messages.find(msg => /\bcustom-rule fail\b/.test(msg))).not.toBeUndefined(); + expect(error).toBe(true); + + obs.complete(); + }), + ).subscribe(undefined, done.fail, done); + }); + }); diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json b/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json index 1cd8606d83..128ff4793b 100644 --- a/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json @@ -1,5 +1,9 @@ { "schematics": { + "custom-rule": { + "description": ".", + "factory": "./custom-rule" + }, "run-task": { "description": ".", "factory": "./run-task" diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/test/custom-rule.ts b/packages/angular_devkit/schematics/tasks/tslint-fix/test/custom-rule.ts new file mode 100644 index 0000000000..d8c2339118 --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/test/custom-rule.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { + Rule, + SchematicContext, + Tree, +} from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies +import { + TslintFixTask, +} from '@angular-devkit/schematics/tasks'; // tslint:disable-line:no-implicit-dependencies +import * as path from 'path'; + +export default function(options: { shouldPass: boolean }): Rule { + return (_: Tree, context: SchematicContext) => { + context.addTask(new TslintFixTask({ + rulesDirectory: path.join(__dirname, 'rules'), + rules: { + 'custom-rule': [true, options.shouldPass], + }, + }, { + includes: '*.ts', + silent: false, + })); + }; +} diff --git a/packages/angular_devkit/schematics/tasks/tslint-fix/test/rules/customRuleRule.js b/packages/angular_devkit/schematics/tasks/tslint-fix/test/rules/customRuleRule.js new file mode 100644 index 0000000000..68c4882e0f --- /dev/null +++ b/packages/angular_devkit/schematics/tasks/tslint-fix/test/rules/customRuleRule.js @@ -0,0 +1,34 @@ +"use strict"; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const Lint = require('tslint'); + + +class Rule extends Lint.Rules.AbstractRule { + apply(sourceFile) { + const shouldPass = this.getOptions().ruleArguments[0]; + if (!shouldPass) { + return [ new Lint.RuleFailure(sourceFile, 0, 0, 'custom-rule fail', this.ruleName) ]; + } else { + return []; + } + } +} + +Rule.metadata = { + ruleName: 'custom-rule', + description: 'Test.', + rationale: 'Do not use this.', + options: [{ type: 'boolean' }], + optionsDescription: '.', + type: 'functionality', + typescriptOnly: false, +}; + +exports.Rule = Rule; From 66bf318e11b662d897b0e7a4fb475a98e8118a88 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 19:00:16 -0700 Subject: [PATCH 381/724] fix(@angular-devkit/schematics): pass the environment to git Otherwise it does not get proper settings and git cannot find the gitconfig (using HOME). Fix https://github.com/angular/angular-cli/issues/10201 --- packages/angular_devkit/schematics/tasks/repo-init/executor.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts index a7b844fea8..607abd5e06 100644 --- a/packages/angular_devkit/schematics/tasks/repo-init/executor.ts +++ b/packages/angular_devkit/schematics/tasks/repo-init/executor.ts @@ -32,6 +32,7 @@ export default function( shell: true, cwd: path.join(rootDirectory, options.workingDirectory || ''), env: { + ...process.env, ...(authorName ? { GIT_AUTHOR_NAME: authorName, GIT_COMMITTER_NAME: authorName } : {} From 2b67fe401d6debf84a7cfb29cec1f4f2de2f15d2 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 19:08:22 -0700 Subject: [PATCH 382/724] release: 6.0.0-rc.2 --- .monorepo.json | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 9fbf10a3d6..820cc3a846 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.1", + "version": "0.5.2", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.1", - "hash": "f48bf7e6bb335235b32ba8b93871ea40" + "version": "0.5.2", + "hash": "a05df7bb2586d6f26944516e743a4c18" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.1", - "hash": "bff5cf1a5c24f3b2e6ae77b7f914eab1", + "version": "0.5.2", + "hash": "a98590cb593e03071049316bc9ebc1f6", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.1", - "hash": "7e6db51ce50e3f3e0023c43b219a0dc8", + "version": "0.5.2", + "hash": "afaaeadcbfc40f2555047ee13984005c", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.1", - "hash": "f676219d440fb0f6a8aa8a15e3a3966b", + "version": "0.5.2", + "hash": "4b38c1ce30dc1c4d60bd701dd47a95c3", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.1", + "version": "0.5.2", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.1", - "hash": "6d023ba1e763ae19df7a3ab6449a124b", + "version": "0.5.2", + "hash": "7f956929636c1a723e80029b363d22b1", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.1", - "hash": "ed902de362dd11885d52f18b309eccf2", + "version": "0.5.2", + "hash": "6140decb465e1aa7ede1b1eaa468ca83", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.1", - "hash": "4f78f23e3b3a8fcf1578869d090612ba", + "version": "0.5.2", + "hash": "62d03dcaab652f41f88133a7307672c4", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.1", - "hash": "5806d6a0edb65bd57912ba3080dd564f", + "version": "0.5.2", + "hash": "ddc0b7b8f6d98f2f9443c37813562140", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.1", - "hash": "93c99a2cf4385a312fa88a000d700f76", + "version": "0.5.2", + "hash": "9ae4f47b891cd9265558103f4399bbef", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.1", + "version": "6.0.0-rc.2.2", "section": "Misc", - "hash": "2234741f124a6478a8f018b0365b2775", + "hash": "0f0a118b1c91f679f682c002ec7bb179", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.1", - "hash": "2d2d1acff699c616ef62a4140845cca0", + "version": "0.5.2", + "hash": "de2c94e4d3abb84fd9aa91e8b7c53b38", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.1", + "version": "0.5.2", "section": "Schematics", - "hash": "85f50de4da92597ef8adb1d484107825", + "hash": "60ed3f4ac0759ec257b5281487e12f6f", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.1", + "version": "0.5.2", "section": "Schematics", - "hash": "aff7f2d8691124d3e040cbc121171d15", + "hash": "d4416fc9a68ad73e7fd46e5161ff12d5", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.1", + "version": "0.5.2", "section": "Schematics", - "hash": "f3891f8d61e106cabdd81cf2279fc6bc", + "hash": "a65a83e96a49145055ce26ca18bf3a27", "snapshotRepo": "angular/schematics-update-builds" } } From 1961b4d63f84ef909af8289ddec5f816933478d1 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 19:10:43 -0700 Subject: [PATCH 383/724] release: 6.0.0-rc.2 (take two) --- .monorepo.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 820cc3a846..7879cb9500 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,17 +42,17 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.2", + "version": "0.5.3", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.2", + "version": "0.5.3", "hash": "a05df7bb2586d6f26944516e743a4c18" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.2", + "version": "0.5.3", "hash": "a98590cb593e03071049316bc9ebc1f6", "snapshotRepo": "angular/angular-pwa-builds" }, @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.2", + "version": "0.5.3", "hash": "afaaeadcbfc40f2555047ee13984005c", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.2", + "version": "0.5.3", "hash": "4b38c1ce30dc1c4d60bd701dd47a95c3", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.2", + "version": "0.5.3", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.2", + "version": "0.5.3", "hash": "7f956929636c1a723e80029b363d22b1", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,7 +106,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.2", + "version": "0.5.3", "hash": "6140decb465e1aa7ede1b1eaa468ca83", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.2", + "version": "0.5.3", "hash": "62d03dcaab652f41f88133a7307672c4", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.2", + "version": "0.5.3", "hash": "ddc0b7b8f6d98f2f9443c37813562140", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.2", + "version": "0.5.3", "hash": "9ae4f47b891cd9265558103f4399bbef", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.2.2", + "version": "6.0.0-rc.2.3", "section": "Misc", "hash": "0f0a118b1c91f679f682c002ec7bb179", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,27 +150,27 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.2", + "version": "0.5.3", "hash": "de2c94e4d3abb84fd9aa91e8b7c53b38", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.2", + "version": "0.5.3", "section": "Schematics", "hash": "60ed3f4ac0759ec257b5281487e12f6f", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.2", + "version": "0.5.3", "section": "Schematics", "hash": "d4416fc9a68ad73e7fd46e5161ff12d5", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.2", + "version": "0.5.3", "section": "Schematics", "hash": "a65a83e96a49145055ce26ca18bf3a27", "snapshotRepo": "angular/schematics-update-builds" From b22e831ddf0c8fbc9799eb43f102b3acf9878761 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 19:12:46 -0700 Subject: [PATCH 384/724] release: 6.0.0-rc.2 (take three) Some dependency issues raised up and I had to redo the release. Three times to be sure (I was not 100% sure about the second time). --- .monorepo.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 7879cb9500..ea2f67e757 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,17 +42,17 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.3", + "version": "0.5.4", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.3", + "version": "0.5.4", "hash": "a05df7bb2586d6f26944516e743a4c18" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.3", + "version": "0.5.4", "hash": "a98590cb593e03071049316bc9ebc1f6", "snapshotRepo": "angular/angular-pwa-builds" }, @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.3", + "version": "0.5.4", "hash": "afaaeadcbfc40f2555047ee13984005c", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.3", + "version": "0.5.4", "hash": "4b38c1ce30dc1c4d60bd701dd47a95c3", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.3", + "version": "0.5.4", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.3", + "version": "0.5.4", "hash": "7f956929636c1a723e80029b363d22b1", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,7 +106,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.3", + "version": "0.5.4", "hash": "6140decb465e1aa7ede1b1eaa468ca83", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.3", + "version": "0.5.4", "hash": "62d03dcaab652f41f88133a7307672c4", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.3", + "version": "0.5.4", "hash": "ddc0b7b8f6d98f2f9443c37813562140", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.3", + "version": "0.5.4", "hash": "9ae4f47b891cd9265558103f4399bbef", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.2.3", + "version": "6.0.0-rc.2.4", "section": "Misc", "hash": "0f0a118b1c91f679f682c002ec7bb179", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,27 +150,27 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.3", + "version": "0.5.4", "hash": "de2c94e4d3abb84fd9aa91e8b7c53b38", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.3", + "version": "0.5.4", "section": "Schematics", "hash": "60ed3f4ac0759ec257b5281487e12f6f", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.3", + "version": "0.5.4", "section": "Schematics", "hash": "d4416fc9a68ad73e7fd46e5161ff12d5", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.3", + "version": "0.5.4", "section": "Schematics", "hash": "a65a83e96a49145055ce26ca18bf3a27", "snapshotRepo": "angular/schematics-update-builds" From cdadfecddd6d515793f8dc6055495615efa587e8 Mon Sep 17 00:00:00 2001 From: Christofer Steingrefer Date: Fri, 6 Apr 2018 09:19:23 +0200 Subject: [PATCH 385/724] fix(@schematics/angular): Correct paths for linting libraries --- packages/schematics/angular/library/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index df49bd0ba4..fe5c0d25f6 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -147,11 +147,11 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche }, }, lint: { - builder: '@angular-devkit/build-angular:lint', + builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ - 'projects/lib/tsconfig.lint.json', - 'projects/lib/tsconfig.spec.json', + `${projectRoot}/tsconfig.lint.json`, + `${projectRoot}/tsconfig.spec.json`, ], exclude: [ '**/node_modules/**', From ed109e521e343e0eb696406d1bc4fbdb0e7546d7 Mon Sep 17 00:00:00 2001 From: Christofer Steingrefer Date: Mon, 2 Apr 2018 09:45:46 +0200 Subject: [PATCH 386/724] refactor(@schematics/angular): remove rxjs blacklist import from tslint.json Fixes: #585 --- packages/schematics/angular/workspace/files/tslint.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/tslint.json b/packages/schematics/angular/workspace/files/tslint.json index 00e5fbecca..3ea984c776 100644 --- a/packages/schematics/angular/workspace/files/tslint.json +++ b/packages/schematics/angular/workspace/files/tslint.json @@ -18,7 +18,6 @@ "forin": true, "import-blacklist": [ true, - "rxjs", "rxjs/Rx" ], "import-spacing": true, From 4f6c73e33cd4572985672470856c3d988d76ffc3 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 21 Mar 2018 15:59:50 -0400 Subject: [PATCH 387/724] feat(@schematics/angular): update guard for rxjs 6 --- .../schematics/angular/guard/files/__name@dasherize__.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts index 781be9ea3f..3d7117391d 100644 --- a/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts +++ b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; @Injectable() export class <%= classify(name) %>Guard implements CanActivate { From 746e40251cc6dc29d2241be742bfb7b6f7df520e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 5 Apr 2018 19:14:15 +0100 Subject: [PATCH 388/724] ci: update appveyor chrome and protractor --- .appveyor.yml | 4 +++- .circleci/config.yml | 2 +- package-lock.json | 32 ++++++++++++++++---------------- package.json | 5 +++-- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bb13c6cce5..5e490c30dd 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,9 @@ install: - ps: Install-Product node $env:nodejs_version - npm install -g npm@~5.6.0 - npm install - - npm run webdriver-update + # Appveyor (via chocolatey) cannot use older versions of Chrome: + # https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/googlechrome + - npm run webdriver-update-appveyor test_script: - node --version diff --git a/.circleci/config.yml b/.circleci/config.yml index 4299fcca1a..f4addfc2d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: steps: - checkout: *post_checkout - restore_cache: *_root_package_lock_key - - run: npm run webdriver-update + - run: npm run webdriver-update-circleci - run: npm run test-large -- --code-coverage --full integration: diff --git a/package-lock.json b/package-lock.json index 3d0559772e..3b438af61d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8686,11 +8686,11 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" }, "protractor": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.0.tgz", - "integrity": "sha512-8z1TWtc/I9Kn4fkfg87DhkSAi0arul7DHBEeJ70sy66teQAeffjQED1s0Gduigme7hxHRYdYEKbhHYz28fpv5w==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.1.tgz", + "integrity": "sha512-AW9qJ0prx2QEMy1gnhJ1Sl1WBQL2R3fx/VnG09FEmWprPIQPK14t0B83OB/pAGddpxiDCAAV0KiNNLf2c2Y/lQ==", "requires": { - "@types/node": "6.0.101", + "@types/node": "6.0.104", "@types/q": "0.0.32", "@types/selenium-webdriver": "2.53.43", "blocking-proxy": "1.0.1", @@ -8708,9 +8708,9 @@ }, "dependencies": { "@types/node": { - "version": "6.0.101", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", - "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==" + "version": "6.0.104", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.104.tgz", + "integrity": "sha512-xPuI3Yeyc3u5SY7aFu6ILTJHFXo820DSfqNqYi1gxPmbpul+vLSfo3vhrY80d0+SdOYR9KdXHg6ozx4i/02LCg==" }, "adm-zip": { "version": "0.4.7", @@ -11132,7 +11132,7 @@ "resolve": "1.5.0", "semver": "5.4.1", "tslib": "1.8.1", - "tsutils": "2.16.0" + "tsutils": "2.22.2" }, "dependencies": { "chalk": { @@ -11175,9 +11175,9 @@ "optional": true }, "tsutils": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz", - "integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.22.2.tgz", + "integrity": "sha512-u06FUSulCJ+Y8a2ftuqZN6kIGqdP2yJjUPEngXqmdPND4UQfb04igcotH+dw+IFr417yP6muCLE8/5/Qlfnx0w==", "requires": { "tslib": "1.8.1" } @@ -12130,7 +12130,7 @@ "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", "requires": { "sax": "0.6.1", - "xmlbuilder": "9.0.4" + "xmlbuilder": "9.0.7" } } } @@ -13291,13 +13291,13 @@ "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "requires": { "sax": "1.2.4", - "xmlbuilder": "9.0.4" + "xmlbuilder": "9.0.7" } }, "xmlbuilder": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", - "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=" + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" }, "xmlhttprequest-ssl": { "version": "1.5.4", diff --git a/package.json b/package.json index 8ed25a0923..49005bf0bc 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "integration:build-optimizer:simple": "cd tests/@angular_devkit/build_optimizer/webpack/simple-app && npm i -q --no-save && npm run e2e && npm run benchmark", "integration:build-optimizer:aio": "cd tests/@angular_devkit/build_optimizer/webpack/aio-app && npm i -q --no-save && npm run e2e && npm run benchmark", "prepush": "node ./bin/devkit-admin hooks/pre-push", - "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.33" + "webdriver-update-appveyor": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.37", + "webdriver-update-circleci": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.33" }, "repository": { "type": "git", @@ -127,7 +128,7 @@ "postcss-import": "^11.1.0", "postcss-loader": "^2.1.1", "postcss-url": "^7.3.1", - "protractor": "^5.1.2", + "protractor": "^5.3.1", "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", From 5ff3424cc14a1b4f887ceddf6645c4c101a50eab Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 6 Apr 2018 18:13:01 +0100 Subject: [PATCH 389/724] fix(@angular-devkit/core): process schema validation errors when async Fix https://github.com/angular/angular-cli/issues/10187 --- .../core/src/json/schema/registry.ts | 21 +++++++++++++++-- .../core/src/json/schema/registry_spec.ts | 23 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 4455755403..20ccef08ed 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -23,6 +23,14 @@ import { addUndefinedDefaults } from './transforms'; import { JsonVisitor, visitJson } from './visitor'; +// This interface should be exported from ajv, but they only export the class and not the type. +interface AjvValidationError { + message: string; + errors: Array; + ajv: true; + validation: true; +} + export class CoreSchemaRegistry implements SchemaRegistry { private _ajv: ajv.Ajv; private _uriCache = new Map(); @@ -173,8 +181,17 @@ export class CoreSchemaRegistry implements SchemaRegistry { return typeof result == 'boolean' ? observableOf([updatedData, result]) - : from((result as PromiseLike) - .then(r => [updatedData, r])); + : from((result as Promise) + .then(r => [updatedData, true]) + .catch((err: Error | AjvValidationError) => { + if ((err as AjvValidationError).ajv) { + validate.errors = (err as AjvValidationError).errors; + + return Promise.resolve([updatedData, false]); + } + + return Promise.reject(err); + })); }), switchMap(([data, valid]) => { if (valid) { diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index aaf3f20f08..c13f8c323e 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -128,6 +128,29 @@ describe('CoreSchemaRegistry', () => { .subscribe(done, done.fail); }); + it('fails on invalid additionalProperties async', done => { + const registry = new CoreSchemaRegistry(); + const data = { notNum: 'foo' }; + + registry + .compile({ + $async: true, + properties: { + num: { type: 'number' }, + }, + additionalProperties: false, + }).pipe( + mergeMap(validator => validator(data)), + map(result => { + expect(result.success).toBe(false); + expect(result.errors).toContain( + 'Data path "" should NOT have additional properties (notNum).'); + }), + ) + .subscribe(done, done.fail); + }); + + // Synchronous failure is only used internally. // If it's meant to be used externally then this test should change to truly be synchronous // (i.e. not relyign on the observable). From 8e6c762c94de1c23bc8b53f1cb87b48726eda951 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 6 Apr 2018 15:55:34 -0700 Subject: [PATCH 390/724] fix(@angular-devkit/build-angular): always use absolute path for loader Otherwise webpack tries to resolve it and when using yarn will not be able to find it. Fix https://github.com/angular/angular-cli/issues/10220 --- .../angular-cli-files/models/webpack-configs/typescript.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index f2eda8ab7b..41e48c7e92 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -14,9 +14,7 @@ const SilentError = require('silent-error'); const g: any = typeof global !== 'undefined' ? global : {}; -const webpackLoader: string = g['_DevKitIsLocal'] - ? require.resolve('@ngtools/webpack') - : '@ngtools/webpack'; +const webpackLoader: string = require.resolve('@ngtools/webpack'); function _createAotPlugin( From 5168470c6fb407ae9b52b475ded11a55a23ad93b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 7 Apr 2018 18:09:16 +0100 Subject: [PATCH 391/724] revert: "fix(@angular-devkit/build-angular): always use absolute path for loader" This reverts commit 8e6c762c94de1c23bc8b53f1cb87b48726eda951. --- .../angular-cli-files/models/webpack-configs/typescript.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index 41e48c7e92..f2eda8ab7b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -14,7 +14,9 @@ const SilentError = require('silent-error'); const g: any = typeof global !== 'undefined' ? global : {}; -const webpackLoader: string = require.resolve('@ngtools/webpack'); +const webpackLoader: string = g['_DevKitIsLocal'] + ? require.resolve('@ngtools/webpack') + : '@ngtools/webpack'; function _createAotPlugin( From e07b02467814da4bc2cb940cc5ebf4db0721af83 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 7 Apr 2018 18:24:55 +0100 Subject: [PATCH 392/724] fix(@angular-devkit/build-angular): resolve loaders from build-angular node_modules first --- .../models/webpack-configs/common.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index ccc4c6453c..519c7eb71b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -176,11 +176,17 @@ export function getCommonConfig(wco: WebpackConfigOptions) { }; } - // Allow loaders to be in a node_modules nested inside the CLI package + // Allow loaders to be in a node_modules nested inside the devkit/build-angular package. + // This is important in case loaders do not get hoisted. + // If this file moves to another location, alter potentialNodeModules as well. const loaderNodeModules = ['node_modules']; - const potentialNodeModules = path.join(__dirname, '..', '..', 'node_modules'); - if (isDirectory(potentialNodeModules)) { - loaderNodeModules.push(potentialNodeModules); + const buildAngularNodeModules = findUp('node_modules', __dirname); + if (buildAngularNodeModules + && isDirectory(buildAngularNodeModules) + && buildAngularNodeModules !== nodeModules + && buildAngularNodeModules.startsWith(nodeModules) + ) { + loaderNodeModules.push(buildAngularNodeModules); } // Load rxjs path aliases. From 81bb99ceb643bd60218afbd1ab711bde1a79db66 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Mon, 9 Apr 2018 14:48:04 +0200 Subject: [PATCH 393/724] fix(@schematics/angular): remove extra comma in service Other schematics don't have extra comma: this commit aligns the service schematics with the others. --- .../__name@dasherize@if-flat__/__name@dasherize__.service.ts | 2 +- packages/schematics/angular/service/index_spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts index d517596e3b..cc5ee3e02e 100644 --- a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts +++ b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';<% if (providedIn) { %> import { <%= providedIn %> } from '<%= providedInPath %>';<% } %> @Injectable({ - providedIn: <%= providedIn || "'root'" %>, + providedIn: <%= providedIn || "'root'" %> }) export class <%= classify(name) %>Service { diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 1304788064..0d269025dd 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -59,7 +59,7 @@ describe('Service Schematic', () => { const tree = schematicRunner.runSchematic('service', options, appTree); const content = tree.readContent('/projects/bar/src/app/foo/foo.service.ts'); - expect(content).toMatch(/providedIn: 'root',/); + expect(content).toMatch(/providedIn: 'root'/); }); it('should import a specified module', () => { @@ -68,7 +68,7 @@ describe('Service Schematic', () => { const tree = schematicRunner.runSchematic('service', options, appTree); const content = tree.readContent('/projects/bar/src/app/foo/foo.service.ts'); expect(content).toMatch(/import { AppModule } from '..\/app.module'/); - expect(content).toMatch(/providedIn: AppModule,/); + expect(content).toMatch(/providedIn: AppModule/); }); it('should fail if specified module does not exist', () => { From 3579ad406b0b6737e7f4855de3e1d4c5696d4755 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 9 Apr 2018 13:28:56 +0100 Subject: [PATCH 394/724] fix(@angular-devkit/build-angular): use monorepo build-optimizer --- package.json | 1 - .../models/webpack-configs/common.ts | 12 +++++++++--- .../models/webpack-configs/typescript.ts | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 49005bf0bc..2cfcf8f2c1 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ }, "homepage": "https://github.com/angular/devkit", "dependencies": { - "@angular-devkit/build-optimizer": "^0.4.2", "@angular/animations": "^6.0.0-rc.0", "@angular/common": "^6.0.0-rc.0", "@angular/compiler": "^6.0.0-rc.0", diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 519c7eb71b..513811b4dd 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -34,6 +34,11 @@ const resolve = require('resolve'); * require('@angular-devkit/build-optimizer') */ +const g: any = typeof global !== 'undefined' ? global : {}; +export const buildOptimizerLoader: string = g['_DevKitIsLocal'] + ? require.resolve('@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader') + : '@angular-devkit/build-optimizer/webpack-loader'; + export function getCommonConfig(wco: WebpackConfigOptions) { const { root, projectRoot, buildOptions } = wco; @@ -158,8 +163,9 @@ export function getCommonConfig(wco: WebpackConfigOptions) { let buildOptimizerUseRule; if (buildOptions.buildOptimizer) { // Set the cache directory to the Build Optimizer dir, so that package updates will delete it. - const buildOptimizerDir = path.dirname( - resolve.sync('@angular-devkit/build-optimizer', { basedir: projectRoot })); + const buildOptimizerDir = g['_DevKitIsLocal'] + ? nodeModules + : path.dirname(resolve.sync('@angular-devkit/build-optimizer', { basedir: projectRoot })); const cacheDirectory = path.resolve(buildOptimizerDir, './.cache/'); buildOptimizerUseRule = { @@ -169,7 +175,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { options: { cacheDirectory } }, { - loader: '@angular-devkit/build-optimizer/webpack-loader', + loader: buildOptimizerLoader, options: { sourceMap: buildOptions.sourceMap } }, ], diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index f2eda8ab7b..ea5c208cf9 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -8,6 +8,7 @@ import { AngularCompilerPluginOptions, PLATFORM } from '@ngtools/webpack'; +import { buildOptimizerLoader } from './common'; import { WebpackConfigOptions } from '../build-options'; const SilentError = require('silent-error'); @@ -80,7 +81,7 @@ export function getAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host Date: Mon, 9 Apr 2018 14:00:20 +0100 Subject: [PATCH 395/724] build: update Angular dependencies --- package-lock.json | 111 ++++++++++++++++++++++------------------------ package.json | 29 ++++++------ 2 files changed, 69 insertions(+), 71 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3b438af61d..66deaa64a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,21 +4,10 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@angular-devkit/build-optimizer": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.4.2.tgz", - "integrity": "sha512-9DHZ60Pd0Wr1ctD5DWhAQ3B8r+KlsNgfUo/oGjg6bArd19bwuOuxiMQjH4E+aNa14HPdJRMrhc+M7VU67mW5Mg==", - "requires": { - "loader-utils": "1.1.0", - "source-map": "0.5.7", - "typescript": "2.7.2", - "webpack-sources": "1.1.0" - } - }, "@angular/animations": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.0.tgz", - "integrity": "sha512-0OeClBhZzLvHv86DrsnVnCml7PObgTjLfWMgmkjil9GX8R5P7Ha8CmSkFqw01btvwYEW1IiIAODufFL+/Rm48Q==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.3.tgz", + "integrity": "sha512-uUx8n3rnORn3pVb1sPiPYRhCETsaLLLeygPKlfqcTqdO8/hUEdumGI0hfrn0rW8qK2x2Pwxvz2qNPkn4iGgwTg==", "requires": { "tslib": "1.9.0" }, @@ -30,10 +19,18 @@ } } }, + "@angular/cdk": { + "version": "6.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.0.0-rc.1.tgz", + "integrity": "sha512-V4nJwF9uchgqi1noRSd/Jm0mZ9yzFFeYzZ5mHZ7scXo0c2sXpEclsEjsnzb6YQo4NENEig8qrjOdYI+M7bd5zQ==", + "requires": { + "tslib": "1.8.1" + } + }, "@angular/common": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.0.tgz", - "integrity": "sha512-zmsy34fmdL4Moj3zQL2C4YKBBEKUiSmYyK7GeiuvnOqQcHuom3hR/Bcg6P7dCwkkonUDtWSN+YcL7Yb5TmY0lg==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.3.tgz", + "integrity": "sha512-arc0LoT2opge2CDUXufN+TIjTUUx+N46MSWW1sKiLUzbK38E2nZ4S1RHoVDR6P7c6ruKMmaqZFJkOn6wd5Oi0w==", "requires": { "tslib": "1.9.0" }, @@ -46,9 +43,9 @@ } }, "@angular/compiler": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.0.tgz", - "integrity": "sha512-KEWTUduV0fHsVdHm34PaqVTxSohpXDQtNplsAd2U+3/2gkrQNW83CWR5Ec4fbJyZmq0RrRhycHomYks8J+KLWA==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.3.tgz", + "integrity": "sha512-ZRsAtThpSrXKQ0N64Wa7ovDXXQ333uyRKUqApNo0NskvWwURiiBU9gACR4KmJmBRo4PUyITkFnyOM+6QMFDGQQ==", "requires": { "tslib": "1.9.0" }, @@ -61,20 +58,20 @@ } }, "@angular/compiler-cli": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.0.tgz", - "integrity": "sha512-BTCZEAc/XSywiesuVS1mxRxryvngdG6hjNV396qas61+h/D9JItOTZ5nb0oHs81IPMUZg5Gv53uUG4GdrTuu0g==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.3.tgz", + "integrity": "sha512-hpVAb3BaX7TaK2iUW91poi1txZv5GeP97qX5c1vTTzGfFveGT5a5zkTee9ihCdelYIl5wBObkRrcXWjVLSXIzw==", "requires": { "chokidar": "1.7.0", "minimist": "1.2.0", "reflect-metadata": "0.1.12", - "tsickle": "0.27.2" + "tsickle": "0.27.5" } }, "@angular/core": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.0.tgz", - "integrity": "sha512-hDvP9XX7ypkK8iumvShlOGeQXTCCLpLSPGMSc9bYuaFiqC11lLmX8KVfoMbR/IYHoB1skPmeWncUMe8cTChRyQ==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.3.tgz", + "integrity": "sha512-zB6bpFNx6Iefko6HKYMSKjyB0XJj8yAgK1G/Ozzb+hbSMmkVi+HetG4v0WXg4sn2mD5NGxj+7qz7tGAzhlBgdA==", "requires": { "tslib": "1.9.0" }, @@ -87,9 +84,9 @@ } }, "@angular/http": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.0.tgz", - "integrity": "sha512-I1OLtuH5Bh27zMnl8ZX7o3cIM1wIqJwXXxRz+S0jmpPTT0suh0PrmYGi6kgwTssXx5m4/cAPtj8eDJoC9gii4w==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.3.tgz", + "integrity": "sha512-PN8W2OSeptAIJ5/CeZNGdRiTVHjuYfFSB+ZgBeWhQVBmIV5Lp5iTNDcGslEB9diMkJSNsh/jYtcA0YAFhirYhw==", "requires": { "tslib": "1.9.0" }, @@ -102,17 +99,17 @@ } }, "@angular/material": { - "version": "6.0.0-beta-0", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-beta-0.tgz", - "integrity": "sha512-DEfnVALypdLGQnJazCuc+R8oORWPD2Utj1AJHL+ffFTjumNVY3Rp/MeToW4MaGw2MvYQ13MhnudNzThV423DdQ==", + "version": "6.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-rc.1.tgz", + "integrity": "sha512-53ak9Oi3BJN0ZaYoqWHtgm0dXkmjkZrCWeOuJFy2nM0NtWObv2SUYMd7bss7bSX0GlU/gQD+aBrHF40RwfQjQw==", "requires": { "tslib": "1.8.1" } }, "@angular/platform-browser": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.0.tgz", - "integrity": "sha512-ydjCNG18PVXhtBOxJTNJ2/fELT7IDrN7fpUZh5idnyJhevc0hiFSil0PGb1LYnLyXVLLb633R9ZDfuOfrJednA==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.3.tgz", + "integrity": "sha512-uMUAImcIbunqp9DKRSqokeAYWlyYFrqQAUpJNTeksUO9zkP2rPXlUi8ogZtEybHCc9XuoByC+UgC2IOMtmS82g==", "requires": { "tslib": "1.9.0" }, @@ -125,9 +122,9 @@ } }, "@angular/platform-browser-dynamic": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.0.tgz", - "integrity": "sha512-nQ4yVl+6lifFm246NZgZ0ceZGJtk+4yBRFCLxdIpNVC1NYsfIOtJn0PDpojmiN8lxE1yEpCJLJ2hMSikDGB8Hg==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.3.tgz", + "integrity": "sha512-q5ZUvgGUuIVKx9I9++ovKXRssu5czNzr/1jgfzvh72a2+s5aVyVB8Zd164pdS6GSvi8lyApSNPBnBlRROHklbg==", "requires": { "tslib": "1.9.0" }, @@ -140,9 +137,9 @@ } }, "@angular/platform-server": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.0.tgz", - "integrity": "sha512-roJnke7VV4ryR/nsiqyOiV2UzdJnySN2u7lTuniHTKZbCSe9ZNoOT3OJMHhfakMD6hc9/mDIFHTB4ghP4Iw9wA==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.3.tgz", + "integrity": "sha512-gIzmma1RWrCwWnaqkOwaSAgNTjRASiCb5iPcOpYoAVwpbkhmRg2UWUYJNI0eDc/p4DHYyM2jET7IdbGrgy3hVw==", "requires": { "domino": "2.0.2", "tslib": "1.9.0", @@ -157,9 +154,9 @@ } }, "@angular/router": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.0.tgz", - "integrity": "sha512-7NZ34xZCEUdiPXaNaa9MeMIsggMW4GjVpiR+T5ZJ5r4Mcv3ltq+4Av+ugO7/hx6QyNMYOX1IJSr4mogp2Wt9Qg==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.3.tgz", + "integrity": "sha512-H621WrhkGayCZlr7f6V2czVAZPPXCeAXqsGjt5MWgB+MzpPP/+lrqKMhku9ZDE0OrlDucU2g34oipGoh0tJW2g==", "requires": { "tslib": "1.9.0" }, @@ -172,9 +169,9 @@ } }, "@angular/service-worker": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.0.tgz", - "integrity": "sha512-oHMkbnh7ZeWl00uKN8noeaA77IKL3LuEvqJnFBedZfILJ6Idrs8JaTmdajA50mALDUu6BGft+qRP50oh0CUfHA==", + "version": "6.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.3.tgz", + "integrity": "sha512-MQXu3XlqbtSvhBfe07kO7tJo61mMRSvcMMbO8ZmICGX3hXIwJUrAVRA6RzGIR1j67Z4nYkGIs7stZJ3nwF7GzA==", "requires": { "tslib": "1.9.0" }, @@ -1781,9 +1778,9 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codelyzer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.0.2.tgz", - "integrity": "sha512-nYwOr49+IV09e7C4aXkVALRz0+XpHqZiUUcxHuDZH4xP1FBcHINyr3qvVhv5Gfm7XRmoLx32tsIhrQhW/gBcog==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.2.1.tgz", + "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", "requires": { "app-root-path": "2.0.1", "css-selector-tokenizer": "0.7.0", @@ -9549,9 +9546,9 @@ } }, "rxjs": { - "version": "6.0.0-beta.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0-beta.3.tgz", - "integrity": "sha512-Rkc4BDr75zsX4ozYOra9E0uAn8jDlnNvE7ISx/w6P7fkREmJH3Y0Zsz0FKRdo/AjWVzqytvjN1umHlTv/Ozayg==", + "version": "6.0.0-tactical-rc.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0-tactical-rc.1.tgz", + "integrity": "sha512-PbAYwhl4VH5U4YzgzA4O5pCbDV5eBN9zNtcb8QyHXFVql3pAm3l1f+uoEcXsLlemuYdFGCYPbU+CYq9KCaIbBA==", "requires": { "tslib": "1.9.0" }, @@ -11094,9 +11091,9 @@ } }, "tsickle": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.2.tgz", - "integrity": "sha512-KW+ZgY0t2cq2Qib1sfdgMiRnk+cr3brUtzZoVWjv+Ot3jNxVorFBUH+6In6hl8Dg7BI2AAFf69NHkwvZNMSFwA==", + "version": "0.27.5", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", + "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", "requires": { "minimist": "1.2.0", "mkdirp": "0.5.1", diff --git a/package.json b/package.json index 2cfcf8f2c1..f1317a0922 100644 --- a/package.json +++ b/package.json @@ -52,18 +52,19 @@ }, "homepage": "https://github.com/angular/devkit", "dependencies": { - "@angular/animations": "^6.0.0-rc.0", - "@angular/common": "^6.0.0-rc.0", - "@angular/compiler": "^6.0.0-rc.0", - "@angular/compiler-cli": "^6.0.0-rc.0", - "@angular/core": "^6.0.0-rc.0", - "@angular/http": "^6.0.0-rc.0", - "@angular/material": "^6.0.0-beta.5", - "@angular/platform-browser": "^6.0.0-rc.0", - "@angular/platform-browser-dynamic": "^6.0.0-rc.0", - "@angular/platform-server": "^6.0.0-rc.0", - "@angular/router": "^6.0.0-rc.0", - "@angular/service-worker": "^6.0.0-rc.0", + "@angular/animations": "6.0.0-rc.3", + "@angular/cdk": "6.0.0-rc.1", + "@angular/common": "6.0.0-rc.3", + "@angular/compiler": "6.0.0-rc.3", + "@angular/compiler-cli": "6.0.0-rc.3", + "@angular/core": "6.0.0-rc.3", + "@angular/http": "6.0.0-rc.3", + "@angular/material": "6.0.0-rc.1", + "@angular/platform-browser": "6.0.0-rc.3", + "@angular/platform-browser-dynamic": "6.0.0-rc.3", + "@angular/platform-server": "6.0.0-rc.3", + "@angular/router": "6.0.0-rc.3", + "@angular/service-worker": "6.0.0-rc.3", "@ngtools/json-schema": "^1.0.9", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", @@ -86,7 +87,7 @@ "chokidar": "^1.7.0", "circular-dependency-plugin": "^5.0.0", "clean-css": "^4.1.11", - "codelyzer": "^4.0.2", + "codelyzer": "^4.2.1", "conventional-changelog": "^1.1.0", "copy-webpack-plugin": "^4.5.0", "express": "^4.16.2", @@ -131,7 +132,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^6.0.0-beta.3", + "rxjs": "^6.0.0-tactical-rc.1", "sass-loader": "^6.0.7", "semver": "^5.3.0", "semver-intersect": "^1.1.2", From 0c3a448d79371266f36aed57f93d07ae62eacb63 Mon Sep 17 00:00:00 2001 From: Miles Malerba Date: Mon, 9 Apr 2018 08:49:10 -0700 Subject: [PATCH 396/724] feat(@angular-devkit/schematics): allow package name to be specified for install task --- .../schematics/tasks/node-package/install-task.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts index d450e7a19b..21b1cf4142 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts @@ -10,6 +10,7 @@ import { NodePackageName, NodePackageTaskOptions } from './options'; export class NodePackageInstallTaskOptions { packageManager: string; + packageName: string; workingDirectory: string; quiet: boolean; } @@ -18,6 +19,7 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator); @@ -34,6 +36,9 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator Date: Mon, 9 Apr 2018 10:02:46 -0400 Subject: [PATCH 397/724] refactor: expose additional schema validation error data --- .../architect/src/architect_spec.ts | 4 +- .../core/src/json/schema/interface.ts | 41 +++++++++++++++++- .../core/src/json/schema/registry.ts | 43 ++++++++++++++++--- .../core/src/json/schema/registry_spec.ts | 15 ++++--- .../core/src/workspace/workspace.ts | 8 +--- .../core/src/workspace/workspace_spec.ts | 4 +- .../tools/schema-option-transform.ts | 6 +-- 7 files changed, 93 insertions(+), 28 deletions(-) diff --git a/packages/angular_devkit/architect/src/architect_spec.ts b/packages/angular_devkit/architect/src/architect_spec.ts index 0cbec7e4c7..a040a2793e 100644 --- a/packages/angular_devkit/architect/src/architect_spec.ts +++ b/packages/angular_devkit/architect/src/architect_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { experimental, normalize } from '@angular-devkit/core'; +import { experimental, normalize, schema } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { concatMap, tap, toArray } from 'rxjs/operators'; import { BrowserTargetOptions } from '../test/browser'; @@ -115,7 +115,7 @@ describe('Architect', () => { const targetSpec = { project: 'app', target: 'badBrowser' }; const builderConfig = architect.getBuilderConfiguration(targetSpec); architect.run(builderConfig).subscribe(undefined, (err: Error) => { - expect(err).toEqual(jasmine.any(experimental.workspace.SchemaValidationException)); + expect(err).toEqual(jasmine.any(schema.SchemaValidationException)); done(); }, done.fail); }); diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index 2e0c24c718..41aff9d094 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -12,10 +12,49 @@ export type JsonPointer = string & { __PRIVATE_DEVKIT_JSON_POINTER: void; }; +export type SchemaValidatorError = + RefValidatorError | + LimitValidatorError | + AdditionalPropertiesValidatorError | + FormatValidatorError | + RequiredValidatorError; + +export interface SchemaValidatorErrorBase { + keyword: string; + dataPath: string; + message?: string; + data?: JsonValue; +} + +export interface RefValidatorError extends SchemaValidatorErrorBase { + keyword: '$ref'; + params: { ref: string }; +} + +export interface LimitValidatorError extends SchemaValidatorErrorBase { + keyword: 'maxItems' | 'minItems' | 'maxLength' | 'minLength' | 'maxProperties' | 'minProperties'; + params: { limit: number }; +} + +export interface AdditionalPropertiesValidatorError extends SchemaValidatorErrorBase { + keyword: 'additionalProperties'; + params: { additionalProperty: string }; +} + +export interface FormatValidatorError extends SchemaValidatorErrorBase { + keyword: 'format'; + params: { format: string }; +} + +export interface RequiredValidatorError extends SchemaValidatorErrorBase { + keyword: 'required'; + params: { missingProperty: string }; +} + export interface SchemaValidatorResult { data: JsonValue; success: boolean; - errors?: string[]; + errors?: SchemaValidatorError[]; } export interface SchemaValidator { diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 20ccef08ed..22ed7a215f 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -9,6 +9,7 @@ import * as ajv from 'ajv'; import * as http from 'http'; import { Observable, from, of as observableOf } from 'rxjs'; import { concatMap, map, switchMap, tap } from 'rxjs/operators'; +import { BaseException } from '../../exception/exception'; import { PartiallyOrderedSet, isObservable } from '../../utils'; import { JsonObject, JsonValue } from '../interface'; import { @@ -16,6 +17,7 @@ import { SchemaFormatter, SchemaRegistry, SchemaValidator, + SchemaValidatorError, SchemaValidatorResult, SmartDefaultProvider, } from './interface'; @@ -31,6 +33,39 @@ interface AjvValidationError { validation: true; } +export class SchemaValidationException extends BaseException { + public readonly errors: SchemaValidatorError[]; + + constructor(errors?: SchemaValidatorError[]) { + if (!errors || errors.length === 0) { + super('Schema validation failed.'); + + return; + } + + const messages = SchemaValidationException.createMessages(errors); + super(`Schema validation failed with the following errors:\n ${messages.join('\n ')}`); + this.errors = errors; + } + + public static createMessages(errors?: SchemaValidatorError[]): string[] { + if (!errors || errors.length === 0) { + return []; + } + + const messages = errors.map((err) => { + let message = `Data path ${JSON.stringify(err.dataPath)} ${err.message}`; + if (err.keyword === 'additionalProperties') { + message += `(${err.params.additionalProperty})`; + } + + return message + '.'; + }); + + return messages; + } +} + export class CoreSchemaRegistry implements SchemaRegistry { private _ajv: ajv.Ajv; private _uriCache = new Map(); @@ -214,13 +249,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { return { data, success: false, - errors: (validate.errors || []) - .map((err) => `Data path ${JSON.stringify(err.dataPath)} ${err.message}${ - err.keyword === 'additionalProperties' && err.params - // tslint:disable-next-line:no-any - ? ` (${(err.params as any)['additionalProperty']}).` - : '.' - }`), + errors: (validate.errors || []), } as SchemaValidatorResult; }), ); diff --git a/packages/angular_devkit/core/src/json/schema/registry_spec.ts b/packages/angular_devkit/core/src/json/schema/registry_spec.ts index c13f8c323e..5ea66b8ef5 100644 --- a/packages/angular_devkit/core/src/json/schema/registry_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/registry_spec.ts @@ -121,8 +121,8 @@ describe('CoreSchemaRegistry', () => { mergeMap(validator => validator(data)), map(result => { expect(result.success).toBe(false); - expect(result.errors).toContain( - 'Data path "" should NOT have additional properties (notNum).'); + expect(result.errors && result.errors[0].message).toContain( + 'should NOT have additional properties'); }), ) .subscribe(done, done.fail); @@ -143,8 +143,9 @@ describe('CoreSchemaRegistry', () => { mergeMap(validator => validator(data)), map(result => { expect(result.success).toBe(false); - expect(result.errors).toContain( - 'Data path "" should NOT have additional properties (notNum).'); + expect(result.errors && result.errors[0].message).toContain( + 'should NOT have additional properties'); + expect(result.errors && result.errors[0].keyword).toBe('additionalProperties'); }), ) .subscribe(done, done.fail); @@ -268,8 +269,10 @@ describe('CoreSchemaRegistry', () => { mergeMap(validator => validator(data)), map(result => { expect(result.success).toBe(false); - expect(result.errors && result.errors[0]).toBe( - 'Data path ".banana" should match format "is-hotdog".'); + expect(result.errors && result.errors[0]).toBeTruthy(); + expect(result.errors && result.errors[0].keyword).toBe('format'); + expect(result.errors && result.errors[0].dataPath).toBe('.banana'); + expect(result.errors && (result.errors[0].params as any).format).toBe('is-hotdog'); }), ) .subscribe(done, done.fail); diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index d1474dbe27..f863cd78ec 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -42,12 +42,6 @@ export class ProjectToolNotFoundException extends BaseException { } } -export class SchemaValidationException extends BaseException { - constructor(errors: string[]) { - super(`Schema validation failed with the following errors:\n ${errors.join('\n ')}`); - } -} - export class WorkspaceNotYetLoadedException extends BaseException { constructor() { super(`Workspace needs to be loaded before it is used.`); } } @@ -222,7 +216,7 @@ export class Workspace { if (validatorResult.success) { return of(contentJsonCopy as T); } else { - return throwError(new SchemaValidationException(validatorResult.errors as string[])); + return throwError(new schema.SchemaValidationException(validatorResult.errors)); } }), ); diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index 3a656f895f..33f54fe414 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -7,11 +7,11 @@ */ import { tap } from 'rxjs/operators'; +import { schema } from '..'; import { NodeJsSyncHost } from '../../node'; import { join, normalize } from '../virtual-fs'; import { ProjectNotFoundException, - SchemaValidationException, Workspace, WorkspaceNotYetLoadedException, WorkspaceProject, @@ -118,7 +118,7 @@ describe('Workspace', () => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson({ foo: 'bar' }) .subscribe(undefined, (err) => { - expect(err).toEqual(jasmine.any(SchemaValidationException)); + expect(err).toEqual(jasmine.any(schema.SchemaValidationException)); done(); }, done.fail); }); diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index 63b0e4137f..b2934d1438 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -20,9 +20,9 @@ export type SchematicDesc = export class InvalidInputOptions extends BaseException { // tslint:disable-next-line:no-any - constructor(options: any, errors: string[]) { + constructor(options: any, public readonly errors: schema.SchemaValidatorError[]) { super(`Schematic input does not validate against the Schema: ${JSON.stringify(options)}\n` - + `Errors:\n ${errors.join('\n ')}`); + + `Errors:\n ${schema.SchemaValidationException.createMessages(errors).join('\n ')}`); } } @@ -59,7 +59,7 @@ export function validateOptionsWithSchema(registry: schema.SchemaRegistry) { first(), map(result => { if (!result.success) { - throw new InvalidInputOptions(options, result.errors || ['Unknown reason.']); + throw new InvalidInputOptions(options, result.errors || []); } return options; From 30f07bca3ba14d2b46359287eb1dd8914d76be7f Mon Sep 17 00:00:00 2001 From: Noel Mace Date: Mon, 9 Apr 2018 16:00:00 +0200 Subject: [PATCH 398/724] refactor(@schematics/angular): bump TS package dependency version to 2.7 should close #651 --- packages/schematics/angular/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/package.json b/packages/schematics/angular/package.json index 1fa4e032fd..81b8d7aab9 100644 --- a/packages/schematics/angular/package.json +++ b/packages/schematics/angular/package.json @@ -14,6 +14,6 @@ "dependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", - "typescript": "~2.6.2" + "typescript": ">=2.6.2 <2.8" } } From 600be1d989154ee755dfe33b1926b91851792f36 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 9 Apr 2018 17:27:25 -0700 Subject: [PATCH 399/724] fix(@angular-devkit/schematics): QoL changes for run-schematic Allow private schematics to run on the RunSchematic task. Also allow 2 arguments to the constructor which will call a schematic from the same collection. --- .../tasks/run-schematic/executor.ts | 9 ++++--- .../schematics/tasks/run-schematic/options.ts | 6 ++--- .../schematics/tasks/run-schematic/task.ts | 27 ++++++++++++++----- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts b/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts index 2e794fc9d8..dd7e144c68 100644 --- a/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts +++ b/packages/angular_devkit/schematics/tasks/run-schematic/executor.ts @@ -9,18 +9,21 @@ import { SchematicContext, TaskExecutor } from '../../src'; import { RunSchematicTaskOptions } from './options'; -export default function(): TaskExecutor { - return (options: RunSchematicTaskOptions, context: SchematicContext) => { +export default function(): TaskExecutor> { + return (options: RunSchematicTaskOptions<{}>, context: SchematicContext) => { const maybeWorkflow = context.engine.workflow; + const collection = options.collection || context.schematic.collection.description.name; if (!maybeWorkflow) { throw new Error('Need Workflow to support executing schematics as post tasks.'); } return maybeWorkflow.execute({ - collection: options.collection, + collection: collection, schematic: options.name, options: options.options, + // Allow private when calling from the same collection. + allowPrivate: collection == context.schematic.collection.description.name, }); }; } diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/options.ts b/packages/angular_devkit/schematics/tasks/run-schematic/options.ts index 7c435fb67c..a7d90f6327 100644 --- a/packages/angular_devkit/schematics/tasks/run-schematic/options.ts +++ b/packages/angular_devkit/schematics/tasks/run-schematic/options.ts @@ -7,8 +7,8 @@ */ export const RunSchematicName = 'run-schematic'; -export interface RunSchematicTaskOptions { - collection: string; +export interface RunSchematicTaskOptions { + collection: string | null; name: string; - options: object; + options: T; } diff --git a/packages/angular_devkit/schematics/tasks/run-schematic/task.ts b/packages/angular_devkit/schematics/tasks/run-schematic/task.ts index 401522526e..b8f17d3078 100644 --- a/packages/angular_devkit/schematics/tasks/run-schematic/task.ts +++ b/packages/angular_devkit/schematics/tasks/run-schematic/task.ts @@ -9,14 +9,27 @@ import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; import { RunSchematicName, RunSchematicTaskOptions } from './options'; -export class RunSchematicTask implements TaskConfigurationGenerator { - constructor( - protected _collection: string, - protected _schematic: string, - protected _options: object, - ) {} +export class RunSchematicTask implements TaskConfigurationGenerator> { + protected _collection: string | null; + protected _schematic: string; + protected _options: T; - toConfiguration(): TaskConfiguration { + constructor(s: string, o: T); + constructor(c: string, s: string, o: T); + + constructor(c: string | null, s: string | T, o?: T) { + if (arguments.length == 2 || typeof s !== 'string') { + o = s as T; + s = c as string; + c = null; + } + + this._collection = c; + this._schematic = s as string; + this._options = o as T; + } + + toConfiguration(): TaskConfiguration> { return { name: RunSchematicName, options: { From 6887b19c6697674014d6c2f2b914b430b5318d41 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 11:58:12 +0100 Subject: [PATCH 400/724] fix(@ngtools/webpack): always set cached assets --- .../ngtools/webpack/src/resource_loader.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/ngtools/webpack/src/resource_loader.ts b/packages/ngtools/webpack/src/resource_loader.ts index ada1ffd7f7..7535865677 100644 --- a/packages/ngtools/webpack/src/resource_loader.ts +++ b/packages/ngtools/webpack/src/resource_loader.ts @@ -26,8 +26,9 @@ interface CompilationOutput { export class WebpackResourceLoader { private _parentCompilation: any; private _context: string; - private _resourceDependencies = new Map(); - private _cachedResources = new Map(); + private _fileDependencies = new Map(); + private _cachedSources = new Map(); + private _cachedEvaluatedSources = new Map(); constructor() {} @@ -37,7 +38,7 @@ export class WebpackResourceLoader { } getResourceDependencies(filePath: string) { - return this._resourceDependencies.get(filePath) || []; + return this._fileDependencies.get(filePath) || []; } private _compile(filePath: string): Promise { @@ -64,7 +65,9 @@ export class WebpackResourceLoader { childCompiler.hooks.thisCompilation.tap('ngtools-webpack', (compilation: any) => { compilation.hooks.additionalAssets.tapAsync('ngtools-webpack', (callback: (err?: Error) => void) => { - if (this._cachedResources.has(compilation.fullHash)) { + if (this._cachedEvaluatedSources.has(compilation.fullHash)) { + const cachedEvaluatedSource = this._cachedEvaluatedSources.get(compilation.fullHash); + compilation.assets[filePath] = cachedEvaluatedSource; callback(); return; @@ -74,7 +77,9 @@ export class WebpackResourceLoader { if (asset) { this._evaluate({ outputName: filePath, source: asset.source() }) .then(output => { - compilation.assets[filePath] = new RawSource(output); + const evaluatedSource = new RawSource(output); + this._cachedEvaluatedSources.set(compilation.fullHash, evaluatedSource); + compilation.assets[filePath] = evaluatedSource; callback(); }) .catch(err => callback(err)); @@ -103,15 +108,16 @@ export class WebpackResourceLoader { }); // Save the dependencies for this resource. - this._resourceDependencies.set(filePath, childCompilation.fileDependencies); + this._fileDependencies.set(filePath, childCompilation.fileDependencies); const compilationHash = childCompilation.fullHash; - const maybeSource = this._cachedResources.get(compilationHash); + const maybeSource = this._cachedSources.get(compilationHash); if (maybeSource) { resolve({ outputName: filePath, source: maybeSource }); } else { const source = childCompilation.assets[filePath].source(); - this._cachedResources.set(compilationHash, source); + this._cachedSources.set(compilationHash, source); + resolve({ outputName: filePath, source }); } } From d1021e81e01a58c98dab29decb1b865b3f19ed85 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 12:34:36 +0100 Subject: [PATCH 401/724] fix(@ngtools/webpack): get resource deps with denormalized path --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 0adea258e4..4d5e6e4ed1 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -960,7 +960,7 @@ export class AngularCompilerPlugin { const uniqueDependencies = new Set([ ...esImports, ...resourceImports, - ...this.getResourceDependencies(resolvedFileName), + ...this.getResourceDependencies(this._compilerHost.denormalizePath(resolvedFileName)), ].map((p) => p && this._compilerHost.denormalizePath(p))); return [...uniqueDependencies] From 42f462f77453dd5fe57c529d52417f6dde514e1a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 12:43:40 +0100 Subject: [PATCH 402/724] fix(@ngtools/webpack): fix resource import path resolution Fix https://github.com/angular/angular-cli/issues/10240 --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 4d5e6e4ed1..58318ccf4d 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -8,7 +8,7 @@ // TODO: fix webpack typings. // tslint:disable-next-line:no-global-tslint-disable // tslint:disable:no-any -import { virtualFs } from '@angular-devkit/core'; +import { dirname, normalize, resolve, virtualFs } from '@angular-devkit/core'; import { ChildProcess, ForkOptions, fork } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; @@ -954,7 +954,7 @@ export class AngularCompilerPlugin { const resourceImports = findResources(sourceFile) .map((resourceReplacement) => resourceReplacement.resourcePaths) .reduce((prev, curr) => prev.concat(curr), []) - .map((resourcePath) => path.resolve(path.dirname(resolvedFileName), resourcePath)); + .map((resourcePath) => resolve(dirname(resolvedFileName), normalize(resourcePath))); // These paths are meant to be used by the loader so we must denormalize them. const uniqueDependencies = new Set([ From f0f0a03357e6052fe8c8bbee4de0b10cdb3dc6a7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 12:45:11 +0100 Subject: [PATCH 403/724] test(@angular-devkit/build-angular): re-enable AOT factories test --- .../test/browser/rebuild_spec_large.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts index 05dfa6a17a..a6ba6c4669 100644 --- a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts @@ -201,9 +201,7 @@ describe('Browser Builder rebuilds', () => { }, Timeout.Basic); - // TODO: writing back the original content in build 4 doesn't seem to trigger a rebuild - // on windows. Figure it out when there is time. - xit('rebuilds after errors in AOT', (done) => { + it('rebuilds after errors in AOT', (done) => { // Save the original contents of `./src/app/app.component.ts`. const origContent = virtualFs.fileBufferToString( host.scopedSync().read(normalize('src/app/app.component.ts'))); @@ -265,14 +263,7 @@ describe('Browser Builder rebuilds', () => { }, Timeout.Complex); - xit('rebuilds AOT factories', (done) => { - if (process.env['APPVEYOR']) { - // TODO: appending to main.ts doesn't seem to be triggering rebuilds on windows. - // Figure it out when there is time. - done(); - - return; - } + it('rebuilds AOT factories', (done) => { host.writeMultipleFiles({ 'src/app/app.component.css': ` From 56b4a8216e72c85d5ecaf241d38aebbbc6113c9a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 13:31:18 +0100 Subject: [PATCH 404/724] test(@angular-devkit/build-angular): re-enable font-awesome test --- .../build_angular/test/browser/assets_spec_large.ts | 4 ++++ .../build_angular/test/browser/styles_spec_large.ts | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index de672f490e..5cd705258b 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -63,5 +63,9 @@ describe('Browser Builder assets', () => { }; runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + + // The node_modules folder must be deleted, otherwise code that tries to find the + // node_modules folder will hit this one and can fail. + host.scopedSync().delete(normalize('./node_modules')); }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index 9622aea375..438e93ab45 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -332,8 +332,7 @@ describe('Browser Builder styles', () => { ).subscribe(undefined, done.fail, done); }, Timeout.Basic); - // Disables a test that relies on node_modules. - xit(`supports font-awesome imports`, (done) => { + it(`supports font-awesome imports`, (done) => { host.writeMultipleFiles({ 'src/styles.scss': ` $fa-font-path: "~font-awesome/fonts"; @@ -345,10 +344,6 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - // TODO: find a way to check logger/output for warnings. - // if (stdout.match(/postcss-url: \.+: Can't read file '\.+', ignoring/)) { - // throw new Error('Expected no postcss-url file read warnings.'); - // } ).subscribe(undefined, done.fail, done); }, 30000); From 86aff35b8103b214789f6e375998d7bb39b22654 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 13:46:24 +0100 Subject: [PATCH 405/724] test(@angular-devkit/build-angular): re-enable karma es2015 test --- .../build_angular/test/karma/works_spec_large.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/karma/works_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/works_spec_large.ts index f8acacf4e3..2450482c01 100644 --- a/packages/angular_devkit/build_angular/test/karma/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/works_spec_large.ts @@ -29,9 +29,7 @@ describe('Karma Builder', () => { ).subscribe(undefined, done.fail, done); }, 30000); - // TODO: this test is failing with `TypeError: Assignment to constant variable.` errors. - // Need to investigate why. Might be TS 2.7. - xit('supports ES2015 target', (done) => { + it('supports ES2015 target', (done) => { host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"'); runTargetSpec(host, karmaTargetSpec).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), From 0689cac76602265b7bad5206b1d5b04d3c2a96ff Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 5 Apr 2018 20:53:59 -0700 Subject: [PATCH 406/724] fix(@angular-devkit/schematics-cli): allow private and reset logging queue General QoL. --- .../schematics_cli/bin/schematics.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 7a54f6acc2..6c44fc979d 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -36,6 +36,8 @@ function usage(exitCode = 0): never { Options: --debug Debug mode. This is true by default if the collection is a relative path (in that case, turn off with --debug=false). + --allowPrivate Allow private schematics to be run from the command line. Default to + false. --dry-run Do not output anything, but instead just show what actions would be performed. Default to true if debug is also true. --force Force overwriting files that would otherwise be an error. @@ -87,7 +89,15 @@ function parseSchematicName(str: string | null): { collection: string, schematic /** Parse the command line. */ -const booleanArgs = [ 'debug', 'dry-run', 'force', 'help', 'list-schematics', 'verbose' ]; +const booleanArgs = [ + 'allowPrivate', + 'debug', + 'dry-run', + 'force', + 'help', + 'list-schematics', + 'verbose', +]; const argv = minimist(process.argv.slice(2), { boolean: booleanArgs, default: { @@ -124,6 +134,7 @@ if (argv['list-schematics']) { const debug: boolean = argv.debug === null ? isLocalCollection : argv.debug; const dryRun: boolean = argv['dry-run'] === null ? debug : argv['dry-run']; const force = argv['force']; +const allowPrivate = argv['allowPrivate']; /** Create a Virtual FS Host scoped to where the process is being run. **/ const fsHost = new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(process.cwd())); @@ -137,7 +148,7 @@ let nothingDone = true; // Logging queue that receives all the messages to show the users. This only get shown when no // errors happened. -const loggingQueue: string[] = []; +let loggingQueue: string[] = []; let error = false; /** @@ -190,6 +201,7 @@ workflow.lifeCycle.subscribe(event => { loggingQueue.forEach(log => logger.info(log)); } + loggingQueue = []; error = false; } }); @@ -235,6 +247,7 @@ workflow.execute({ collection: collectionName, schematic: schematicName, options: args, + allowPrivate: allowPrivate, debug: debug, logger: logger, }) From a3a9e34db72ddf45e9e1aa6c205027726c9b7f56 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 6 Apr 2018 09:10:14 -0400 Subject: [PATCH 407/724] fix(@angular-devkit/schematics): Fix deep copy logic --- .../angular_devkit/core/src/utils/object.ts | 21 +++++++++++++++++++ .../tools/schema-option-transform.ts | 21 ++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/packages/angular_devkit/core/src/utils/object.ts b/packages/angular_devkit/core/src/utils/object.ts index b77c1a9596..b7282ddeb6 100644 --- a/packages/angular_devkit/core/src/utils/object.ts +++ b/packages/angular_devkit/core/src/utils/object.ts @@ -14,3 +14,24 @@ export function mapObject(obj: {[k: string]: T}, return acc; }, {}); } + +// tslint:disable-next-line:no-any +export function deepCopy (object: T): T { + if (Array.isArray(object)) { + // tslint:disable-next-line:no-any + return object.map((o: any) => deepCopy(o)); + } else if (typeof object === 'object') { + if (object['toJSON']) { + return JSON.parse((object['toJSON'] as () => string)()); + } + + const copy = {} as T; + for (const key of Object.keys(object)) { + copy[key] = deepCopy(object[key]); + } + + return copy; + } else { + return object; + } +} diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index b2934d1438..1a2f579351 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -7,6 +7,7 @@ */ import { BaseException, + deepCopy, schema, } from '@angular-devkit/core'; import { Observable, of as observableOf } from 'rxjs'; @@ -26,29 +27,11 @@ export class InvalidInputOptions extends BaseException { } } - -// tslint:disable-next-line:no-any -function _deepCopy(object: T): T { - return JSON.parse(JSON.stringify(object)); - // const copy = {} as T; - // for (const key of Object.keys(object)) { - // if (typeof object[key] == 'object') { - // copy[key] = _deepCopy(object[key]); - // break; - // } else { - // copy[key] = object[key]; - // } - // } - - // return copy; -} - - // This can only be used in NodeJS. export function validateOptionsWithSchema(registry: schema.SchemaRegistry) { return (schematic: SchematicDesc, options: T): Observable => { // Prevent a schematic from changing the options object by making a copy of it. - options = _deepCopy(options); + options = deepCopy(options); if (schematic.schema && schematic.schemaJson) { // Make a deep copy of options. From 6c65b58aaf5f03daa87eac1161b3d6f4cb6da572 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 10 Apr 2018 09:57:29 -0700 Subject: [PATCH 408/724] release: 0.5.5 --- .monorepo.json | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index ea2f67e757..ddce997115 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.4", + "version": "0.5.5", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.4", - "hash": "a05df7bb2586d6f26944516e743a4c18" + "version": "0.5.5", + "hash": "28898958350e070a894e2bafce67068b" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.4", - "hash": "a98590cb593e03071049316bc9ebc1f6", + "version": "0.5.5", + "hash": "0f1fe3107ec4916c0b43aa663286428a", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.4", - "hash": "afaaeadcbfc40f2555047ee13984005c", + "version": "0.5.5", + "hash": "d241f3547369439bf53f26023e83237a", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.4", - "hash": "4b38c1ce30dc1c4d60bd701dd47a95c3", + "version": "0.5.5", + "hash": "510ad1ca290ac6c2b27010c0df18aed2", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.4", + "version": "0.5.5", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.4", - "hash": "7f956929636c1a723e80029b363d22b1", + "version": "0.5.5", + "hash": "8bef70f3f10f42c21b1b8e6682547c3e", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.4", - "hash": "6140decb465e1aa7ede1b1eaa468ca83", + "version": "0.5.5", + "hash": "d201f8eed30db441e7d53657df6f17cf", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.4", - "hash": "62d03dcaab652f41f88133a7307672c4", + "version": "0.5.5", + "hash": "56e4ef455acfc5eb1eb9dd9850d4530f", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.4", - "hash": "ddc0b7b8f6d98f2f9443c37813562140", + "version": "0.5.5", + "hash": "d2776bfee424e1abaa5903312a72bd19", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.4", - "hash": "9ae4f47b891cd9265558103f4399bbef", + "version": "0.5.5", + "hash": "5dd23a0620ba7d29931780a74561aa22", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.2.4", + "version": "6.0.0-rc.3", "section": "Misc", - "hash": "0f0a118b1c91f679f682c002ec7bb179", + "hash": "17eb764288ab9772726be03320750adf", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.4", - "hash": "de2c94e4d3abb84fd9aa91e8b7c53b38", + "version": "0.5.5", + "hash": "9036cd537d5d51c7d59e670314da493a", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.4", + "version": "0.5.5", "section": "Schematics", - "hash": "60ed3f4ac0759ec257b5281487e12f6f", + "hash": "7bf87a8befff9781069a091755adf9c1", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.4", + "version": "0.5.5", "section": "Schematics", - "hash": "d4416fc9a68ad73e7fd46e5161ff12d5", + "hash": "0bf472fe5c82e896f646be946e508185", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.4", + "version": "0.5.5", "section": "Schematics", - "hash": "a65a83e96a49145055ce26ca18bf3a27", + "hash": "58e309396c0cd83d723ff4dc9576f1e1", "snapshotRepo": "angular/schematics-update-builds" } } From a0c9a612da8dd06a90bf8e82f16d4ebc8cd05e85 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Tue, 10 Apr 2018 11:36:31 -0400 Subject: [PATCH 409/724] fix(@schematics/angular): update script should remove rxjs from the import blacklist fixes angular/angular-cli#10259 --- .../angular/migrations/update-6/index.ts | 23 +++++++++++++ .../angular/migrations/update-6/index_spec.ts | 32 +++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 6fc75e8abd..0bba17703e 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -543,6 +543,28 @@ function updatePackageJson(packageManager?: string) { }; } +function updateTsLintConfig(): Rule { + return (host: Tree, context: SchematicContext) => { + const tsLintPath = '/tslint.json'; + const buffer = host.read(tsLintPath); + if (!buffer) { + return; + } + const tsCfg = JSON.parse(buffer.toString()); + + if (tsCfg.rules && tsCfg.rules['import-blacklist'] && + tsCfg.rules['import-blacklist'].indexOf('rxjs') !== -1) { + + tsCfg.rules['import-blacklist'] = tsCfg.rules['import-blacklist'] + .filter((rule: string | boolean) => rule !== 'rxjs'); + + host.overwrite(tsLintPath, JSON.stringify(tsCfg, null, 2)); + } + + return host; + }; +} + export default function (): Rule { return (host: Tree, context: SchematicContext) => { const configPath = getConfigPath(host); @@ -557,6 +579,7 @@ export default function (): Rule { migrateConfiguration(config), updateSpecTsConfig(config), updatePackageJson(config.packageManager), + updateTsLintConfig(), ])(host, context); }; } diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index be715b557d..d5ae8f0853 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -688,4 +688,36 @@ describe('Migration to v6', () => { expect(pkg.devDependencies['@angular-devkit/build-angular']).toBeDefined(); }); }); + + describe('tslint.json', () => { + const tslintPath = '/tslint.json'; + // tslint:disable-next-line:no-any + let tslintConfig: any; + beforeEach(() => { + tslintConfig = { + rules: { + 'import-blacklist': ['rxjs'], + }, + }; + }); + + it('should remove "rxjs" from the "import-blacklist" rule', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree.create(tslintPath, JSON.stringify(tslintConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = JSON.parse(tree.readContent(tslintPath)); + const blacklist = tslint.rules['import-blacklist']; + expect(blacklist).toEqual([]); + }); + + it('should work if "rxjs" is not in the "import-blacklist" rule', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tslintConfig.rules['import-blacklist'] = []; + tree.create(tslintPath, JSON.stringify(tslintConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = JSON.parse(tree.readContent(tslintPath)); + const blacklist = tslint.rules['import-blacklist']; + expect(blacklist).toEqual([]); + }); + }); }); From e7a32db24492fbe1fbb57c820240e326a6db186a Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Tue, 10 Apr 2018 17:46:24 -0400 Subject: [PATCH 410/724] fix(@schematics/angular): Update CLI schematic should convert server apps fixes #659 --- .../angular/migrations/update-6/index.ts | 26 +++++++- .../angular/migrations/update-6/index_spec.ts | 61 +++++++++++++++++-- 2 files changed, 80 insertions(+), 7 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 0bba17703e..0984ada05b 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -28,6 +28,9 @@ const defaults = { karma: 'karma.conf.js', protractor: 'protractor.conf.js', testTsConfig: 'tsconfig.spec.json', + serverOutDir: 'dist-server', + serverMain: 'main.server.ts', + serverTsConfig: 'tsconfig.server.json', }; function getConfigPath(tree: Tree): Path { @@ -195,8 +198,11 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { const apps = config.apps || []; // convert the apps to projects - const projectMap = apps - .map((app: AppConfig, idx: number) => { + const browserApps = apps.filter(app => app.platform !== 'server'); + const serverApps = apps.filter(app => app.platform === 'server'); + + const projectMap = browserApps + .map((app, idx) => { const defaultAppName = idx === 0 ? defaultAppNamePrefix : `${defaultAppNamePrefix}${idx}`; const name = app.name || defaultAppName; const outDir = app.outDir || defaults.outDir; @@ -440,6 +446,22 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { options: lintOptions, }; + // server target + const serverApp = serverApps + .filter(serverApp => app.root === serverApp.root && app.index === serverApp.index)[0]; + + if (serverApp) { + const serverOptions: JsonObject = { + outputPath: serverApp.outDir || defaults.serverOutDir, + main: serverApp.main || defaults.serverMain, + tsConfig: serverApp.tsconfig || defaults.serverTsConfig, + }; + const serverTarget: JsonObject = { + builder: '@angular-devkit/build-angular:server', + options: serverOptions, + }; + architect.server = serverTarget; + } const e2eProject: JsonObject = { root: project.root, projectType: 'application', diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index d5ae8f0853..9a5a0b3f85 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -107,6 +107,11 @@ describe('Migration to v6', () => { tree.create('/src/favicon.ico', ''); }); + // tslint:disable-next-line:no-any + function getConfig(tree: UnitTestTree): any { + return JSON.parse(tree.readContent(configPath)); + } + describe('file creation/deletion', () => { it('should delete the old config file', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); @@ -123,11 +128,6 @@ describe('Migration to v6', () => { }); describe('config file contents', () => { - // tslint:disable-next-line:no-any - function getConfig(tree: UnitTestTree): any { - return JSON.parse(tree.readContent(configPath)); - } - it('should set root values', () => { tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); @@ -720,4 +720,55 @@ describe('Migration to v6', () => { expect(blacklist).toEqual([]); }); }); + + describe('server/universal apps', () => { + let serverApp; + beforeEach(() => { + serverApp = { + platform: 'server', + root: 'src', + outDir: 'dist/server', + assets: [ + 'assets', + 'favicon.ico', + ], + index: 'index.html', + main: 'main.server.ts', + test: 'test.ts', + tsconfig: 'tsconfig.server.json', + testTsconfig: 'tsconfig.spec.json', + prefix: 'app', + styles: [ + 'styles.css', + ], + scripts: [], + environmentSource: 'environments/environment.ts', + environments: { + dev: 'environments/environment.ts', + prod: 'environments/environment.prod.ts', + }, + }; + baseConfig.apps.push(serverApp); + }); + + it('should not create a separate app for server apps', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + const appCount = Object.keys(config.projects).length; + expect(appCount).toEqual(2); + }); + + it('should create a server target', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + const target = config.projects.foo.architect.server; + expect(target).toBeDefined(); + expect(target.builder).toEqual('@angular-devkit/build-angular:server'); + expect(target.options.outputPath).toEqual('dist/server'); + expect(target.options.main).toEqual('main.server.ts'); + expect(target.options.tsConfig).toEqual('tsconfig.server.json'); + }); + }); }); From cfbe528c41f9b75f2598ea97f8541476ac6d505d Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 10 Apr 2018 15:16:03 -0700 Subject: [PATCH 411/724] fix(@schematics/update): show message when nothing to do Fix https://github.com/angular/angular-cli/issues/10251 --- packages/schematics/update/update/index.ts | 56 ++++++++++++++-------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index f762762d2b..9726726774 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -331,6 +331,30 @@ function _usageMessage( infoMap: Map, logger: logging.LoggerApi, ) { + const packagesToUpdate = [...infoMap.entries()] + .sort() + .map(([name, info]) => { + const tag = options.next ? 'next' : 'latest'; + const version = info.npmPackageJson['dist-tags'][tag]; + const target = info.npmPackageJson.versions[version]; + + return [ + name, + info, + version, + target, + ] as [string, PackageInfo, string, JsonSchemaForNpmPackageJsonFiles]; + }) + .filter(([name, info, version, target]) => { + return (target && semver.compare(info.installed.version, version) < 0); + }); + + if (packagesToUpdate.length == 0) { + logger.info('We analyzed your package.json and everything seems to be in order. Good work!'); + + return of(undefined); + } + logger.info( 'We analyzed your package.json, there are some packages to update:\n', ); @@ -349,26 +373,20 @@ function _usageMessage( ); logger.info(' ' + '-'.repeat(namePad * 2 + 35)); - [...infoMap.entries()].sort().forEach(([name, info]) => { - const tag = options.next ? 'next' : 'latest'; - const version = info.npmPackageJson['dist-tags'][tag]; - const target = info.npmPackageJson.versions[version]; - - if (target && semver.compare(info.installed.version, version) < 0) { - let command = `npm install ${name}`; - if (target && target['ng-update']) { - // Show the ng command only when migrations are supported, otherwise it's a fancy - // npm install, really. - command = `ng update ${name}`; - } - - logger.info( - ' ' - + name.padEnd(namePad) - + `${info.installed.version} -> ${version}`.padEnd(25) - + ' ' + command, - ); + packagesToUpdate.forEach(([name, info, version, target]) => { + let command = `npm install ${name}`; + if (target && target['ng-update']) { + // Show the ng command only when migrations are supported, otherwise it's a fancy + // npm install, really. + command = `ng update ${name}`; } + + logger.info( + ' ' + + name.padEnd(namePad) + + `${info.installed.version} -> ${version}`.padEnd(25) + + ' ' + command, + ); }); logger.info('\n'); From 92bbe6109e8ad63fa835c087464929200d8534d0 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 10 Apr 2018 15:17:46 -0700 Subject: [PATCH 412/724] fix(@schematics/update): only list packages that support ng-update Fix https://github.com/angular/angular-cli/issues/10273 Fix https://github.com/angular/angular-cli/issues/10249 --- packages/schematics/update/update/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 9726726774..4c81c3c4f6 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -347,6 +347,9 @@ function _usageMessage( }) .filter(([name, info, version, target]) => { return (target && semver.compare(info.installed.version, version) < 0); + }) + .filter(([, , , target]) => { + return target['ng-update']; }); if (packagesToUpdate.length == 0) { From 0a70464166d812c0f9bfc6a00619a64ae67bdbbd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 15:41:37 +0100 Subject: [PATCH 413/724] fix(@angular-devkit/build-angular): add newline on rebuilds --- .../build_angular/src/angular-cli-files/utilities/stats.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts index b7d7a345c6..6c135c3722 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts @@ -47,13 +47,13 @@ export function statsToString(json: any, statsConfig: any) { const unchangedChunkNumber = json.chunks.length - changedChunksStats.length; if (unchangedChunkNumber > 0) { - return rs(tags.stripIndents` + return '\n' + rs(tags.stripIndents` Date: ${w(new Date().toISOString())} - Hash: ${w(json.hash)} - Time: ${w('' + json.time)}ms ${unchangedChunkNumber} unchanged chunks ${changedChunksStats.join('\n')} `); } else { - return rs(tags.stripIndents` + return '\n' + rs(tags.stripIndents` Date: ${w(new Date().toISOString())} Hash: ${w(json.hash)} Time: ${w('' + json.time)}ms From 8d48293c8a6b25728a75582b082d55b9e51c3f43 Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 10 Apr 2018 18:37:03 -0700 Subject: [PATCH 414/724] feat(@schematics/update): add registry flag To allow for people that use NPM proxies or local cache and dont have access to the registry.npmjs.org Fix angular/angular-cli#10241 --- packages/schematics/update/update/index.ts | 2 +- packages/schematics/update/update/npm.ts | 23 +++++++++++++++---- packages/schematics/update/update/schema.json | 13 +++++++++++ packages/schematics/update/update/schema.ts | 1 + 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 4c81c3c4f6..2567de1a41 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -652,7 +652,7 @@ export default function(options: UpdateSchema): Rule { return observableFrom([...allDependencies.keys()]).pipe( // Grab all package.json from the npm repository. This requires a lot of HTTP calls so we // try to parallelize as many as possible. - mergeMap(depName => getNpmPackageJson(depName, logger)), + mergeMap(depName => getNpmPackageJson(depName, options.registry, logger)), // Build a map of all dependencies and their packageJson. reduce>( diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index d5edf0fa61..1f3872ee18 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -7,7 +7,9 @@ */ import { logging } from '@angular-devkit/core'; import * as http from 'http'; +import * as https from 'https'; import { Observable, ReplaySubject } from 'rxjs'; +import * as url from 'url'; import { NpmRepositoryPackageJson } from './npm-package-json'; @@ -17,24 +19,35 @@ const npmPackageJsonCache = new Map /** * Get the NPM repository's package.json for a package. This is p * @param {string} packageName The package name to fetch. + * @param {string} registryUrl The NPM Registry URL to use. * @param {LoggerApi} logger A logger instance to log debug information. * @returns An observable that will put the pacakge.json content. * @private */ export function getNpmPackageJson( packageName: string, + registryUrl: string, logger: logging.LoggerApi, ): Observable { - const url = `http://registry.npmjs.org/${packageName.replace(/\//g, '%2F')}`; + let fullUrl = new url.URL(`http://${registryUrl}/${packageName.replace(/\//g, '%2F')}`); + try { + const registry = new url.URL(registryUrl); + registry.pathname = (registry.pathname || '') + .replace(/\/?$/, '/' + packageName.replace(/\//g, '%2F')); + fullUrl = new url.URL(url.format(registry)); + } catch (_) { + } + logger.debug( - `Getting package.json from ${JSON.stringify(packageName)} (url: ${JSON.stringify(url)})...`, + `Getting package.json from ${JSON.stringify(packageName)} (url: ${JSON.stringify(fullUrl)})...`, ); - let maybeRequest = npmPackageJsonCache.get(url); + let maybeRequest = npmPackageJsonCache.get(fullUrl.toString()); if (!maybeRequest) { const subject = new ReplaySubject(1); - const request = http.request(url, response => { + const protocolPackage = (fullUrl.protocol == 'https' ? https : http) as typeof http; + const request = protocolPackage.request(fullUrl, response => { let data = ''; response.on('data', chunk => data += chunk); response.on('end', () => { @@ -51,7 +64,7 @@ export function getNpmPackageJson( request.end(); maybeRequest = subject.asObservable(); - npmPackageJsonCache.set(url, maybeRequest); + npmPackageJsonCache.set(fullUrl.toString(), maybeRequest); } return maybeRequest; diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json index 242448e403..621608cced 100644 --- a/packages/schematics/update/update/schema.json +++ b/packages/schematics/update/update/schema.json @@ -41,6 +41,19 @@ "to": { "description": "Version up to which to apply migrations. Only available with a single package being updated, and only on migrations only. Requires from to be specified. Default to the installed version detected.", "type": "string" + }, + "registry": { + "description": "The NPM registry to use. If you have an NPM proxy, you need to use this flag and set it to point to the proxy.", + "type": "string", + "oneOf": [ + { + "format": "uri" + }, + { + "format": "hostname" + } + ], + "default": "http://registry.npmjs.org/" } } } diff --git a/packages/schematics/update/update/schema.ts b/packages/schematics/update/update/schema.ts index 4890f7d3fe..2b45fd81e3 100644 --- a/packages/schematics/update/update/schema.ts +++ b/packages/schematics/update/update/schema.ts @@ -13,4 +13,5 @@ export interface UpdateSchema { migrateOnly: boolean; from?: string; to?: string; + registry: string; } From 6b479dc87eb4f81e55af17927acd049f634b0738 Mon Sep 17 00:00:00 2001 From: Maxim Salnikov Date: Wed, 11 Apr 2018 19:51:15 +0200 Subject: [PATCH 415/724] fix(@schematics/angular): Correct the service worker package dependency --- packages/schematics/angular/service-worker/index.ts | 2 +- packages/schematics/angular/service-worker/index_spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 4a24189427..c9f794edc1 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -70,7 +70,7 @@ function updateConfigFile(options: ServiceWorkerOptions): Rule { function addDependencies(): Rule { return (host: Tree, context: SchematicContext) => { - const packageName = '@angular/platform-server'; + const packageName = '@angular/service-worker'; context.logger.debug(`adding dependency (${packageName})`); const buffer = host.read(packageJsonPath); if (buffer === null) { diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index bc231aa388..9a724e4dcf 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -68,7 +68,7 @@ describe('Service Worker Schematic', () => { const pkgText = tree.readContent('/package.json'); const pkg = JSON.parse(pkgText); const version = pkg.dependencies['@angular/core']; - expect(pkg.dependencies['@angular/platform-server']).toEqual(version); + expect(pkg.dependencies['@angular/service-worker']).toEqual(version); }); it('should import ServiceWorkerModule', () => { From 6dbcd7816d75ec7d41a33d9873af1a23362e4743 Mon Sep 17 00:00:00 2001 From: Christofer Steingrefer Date: Fri, 6 Apr 2018 19:00:46 +0200 Subject: [PATCH 416/724] feat(@schematics/angular): Add directive and component selector rules Fixes: #570 --- .../files/lint/__tsLintRoot__/tslint.json | 17 ++++++++++++++ .../schematics/angular/application/index.ts | 23 ++++++++++++++++++- .../angular/application/index_spec.ts | 21 +++++++++++++++++ .../library/files/__projectRoot__/tslint.json | 17 ++++++++++++++ packages/schematics/angular/library/index.ts | 5 ++++ .../schematics/angular/library/index_spec.ts | 10 ++++++++ .../schematics/angular/library/schema.d.ts | 4 ++++ .../schematics/angular/library/schema.json | 9 +++++++- 8 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json create mode 100644 packages/schematics/angular/library/files/__projectRoot__/tslint.json diff --git a/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json b/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json new file mode 100644 index 0000000000..2eec2dd9cc --- /dev/null +++ b/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "<%= relativeTsLintPath %>/tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "<%= prefix %>", + "camelCase" + ], + "component-selector": [ + true, + "element", + "<%= prefix %>", + "kebab-case" + ] + } +} diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 6bf876884a..547e650613 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -270,7 +270,8 @@ export default function (options: ApplicationOptions): Rule { throw new SchematicsException(`Invalid options, "name" is required.`); } validateProjectName(options.name); - const appRootSelector = `${options.prefix || 'app'}-root`; + const prefix = options.prefix || 'app'; + const appRootSelector = `${prefix}-root`; const componentOptions = { inlineStyle: options.inlineStyle, inlineTemplate: options.inlineTemplate, @@ -285,6 +286,7 @@ export default function (options: ApplicationOptions): Rule { let sourceRoot = `${appDir}/src`; let sourceDir = `${sourceRoot}/app`; let relativeTsConfigPath = appDir.split('/').map(x => '..').join('/'); + let relativeTsLintPath = appDir.split('/').map(x => '..').join('/'); const rootInSrc = options.projectRoot !== undefined; if (options.projectRoot !== undefined) { newProjectRoot = options.projectRoot; @@ -295,7 +297,12 @@ export default function (options: ApplicationOptions): Rule { if (relativeTsConfigPath === '') { relativeTsConfigPath = '.'; } + relativeTsLintPath = relative(normalize('/' + sourceRoot), normalize('/')); + if (relativeTsLintPath === '') { + relativeTsLintPath = '.'; + } } + const tsLintRoot = appDir; const e2eOptions: E2eOptions = { name: `${options.name}-e2e`, @@ -330,6 +337,20 @@ export default function (options: ApplicationOptions): Rule { }), move(appDir), ])), + mergeWith( + apply(url('./files/lint'), [ + template({ + utils: strings, + ...options, + tsLintRoot, + relativeTsLintPath, + prefix, + }), + // TODO: Moving should work but is bugged right now. + // The __tsLintRoot__ is being used meanwhile. + // Otherwise the tslint.json file could be inside of the root folder and + // this block and the lint folder could be removed. + ])), schematic('module', { name: 'app', commonModule: false, diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index f3987eb878..a804779992 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -47,6 +47,7 @@ describe('Application Schematic', () => { expect(files.indexOf('/projects/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/tsconfig.app.json')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/tsconfig.spec.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/tslint.json')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/environments/environment.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/environments/environment.prod.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/favicon.ico')).toBeGreaterThanOrEqual(0); @@ -109,6 +110,15 @@ describe('Application Schematic', () => { expect(specTsConfig.files).toEqual(['src/test.ts', 'src/polyfills.ts']); }); + it('should set the right path and prefix in the tslint file', () => { + const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); + const path = '/projects/foo/tslint.json'; + const content = JSON.parse(tree.readContent(path)); + expect(content.extends).toMatch('../../tslint.json'); + expect(content.rules['directive-selector'][2]).toMatch('app'); + expect(content.rules['component-selector'][2]).toMatch('app'); + }); + describe(`update package.json`, () => { it(`should add build-angular to devDependencies`, () => { const tree = schematicRunner.runSchematic('application', defaultOptions, workspaceTree); @@ -157,6 +167,7 @@ describe('Application Schematic', () => { expect(files.indexOf('/src/karma.conf.js')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/src/tsconfig.app.json')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/src/tsconfig.spec.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/src/tslint.json')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/src/environments/environment.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/src/environments/environment.prod.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/src/favicon.ico')).toBeGreaterThanOrEqual(0); @@ -196,5 +207,15 @@ describe('Application Schematic', () => { expect(specTsConfig.extends).toEqual('../tsconfig.json'); expect(specTsConfig.files).toEqual(['test.ts', 'polyfills.ts']); }); + + it('should set the relative path and prefix in the tslint file', () => { + const options = { ...defaultOptions, projectRoot: '' }; + + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const content = JSON.parse(tree.readContent('/src/tslint.json')); + expect(content.extends).toMatch('../tslint.json'); + expect(content.rules['directive-selector'][2]).toMatch('app'); + expect(content.rules['component-selector'][2]).toMatch('app'); + }); }); }); diff --git a/packages/schematics/angular/library/files/__projectRoot__/tslint.json b/packages/schematics/angular/library/files/__projectRoot__/tslint.json new file mode 100644 index 0000000000..2eec2dd9cc --- /dev/null +++ b/packages/schematics/angular/library/files/__projectRoot__/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "<%= relativeTsLintPath %>/tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "<%= prefix %>", + "camelCase" + ], + "component-selector": [ + true, + "element", + "<%= prefix %>", + "kebab-case" + ] + } +} diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index fe5c0d25f6..4195ca8f12 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -172,17 +172,21 @@ export default function (options: LibraryOptions): Rule { throw new SchematicsException(`Invalid options, "name" is required.`); } const name = options.name; + const prefix = options.prefix || 'lib'; const workspace = getWorkspace(host); const newProjectRoot = workspace.newProjectRoot; const projectRoot = `${newProjectRoot}/${options.name}`; const sourceDir = `${projectRoot}/src/lib`; + const relativeTsLintPath = projectRoot.split('/').map(x => '..').join('/'); const templateSource = apply(url('./files'), [ template({ ...strings, ...options, projectRoot, + relativeTsLintPath, + prefix, }), // TODO: Moving inside `branchAndMerge` should work but is bugged right now. // The __projectRoot__ is being used meanwhile. @@ -203,6 +207,7 @@ export default function (options: LibraryOptions): Rule { }), schematic('component', { name: name, + selector: `${prefix}-${name}`, inlineStyle: true, inlineTemplate: true, flat: true, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index efce390697..a7f8de6b6d 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -44,6 +44,7 @@ describe('Library Schematic', () => { expect(files.indexOf('/projects/foo/karma.conf.js')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/ng-package.json')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/package.json')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('/projects/foo/tslint.json')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/test.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/my_index.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/projects/foo/src/lib/foo.module.ts')).toBeGreaterThanOrEqual(0); @@ -88,6 +89,15 @@ describe('Library Schematic', () => { expect(fileContent).toContain('exports: [FooComponent]'); }); + it('should set the right path and prefix in the tslint file', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const path = '/projects/foo/tslint.json'; + const content = JSON.parse(tree.readContent(path)); + expect(content.extends).toMatch('../../tslint.json'); + expect(content.rules['directive-selector'][2]).toMatch('lib'); + expect(content.rules['component-selector'][2]).toMatch('lib'); + }); + describe(`update package.json`, () => { it(`should add ng-packagr to devDependencies`, () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); diff --git a/packages/schematics/angular/library/schema.d.ts b/packages/schematics/angular/library/schema.d.ts index 838dd7ee2c..d833e503d5 100644 --- a/packages/schematics/angular/library/schema.d.ts +++ b/packages/schematics/angular/library/schema.d.ts @@ -15,6 +15,10 @@ export interface Schema { * The path to create the interface. */ entryFile: string; + /** + * The prefix to apply to generated selectors. + */ + prefix?: string; /** * Do not add dependencies to package.json (e.g., --skipPackageJson) */ diff --git a/packages/schematics/angular/library/schema.json b/packages/schematics/angular/library/schema.json index 53e574e0b1..9a3873f614 100644 --- a/packages/schematics/angular/library/schema.json +++ b/packages/schematics/angular/library/schema.json @@ -18,6 +18,13 @@ "description": "The path to create the library's public API file.", "default": "public_api" }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "default": "lib", + "alias": "p" + }, "skipPackageJson": { "type": "boolean", "default": false, @@ -30,4 +37,4 @@ } }, "required": [] -} \ No newline at end of file +} From 4096f40894c4f38bfeae96766a0bcff8976d9ae1 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 11 Apr 2018 12:44:44 -0400 Subject: [PATCH 417/724] fix(@schematics/angular): Default library service should be providedIn root --- packages/schematics/angular/library/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 4195ca8f12..9ed9f2bc29 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -218,7 +218,6 @@ export default function (options: LibraryOptions): Rule { name: name, flat: true, path: sourceDir, - module: `${name}.module.ts`, }), ])(host, context); }; From 9d82814405d10977734fdedfa7a88953983e56a9 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 11 Apr 2018 12:45:25 -0400 Subject: [PATCH 418/724] fix(@schematics/angular): Library should support pascalCasedNames fixes angular/angular-cli#10255 --- packages/schematics/angular/library/index.ts | 8 ++++---- packages/schematics/angular/library/index_spec.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 9ed9f2bc29..173bad6679 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -118,10 +118,10 @@ function addDependenciesToPackageJson() { }; } -function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSchema): Rule { +function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSchema, + projectRoot: string): Rule { return (host: Tree, context: SchematicContext) => { - const projectRoot = `${workspace.newProjectRoot}/${options.name}`; // tslint:disable-next-line:no-any const project: any = { root: `${projectRoot}`, @@ -176,7 +176,7 @@ export default function (options: LibraryOptions): Rule { const workspace = getWorkspace(host); const newProjectRoot = workspace.newProjectRoot; - const projectRoot = `${newProjectRoot}/${options.name}`; + const projectRoot = `${newProjectRoot}/${strings.dasherize(options.name)}`; const sourceDir = `${projectRoot}/src/lib`; const relativeTsLintPath = projectRoot.split('/').map(x => '..').join('/'); @@ -195,7 +195,7 @@ export default function (options: LibraryOptions): Rule { return chain([ branchAndMerge(mergeWith(templateSource)), - addAppToWorkspaceFile(options, workspace), + addAppToWorkspaceFile(options, workspace, projectRoot), options.skipPackageJson ? noop() : addDependenciesToPackageJson(), options.skipTsConfig ? noop() : updateTsConfig(name), schematic('module', { diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index a7f8de6b6d..e223a3e043 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -16,6 +16,7 @@ function getJsonFileContent(tree: UnitTestTree, path: string) { return JSON.parse(tree.readContent(path)); } +// tslint:disable:max-line-length describe('Library Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/ng_packagr', @@ -83,6 +84,17 @@ describe('Library Schematic', () => { expect(workspace.projects.foo).toBeDefined(); }); + it('should handle a pascalCasedName', () => { + const options = {...defaultOptions, name: 'pascalCasedName'}; + const tree = schematicRunner.runSchematic('library', options, workspaceTree); + const config = getJsonFileContent(tree, '/angular.json'); + const project = config.projects.pascalCasedName; + expect(project).toBeDefined(); + expect(project.root).toEqual('projects/pascal-cased-name'); + const svcContent = tree.readContent('/projects/pascal-cased-name/src/lib/pascal-cased-name.service.ts'); + expect(svcContent).toMatch(/providedIn: 'root'/); + }); + it('should export the component in the NgModule', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const fileContent = getFileContent(tree, '/projects/foo/src/lib/foo.module.ts'); From 7fbe494a13f673975471ffdf980c4869215fe2dc Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 11 Apr 2018 17:27:34 -0700 Subject: [PATCH 419/724] ci: disable bazel build --- .circleci/config.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4addfc2d3..235770cd46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -82,13 +82,13 @@ jobs: - restore_cache: *_root_package_lock_key - run: npm run admin -- build - build-bazel: - <<: *defaults - steps: - - checkout: *post_checkout - - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc - - run: bazel run @nodejs//:npm install - - run: bazel build //packages/... + # build-bazel: + # <<: *defaults + # steps: + # - checkout: *post_checkout + # - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc + # - run: bazel run @nodejs//:npm install + # - run: bazel build //packages/... snapshot_publish: <<: *defaults @@ -133,10 +133,10 @@ workflows: requires: - lint - validate - - build-bazel: - requires: - - lint - - validate + # - build-bazel: + # requires: + # - lint + # - validate - test: requires: - build From f6e9c0ffa5485eef036f6a138a4b090f31c0fe72 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 11 Apr 2018 17:34:36 -0700 Subject: [PATCH 420/724] ci: disable tests on platforms that dont support the test --- .../test/browser/rebuild_spec_large.ts | 11 +++++++++-- .../test/protractor/works_spec_large.ts | 15 +++++++++++---- .../src/build/index_spec_large.ts | 9 ++++++++- packages/angular_devkit/core/node/host_spec.ts | 15 +++++++++++---- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts index a6ba6c4669..b4ab007b50 100644 --- a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts @@ -12,6 +12,13 @@ import { TestLogger, Timeout, browserTargetSpec, host, runTargetSpec } from '../ import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large'; +// TODO: replace this with an "it()" macro that's reusable globally. +let linuxOnlyIt: typeof it = it; +if (process.platform.startsWith('win')) { + linuxOnlyIt = xit; +} + + describe('Browser Builder rebuilds', () => { const outputPath = normalize('dist'); @@ -201,7 +208,7 @@ describe('Browser Builder rebuilds', () => { }, Timeout.Basic); - it('rebuilds after errors in AOT', (done) => { + linuxOnlyIt('rebuilds after errors in AOT', (done) => { // Save the original contents of `./src/app/app.component.ts`. const origContent = virtualFs.fileBufferToString( host.scopedSync().read(normalize('src/app/app.component.ts'))); @@ -263,7 +270,7 @@ describe('Browser Builder rebuilds', () => { }, Timeout.Complex); - it('rebuilds AOT factories', (done) => { + linuxOnlyIt('rebuilds AOT factories', (done) => { host.writeMultipleFiles({ 'src/app/app.component.css': ` diff --git a/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts b/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts index c8bfb67766..ae86677ab9 100644 --- a/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts @@ -11,17 +11,24 @@ import { retry } from 'rxjs/operators'; import { host, protractorTargetSpec, runTargetSpec } from '../utils'; +// TODO: replace this with an "it()" macro that's reusable globally. +let linuxOnlyIt: typeof it = it; +if (process.platform.startsWith('win')) { + linuxOnlyIt = xit; +} + + describe('Protractor Builder', () => { beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - it('works', (done) => { + linuxOnlyIt('works', (done) => { runTargetSpec(host, protractorTargetSpec).pipe( retry(3), ).subscribe(undefined, done.fail, done); }, 30000); - it('works with no devServerTarget', (done) => { + linuxOnlyIt('works with no devServerTarget', (done) => { const overrides = { devServerTarget: undefined }; runTargetSpec(host, protractorTargetSpec, overrides).pipe( @@ -29,7 +36,7 @@ describe('Protractor Builder', () => { ).subscribe(undefined, done, done.fail); }, 30000); - it('overrides protractor specs', (done) => { + linuxOnlyIt('overrides protractor specs', (done) => { host.scopedSync().rename(normalize('./e2e/app.e2e-spec.ts'), normalize('./e2e/renamed-app.e2e-spec.ts')); @@ -40,7 +47,7 @@ describe('Protractor Builder', () => { ).subscribe(undefined, done.fail, done); }, 60000); - it('overrides protractor suites', (done) => { + linuxOnlyIt('overrides protractor suites', (done) => { host.scopedSync().rename(normalize('./e2e/app.e2e-spec.ts'), normalize('./e2e/renamed-app.e2e-spec.ts')); diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 212fb654b9..47e874528f 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -12,6 +12,13 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { concatMap, tap } from 'rxjs/operators'; +// TODO: replace this with an "it()" macro that's reusable globally. +let linuxOnlyIt: typeof it = it; +if (process.platform.startsWith('win')) { + linuxOnlyIt = xit; +} + + describe('NgPackagr Builder', () => { const workspaceFile = normalize('angular.json'); const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any @@ -33,7 +40,7 @@ describe('NgPackagr Builder', () => { ).subscribe(undefined, done.fail, done); }, 30000); - it('tests works', (done) => { + linuxOnlyIt('tests works', (done) => { const targetSpec: TargetSpecifier = { project: 'lib', target: 'test' }; return workspace.loadWorkspaceFromHost(workspaceFile).pipe( diff --git a/packages/angular_devkit/core/node/host_spec.ts b/packages/angular_devkit/core/node/host_spec.ts index f25e66fe51..7be99bd388 100644 --- a/packages/angular_devkit/core/node/host_spec.ts +++ b/packages/angular_devkit/core/node/host_spec.ts @@ -16,6 +16,13 @@ import { Observable, Subscription } from 'rxjs'; const temp = require('temp'); +// TODO: replace this with an "it()" macro that's reusable globally. +let linuxOnlyIt: typeof it = it; +if (process.platform.startsWith('win') || process.platform.startsWith('darwin')) { + linuxOnlyIt = xit; +} + + describe('NodeJsAsyncHost', () => { let root: string; let host: virtualFs.Host; @@ -29,7 +36,7 @@ describe('NodeJsAsyncHost', () => { .subscribe({ complete() { done(); } }); }); - it('can watch', done => { + linuxOnlyIt('can watch', done => { let obs: Observable; let subscription: Subscription; const content = virtualFs.stringToFileBuffer('hello world'); @@ -56,7 +63,7 @@ describe('NodeJsAsyncHost', () => { subscription.unsubscribe(); }) .then(done, done.fail); - }, 10000000); + }, 30000); }); @@ -73,7 +80,7 @@ describe('NodeJsSyncHost', () => { host.delete(normalize('/')); }); - it('can watch', done => { + linuxOnlyIt('can watch', done => { let obs: Observable; let subscription: Subscription; const content = virtualFs.stringToFileBuffer('hello world'); @@ -102,6 +109,6 @@ describe('NodeJsSyncHost', () => { subscription.unsubscribe(); }) .then(done, done.fail); - }, 10000000); + }, 30000); }); From a6c5472b41687aeb440f652349c123246767e4fd Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 11 Apr 2018 20:51:44 -0700 Subject: [PATCH 421/724] fix(@schematics/angular): v6 migration should keep packageManager Fix angular/angular-cli#10225 --- packages/schematics/angular/migrations/update-6/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 0984ada05b..7ff3303534 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -99,8 +99,13 @@ function migrateConfiguration(oldConfig: CliConfig): Rule { }; } -function extractCliConfig(_config: CliConfig): JsonObject | null { - return null; +function extractCliConfig(config: CliConfig): JsonObject | null { + const newConfig: JsonObject = {}; + if (config.packageManager && config.packageManager !== 'default') { + newConfig['packageManager'] = config.packageManager; + } + + return newConfig; } function extractSchematicsConfig(config: CliConfig): JsonObject | null { From 9d00497531f55c3e1b91873188b5626c3742d200 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 11 Apr 2018 21:08:37 -0700 Subject: [PATCH 422/724] fix(@schematics/update): ng update ignores packages it cannot find Fix angular/angular-cli#10167 --- packages/schematics/update/update/index.ts | 24 ++++++++++++++++++- .../update/update/npm-package-json.ts | 1 + packages/schematics/update/update/npm.ts | 3 ++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 2567de1a41..cbf54ca9bd 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -656,7 +656,29 @@ export default function(options: UpdateSchema): Rule { // Build a map of all dependencies and their packageJson. reduce>( - (acc, npmPackageJson) => acc.set(npmPackageJson.name, npmPackageJson), + (acc, npmPackageJson) => { + // If the package was not found on the registry. It could be private, so we will just + // ignore. If the package was part of the list, we will error out, but will simply ignore + // if it's either not requested (so just part of package.json. silently) or if it's a + // `--all` situation. There is an edge case here where a public package peer depends on a + // private one, but it's rare enough. + if (!npmPackageJson.name) { + if (packages.has(npmPackageJson.requestedName)) { + if (options.all) { + logger.warn(`Package ${JSON.stringify(npmPackageJson.requestedName)} was not ` + + 'found on the registry. Skipping.'); + } else { + throw new SchematicsException( + `Package ${JSON.stringify(npmPackageJson.requestedName)} was not found on the ` + + 'registry. Cannot continue as this may be an error.'); + } + } + } else { + acc.set(npmPackageJson.name, npmPackageJson); + } + + return acc; + }, new Map(), ), diff --git a/packages/schematics/update/update/npm-package-json.ts b/packages/schematics/update/update/npm-package-json.ts index bab210b6aa..675c45c0ff 100644 --- a/packages/schematics/update/update/npm-package-json.ts +++ b/packages/schematics/update/update/npm-package-json.ts @@ -9,6 +9,7 @@ import { JsonSchemaForNpmPackageJsonFiles } from './package-json'; export interface NpmRepositoryPackageJson { name: string; + requestedName: string; description: string; 'dist-tags': { diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index 1f3872ee18..c7d12be3f8 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -28,7 +28,7 @@ export function getNpmPackageJson( packageName: string, registryUrl: string, logger: logging.LoggerApi, -): Observable { +): Observable> { let fullUrl = new url.URL(`http://${registryUrl}/${packageName.replace(/\//g, '%2F')}`); try { const registry = new url.URL(registryUrl); @@ -53,6 +53,7 @@ export function getNpmPackageJson( response.on('end', () => { try { const json = JSON.parse(data); + json.requestedName = packageName; subject.next(json as NpmRepositoryPackageJson); subject.complete(); } catch (err) { From 7e916a6c4936c797eba602f16f959b4b92afcd47 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 11 Apr 2018 21:22:24 -0700 Subject: [PATCH 423/724] fix(@schematics/angular): run node package install task after generate library Fix angular/angular-cli#10216 --- packages/schematics/angular/library/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 173bad6679..e2b5f4f159 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -20,6 +20,7 @@ import { template, url, } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { WorkspaceSchema, getWorkspace, getWorkspacePath } from '../utility/config'; import { latestVersions } from '../utility/latest-versions'; import { Schema as LibraryOptions } from './schema'; @@ -219,6 +220,9 @@ export default function (options: LibraryOptions): Rule { flat: true, path: sourceDir, }), + (_tree: Tree, context: SchematicContext) => { + context.addTask(new NodePackageInstallTask()); + }, ])(host, context); }; } From 33930a455dec22c74dd718a8042431c662c328d4 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Apr 2018 14:08:44 -0400 Subject: [PATCH 424/724] fix(@schematics/angular): add schema link to migrated config --- packages/schematics/angular/migrations/update-6/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 7ff3303534..618e844480 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -73,6 +73,7 @@ function migrateConfiguration(oldConfig: CliConfig): Rule { const configPath = normalize('angular.json'); context.logger.info(`Updating configuration`); const config: JsonObject = { + '$schema': './node_modules/@angular-devkit/core/src/workspace/workspace-schema.json', version: 1, newProjectRoot: 'projects', projects: extractProjectsConfig(oldConfig, host), From 3bf5ec65c90c6ec022c8d7db7388660af093ffe4 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 12 Apr 2018 12:19:02 -0400 Subject: [PATCH 425/724] fix(@schematics/angular): Remove module option from service schematic fixes angular/angular-cli#10170 --- .../__name@dasherize__.service.ts | 5 +- packages/schematics/angular/service/index.ts | 53 +------------------ .../schematics/angular/service/index_spec.ts | 21 -------- .../schematics/angular/service/schema.d.ts | 4 -- .../schematics/angular/service/schema.json | 6 --- 5 files changed, 3 insertions(+), 86 deletions(-) diff --git a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts index cc5ee3e02e..f14985e32b 100644 --- a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts +++ b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts @@ -1,8 +1,7 @@ -import { Injectable } from '@angular/core';<% if (providedIn) { %> -import { <%= providedIn %> } from '<%= providedInPath %>';<% } %> +import { Injectable } from '@angular/core'; @Injectable({ - providedIn: <%= providedIn || "'root'" %> + providedIn: 'root' }) export class <%= classify(name) %>Service { diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index e1ddf94505..5c2801725f 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -5,11 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Path, strings } from '@angular-devkit/core'; +import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, - SchematicsException, Tree, apply, filter, @@ -19,41 +18,12 @@ import { template, url, } from '@angular-devkit/schematics'; -import * as ts from 'typescript'; -import { getFirstNgModuleName } from '../utility/ast-utils'; import { getWorkspace } from '../utility/config'; -import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as ServiceOptions } from './schema'; -function getModuleNameFromPath(host: Tree, modulePath: Path) { - if (!host.exists(modulePath)) { - throw new SchematicsException(`File ${modulePath} does not exist.`); - } - - const text = host.read(modulePath); - if (text === null) { - throw new SchematicsException(`File ${modulePath} cannot be read.`); - } - const sourceText = text.toString('utf-8'); - const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - - return getFirstNgModuleName(source); -} - -function stripTsExtension(path: string): string { - if (!path.endsWith('.ts')) { - throw new SchematicsException(`File ${path} is not a Typescript file.`); - } - - return path.substr(0, path.length - 3); -} - export default function (options: ServiceOptions): Rule { return (host: Tree, context: SchematicContext) => { - let providedByModule = ''; - let providedInPath = ''; - const workspace = getWorkspace(host); if (!options.project) { options.project = Object.keys(workspace.projects)[0]; @@ -64,25 +34,6 @@ export default function (options: ServiceOptions): Rule { options.path = `/${project.root}/src/app`; } - if (options.module) { - const modulePath = findModuleFromOptions(host, options); - if (!modulePath || !host.exists(modulePath)) { - throw new Error('Specified module does not exist'); - } - providedByModule = getModuleNameFromPath(host, modulePath) || ''; - - if (!providedByModule) { - throw new SchematicsException(`module option did not point to an @NgModule.`); - } - - const servicePath = `/${options.path}/` - + (options.flat ? '' : strings.dasherize(options.name) + '/') - + strings.dasherize(options.name) - + '.service'; - - providedInPath = stripTsExtension(buildRelativePath(servicePath, modulePath)); - } - const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; @@ -93,8 +44,6 @@ export default function (options: ServiceOptions): Rule { ...strings, 'if-flat': (s: string) => options.flat ? '' : s, ...options, - providedIn: providedByModule, - providedInPath: providedInPath, }), move(parsedPath.path), ]); diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 0d269025dd..0ac6d3df44 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -20,7 +20,6 @@ describe('Service Schematic', () => { const defaultOptions: ServiceOptions = { name: 'foo', spec: true, - module: undefined, flat: false, }; @@ -62,26 +61,6 @@ describe('Service Schematic', () => { expect(content).toMatch(/providedIn: 'root'/); }); - it('should import a specified module', () => { - const options = { ...defaultOptions, module: 'app.module.ts' }; - - const tree = schematicRunner.runSchematic('service', options, appTree); - const content = tree.readContent('/projects/bar/src/app/foo/foo.service.ts'); - expect(content).toMatch(/import { AppModule } from '..\/app.module'/); - expect(content).toMatch(/providedIn: AppModule/); - }); - - it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/projects/bar/src/app/app.moduleXXX.ts' }; - let thrownError: Error | null = null; - try { - schematicRunner.runSchematic('service', options, appTree); - } catch (err) { - thrownError = err; - } - expect(thrownError).toBeDefined(); - }); - it('should respect the spec flag', () => { const options = { ...defaultOptions, spec: false }; diff --git a/packages/schematics/angular/service/schema.d.ts b/packages/schematics/angular/service/schema.d.ts index 6e08cb165d..0dc5a42156 100644 --- a/packages/schematics/angular/service/schema.d.ts +++ b/packages/schematics/angular/service/schema.d.ts @@ -27,8 +27,4 @@ export interface Schema { * Specifies if a spec file is generated. */ spec?: boolean; - /** - * Allows specification of the providing module. - */ - module?: string; } diff --git a/packages/schematics/angular/service/schema.json b/packages/schematics/angular/service/schema.json index 67ab7e6b32..44c0cb365e 100644 --- a/packages/schematics/angular/service/schema.json +++ b/packages/schematics/angular/service/schema.json @@ -32,12 +32,6 @@ "type": "boolean", "default": true, "description": "Specifies if a spec file is generated." - }, - "module": { - "type": "string", - "default": "", - "description": "Allows specification of the providing module.", - "alias": "m" } }, "required": [] From 7d8cee1cfe25b991fda5e4c87667b669ebb9432d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Apr 2018 18:49:59 -0400 Subject: [PATCH 426/724] fix(@angular-devkit/build-angular): adjust chunk splitting options This ensures that initial vendor modules are alway placed in the vendor bundle. And also increases the potential for splitting common modules out of async (lazy route) chunks. Mitigates angular/angular-cli#10294 --- .../src/angular-cli-files/models/webpack-configs/browser.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index 798198d40e..9822445d3d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -95,11 +95,13 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { runtimeChunk: 'single', splitChunks: { chunks: buildOptions.commonChunk ? 'all' : 'initial', + maxAsyncRequests: Infinity, cacheGroups: { vendors: false, vendor: buildOptions.vendorChunk && { name: 'vendor', chunks: 'initial', + enforce: true, test: (module: any, chunks: Array<{ name: string }>) => { const moduleName = module.nameForCondition ? module.nameForCondition() : ''; return /[\\/]node_modules[\\/]/.test(moduleName) From 799b2fa241478ae3f5dfec088204ec228a29324d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Apr 2018 12:16:50 -0400 Subject: [PATCH 427/724] refactor: rebase schematic option transformer exception --- .../core/src/json/schema/registry.ts | 7 +++++-- .../schematics/tools/schema-option-transform.ts | 17 +++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 22ed7a215f..4f59b2a010 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -36,7 +36,10 @@ interface AjvValidationError { export class SchemaValidationException extends BaseException { public readonly errors: SchemaValidatorError[]; - constructor(errors?: SchemaValidatorError[]) { + constructor( + errors?: SchemaValidatorError[], + baseMessage = 'Schema validation failed with the following errors:', + ) { if (!errors || errors.length === 0) { super('Schema validation failed.'); @@ -44,7 +47,7 @@ export class SchemaValidationException extends BaseException { } const messages = SchemaValidationException.createMessages(errors); - super(`Schema validation failed with the following errors:\n ${messages.join('\n ')}`); + super(`${baseMessage}\n ${messages.join('\n ')}`); this.errors = errors; } diff --git a/packages/angular_devkit/schematics/tools/schema-option-transform.ts b/packages/angular_devkit/schematics/tools/schema-option-transform.ts index 1a2f579351..2614cb32b3 100644 --- a/packages/angular_devkit/schematics/tools/schema-option-transform.ts +++ b/packages/angular_devkit/schematics/tools/schema-option-transform.ts @@ -5,11 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { - BaseException, - deepCopy, - schema, -} from '@angular-devkit/core'; +import { deepCopy, schema } from '@angular-devkit/core'; import { Observable, of as observableOf } from 'rxjs'; import { first, map, mergeMap } from 'rxjs/operators'; import { SchematicDescription } from '../src'; @@ -19,11 +15,12 @@ export type SchematicDesc = SchematicDescription; -export class InvalidInputOptions extends BaseException { - // tslint:disable-next-line:no-any - constructor(options: any, public readonly errors: schema.SchemaValidatorError[]) { - super(`Schematic input does not validate against the Schema: ${JSON.stringify(options)}\n` - + `Errors:\n ${schema.SchemaValidationException.createMessages(errors).join('\n ')}`); +export class InvalidInputOptions extends schema.SchemaValidationException { + constructor(options: T, errors: schema.SchemaValidatorError[]) { + super( + errors, + `Schematic input does not validate against the Schema: ${JSON.stringify(options)}\nErrors:\n`, + ); } } From 3d809ef29cf690f9d2b37fa048710132a7a9e389 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 10 Apr 2018 18:09:11 +0100 Subject: [PATCH 428/724] fix(@angular-devkit/build-angular): validate fileReplacements, allow string styles/scripts Fix https://github.com/angular/angular-cli/issues/5053 Fix https://github.com/angular/angular-cli/issues/10267 --- .../angular-cli-files/models/build-options.ts | 27 +- .../models/webpack-configs/browser.ts | 16 +- .../models/webpack-configs/common.ts | 8 +- .../models/webpack-configs/styles.ts | 13 +- .../models/webpack-configs/typescript.ts | 23 +- .../models/webpack-configs/utils.ts | 40 +- .../plugins/bundle-budget.ts | 3 +- .../src/angular-cli-files/plugins/karma.ts | 2 +- .../utilities/bundle-calculator.ts | 41 +- .../utilities/package-chunk-sort.ts | 12 +- .../build_angular/src/browser/index.ts | 123 +----- .../build_angular/src/browser/schema.d.ts | 353 ++++++++++++++++++ .../build_angular/src/browser/schema.json | 110 +++--- .../build_angular/src/dev-server/index.ts | 36 +- .../build_angular/src/extract-i18n/index.ts | 57 ++- .../angular_devkit/build_angular/src/index.ts | 2 + .../build_angular/src/karma/index.ts | 161 ++++---- .../build_angular/src/karma/schema.d.ts | 35 ++ .../build_angular/src/karma/schema.json | 109 +++--- .../src/utils/add-file-replacements.ts | 74 ++++ .../build_angular/src/utils/index.ts | 1 + .../test/browser/lazy-module_spec_large.ts | 8 +- .../test/browser/replacements_spec_large.ts | 43 ++- .../test/browser/scripts-array_spec_large.ts | 14 +- .../test/browser/styles_spec_large.ts | 14 +- .../test/karma/replacements_spec_large.ts | 4 +- .../schematics/angular/application/index.ts | 4 +- .../angular/migrations/update-6/index.ts | 22 +- .../angular/migrations/update-6/index_spec.ts | 8 +- .../hello-world-app/.angular.json | 8 +- 30 files changed, 886 insertions(+), 485 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/browser/schema.d.ts create mode 100644 packages/angular_devkit/build_angular/src/karma/schema.d.ts create mode 100644 packages/angular_devkit/build_angular/src/utils/add-file-replacements.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index 1f4c2d7246..de7fc607d6 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -10,7 +10,7 @@ // tslint:disable-next-line:no-implicit-dependencies import * as ts from 'typescript'; -import { Budget } from '../utilities/bundle-calculator'; +import { AssetPattern, Budget, ExtraEntryPoint } from '../../browser/schema'; export interface BuildOptions { optimization: boolean; @@ -27,8 +27,6 @@ export interface BuildOptions { progress?: boolean; i18nFile?: string; i18nFormat?: string; - i18nOutFile?: string; - i18nOutFormat?: string; i18nLocale?: string; i18nMissingTranslation?: string; extractCss?: boolean; @@ -56,25 +54,17 @@ export interface BuildOptions { assets: AssetPattern[]; scripts: ExtraEntryPoint[]; styles: ExtraEntryPoint[]; - stylePreprocessorOptions: { includePaths: string[] }; + stylePreprocessorOptions?: { includePaths: string[] }; lazyModules: string[]; platform?: 'browser' | 'server'; } -export interface AssetPattern { - glob: string; - input: string; - output: string; - allowOutsideOutDir?: boolean; -} - -export interface ExtraEntryPoint { - input: string; - output?: string; - lazy: boolean; +export interface WebpackTestOptions extends BuildOptions { + codeCoverage?: boolean; + codeCoverageExclude?: string[]; } -export interface WebpackConfigOptions { +export interface WebpackConfigOptions { root: string; projectRoot: string; buildOptions: T; @@ -82,8 +72,3 @@ export interface WebpackConfigOptions { tsConfigPath: string; supportES2015: boolean; } - -export interface WebpackTestOptions extends BuildOptions { - codeCoverage?: boolean; - codeCoverageExclude?: string[]; -} diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index 9822445d3d..bf262f9c5c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -8,9 +8,10 @@ import { LicenseWebpackPlugin } from 'license-webpack-plugin'; import { generateEntryPoints, packageChunkSort } from '../../utilities/package-chunk-sort'; import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; import { IndexHtmlWebpackPlugin } from '../../plugins/index-html-webpack-plugin'; -import { ExtraEntryPoint } from '../../../browser'; +import { ExtraEntryPoint } from '../../../browser/schema'; +import { BrowserBuilderSchema } from '../../../browser/schema'; import { WebpackConfigOptions } from '../build-options'; -import { computeBundleName } from './utils'; +import { normalizeExtraEntryPoints } from './utils'; /** + * license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to @@ -26,10 +27,11 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { let extraPlugins: any[] = []; // Figure out which are the lazy loaded bundle names. - const lazyChunkBundleNames = ([...buildOptions.styles, ...buildOptions.scripts] as ExtraEntryPoint[]) - .filter(entry => entry.lazy) + const lazyChunkBundleNames = normalizeExtraEntryPoints( // We don't really need a default name because we pre-filtered by lazy only entries. - .map(style => computeBundleName(style, 'not-lazy')); + [...buildOptions.styles, ...buildOptions.scripts], 'not-lazy') + .filter(entry => entry.lazy) + .map(entry => entry.bundleName) const generateIndexHtml = false; if (generateIndexHtml) { @@ -77,8 +79,8 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { })); } - const globalStylesBundleNames = (buildOptions.styles as ExtraEntryPoint[]) - .map(style => computeBundleName(style, 'styles')); + const globalStylesBundleNames = normalizeExtraEntryPoints(buildOptions.styles, 'styles') + .map(style => style.bundleName); return { devtool: sourcemaps, diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 513811b4dd..e80f5281bf 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -12,8 +12,8 @@ import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; import { findUp } from '../../utilities/find-up'; -import { AssetPattern, ExtraEntryPoint } from '../../../browser'; -import { computeBundleName } from './utils'; +import { AssetPattern, ExtraEntryPoint } from '../../../browser/schema'; +import { normalizeExtraEntryPoints } from './utils'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); @@ -63,9 +63,9 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // process global scripts if (buildOptions.scripts.length > 0) { - const globalScriptsByBundleName = (buildOptions.scripts as ExtraEntryPoint[]) + const globalScriptsByBundleName = normalizeExtraEntryPoints(buildOptions.scripts, 'scripts') .reduce((prev: { bundleName: string, paths: string[], lazy: boolean }[], curr) => { - const bundleName = computeBundleName(curr, 'scripts'); + const bundleName = curr.bundleName; const resolvedPath = path.resolve(root, curr.input); let existingEntry = prev.find((el) => el.bundleName === bundleName); if (existingEntry) { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 63425c8796..9ed1c8ff06 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -8,8 +8,8 @@ import { getOutputHashFormat } from './utils'; import { WebpackConfigOptions } from '../build-options'; import { findUp } from '../../utilities/find-up'; import { RawCssLoader } from '../../plugins/webpack'; -import { ExtraEntryPoint } from '../../../browser'; -import { computeBundleName } from './utils'; +import { ExtraEntryPoint } from '../../../browser/schema'; +import { normalizeExtraEntryPoints } from './utils'; const postcssUrl = require('postcss-url'); const autoprefixer = require('autoprefixer'); @@ -166,15 +166,14 @@ export function getStylesConfig(wco: WebpackConfigOptions) { // Process global styles. if (buildOptions.styles.length > 0) { - (buildOptions.styles as ExtraEntryPoint[]).forEach(style => { - const bundleName = computeBundleName(style, 'styles');; + normalizeExtraEntryPoints(buildOptions.styles, 'styles').forEach(style => { const resolvedPath = path.resolve(root, style.input); // Add style entry points. - if (entryPoints[bundleName]) { - entryPoints[bundleName].push(resolvedPath) + if (entryPoints[style.bundleName]) { + entryPoints[style.bundleName].push(resolvedPath) } else { - entryPoints[bundleName] = [resolvedPath] + entryPoints[style.bundleName] = [resolvedPath] } // Add global css paths. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index ea5c208cf9..22ca2f0185 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -25,6 +25,7 @@ function _createAotPlugin( options: any, host: virtualFs.Host, useMain = true, + extract = false ) { const { root, buildOptions } = wco; options.compilerOptions = options.compilerOptions || {}; @@ -37,6 +38,15 @@ function _createAotPlugin( ? path.resolve(root, buildOptions.i18nFile) : undefined; + const i18nFileAndFormat = extract + ? { + i18nOutFile: buildOptions.i18nFile, + i18nOutFormat: buildOptions.i18nFormat, + } : { + i18nInFile: i18nInFile, + i18nInFormat: buildOptions.i18nFormat, + }; + const additionalLazyModules: { [module: string]: string } = {}; if (buildOptions.lazyModules) { for (const lazyModule of buildOptions.lazyModules) { @@ -49,10 +59,7 @@ function _createAotPlugin( const pluginOptions: AngularCompilerPluginOptions = { mainPath: useMain ? path.join(root, buildOptions.main) : undefined, - i18nInFile: i18nInFile, - i18nInFormat: buildOptions.i18nFormat, - i18nOutFile: buildOptions.i18nOutFile, - i18nOutFormat: buildOptions.i18nOutFormat, + ...i18nFileAndFormat, locale: buildOptions.i18nLocale, platform: buildOptions.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser, missingTranslation: buildOptions.i18nMissingTranslation, @@ -75,7 +82,11 @@ export function getNonAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host< }; } -export function getAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host) { +export function getAotConfig( + wco: WebpackConfigOptions, + host: virtualFs.Host, + extract = false +) { const { tsConfigPath, buildOptions } = wco; const loaders: any[] = [webpackLoader]; @@ -90,7 +101,7 @@ export function getAotConfig(wco: WebpackConfigOptions, host: virtualFs.Host { return path.resolve(process.cwd(), resolvePath); @@ -61,14 +61,34 @@ export function getOutputHashFormat(option: string, length = 20): HashFormat { return hashFormats[option] || hashFormats['none']; } -export function computeBundleName(entry: ExtraEntryPoint, defaultName: string){ - if (entry.bundleName) { - return entry.bundleName; - } else if (entry.lazy) { - return basename( - normalize(entry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), - ); +export type NormalizedEntryPoint = ExtraEntryPointObject & { bundleName: string }; + +export function normalizeExtraEntryPoints( + extraEntryPoints: ExtraEntryPoint[], + defaultBundleName: string +): NormalizedEntryPoint[] { + return extraEntryPoints.map(entry => { + let normalizedEntry; + + if (typeof entry === 'string') { + normalizedEntry = { input: entry, lazy: false, bundleName: defaultBundleName }; } else { - return defaultName; - } + let bundleName; + + if (entry.bundleName) { + bundleName = entry.bundleName; + } else if (entry.lazy) { + // Lazy entry points use the file name as bundle name. + bundleName = basename( + normalize(entry.input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), + ); + } else { + bundleName = defaultBundleName; + } + + normalizedEntry = {...entry, bundleName}; + } + + return normalizedEntry; + }) } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/bundle-budget.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/bundle-budget.ts index 68d485e19e..6400ce9491 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/bundle-budget.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/bundle-budget.ts @@ -9,7 +9,8 @@ * found in the LICENSE file at https://angular.io/license */ -import { Budget, Size, calculateBytes, calculateSizes } from '../utilities/bundle-calculator'; +import { Size, calculateBytes, calculateSizes } from '../utilities/bundle-calculator'; +import { Budget } from '../../browser/schema'; import { formatSize } from '../utilities/stats'; interface Thresholds { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index ef139ec981..8c33c36fa1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -7,7 +7,7 @@ import * as glob from 'glob'; import * as webpack from 'webpack'; const webpackDevMiddleware = require('webpack-dev-middleware'); -import { AssetPattern } from '../../browser'; +import { AssetPattern } from '../../browser/schema'; import { KarmaWebpackFailureCb } from './karma-webpack-failure-cb'; /** diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts index 59d4b54903..0df3d1e333 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts @@ -8,46 +8,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -export type BudgetType = 'all' | 'allScript' | 'any' | 'anyScript' | 'bundle' | 'initial'; - -export interface Budget { - /** - * The type of budget - */ - type: BudgetType; - /** - * The name of the bundle - */ - name?: string; - /** - * The baseline size for comparison. - */ - baseline?: string; - /** - * The maximum threshold for warning relative to the baseline. - */ - maximumWarning?: string; - /** - * The maximum threshold for error relative to the baseline. - */ - maximumError?: string; - /** - * The minimum threshold for warning relative to the baseline. - */ - minimumWarning?: string; - /** - * The minimum threshold for error relative to the baseline. - */ - minimumError?: string; - /** - * The threshold for warning relative to the baseline (min & max). - */ - warning?: string; - /** - * The threshold for error relative to the baseline (min & max). - */ - error?: string; -} +import { Budget } from '../../browser/schema'; export interface Compilation { assets: any; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts index f0f2a24250..35cf0db898 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -1,20 +1,20 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { ExtraEntryPoint } from '../../browser'; -import { computeBundleName } from '../models/webpack-configs/utils'; +import { ExtraEntryPoint } from '../../browser/schema'; +import { normalizeExtraEntryPoints } from '../models/webpack-configs/utils'; export function generateEntryPoints(appConfig: any) { let entryPoints = ['polyfills', 'sw-register']; // Add all styles/scripts, except lazy-loaded ones. [ - ...(appConfig.styles as ExtraEntryPoint[]) + ...normalizeExtraEntryPoints(appConfig.styles as ExtraEntryPoint[], 'styles') .filter(entry => !entry.lazy) - .map(entry => computeBundleName(entry, 'styles')), - ...(appConfig.scripts as ExtraEntryPoint[]) + .map(entry => entry.bundleName), + ...normalizeExtraEntryPoints(appConfig.scripts as ExtraEntryPoint[], 'scripts') .filter(entry => !entry.lazy) - .map(entry => computeBundleName(entry, 'scripts')), + .map(entry => entry.bundleName), ].forEach(bundleName => { if (entryPoints.indexOf(bundleName) === -1) { entryPoints.push(bundleName); diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index ff00e51466..9402e23cb9 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -11,7 +11,7 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable, concat, of } from 'rxjs'; import { concatMap, last } from 'rxjs/operators'; @@ -25,7 +25,6 @@ import { getStylesConfig, } from '../angular-cli-files/models/webpack-configs'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; -import { Budget } from '../angular-cli-files/utilities/bundle-calculator'; import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; import { augmentAppWithServiceWorker } from '../angular-cli-files/utilities/service-worker'; @@ -34,99 +33,35 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; +import { addFileReplacements } from '../utils'; +import { BrowserBuilderSchema } from './schema'; const webpackMerge = require('webpack-merge'); -// TODO: Use quicktype to build our TypeScript interfaces from the JSON Schema itself, in -// the build system. -export interface BrowserBuilderOptions { - outputPath: string; - index: string; - main: string; - tsConfig: string; // previously 'tsconfig'. - aot: boolean; - vendorChunk: boolean; - commonChunk: boolean; - verbose: boolean; - progress: boolean; - extractCss: boolean; - watch: boolean; - outputHashing: 'none' | 'all' | 'media' | 'bundles'; - deleteOutputPath: boolean; - preserveSymlinks: boolean; - extractLicenses: boolean; - showCircularDependencies: boolean; - buildOptimizer: boolean; - namedChunks: boolean; - subresourceIntegrity: boolean; - serviceWorker: boolean; - skipAppShell: boolean; - forkTypeChecker: boolean; - statsJson: boolean; - lazyModules: string[]; - budgets: Budget[]; - - // Options with no defaults. - // TODO: reconsider this list. - polyfills?: string; - baseHref?: string; - deployUrl?: string; - i18nFile?: string; - i18nFormat?: string; - i18nOutFile?: string; - i18nOutFormat?: string; - poll?: number; - - // A couple of options have different names. - sourceMap: boolean; // previously 'sourcemaps'. - evalSourceMap: boolean; // previously 'evalSourcemaps'. - optimization: boolean; // previously 'target'. - i18nLocale?: string; // previously 'locale'. - i18nMissingTranslation?: string; // previously 'missingTranslation'. - - // These options were not available as flags. - assets: AssetPattern[]; - scripts: ExtraEntryPoint[]; - styles: ExtraEntryPoint[]; - stylePreprocessorOptions: { includePaths: string[] }; - - fileReplacements: { src: string; replaceWith: string; }[]; -} - -export interface AssetPattern { - glob: string; - input: string; - output: string; -} - -export interface ExtraEntryPoint { - input: string; - bundleName?: string; - lazy: boolean; -} - export interface WebpackConfigOptions { root: string; projectRoot: string; - buildOptions: BrowserBuilderOptions; + buildOptions: BrowserBuilderSchema; tsConfig: ts.ParsedCommandLine; tsConfigPath: string; supportES2015: boolean; } -export class BrowserBuilder implements Builder { +export class BrowserBuilder implements Builder { constructor(public context: BuilderContext) { } - run(builderConfig: BuilderConfiguration): Observable { + run(builderConfig: BuilderConfiguration): Observable { const options = builderConfig.options; const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); return of(null).pipe( concatMap(() => options.deleteOutputPath ? this._deleteOutputDir(root, normalize(options.outputPath), this.context.host) : of(null)), + concatMap(() => addFileReplacements(root, host, options.fileReplacements)), concatMap(() => new Observable(obs => { // Ensure Build Optimizer is only used with AOT. if (options.buildOptimizer && !options.aot) { @@ -135,7 +70,7 @@ export class BrowserBuilder implements Builder { let webpackConfig; try { - webpackConfig = this.buildWebpackConfig(root, projectRoot, options); + webpackConfig = this.buildWebpackConfig(root, projectRoot, host, options); } catch (e) { obs.error(e); @@ -216,22 +151,11 @@ export class BrowserBuilder implements Builder { buildWebpackConfig( root: Path, projectRoot: Path, - options: BrowserBuilderOptions, + host: virtualFs.Host, + options: BrowserBuilderSchema, ) { let wco: WebpackConfigOptions; - const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); - - options.fileReplacements.forEach(({ src, replaceWith }) => { - host.aliases.set( - join(root, normalize(src)), - join(root, normalize(replaceWith)), - ); - }); - - // TODO: make target defaults into configurations instead - // options = this.addTargetDefaults(options); - const tsConfigPath = getSystemPath(normalize(resolve(root, normalize(options.tsConfig)))); const tsConfig = readTsconfig(tsConfigPath); @@ -243,37 +167,12 @@ export class BrowserBuilder implements Builder { wco = { root: getSystemPath(root), projectRoot: getSystemPath(projectRoot), - // TODO: use only this.options, it contains all flags and configs items already. buildOptions: options, tsConfig, tsConfigPath, supportES2015, }; - - // TODO: add the old dev options as the default, and the prod one as a configuration: - // development: { - // environment: 'dev', - // outputHashing: 'media', - // sourcemaps: true, - // extractCss: false, - // namedChunks: true, - // aot: false, - // vendorChunk: true, - // buildOptimizer: false, - // }, - // production: { - // environment: 'prod', - // outputHashing: 'all', - // sourcemaps: false, - // extractCss: true, - // namedChunks: false, - // aot: true, - // extractLicenses: true, - // vendorChunk: false, - // buildOptimizer: buildOptions.aot !== false, - // } - const webpackConfigs: {}[] = [ getCommonConfig(wco), getBrowserConfig(wco), diff --git a/packages/angular_devkit/build_angular/src/browser/schema.d.ts b/packages/angular_devkit/build_angular/src/browser/schema.d.ts new file mode 100644 index 0000000000..7a551cf926 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/browser/schema.d.ts @@ -0,0 +1,353 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export interface BrowserBuilderSchema { + /** + * List of static application assets. + */ + assets: AssetPattern[]; + + /** + * The name of the main entry-point file. + */ + main: string; + + /** + * The name of the polyfills file. + */ + polyfills?: string; + + /** + * The name of the TypeScript configuration file. + */ + tsConfig: string; + + /** + * Global scripts to be included in the build. + */ + scripts: ExtraEntryPoint[]; + + /** + * Global styles to be included in the build. + */ + styles: ExtraEntryPoint[]; + + /** + * Options to pass to style preprocessors. + */ + stylePreprocessorOptions?: StylePreprocessorOptions; + + /** + * Defines the optimization level of the build. + */ + optimization: boolean; + + /** + * Replace files with other files in the build. + */ + fileReplacements: FileReplacements[]; + + /** + * Path where output will be placed. + */ + outputPath: string; + + /** + * Build using Ahead of Time compilation. + */ + aot: boolean; + + /** + * Output sourcemaps. + */ + sourceMap: boolean; + + /** + * Output in-file eval sourcemaps. + */ + evalSourceMap: boolean; + + /** + * Use a separate bundle containing only vendor libraries. + */ + vendorChunk: boolean; + + /** + * Use a separate bundle containing code used across multiple bundles. + */ + commonChunk: boolean; + + /** + * Base url for the application being built. + */ + baseHref?: string; + + /** + * URL where files will be deployed. + */ + deployUrl?: string; + + /** + * Adds more details to output logging. + */ + verbose: boolean; + + /** + * Log progress to the console while building. + */ + progress: boolean; + + /** + * Localization file to use for i18n. + */ + i18nFile?: string; + + /** + * Format of the localization file specified with --i18n-file. + */ + i18nFormat?: string; + + /** + * Locale to use for i18n. + */ + i18nLocale?: string; + + /** + * How to handle missing translations for i18n. + */ + i18nMissingTranslation?: string; + + /** + * Extract css from global styles onto css files instead of js ones. + */ + extractCss: boolean; + + /** + * Run build when files change. + */ + watch: boolean; + + /** + * Define the output filename cache-busting hashing mode. + */ + outputHashing: OutputHashing; + + /** + * Enable and define the file watching poll time period in milliseconds. + */ + poll?: number; + + /** + * Delete the output path before building. + */ + deleteOutputPath: boolean; + + /** + * Do not use the real path when resolving modules. + */ + preserveSymlinks: boolean; + + /** + * Extract all licenses in a separate file, in the case of production builds only. + */ + extractLicenses: boolean; + + /** + * Show circular dependency warnings on builds. + */ + showCircularDependencies: boolean; + + /** + * Enables @angular-devkit/build-optimizer optimizations when using the 'aot' option. + */ + buildOptimizer: boolean; + + /** + * Use file name for lazy loaded chunks. + */ + namedChunks: boolean; + + /** + * Enables the use of subresource integrity validation. + */ + subresourceIntegrity: boolean; + + /** + * Generates a service worker config for production builds. + */ + serviceWorker: boolean; + + /** + * Flag to prevent building an app shell. + */ + skipAppShell: boolean; + + /** + * The name of the index HTML file. + */ + index: string; + + /** + * Generates a 'stats.json' file which can be analyzed using tools + * such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse. + */ + statsJson: boolean; + + /** + * Run the TypeScript type checker in a forked process. + */ + forkTypeChecker: boolean; + + /** + * List of additional NgModule files that will be lazy loaded. + * Lazy router modules with be discovered automatically. + */ + lazyModules: string[]; + + /** + * Budget thresholds to ensure parts of your application stay within boundaries which you set. + */ + budgets: Budget[]; +} + +export interface AssetPattern { + /** + * The pattern to match. + */ + glob: string; + + /** + * The input path dir in which to apply 'glob'. Defaults to the project root. + */ + input: string; + + /** + * Absolute path within the output. + */ + output: string; +} + +export type ExtraEntryPoint = string | ExtraEntryPointObject; + +export interface ExtraEntryPointObject { + /** + * The file to include. + */ + input: string; + + /** + * The bundle name for this extra entry point. + */ + bundleName?: string; + + /** + * If the bundle will be lazy loaded. + */ + lazy: boolean; +} + +export declare type FileReplacement = DeprecatedFileReplacment | CurrentFileReplacement; + +export interface DeprecatedFileReplacment { + /** + * The file that should be replaced. + */ + src: string; + + /** + * The file that should replace. + */ + replaceWith: string; +} + +export interface CurrentFileReplacement { + /** + * The file that should be replaced. + */ + replace: string; + + /** + * The file that should replace. + */ + with: string; +} + +/** + * Define the output filename cache-busting hashing mode. + */ +export enum OutputHashing { + All = 'all', + Bundles = 'bundles', + Media = 'media', + None = 'none', +} + +/** + * Options to pass to style preprocessors + */ +export interface StylePreprocessorOptions { + /** + * Paths to include. Paths will be resolved to project root. + */ + includePaths: string[]; +} + +export interface Budget { + /** + * The type of budget. + */ + type: BudgetType; + + /** + * The name of the bundle. + */ + name: string; + + /** + * The baseline size for comparison. + */ + baseline: string; + + /** + * The maximum threshold for warning relative to the baseline. + */ + maximumWarning: string; + + /** + * The maximum threshold for error relative to the baseline. + */ + maximumError: string; + + /** + * The minimum threshold for warning relative to the baseline. + */ + minimumWarning: string; + + /** + * The minimum threshold for error relative to the baseline. + */ + minimumError: string; + + /** + * The threshold for warning relative to the baseline (min & max). + */ + warning: string; + + /** + * The threshold for error relative to the baseline (min & max). + */ + error: string; +} + +export enum BudgetType { + Initial = 'initial', + All = 'all', + Any = 'any', + AllScript = 'allScript', + AnyScript = 'anyScript', + Bundle = 'bundle', +} diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index b18fbc7e69..ad40b49955 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -27,7 +27,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/scriptEntryPoint" + "$ref": "#/definitions/extraEntryPoint" } }, "styles": { @@ -35,11 +35,11 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/styleEntryPoint" + "$ref": "#/definitions/extraEntryPoint" } }, "stylePreprocessorOptions": { - "description": "Options to pass to style preprocessors", + "description": "Options to pass to style preprocessors.", "type": "object", "properties": { "includePaths": { @@ -62,15 +62,7 @@ "description": "Replace files with other files in the build.", "type": "array", "items": { - "type": "object", - "properties": { - "src": { - "type": "string" - }, - "replaceWith": { - "type": "string" - } - } + "$ref": "#/definitions/fileReplacement" }, "default": [] }, @@ -164,7 +156,7 @@ }, "deleteOutputPath": { "type": "boolean", - "description": "delete-output-path", + "description": "Delete the output path before building.", "default": true }, "preserveSymlinks": { @@ -269,48 +261,70 @@ "output" ] }, - "styleEntryPoint": { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "The file to include." - }, - "bundleName": { - "type": "string", - "description": "The bundle name for this extra entry point." + "fileReplacement": { + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string" + }, + "replaceWith": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "src", + "replaceWith" + ] }, - "lazy": { - "type": "boolean", - "description": "If the bundle will be lazy loaded later.", - "default": false + { + "type": "object", + "properties": { + "replace": { + "type": "string" + }, + "with": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "replace", + "with" + ] } - }, - "additionalProperties": false, - "required": [ - "input" ] }, - "scriptEntryPoint": { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "The file to include." + "extraEntryPoint": { + "oneOf": [ + { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include." + }, + "bundleName": { + "type": "string", + "description": "The bundle name for this extra entry point." + }, + "lazy": { + "type": "boolean", + "description": "If the bundle will be lazy loaded.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "input" + ] }, - "bundleName": { + { "type": "string", - "description": "The bundle name for this extra entry point. Default is the basename of the input." - }, - "lazy": { - "type": "boolean", - "description": "If the bundle will be lazy loaded later.", - "default": false + "description": "The file to include." } - }, - "additionalProperties": false, - "required": [ - "input" ] }, "budget": { diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index aa3e066e83..96e8843023 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -12,11 +12,12 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, resolve, tags } from '@angular-devkit/core'; +import { Path, getSystemPath, resolve, tags, virtualFs } from '@angular-devkit/core'; import { existsSync, readFileSync } from 'fs'; +import * as fs from 'fs'; import * as path from 'path'; import { Observable } from 'rxjs'; -import { concatMap, map } from 'rxjs/operators'; +import { concatMap, map, tap } from 'rxjs/operators'; import * as url from 'url'; import * as webpack from 'webpack'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; @@ -26,10 +27,9 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; -import { - BrowserBuilder, - BrowserBuilderOptions, -} from '../browser/'; +import { BrowserBuilder } from '../browser/'; +import { BrowserBuilderSchema } from '../browser/schema'; +import { addFileReplacements } from '../utils'; const opn = require('opn'); const WebpackDevServer = require('webpack-dev-server'); @@ -87,16 +87,18 @@ export class DevServerBuilder implements Builder { const options = builderConfig.options; const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); + let browserOptions: BrowserBuilderSchema; return checkPort(options.port, options.host).pipe( - concatMap((port) => { - options.port = port; - - return this._getBrowserOptions(options); - }), - concatMap((browserOptions) => new Observable(obs => { + tap((port) => options.port = port), + concatMap(() => this._getBrowserOptions(options)), + tap((opts) => browserOptions = opts), + concatMap(() => addFileReplacements(root, host, browserOptions.fileReplacements)), + concatMap(() => new Observable(obs => { const browserBuilder = new BrowserBuilder(this.context); - const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, browserOptions); + const webpackConfig = browserBuilder.buildWebpackConfig( + root, projectRoot, host, browserOptions); const webpackCompiler = webpack(webpackConfig); const statsConfig = getWebpackStatsConfig(browserOptions.verbose); @@ -220,7 +222,7 @@ export class DevServerBuilder implements Builder { root: Path, projectRoot: Path, options: DevServerBuilderOptions, - browserOptions: BrowserBuilderOptions, + browserOptions: BrowserBuilderSchema, ) { const systemRoot = getSystemPath(root); if (options.disableHostCheck) { @@ -270,7 +272,7 @@ export class DevServerBuilder implements Builder { private _addLiveReload( options: DevServerBuilderOptions, - browserOptions: BrowserBuilderOptions, + browserOptions: BrowserBuilderSchema, webpackConfig: any, // tslint:disable-line:no-any clientAddress: string, ) { @@ -355,7 +357,7 @@ export class DevServerBuilder implements Builder { config.proxy = proxyConfig; } - private _buildServePath(options: DevServerBuilderOptions, browserOptions: BrowserBuilderOptions) { + private _buildServePath(options: DevServerBuilderOptions, browserOptions: BrowserBuilderSchema) { let servePath = options.servePath; if (!servePath && servePath !== '') { const defaultServePath = @@ -420,7 +422,7 @@ export class DevServerBuilder implements Builder { // Override browser build watch setting. const overrides = { watch: options.watch }; const browserTargetSpec = { project, target, configuration, overrides }; - const builderConfig = architect.getBuilderConfiguration( + const builderConfig = architect.getBuilderConfiguration( browserTargetSpec); return architect.getBuilderDescription(builderConfig).pipe( diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index b20732b0d8..e6fdc0ebc7 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -5,22 +5,30 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ - import { BuildEvent, Builder, BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { resolve } from '@angular-devkit/core'; +import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import * as fs from 'fs'; import * as path from 'path'; import { Observable } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; import * as webpack from 'webpack'; +import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; +import { + getAotConfig, + getCommonConfig, + getStylesConfig, +} from '../angular-cli-files/models/webpack-configs'; import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; -import { BrowserBuilder, BrowserBuilderOptions } from '../browser'; +import { BrowserBuilderSchema } from '../browser/schema'; const MemoryFS = require('memory-fs'); +const webpackMerge = require('webpack-merge'); export interface ExtractI18nBuilderOptions { @@ -45,7 +53,7 @@ export class ExtractI18nBuilder implements Builder { const overrides = { watch: false }; const browserTargetSpec = { project, target: targetName, configuration, overrides }; - const browserBuilderConfig = architect.getBuilderConfiguration( + const browserBuilderConfig = architect.getBuilderConfiguration( browserTargetSpec); return architect.getBuilderDescription(browserBuilderConfig).pipe( @@ -54,7 +62,6 @@ export class ExtractI18nBuilder implements Builder { map(browserBuilderConfig => browserBuilderConfig.options), concatMap((validatedBrowserOptions) => new Observable(obs => { const browserOptions = validatedBrowserOptions; - const browserBuilder = new BrowserBuilder(this.context); // We need to determine the outFile name so that AngularCompiler can retrieve it. let outFile = options.outFile || getI18nOutfile(options.i18nFormat); @@ -64,13 +71,16 @@ export class ExtractI18nBuilder implements Builder { } // Extracting i18n uses the browser target webpack config with some specific options. - const webpackConfig = browserBuilder.buildWebpackConfig(root, projectRoot, { + const webpackConfig = this.buildWebpackConfig(root, projectRoot, { ...browserOptions, optimization: false, i18nLocale: options.i18nLocale, - i18nOutFormat: options.i18nFormat, - i18nOutFile: outFile, + i18nFormat: options.i18nFormat, + i18nFile: outFile, aot: true, + assets: [], + scripts: [], + styles: [], }); const webpackCompiler = webpack(webpackConfig); @@ -108,6 +118,37 @@ export class ExtractI18nBuilder implements Builder { })), ); } + + buildWebpackConfig( + root: Path, + projectRoot: Path, + options: BrowserBuilderSchema, + ) { + let wco: WebpackConfigOptions; + + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); + + const tsConfigPath = getSystemPath(normalize(resolve(root, normalize(options.tsConfig)))); + const tsConfig = readTsconfig(tsConfigPath); + + wco = { + root: getSystemPath(root), + projectRoot: getSystemPath(projectRoot), + // TODO: use only this.options, it contains all flags and configs items already. + buildOptions: options, + tsConfig, + tsConfigPath, + supportES2015: false, + }; + + const webpackConfigs: {}[] = [ + getCommonConfig(wco), + getAotConfig(wco, host, true), + getStylesConfig(wco), + ]; + + return webpackMerge(webpackConfigs); + } } function getI18nOutfile(format: string) { diff --git a/packages/angular_devkit/build_angular/src/index.ts b/packages/angular_devkit/build_angular/src/index.ts index 909fbed598..ba47eb494b 100644 --- a/packages/angular_devkit/build_angular/src/index.ts +++ b/packages/angular_devkit/build_angular/src/index.ts @@ -15,9 +15,11 @@ export * from './app-shell'; export * from './browser'; +export * from './browser/schema'; export * from './dev-server'; export * from './extract-i18n'; export * from './karma'; +export * from './karma/schema'; export * from './protractor'; export * from './server'; export * from './tslint'; diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index 510840f451..9e44e70ade 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -12,9 +12,10 @@ import { BuilderConfiguration, BuilderContext, } from '@angular-devkit/architect'; -import { Path, getSystemPath, join, normalize, resolve, virtualFs } from '@angular-devkit/core'; +import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; +import { concatMap } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; import { @@ -25,118 +26,84 @@ import { } from '../angular-cli-files/models/webpack-configs'; import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; -import { - AssetPattern, - ExtraEntryPoint, -} from '../browser'; +import { CurrentFileReplacement } from '../browser/schema'; +import { addFileReplacements } from '../utils'; +import { KarmaBuilderSchema } from './schema'; const webpackMerge = require('webpack-merge'); -export interface KarmaBuilderOptions { - main: string; - tsConfig: string; // previously 'tsconfig'. - karmaConfig: string; // previously 'config'. - watch: boolean; - codeCoverage: boolean; - codeCoverageExclude: string[]; - progress: boolean; - preserveSymlinks?: boolean; - - // Options with no defaults. - polyfills?: string; - poll?: number; - port?: number; - browsers?: string; - - // A couple of options have different names. - sourceMap: boolean; // previously 'sourcemaps'. - - // These options were not available as flags. - assets: AssetPattern[]; - scripts: ExtraEntryPoint[]; - styles: ExtraEntryPoint[]; - stylePreprocessorOptions: { includePaths: string[] }; - - // Some options are not needed anymore. - // app?: string; // apps aren't used with build facade - // singleRun?: boolean; // same as watch - // colors: boolean; // we just passed it to the karma config - // logLevel?: string; // same as above - // reporters?: string; // same as above - - fileReplacements: { src: string; replaceWith: string; }[]; +export interface KarmaBuilderOptions extends KarmaBuilderSchema { + fileReplacements: CurrentFileReplacement[]; } export class KarmaBuilder implements Builder { constructor(public context: BuilderContext) { } run(builderConfig: BuilderConfiguration): Observable { - - // const root = getSystemPath(builderConfig.root); const options = builderConfig.options; const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); - return new Observable(obs => { - const karma = requireProjectModule(getSystemPath(projectRoot), 'karma'); - const karmaConfig = getSystemPath(resolve(root, normalize(options.karmaConfig))); - - // TODO: adjust options to account for not passing them blindly to karma. - // const karmaOptions: any = Object.assign({}, options); - // tslint:disable-next-line:no-any - const karmaOptions: any = { - singleRun: !options.watch, - }; - - // Convert browsers from a string to an array - if (options.browsers) { - karmaOptions.browsers = options.browsers.split(','); - } - - karmaOptions.buildWebpack = { - root: getSystemPath(root), - projectRoot: getSystemPath(projectRoot), - options: options, - webpackConfig: this._buildWebpackConfig(root, projectRoot, options), - // Pass onto Karma to emit BuildEvents. - successCb: () => obs.next({ success: true }), - failureCb: () => obs.next({ success: false }), - }; - - // TODO: inside the configs, always use the project root and not the workspace root. - // Until then we pretend the app root is relative (``) but the same as `projectRoot`. - (karmaOptions.buildWebpack.options as any).root = ''; // tslint:disable-line:no-any - - // Assign additional karmaConfig options to the local ngapp config - karmaOptions.configFile = karmaConfig; - - // Complete the observable once the Karma server returns. - const karmaServer = new karma.Server(karmaOptions, () => obs.complete()); - karmaServer.start(); - - // Cleanup, signal Karma to exit. - return () => { - // Karma does not seem to have a way to exit the server gracefully. - // See https://github.com/karma-runner/karma/issues/2867#issuecomment-369912167 - // TODO: make a PR for karma to add `karmaServer.close(code)`, that - // calls `disconnectBrowsers(code);` - // karmaServer.close(); - }; - }); + return of(null).pipe( + concatMap(() => addFileReplacements(root, host, options.fileReplacements)), + concatMap(() => new Observable(obs => { + const karma = requireProjectModule(getSystemPath(projectRoot), 'karma'); + const karmaConfig = getSystemPath(resolve(root, normalize(options.karmaConfig))); + + // TODO: adjust options to account for not passing them blindly to karma. + // const karmaOptions: any = Object.assign({}, options); + // tslint:disable-next-line:no-any + const karmaOptions: any = { + singleRun: !options.watch, + }; + + // Convert browsers from a string to an array + if (options.browsers) { + karmaOptions.browsers = options.browsers.split(','); + } + + karmaOptions.buildWebpack = { + root: getSystemPath(root), + projectRoot: getSystemPath(projectRoot), + options: options, + webpackConfig: this._buildWebpackConfig(root, projectRoot, host, options), + // Pass onto Karma to emit BuildEvents. + successCb: () => obs.next({ success: true }), + failureCb: () => obs.next({ success: false }), + }; + + // TODO: inside the configs, always use the project root and not the workspace root. + // Until then we pretend the app root is relative (``) but the same as `projectRoot`. + (karmaOptions.buildWebpack.options as any).root = ''; // tslint:disable-line:no-any + + // Assign additional karmaConfig options to the local ngapp config + karmaOptions.configFile = karmaConfig; + + // Complete the observable once the Karma server returns. + const karmaServer = new karma.Server(karmaOptions, () => obs.complete()); + karmaServer.start(); + + // Cleanup, signal Karma to exit. + return () => { + // Karma does not seem to have a way to exit the server gracefully. + // See https://github.com/karma-runner/karma/issues/2867#issuecomment-369912167 + // TODO: make a PR for karma to add `karmaServer.close(code)`, that + // calls `disconnectBrowsers(code);` + // karmaServer.close(); + }; + })), + ); } - private _buildWebpackConfig(root: Path, projectRoot: Path, options: KarmaBuilderOptions) { + private _buildWebpackConfig( + root: Path, + projectRoot: Path, + host: virtualFs.Host, + options: KarmaBuilderOptions, + ) { let wco: WebpackConfigOptions; - const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); - - options.fileReplacements.forEach(({ src, replaceWith }) => { - host.aliases.set( - join(root, normalize(src)), - join(root, normalize(replaceWith)), - ); - }); - const tsConfigPath = getSystemPath(resolve(root, normalize(options.tsConfig as string))); const tsConfig = readTsconfig(tsConfigPath); diff --git a/packages/angular_devkit/build_angular/src/karma/schema.d.ts b/packages/angular_devkit/build_angular/src/karma/schema.d.ts new file mode 100644 index 0000000000..650e05c3d6 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/karma/schema.d.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { BrowserBuilderSchema } from '../browser/schema'; + + +// TODO: in TS 2.8 use Extract instead of Pick to make a subset of another type. +export interface KarmaBuilderSchema extends Pick { + /** + * The name of the Karma configuration file.. + */ + karmaConfig: string; + + /** + * Override which browsers tests are run against. + */ + browsers: string; + + /** + * Output a code coverage report. + */ + codeCoverage: boolean; + + /** + * Globs to exclude from code coverage. + */ + codeCoverageExclude: string[]; +} diff --git a/packages/angular_devkit/build_angular/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json index 79a4d7c80e..5b7115c979 100644 --- a/packages/angular_devkit/build_angular/src/karma/schema.json +++ b/packages/angular_devkit/build_angular/src/karma/schema.json @@ -13,7 +13,7 @@ }, "karmaConfig": { "type": "string", - "description": "The name of the TypeScript configuration file." + "description": "The name of the Karma configuration file." }, "polyfills": { "type": "string", @@ -32,7 +32,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/scriptEntryPoint" + "$ref": "#/definitions/extraEntryPoint" } }, "styles": { @@ -40,7 +40,7 @@ "type": "array", "default": [], "items": { - "$ref": "#/definitions/styleEntryPoint" + "$ref": "#/definitions/extraEntryPoint" } }, "stylePreprocessorOptions": { @@ -107,15 +107,40 @@ "description": "Replace files with other files in the build.", "type": "array", "items": { - "type": "object", - "properties": { - "src": { - "type": "string" + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string" + }, + "replaceWith": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "src", + "replaceWith" + ] }, - "replaceWith": { - "type": "string" + { + "type": "object", + "properties": { + "replace": { + "type": "string" + }, + "with": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "replace", + "with" + ] } - } + ] }, "default": [] } @@ -150,50 +175,34 @@ "output" ] }, - "styleEntryPoint": { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "The file to include." + "extraEntryPoint": { + "oneOf": [ + { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The file to include." + }, + "bundleName": { + "type": "string", + "description": "The bundle name for this extra entry point." + }, + "lazy": { + "type": "boolean", + "description": "If the bundle will be lazy loaded.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "input" + ] }, - "bundleName": { - "type": "string", - "description": "The bundle name for this extra entry point.", - "default": "styles" - }, - "lazy": { - "type": "boolean", - "description": "If the bundle will be lazy loaded later.", - "default": false - } - }, - "additionalProperties": false, - "required": [ - "input" - ] - }, - "scriptEntryPoint": { - "type": "object", - "properties": { - "input": { + { "type": "string", "description": "The file to include." - }, - "bundleName": { - "type": "string", - "description": "The bundle name for this extra entry point.", - "default": "scripts" - }, - "lazy": { - "type": "boolean", - "description": "If the bundle will be lazy loaded later.", - "default": false } - }, - "additionalProperties": false, - "required": [ - "input" ] } } diff --git a/packages/angular_devkit/build_angular/src/utils/add-file-replacements.ts b/packages/angular_devkit/build_angular/src/utils/add-file-replacements.ts new file mode 100644 index 0000000000..f776160f03 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/add-file-replacements.ts @@ -0,0 +1,74 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { BaseException, Path, join, normalize, virtualFs } from '@angular-devkit/core'; +import { Observable, forkJoin, of } from 'rxjs'; +import { map, tap } from 'rxjs/operators'; +import { + CurrentFileReplacement, + DeprecatedFileReplacment, + FileReplacement, +} from '../browser/schema'; + + +export class MissingFileReplacementException extends BaseException { + constructor(path: String) { + super(`The ${path} path in file replacements does not exist.`); + } +} + +// Note: This method changes the file replacements in place. +export function addFileReplacements( + root: Path, + host: virtualFs.AliasHost, + fileReplacements: FileReplacement[], +): Observable { + + if (fileReplacements.length === 0) { + return of(null); + } + + // Normalize the legacy format into the current one. + for (const fileReplacement of fileReplacements) { + const currentFormat = fileReplacement as CurrentFileReplacement; + const maybeOldFormat = fileReplacement as DeprecatedFileReplacment; + + if (maybeOldFormat.src && maybeOldFormat.replaceWith) { + currentFormat.replace = maybeOldFormat.src; + currentFormat.with = maybeOldFormat.replaceWith; + } + } + + const normalizedFileReplacements = fileReplacements as CurrentFileReplacement[]; + + // Ensure all the replacements exist. + const errorOnFalse = (path: string) => tap((exists: boolean) => { + if (!exists) { + throw new MissingFileReplacementException(path); + } + }); + + const existObservables = normalizedFileReplacements + .map(replacement => [ + host.exists(join(root, replacement.replace)).pipe(errorOnFalse(replacement.replace)), + host.exists(join(root, replacement.with)).pipe(errorOnFalse(replacement.with)), + ]) + .reduce((prev, curr) => prev.concat(curr), []); + + return forkJoin(existObservables).pipe( + tap(() => { + normalizedFileReplacements.forEach(replacement => { + host.aliases.set( + join(root, normalize(replacement.replace)), + join(root, normalize(replacement.with)), + ); + }); + }), + map(() => null), + ); +} diff --git a/packages/angular_devkit/build_angular/src/utils/index.ts b/packages/angular_devkit/build_angular/src/utils/index.ts index ef85078838..9e6614690f 100644 --- a/packages/angular_devkit/build_angular/src/utils/index.ts +++ b/packages/angular_devkit/build_angular/src/utils/index.ts @@ -7,3 +7,4 @@ */ export * from './run-module-as-observable-fork'; +export * from './add-file-replacements'; diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index 022c8e3f1a..0cbff858b1 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { BrowserBuilderOptions } from '../../src'; +import { BrowserBuilderSchema } from '../../src'; import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; @@ -137,7 +137,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - const overrides: Partial = { namedChunks: false }; + const overrides: Partial = { namedChunks: false }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -170,7 +170,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - const overrides: Partial = { commonChunk: false }; + const overrides: Partial = { commonChunk: false }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -203,7 +203,7 @@ describe('Browser Builder lazy modules', () => { }); host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); - const overrides: Partial = { lazyModules: ['src/app/lazy/lazy.module'] }; + const overrides: Partial = { lazyModules: ['src/app/lazy/lazy.module'] }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), diff --git a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts index 3b295a6d11..9937caba86 100644 --- a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts @@ -32,8 +32,8 @@ describe('Browser Builder file replacements', () => { const overrides = { fileReplacements: [ { - src: normalize('/src/meaning.ts'), - replaceWith: normalize('/src/meaning-too.ts'), + replace: normalize('/src/meaning.ts'), + with: normalize('/src/meaning-too.ts'), }, ], }; @@ -50,18 +50,51 @@ describe('Browser Builder file replacements', () => { ).subscribe(undefined, done.fail, done); }, Timeout.Basic); - it(`fails compilation with missing 'to' file`, (done) => { + it(`allows file replacements with deprecated format`, (done) => { const overrides = { fileReplacements: [ { src: normalize('/src/meaning.ts'), - replaceWith: normalize('/src/meaning-three.ts'), + replaceWith: normalize('/src/meaning-too.ts'), }, ], }; runTargetSpec(host, browserTargetSpec, overrides).pipe( - tap((buildEvent) => expect(buildEvent.success).toBe(false)), + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'main.js'); + expect(virtualFs.fileBufferToString(host.scopedSync().read(fileName))) + .toMatch(/meaning\s*=\s*42/); + expect(virtualFs.fileBufferToString(host.scopedSync().read(fileName))) + .not.toMatch(/meaning\s*=\s*10/); + }), ).subscribe(undefined, done.fail, done); }, Timeout.Basic); + + it(`fails compilation with missing 'replace' file`, (done) => { + const overrides = { + fileReplacements: [ + { + replace: normalize('/src/meaning.ts'), + with: normalize('/src/meaning-three.ts'), + }, + ], + }; + + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + }, Timeout.Basic); + + it(`fails compilation with missing 'with' file`, (done) => { + const overrides = { + fileReplacements: [ + { + replace: normalize('/src/meaning-three.ts'), + with: normalize('/src/meaning-too.ts'), + }, + ], + }; + + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts index 572f3a5459..391b260bae 100644 --- a/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/scripts-array_spec_large.ts @@ -27,13 +27,13 @@ describe('Browser Builder scripts array', () => { 'src/pre-rename-lazy-script.js': 'console.log(\'pre-rename-lazy-script\');', }; const getScriptsOption = () => [ - { input: 'src/input-script.js' }, - { input: 'src/zinput-script.js' }, - { input: 'src/finput-script.js' }, - { input: 'src/uinput-script.js' }, - { input: 'src/binput-script.js' }, - { input: 'src/ainput-script.js' }, - { input: 'src/cinput-script.js' }, + 'src/input-script.js', + 'src/zinput-script.js', + 'src/finput-script.js', + 'src/uinput-script.js', + 'src/binput-script.js', + 'src/ainput-script.js', + 'src/cinput-script.js', { input: 'src/lazy-script.js', bundleName: 'lazy-script', lazy: true }, { input: 'src/pre-rename-script.js', bundleName: 'renamed-script' }, { input: 'src/pre-rename-lazy-script.js', bundleName: 'renamed-lazy-script', lazy: true }, diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index 438e93ab45..99ed697eab 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -32,7 +32,7 @@ describe('Browser Builder styles', () => { 'src/pre-rename-lazy-style.css': '.pre-rename-lazy-style { color: red }', }; const getStylesOption = () => [ - { input: 'src/input-style.css' }, + 'src/input-style.css', { input: 'src/lazy-style.css', bundleName: 'lazy-style', lazy: true }, { input: 'src/pre-rename-style.css', bundleName: 'renamed-style' }, { input: 'src/pre-rename-lazy-style.css', bundleName: 'renamed-lazy-style', lazy: true }, @@ -166,7 +166,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, sourceMap: true, - styles: [{ input: `src/styles.${ext}` }], + styles: [`src/styles.${ext}`], }; host.replaceInFile('src/app/app.component.ts', './app.component.css', @@ -260,7 +260,7 @@ describe('Browser Builder styles', () => { const overrides = { extractCss: true, - styles: [{ input: `src/styles.${ext}` }], + styles: [`src/styles.${ext}`], stylePreprocessorOptions: { includePaths: ['src/style-paths'], }, @@ -296,7 +296,7 @@ describe('Browser Builder styles', () => { const overrides = { aot: true, extractCss: true, - styles: [{ input: `src/styles.scss` }], + styles: [`src/styles.scss`], }; runTargetSpec(host, browserTargetSpec, overrides).pipe( @@ -340,7 +340,7 @@ describe('Browser Builder styles', () => { `, }); - const overrides = { extractCss: true, styles: [{ input: `src/styles.scss` }] }; + const overrides = { extractCss: true, styles: [`src/styles.scss`] }; runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), @@ -519,8 +519,8 @@ describe('Browser Builder styles', () => { it(`supports bootstrap@4`, (done) => { const overrides = { extractCss: true, - styles: [{ input: '../../../../node_modules/bootstrap/dist/css/bootstrap.css' }], - scripts: [{ input: '../../../../node_modules/bootstrap/dist/js/bootstrap.js' }], + styles: ['../../../../node_modules/bootstrap/dist/css/bootstrap.css'], + scripts: ['../../../../node_modules/bootstrap/dist/js/bootstrap.js'], }; runTargetSpec(host, browserTargetSpec, overrides).pipe( diff --git a/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts index 778a3cb826..584c363f75 100644 --- a/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/replacements_spec_large.ts @@ -33,8 +33,8 @@ describe('Karma Builder file replacements', () => { const overrides = { fileReplacements: [{ - src: normalize('/src/meaning.ts'), - replaceWith: normalize('/src/meaning-too.ts'), + replace: normalize('/src/meaning.ts'), + with: normalize('/src/meaning-too.ts'), }], }; diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 547e650613..975e1cc5d3 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -141,8 +141,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace configurations: { production: { fileReplacements: [{ - src: `${projectRoot}src/environments/environment.ts`, - replaceWith: `${projectRoot}src/environments/environment.prod.ts`, + replace: `${projectRoot}src/environments/environment.ts`, + with: `${projectRoot}src/environments/environment.prod.ts`, }], optimization: true, outputHashing: 'all', diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 618e844480..a2c1d84dee 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, Path, basename, join, normalize } from '@angular-devkit/core'; +import { JsonObject, Path, join, normalize } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -291,8 +291,8 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { ...(isProduction && serviceWorker ? { serviceWorker: true } : {}), fileReplacements: [ { - src: `${app.root}/${source}`, - replaceWith: `${app.root}/${environments[environment]}`, + replace: `${app.root}/${source}`, + with: `${app.root}/${environments[environment]}`, }, ], }; @@ -321,20 +321,14 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { } function _extraEntryMapper(extraEntry: string | JsonObject) { - let entry: JsonObject; + let entry: string | JsonObject; if (typeof extraEntry === 'string') { - entry = { input: join(app.root as Path, extraEntry) }; + entry = join(app.root as Path, extraEntry); } else { const input = join(app.root as Path, extraEntry.input as string || ''); - const lazy = !!extraEntry.lazy; - entry = { input }; - - if (!extraEntry.output && lazy) { - entry.lazy = true; - entry.bundleName = basename( - normalize(input.replace(/\.(js|css|scss|sass|less|styl)$/i, '')), - ); - } else if (extraEntry.output) { + entry = { input, lazy: extraEntry.lazy }; + + if (extraEntry.output) { entry.bundleName = extraEntry.output; } } diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 9a5a0b3f85..b19fa3b5af 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -505,7 +505,7 @@ describe('Migration to v6', () => { const build = getConfig(tree).projects.foo.architect.build; expect(build.builder).toEqual('@angular-devkit/build-angular:browser'); expect(build.options.scripts).toEqual([]); - expect(build.options.styles).toEqual([{ input: 'src/styles.css' }]); + expect(build.options.styles).toEqual(['src/styles.css']); expect(build.options.assets).toEqual([ { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, @@ -525,8 +525,8 @@ describe('Migration to v6', () => { vendorChunk: false, buildOptimizer: true, fileReplacements: [{ - src: 'src/environments/environment.ts', - replaceWith: 'src/environments/environment.prod.ts', + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', }], }, }); @@ -566,7 +566,7 @@ describe('Migration to v6', () => { expect(test.options.tsConfig).toEqual('src/tsconfig.spec.json'); expect(test.options.karmaConfig).toEqual('./karma.conf.js'); expect(test.options.scripts).toEqual([]); - expect(test.options.styles).toEqual([{ input: 'src/styles.css' }]); + expect(test.options.styles).toEqual(['src/styles.css']); expect(test.options.assets).toEqual([ { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index 7881cfd9e5..df33c69d25 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -33,9 +33,7 @@ } ], "styles": [ - { - "input": "src/styles.css" - } + "src/styles.css" ], "scripts": [] }, @@ -43,8 +41,8 @@ "production": { "fileReplacements": [ { - "src": "src/environments/environments.ts", - "replaceWith": "src/environments/environments.prod.ts" + "replace": "src/environments/environments.ts", + "with": "src/environments/environments.prod.ts" } ], "optimization": true, From efb67318703adfb9bfe3d6d9f430dad123c1e849 Mon Sep 17 00:00:00 2001 From: Christofer Steingrefer Date: Thu, 12 Apr 2018 12:54:05 +0200 Subject: [PATCH 429/724] refactor(@schematics/angular): Add prefix handling --- .../core/src/workspace/workspace-schema.json | 6 +++++- .../core/src/workspace/workspace-schema.ts | 4 ++++ .../core/src/workspace/workspace_spec.ts | 1 + packages/schematics/angular/application/index.ts | 1 + .../schematics/angular/application/index_spec.ts | 16 ++++++++++++++++ packages/schematics/angular/component/index.ts | 6 ++++-- .../schematics/angular/component/index_spec.ts | 5 ++--- packages/schematics/angular/directive/index.ts | 6 ++++-- .../schematics/angular/directive/index_spec.ts | 16 ++++++++++++++++ packages/schematics/angular/library/index.ts | 1 + .../schematics/angular/library/index_spec.ts | 15 +++++++++++++++ packages/schematics/angular/ng-new/index.ts | 1 + packages/schematics/angular/ng-new/index_spec.ts | 8 ++++++++ .../build_angular/hello-world-app/.angular.json | 1 + 14 files changed, 79 insertions(+), 8 deletions(-) diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.json b/packages/angular_devkit/core/src/workspace/workspace-schema.json index 223d4a8a11..71acda0c48 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.json +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.json @@ -60,6 +60,10 @@ "type": "string", "description": "Root of the project sourcefiles." }, + "prefix": { + "type": "string", + "description": "The prefix to apply to generated selectors." + }, "cli": { "$ref": "#/definitions/tool", "default": {} @@ -91,4 +95,4 @@ "additionalProperties": true } } -} \ No newline at end of file +} diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.ts b/packages/angular_devkit/core/src/workspace/workspace-schema.ts index 3a5583c0e6..ba907905cc 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.ts +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.ts @@ -68,6 +68,10 @@ export interface Project { * Root of the project sourcefiles. */ root: string; + /** + * The prefix to apply to generated selectors." + */ + prefix: string; /** * Tool options. */ diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index 33f54fe414..e22b3e4860 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -51,6 +51,7 @@ describe('Workspace', () => { app: { root: 'projects/app', projectType: 'application', + prefix: 'app', cli: {}, schematics: { '@schematics/angular': { diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 975e1cc5d3..c1b5882685 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -110,6 +110,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace const project: any = { root: projectRoot, projectType: 'application', + prefix: options.prefix || 'app', architect: { build: { builder: '@angular-devkit/build-angular:browser', diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index a804779992..018816559f 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -71,6 +71,22 @@ describe('Application Schematic', () => { expect(workspace.projects.foo).toBeDefined(); }); + it('should set the prefix to app if none is set', () => { + const options = { ...defaultOptions }; + + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo.prefix).toEqual('app'); + }); + + it('should set the prefix correctly', () => { + const options = { ...defaultOptions, prefix: 'pre' }; + + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo.prefix).toEqual('pre'); + }); + it('should handle the routing flag', () => { const options = { ...defaultOptions, routing: true }; diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index e95469751d..026f3a1379 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -92,10 +92,12 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { } -function buildSelector(options: ComponentOptions) { +function buildSelector(options: ComponentOptions, projectPrefix: string) { let selector = strings.dasherize(options.name); if (options.prefix) { selector = `${options.prefix}-${selector}`; + } else if (projectPrefix) { + selector = `${projectPrefix}-${selector}`; } return selector; @@ -119,7 +121,7 @@ export default function(options: ComponentOptions): Rule { const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; - options.selector = options.selector || buildSelector(options); + options.selector = options.selector || buildSelector(options, project.prefix); validateName(options.name); validateHtmlSelector(options.selector); diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index b4cbb6792a..b145633db6 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -28,7 +28,6 @@ describe('Component Schematic', () => { spec: true, module: undefined, export: false, - prefix: 'app', }; @@ -197,12 +196,12 @@ describe('Component Schematic', () => { expect(content).toMatch(/selector: 'pre-foo'/); }); - it('should not use a prefix if none is passed', () => { + it('should use the default project prefix if none is passed', () => { const options = { ...defaultOptions, prefix: undefined }; const tree = schematicRunner.runSchematic('component', options, appTree); const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); - expect(content).toMatch(/selector: 'foo'/); + expect(content).toMatch(/selector: 'app-foo'/); }); it('should respect the inlineTemplate option', () => { diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 21f19f579c..bcacb61ef4 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -90,10 +90,12 @@ function addDeclarationToNgModule(options: DirectiveOptions): Rule { } -function buildSelector(options: DirectiveOptions) { +function buildSelector(options: DirectiveOptions, projectPrefix: string) { let selector = options.name; if (options.prefix) { selector = `${options.prefix}-${selector}`; + } else if (projectPrefix) { + selector = `${projectPrefix}-${selector}`; } return strings.camelize(selector); @@ -116,7 +118,7 @@ export default function (options: DirectiveOptions): Rule { const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; - options.selector = options.selector || buildSelector(options); + options.selector = options.selector || buildSelector(options, project.prefix); validateHtmlSelector(options.selector); diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index 8d173fc8f8..9673e3cd2c 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -129,4 +129,20 @@ describe('Directive Schematic', () => { const content = appTree.readContent('/projects/bar/src/app/sub/test.directive.ts'); expect(content).toMatch(/selector: '\[appTest\]'/); }); + + it('should use the prefix', () => { + const options = { ...defaultOptions, prefix: 'pre' }; + const tree = schematicRunner.runSchematic('directive', options, appTree); + + const content = tree.readContent('/projects/bar/src/app/foo.directive.ts'); + expect(content).toMatch(/selector: '\[preFoo\]'/); + }); + + it('should use the default project prefix if none is passed', () => { + const options = { ...defaultOptions, prefix: undefined }; + const tree = schematicRunner.runSchematic('directive', options, appTree); + + const content = tree.readContent('/projects/bar/src/app/foo.directive.ts'); + expect(content).toMatch(/selector: '\[appFoo\]'/); + }); }); diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index e2b5f4f159..93c69c6fb7 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -127,6 +127,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche const project: any = { root: `${projectRoot}`, projectType: 'library', + prefix: options.prefix || 'lib', architect: { build: { builder: '@angular-devkit/build-ng-packagr:build', diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index e223a3e043..47a76f0c6c 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -84,6 +84,21 @@ describe('Library Schematic', () => { expect(workspace.projects.foo).toBeDefined(); }); + it('should set the prefix to lib if none is set', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo.prefix).toEqual('lib'); + }); + + it('should set the prefix correctly', () => { + const options = { ...defaultOptions, prefix: 'pre' }; + const tree = schematicRunner.runSchematic('application', options, workspaceTree); + + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo.prefix).toEqual('pre'); + }); + it('should handle a pascalCasedName', () => { const options = {...defaultOptions, name: 'pascalCasedName'}; const tree = schematicRunner.runSchematic('library', options, workspaceTree); diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index 7e44a9682a..1862d086f2 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -46,6 +46,7 @@ export default function (options: NgNewOptions): Rule { name: options.name, inlineStyle: options.inlineStyle, inlineTemplate: options.inlineTemplate, + prefix: options.prefix, viewEncapsulation: options.viewEncapsulation, routing: options.routing, style: options.style, diff --git a/packages/schematics/angular/ng-new/index_spec.ts b/packages/schematics/angular/ng-new/index_spec.ts index 4c75eec0d1..fb25a4d41f 100644 --- a/packages/schematics/angular/ng-new/index_spec.ts +++ b/packages/schematics/angular/ng-new/index_spec.ts @@ -38,4 +38,12 @@ describe('Ng New Schematic', () => { expect(files.indexOf('/bar/src/main.ts')).toBeGreaterThanOrEqual(0); expect(files.indexOf('/bar/src/app/app.module.ts')).toBeGreaterThanOrEqual(0); }); + + it('should should set the prefix in angular.json and in app.component.ts', () => { + const options = { ...defaultOptions, prefix: 'pre' }; + + const tree = schematicRunner.runSchematic('ng-new', options); + const content = tree.readContent('/bar/angular.json'); + expect(content).toMatch(/"prefix": "pre"/); + }); }); diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index df33c69d25..c3c338ff3e 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -9,6 +9,7 @@ "app": { "root": "src", "projectType": "application", + "prefix": "app", "schematics": {}, "architect": { "build": { From beedf5481635e61594dac81fca7dff920a68266c Mon Sep 17 00:00:00 2001 From: Hans Date: Thu, 12 Apr 2018 17:14:03 -0700 Subject: [PATCH 430/724] release: v6.0.0-rc.4 --- .monorepo.json | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index ddce997115..0bf4759b15 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.5", + "version": "0.5.6", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.5", - "hash": "28898958350e070a894e2bafce67068b" + "version": "0.5.6", + "hash": "0f2c1274c1a33354e21586921fd4a29a" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.5", - "hash": "0f1fe3107ec4916c0b43aa663286428a", + "version": "0.5.6", + "hash": "4cf615db59e59d114672e927f35c8973", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.5", - "hash": "d241f3547369439bf53f26023e83237a", + "version": "0.5.6", + "hash": "67cca04a43ff8a1bc5f3c12423569752", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.5", - "hash": "510ad1ca290ac6c2b27010c0df18aed2", + "version": "0.5.6", + "hash": "437cdb100a812bc10a08131cde7c3028", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.5", + "version": "0.5.6", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.5", - "hash": "8bef70f3f10f42c21b1b8e6682547c3e", + "version": "0.5.6", + "hash": "ef46e636df1a32ffd43ca795dbe20607", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.5", - "hash": "d201f8eed30db441e7d53657df6f17cf", + "version": "0.5.6", + "hash": "0de6ff5665a03357e496a40ebab64d84", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.5", - "hash": "56e4ef455acfc5eb1eb9dd9850d4530f", + "version": "0.5.6", + "hash": "89c39fd109e35cfc39ca2d45f6da29ee", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.5", - "hash": "d2776bfee424e1abaa5903312a72bd19", + "version": "0.5.6", + "hash": "5b1953260312043a7ad13929aaf62e3f", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.5", - "hash": "5dd23a0620ba7d29931780a74561aa22", + "version": "0.5.6", + "hash": "8e8ed56f8334efecbbcdaa889fb5e5fd", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.3", + "version": "6.0.0-rc.4", "section": "Misc", - "hash": "17eb764288ab9772726be03320750adf", + "hash": "4346a38d1e70711671d3a5cac2959663", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.5", - "hash": "9036cd537d5d51c7d59e670314da493a", + "version": "0.5.6", + "hash": "8a0904c4dacef4ff1e27f4641adfe187", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.5", + "version": "0.5.6", "section": "Schematics", - "hash": "7bf87a8befff9781069a091755adf9c1", + "hash": "81ea3d90a8e85b15fd83c847af72c26c", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.5", + "version": "0.5.6", "section": "Schematics", - "hash": "0bf472fe5c82e896f646be946e508185", + "hash": "53654c259405585a652ba71c93cf7269", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.5", + "version": "0.5.6", "section": "Schematics", - "hash": "58e309396c0cd83d723ff4dc9576f1e1", + "hash": "ac963f112efee0a83293d6b7d24bca89", "snapshotRepo": "angular/schematics-update-builds" } } From 48a9d211623b37ebc788d42487501b7520b9dcb5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 13 Apr 2018 17:21:02 +0100 Subject: [PATCH 431/724] fix(@angular-devkit/build-optimizer): remove side effects override Also prevent Build Optimizer from running twice on Angular packages. Partially address https://github.com/angular/angular-cli/issues/10322. --- .../src/angular-cli-files/models/webpack-configs/common.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index e80f5281bf..5e22fd11f1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -251,10 +251,10 @@ export function getCommonConfig(wco: WebpackConfigOptions) { } }, { - test: /[\/\\]@angular[\/\\].+\.js$/, - sideEffects: false, + // Mark files inside `@angular/core` as using SystemJS style dynamic imports. + // Removing this will cause deprecation warnings to appear. + test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/, parser: { system: true }, - ...buildOptimizerUseRule, }, { test: /\.js$/, From 349b27395b0180b38b4fb246bfc46edf3a41282d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 13 Apr 2018 14:35:36 -0400 Subject: [PATCH 432/724] refactor(@angular-devkit/core): support writing ArrayBufferLike types --- .../angular_devkit/core/src/virtual-fs/host/interface.ts | 5 +++-- packages/angular_devkit/core/src/virtual-fs/host/sync.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts index bcd83d7b4d..57cb98a1f4 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/interface.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/interface.ts @@ -9,7 +9,8 @@ import { Observable } from 'rxjs'; import { Path, PathFragment } from '../path'; -export declare type FileBuffer = ArrayBuffer; +export type FileBuffer = ArrayBuffer; +export type FileBufferLike = ArrayBufferLike; export interface HostWatchOptions { readonly persistent?: boolean; @@ -49,7 +50,7 @@ export interface HostCapabilities { export interface Host { readonly capabilities: HostCapabilities; - write(path: Path, content: FileBuffer): Observable; + write(path: Path, content: FileBufferLike): Observable; read(path: Path): Observable; delete(path: Path): Observable; rename(from: Path, to: Path): Observable; diff --git a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts index cd3eaf035b..22037c4973 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts @@ -10,6 +10,7 @@ import { BaseException } from '../../exception/exception'; import { Path, PathFragment } from '../path'; import { FileBuffer, + FileBufferLike, Host, HostCapabilities, HostWatchEvent, @@ -63,7 +64,7 @@ export class SyncDelegateHost { return this._delegate; } - write(path: Path, content: FileBuffer): void { + write(path: Path, content: FileBufferLike): void { return this._doSyncCall(this._delegate.write(path, content)); } read(path: Path): FileBuffer { From 2e3e7af348d2fbe18e7b07f3aa7961303b9540a0 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Apr 2018 12:54:26 -0400 Subject: [PATCH 433/724] fix(@angular-devkit/build-angular): strip and use BOM for index.html --- .../plugins/index-html-webpack-plugin.ts | 12 +++- .../test/browser/index-bom_spec_large.ts | 55 +++++++++++++++++++ .../test/utils/test-project-host.ts | 20 +++++-- 3 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts index d4d9ba9623..ede8470dcf 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts @@ -29,7 +29,17 @@ function readFile(filename: string, compilation: any): Promise { return; } - const content = data.toString(); + let content; + if (data.length >= 3 && data[0] === 0xEF && data[1] === 0xBB && data[2] === 0xBF) { + // Strip UTF-8 BOM + content = data.toString('utf8', 3); + } else if (data.length >= 2 && data[0] === 0xFF && data[1] === 0xFE) { + // Strip UTF-16 LE BOM + content = data.toString('utf16le', 2); + } else { + content = data.toString(); + } + resolve(content); }); }); diff --git a/packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts new file mode 100644 index 0000000000..6164ce1c15 --- /dev/null +++ b/packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts @@ -0,0 +1,55 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { tap } from 'rxjs/operators'; +import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; + + +describe('Browser Builder works with BOM index.html', () => { + const outputPath = normalize('dist'); + + beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); + afterEach(done => host.restore().subscribe(undefined, done.fail, done)); + + it('works with UTF-8 BOM', (done) => { + host.writeMultipleFiles({ + 'src/index.html': Buffer.from( + '\ufeff', + 'utf8'), + }); + + runTargetSpec(host, browserTargetSpec).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + // tslint:disable-next-line:max-line-length + expect(content).toBe(``); + }), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); + + it('works with UTF16 LE BOM', (done) => { + host.writeMultipleFiles({ + 'src/index.html': Buffer.from( + '\ufeff', + 'utf16le'), + }); + + runTargetSpec(host, browserTargetSpec).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + // tslint:disable-next-line:max-line-length + expect(content).toBe(``); + }), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); +}); diff --git a/packages/angular_devkit/build_angular/test/utils/test-project-host.ts b/packages/angular_devkit/build_angular/test/utils/test-project-host.ts index 512d7a1f7c..87a84704ed 100644 --- a/packages/angular_devkit/build_angular/test/utils/test-project-host.ts +++ b/packages/angular_devkit/build_angular/test/utils/test-project-host.ts @@ -96,13 +96,23 @@ export class TestProjectHost extends NodeJsSyncHost { }); } - writeMultipleFiles(files: { [path: string]: string }): void { - Object.keys(files).map(fileName => + writeMultipleFiles(files: { [path: string]: string | ArrayBufferLike | Buffer }): void { + Object.keys(files).map(fileName => { + let content = files[fileName]; + if (typeof content == 'string') { + content = virtualFs.stringToFileBuffer(content); + } else if (content instanceof Buffer) { + content = content.buffer.slice( + content.byteOffset, + content.byteOffset + content.byteLength, + ); + } + this.scopedSync().write( normalize(fileName), - virtualFs.stringToFileBuffer(files[fileName]), - ), - ); + content, + ); + }); } replaceInFile(path: string, match: RegExp | string, replacement: string) { From ff0919a3bb742016498596505e0ed3494000d47c Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 10 Apr 2018 18:54:53 -0700 Subject: [PATCH 434/724] fix(@schematics/update): allow --from and --to to have partial versions Basically, --from=1 is the same as --from=1.0.0. Fix #660 --- packages/schematics/update/update/index.ts | 22 ++++++++++ .../schematics/update/update/index_spec.ts | 41 +++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index cbf54ca9bd..9005f4b53c 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -628,6 +628,25 @@ function _getAllDependencies(tree: Tree): Map { ] as [string, VersionRange][]); } +function _formatVersion(version: string | undefined) { + if (version === undefined) { + return undefined; + } + + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}/)) { + version += '.0'; + } + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}/)) { + version += '.0'; + } + if (!semver.valid(version)) { + throw new SchematicsException(`Invalid migration version: ${JSON.stringify(version)}`); + } + + return version; +} + + export default function(options: UpdateSchema): Rule { if (!options.packages) { // We cannot just return this because we need to fetch the packages from NPM still for the @@ -644,6 +663,9 @@ export default function(options: UpdateSchema): Rule { } } + options.from = _formatVersion(options.from); + options.to = _formatVersion(options.to); + return (tree: Tree, context: SchematicContext) => { const logger = context.logger; const allDependencies = _getAllDependencies(tree); diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 29141de243..8e7d42dd8c 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -147,6 +147,47 @@ describe('@schematics/update', () => { name: 'run-schematic', options: jasmine.objectContaining({ name: 'migrate', + options: jasmine.objectContaining({ + from: '0.1.2', + to: '1.6.0', + }), + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }); + + it('can install and migrate with --from (short version number)', done => { + // Add the basic migration package. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '1.6.0'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { + packages: ['@angular-devkit-tests/update-migrations'], + migrateOnly: true, + from: '0', + }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular-devkit-tests/update-migrations']) + .toBe('1.6.0'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'run-schematic', + options: jasmine.objectContaining({ + name: 'migrate', + options: jasmine.objectContaining({ + from: '0.0.0', + to: '1.6.0', + }), }), }, ]); From 9404bcb9eefe44534b480a6479b981bb45932b04 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 12 Apr 2018 17:57:36 -0400 Subject: [PATCH 435/724] fix(@schematics/angular): Add missing head tags to index.html fixes #686 --- .../angular/service-worker/index.ts | 65 +++++++++++++++++++ .../angular/service-worker/index_spec.ts | 9 +++ 2 files changed, 74 insertions(+) diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index c9f794edc1..e8ac4d00ae 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -161,6 +161,70 @@ function getTsSourceFile(host: Tree, path: string): ts.SourceFile { return source; } +function updateIndexFile(options: ServiceWorkerOptions): Rule { + return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + const project = workspace.projects[options.project]; + let path: string; + if (project && project.architect && project.architect.build && + project.architect.build.options.index) { + path = project.architect.build.options.index; + } else { + throw new SchematicsException('Could not find index file for the project'); + } + const buffer = host.read(path); + if (buffer === null) { + throw new SchematicsException(`Could not read index file: ${path}`); + } + const content = buffer.toString(); + const lines = content.split('\n'); + let closingHeadTagLineIndex = -1; + let closingHeadTagLine = ''; + lines.forEach((line, index) => { + if (/<\/head>/.test(line) && closingHeadTagLineIndex === -1) { + closingHeadTagLine = line; + closingHeadTagLineIndex = index; + } + }); + + const indent = getIndent(closingHeadTagLine) + ' '; + const itemsToAdd = [ + '', + '', + '', + ]; + + const textToInsert = itemsToAdd + .map(text => indent + text) + .join('\n'); + + const updatedIndex = [ + ...lines.slice(0, closingHeadTagLineIndex), + textToInsert, + ...lines.slice(closingHeadTagLineIndex), + ].join('\n'); + + host.overwrite(path, updatedIndex); + + return host; + }; +} + +function getIndent(text: string): string { + let indent = ''; + let hitNonSpace = false; + text.split('') + .forEach(char => { + if (char === ' ' && !hitNonSpace) { + indent += ' '; + } else { + hitNonSpace = true; + } + }, 0); + + return indent; +} + export default function (options: ServiceWorkerOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); @@ -179,6 +243,7 @@ export default function (options: ServiceWorkerOptions): Rule { updateConfigFile(options), addDependencies(), updateAppModule(options), + updateIndexFile(options), ])(host, context); }; } diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index 9a724e4dcf..b2d0255746 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -96,4 +96,13 @@ describe('Service Worker Schematic', () => { const path = '/projects/bar/ngsw-config.json'; expect(tree.exists(path)).toEqual(true); }); + + it('should update the index file', () => { + const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); + const content = tree.readContent('projects/bar/src/index.html'); + + expect(content).toMatch(//); + expect(content).toMatch(//); + expect(content).toMatch(//); + }); }); From 556649dee6a7403444b889d0a87f4ca0a05f7d9b Mon Sep 17 00:00:00 2001 From: Cyrille Tuzi Date: Tue, 10 Apr 2018 18:21:03 +0200 Subject: [PATCH 436/724] feat(@schematics/angular): save ng new options as defaults --- .../schematics/angular/application/index.ts | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index c1b5882685..334755bb34 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { normalize, relative, strings, tags } from '@angular-devkit/core'; +import { JsonObject, normalize, relative, strings, tags } from '@angular-devkit/core'; import { experimental } from '@angular-devkit/core'; import { MergeStrategy, @@ -224,6 +224,35 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace // } workspace.projects[options.name] = project; + + const schematics: JsonObject = {}; + + if (options.inlineTemplate === true + || options.inlineStyle === true + || options.style !== undefined) { + schematics['@schematics/angular:component'] = {}; + if (options.inlineTemplate === true) { + (schematics['@schematics/angular:component'] as JsonObject).inlineTemplate = true; + } + if (options.inlineStyle === true) { + (schematics['@schematics/angular:component'] as JsonObject).inlineStyle = true; + } + if (options.style !== undefined) { + (schematics['@schematics/angular:component'] as JsonObject).styleext = options.style; + } + } + + if (options.skipTests === true) { + ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { + if (!(`@schematics/angular:${type}` in schematics)) { + schematics[`@schematics/angular:${type}`] = {}; + } + (schematics[`@schematics/angular:${type}`] as JsonObject).spec = false; + }); + } + + workspace.schematics = schematics; + host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); }; } From c60517d932fbb7ad2c2d64d6a071e309d10a972e Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 13 Apr 2018 13:21:53 -0700 Subject: [PATCH 437/724] fix(@angular-devkit/core): fix deepCopy entirely And add tests. Fix #682 --- .../angular_devkit/core/src/utils/object.ts | 30 +++++++---- .../core/src/utils/object_spec.ts | 54 +++++++++++++++++++ 2 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 packages/angular_devkit/core/src/utils/object_spec.ts diff --git a/packages/angular_devkit/core/src/utils/object.ts b/packages/angular_devkit/core/src/utils/object.ts index b7282ddeb6..3d5d9edf24 100644 --- a/packages/angular_devkit/core/src/utils/object.ts +++ b/packages/angular_devkit/core/src/utils/object.ts @@ -15,23 +15,31 @@ export function mapObject(obj: {[k: string]: T}, }, {}); } + +const copySymbol = Symbol(); + // tslint:disable-next-line:no-any -export function deepCopy (object: T): T { - if (Array.isArray(object)) { - // tslint:disable-next-line:no-any - return object.map((o: any) => deepCopy(o)); - } else if (typeof object === 'object') { - if (object['toJSON']) { - return JSON.parse((object['toJSON'] as () => string)()); +export function deepCopy (value: T): T { + if (Array.isArray(value)) { + return value.map((o: T) => deepCopy(o)); + } else if (value && typeof value === 'object') { + if (value[copySymbol]) { + // This is a circular dependency. Just return the cloned value. + return value[copySymbol]; + } + if (value['toJSON']) { + return JSON.parse((value['toJSON'] as () => string)()); } - const copy = {} as T; - for (const key of Object.keys(object)) { - copy[key] = deepCopy(object[key]); + const copy = new (Object.getPrototypeOf(value).constructor)(); + value[copySymbol] = copy; + for (const key of Object.getOwnPropertyNames(value)) { + copy[key] = deepCopy(value[key]); } + value[copySymbol] = undefined; return copy; } else { - return object; + return value; } } diff --git a/packages/angular_devkit/core/src/utils/object_spec.ts b/packages/angular_devkit/core/src/utils/object_spec.ts new file mode 100644 index 0000000000..635c783c5f --- /dev/null +++ b/packages/angular_devkit/core/src/utils/object_spec.ts @@ -0,0 +1,54 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-any +import { deepCopy } from './object'; + +describe('object', () => { + describe('deepCopy', () => { + it('works with empty', () => { + const data = {}; + expect(deepCopy(data)).toEqual(data); + }); + + it('works with objects', () => { + const data = { a: 1, b: { c: 'hello' } }; + expect(deepCopy(data)).toEqual(data); + }); + + it('works with null', () => { + const data = null; + expect(deepCopy(data)).toEqual(data); + }); + + it('works with number', () => { + const data = 1; + expect(deepCopy(data)).toEqual(data); + }); + + it('works with simple classes', () => { + class Data { + constructor(private _x = 1, protected _y = 2, public _z = 3) {} + } + const data = new Data(); + expect(deepCopy(data)).toEqual(data); + expect(deepCopy(data) instanceof Data).toBe(true); + }); + + it('works with circular objects', () => { + const data1 = { a: 1 } as any; + const data = { b: data1 }; + data1['circular'] = data; + + const result = deepCopy(data) as any; + expect(result.b.a).toBe(1); + expect(result.b.circular.b.a).toBe(1); + expect(result.b).not.toBe(data1); + expect(result.b).toBe(result.b.circular.b); + }); + }); +}); From b2247ca5c7db4cba56e9b047c041b5f13ddaa0c6 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 13 Apr 2018 10:46:34 -0700 Subject: [PATCH 438/724] fix(@schematics/angular): do not error if project already migrated Fix angular/angular-cli#10326 --- packages/schematics/angular/migrations/update-6/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index a2c1d84dee..81c6920be5 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -589,6 +589,12 @@ function updateTsLintConfig(): Rule { export default function (): Rule { return (host: Tree, context: SchematicContext) => { + if (host.exists('/.angular.json') || host.exists('/angular.json')) { + context.logger.info('Found a modern configuration file. Nothing to be done.'); + + return host; + } + const configPath = getConfigPath(host); const configBuffer = host.read(normalize(configPath)); if (configBuffer == null) { From cbd3239d10a8b28aedbabec7d8e6e9de80085fd4 Mon Sep 17 00:00:00 2001 From: Steven Enten Date: Sat, 14 Apr 2018 09:12:25 +0200 Subject: [PATCH 439/724] fix(@angular-devkit/build-angular): fix dev server hmr Create webpack compiler after webpack config customization. Fix @angular/devkit#700 --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 96e8843023..ae3c6fb11e 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -99,7 +99,6 @@ export class DevServerBuilder implements Builder { const browserBuilder = new BrowserBuilder(this.context); const webpackConfig = browserBuilder.buildWebpackConfig( root, projectRoot, host, browserOptions); - const webpackCompiler = webpack(webpackConfig); const statsConfig = getWebpackStatsConfig(browserOptions.verbose); let webpackDevServerConfig: WebpackDevServerConfigurationOptions; @@ -169,6 +168,7 @@ export class DevServerBuilder implements Builder { ** `); + const webpackCompiler = webpack(webpackConfig); const server = new WebpackDevServer(webpackCompiler, webpackDevServerConfig); let first = true; From 6a9bd3677c335bd84ae0352e9c5fd2a0d5ae1b70 Mon Sep 17 00:00:00 2001 From: Hans Date: Fri, 13 Apr 2018 17:54:16 -0700 Subject: [PATCH 440/724] fix(@schematics/update): group packages together Packages will be reduced to their package name. Added the spec for the new packageGroupName argument (default to the first item of the packageGroup). Fixes angular/angular-cli#10248 Fixes angular/angular-cli#10247 --- docs/specifications/update.md | 3 +- packages/schematics/update/update/index.ts | 64 ++++++++++++++-------- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/docs/specifications/update.md b/docs/specifications/update.md index 79376fb8f4..b81f35f5fd 100644 --- a/docs/specifications/update.md +++ b/docs/specifications/update.md @@ -75,7 +75,8 @@ In order to implement migrations in a library, the author must add the `ng-updat |---|---|---| | `requirements` | `{ [packageName: string]: VersionRange }` | A map of package names to version to check for minimal requirement. If one of the libraries listed here does not match the version range specified in `requirements`, an error will be shown to the user to manually update those libraries. For example, `@angular/core` does not support updates from versions earlier than 5, so this field would be `{ '@angular/core': '>= 5' }`. | `migrations` | `string` | A relative path (or resolved using Node module resolution) to a Schematics collection definition. | -| `packageGroup` | `string[]` | A list of npm packages that are to be grouped together. When running +| `packageGroup` | `string[]` | A list of npm packages that are to be grouped together. When running the update schematic it will automatically include all packages as part of the packageGroup in the update (if the user also installed them). | +| `packageGroupName` | `string` | The name of the packageGroup to use. By default, uses the first package in the packageGroup. The packageGroupName needs to be part of the packageGroup and should be a valid package name. | #### Example given: Library my-lib wants to have 2 steps to update from version 4 -> 4.5 and 4.5 to 5. It would add this information in its `package.json`: diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 9005f4b53c..ec29859a30 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -331,26 +331,53 @@ function _usageMessage( infoMap: Map, logger: logging.LoggerApi, ) { + const packageGroups = new Map(); const packagesToUpdate = [...infoMap.entries()] - .sort() .map(([name, info]) => { const tag = options.next ? 'next' : 'latest'; const version = info.npmPackageJson['dist-tags'][tag]; const target = info.npmPackageJson.versions[version]; - return [ + return { name, info, version, + tag, target, - ] as [string, PackageInfo, string, JsonSchemaForNpmPackageJsonFiles]; + }; }) - .filter(([name, info, version, target]) => { + .filter(({ name, info, version, target }) => { return (target && semver.compare(info.installed.version, version) < 0); }) - .filter(([, , , target]) => { + .filter(({ target }) => { return target['ng-update']; - }); + }) + .map(({ name, info, version, tag, target }) => { + // Look for packageGroup. + if (target['ng-update'] && target['ng-update']['packageGroup']) { + const packageGroup = target['ng-update']['packageGroup']; + const packageGroupName = target['ng-update']['packageGroupName'] + || target['ng-update']['packageGroup'][0]; + if (packageGroupName) { + if (packageGroups.has(name)) { + return null; + } + + packageGroup.forEach((x: string) => packageGroups.set(x, packageGroupName)); + packageGroups.set(packageGroupName, packageGroupName); + name = packageGroupName; + } + } + + let command = `ng update ${name}`; + if (tag == 'next') { + command += ' --next'; + } + + return [name, `${info.installed.version} -> ${version}`, command]; + }) + .filter(x => x !== null) + .sort((a, b) => a && b ? a[0].localeCompare(b[0]) : 0); if (packagesToUpdate.length == 0) { logger.info('We analyzed your package.json and everything seems to be in order. Good work!'); @@ -367,29 +394,20 @@ function _usageMessage( if (!Number.isFinite(namePad)) { namePad = 30; } + const pads = [namePad, 25, 0]; logger.info( ' ' - + 'Name'.padEnd(namePad) - + 'Version'.padEnd(25) - + ' Command to update', + + ['Name', 'Version', 'Command to update'].map((x, i) => x.padEnd(pads[i])).join(''), ); - logger.info(' ' + '-'.repeat(namePad * 2 + 35)); - - packagesToUpdate.forEach(([name, info, version, target]) => { - let command = `npm install ${name}`; - if (target && target['ng-update']) { - // Show the ng command only when migrations are supported, otherwise it's a fancy - // npm install, really. - command = `ng update ${name}`; + logger.info(' ' + '-'.repeat(pads.reduce((s, x) => s += x, 0) + 20)); + + packagesToUpdate.forEach(fields => { + if (!fields) { + return; } - logger.info( - ' ' - + name.padEnd(namePad) - + `${info.installed.version} -> ${version}`.padEnd(25) - + ' ' + command, - ); + logger.info(' ' + fields.map((x, i) => x.padEnd(pads[i])).join('')); }); logger.info('\n'); From a5877131b3e620704dff44f7f8e29a4679c00f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Will=20=E4=BF=9D=E5=93=A5?= Date: Sat, 14 Apr 2018 02:27:15 +0800 Subject: [PATCH 441/724] fix(@angular-devkit/core): Windows path normalize bug The Windows drive letter could be lower case. This PR fix https://github.com/angular/angular-cli/issues/10328 --- packages/angular_devkit/core/src/virtual-fs/path.ts | 2 +- packages/angular_devkit/core/src/virtual-fs/path_spec.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/virtual-fs/path.ts b/packages/angular_devkit/core/src/virtual-fs/path.ts index 9f80c9b9df..efa33f2784 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path.ts @@ -204,7 +204,7 @@ export function normalize(path: string): Path { // Match absolute windows path. const original = path; - if (path.match(/^[A-Z]:[\/\\]/)) { + if (path.match(/^[A-Z]:[\/\\]/i)) { path = '\\' + path[0] + '\\' + path.substr(3); } diff --git a/packages/angular_devkit/core/src/virtual-fs/path_spec.ts b/packages/angular_devkit/core/src/virtual-fs/path_spec.ts index 51b3289728..fa63df2e74 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path_spec.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path_spec.ts @@ -70,6 +70,7 @@ describe('path', () => { expect(normalize('\\a\\b\\c')).toBe('/a/b/c'); expect(normalize('.\\a\\b\\c')).toBe('a/b/c'); expect(normalize('C:\\a\\b\\c')).toBe('/C/a/b/c'); + expect(normalize('c:\\a\\b\\c')).toBe('/c/a/b/c'); expect(normalize('A:\\a\\b\\c')).toBe('/A/a/b/c'); expect(() => normalize('A:\\..\\..')) .toThrow(new InvalidPathException('A:\\..\\..')); From e476974b1c6571e59f0b1797665e2dcf863d152d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Cevey?= Date: Thu, 29 Mar 2018 23:41:47 +0100 Subject: [PATCH 442/724] build: upgrade ajv to latest v6.4.0 --- package-lock.json | 826 +----------------- package.json | 2 +- packages/angular_devkit/core/package.json | 2 +- .../core/src/json/schema/registry.ts | 5 +- 4 files changed, 34 insertions(+), 801 deletions(-) diff --git a/package-lock.json b/package-lock.json index 66deaa64a4..5fcdedb84b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -465,14 +465,14 @@ } }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", "requires": { - "co": "4.6.0", "fast-deep-equal": "1.0.0", "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "json-schema-traverse": "0.3.1", + "uri-js": "3.0.2" } }, "ajv-keywords": { @@ -1615,7 +1615,6 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -3643,795 +3642,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "optional": true, - "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "optional": true, - "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - } - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -9253,6 +8463,17 @@ "uuid": "3.1.0" }, "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -9726,6 +8947,19 @@ "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "requires": { "ajv": "5.5.2" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + } } }, "scss-tokenizer": { @@ -11838,7 +11072,6 @@ "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.1", - "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -12591,7 +11824,6 @@ "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.1", - "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", diff --git a/package.json b/package.json index f1317a0922..6704cd0231 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@types/source-map": "0.5.2", "@types/webpack": "^3.8.2", "@types/webpack-sources": "^0.1.3", - "ajv": "^5.5.1", + "ajv": "^6.4.0", "autoprefixer": "^8.1.0", "bootstrap": "^4.0.0", "cache-loader": "^1.2.2", diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index c1c3589339..6d501d9c5c 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -11,7 +11,7 @@ "core" ], "dependencies": { - "ajv": "~5.5.1", + "ajv": "~6.4.0", "chokidar": "^1.7.0", "source-map": "^0.5.6", "rxjs": "^6.0.0-beta.3" diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 4f59b2a010..c6c14f1d0e 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -93,7 +93,8 @@ export class CoreSchemaRegistry implements SchemaRegistry { this._ajv = ajv({ useDefaults: true, formats: formatsObj, - loadSchema: (uri: string) => this._fetch(uri) as ajv.Thenable, + loadSchema: (uri: string) => this._fetch(uri), + schemaId: 'auto', }); this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); @@ -308,7 +309,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { ); return function() { - return > Promise.resolve(true); + return Promise.resolve(true); }; }, }); From 96b9e6d259e5171b67cbc1dafabf7b3b06ea808d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Cevey?= Date: Thu, 29 Mar 2018 17:40:40 +0100 Subject: [PATCH 443/724] build: declare expected external typings --- packages/angular_devkit/core/BUILD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index ab34a37643..4772e03b94 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -22,6 +22,11 @@ ts_library( module_root = "src", deps = [ # @deps: rxjs + # @typings: es2015.core + # @typings: es2015.symbol.wellknown + # @typings: ajv + # @typings: node + # @typings: source-map ], ) From d8ba97f7e711036d9d90cff76dcabd227fad2bd6 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Sun, 15 Apr 2018 21:32:26 -0400 Subject: [PATCH 444/724] fix(@schematics/schematics): Fix test in blank schematic project --- .../blank/schematic-files/src/__name@dasherize__/index_spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/schematics/blank/schematic-files/src/__name@dasherize__/index_spec.ts b/packages/schematics/schematics/blank/schematic-files/src/__name@dasherize__/index_spec.ts index 5a2becd0ff..582d49d925 100644 --- a/packages/schematics/schematics/blank/schematic-files/src/__name@dasherize__/index_spec.ts +++ b/packages/schematics/schematics/blank/schematic-files/src/__name@dasherize__/index_spec.ts @@ -9,7 +9,7 @@ const collectionPath = path.join(__dirname, '../collection.json'); describe('<%= dasherize(name) %>', () => { it('works', () => { const runner = new SchematicTestRunner('schematics', collectionPath); - const tree = runner.runSchematic('my-schematic', {}, Tree.empty()); + const tree = runner.runSchematic('<%= dasherize(name) %>', {}, Tree.empty()); expect(tree.files).toEqual([]); }); From 465414a379b3f83d44dd80e4bc641e92aff4b727 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 16 Apr 2018 11:51:56 +0100 Subject: [PATCH 445/724] fix(@schematics/angular): remove unused karma config option This option isn't used anymore. --- .../schematics/angular/application/files/root/karma.conf.js | 3 --- .../angular/library/files/__projectRoot__/karma.conf.js | 3 --- .../build_angular/hello-world-app/karma.conf.js | 3 --- .../build_ng_packagr/ng-packaged/projects/lib/karma.conf.js | 3 --- .../build_webpack/hello-world-app/karma.conf.js | 3 --- 5 files changed, 15 deletions(-) diff --git a/packages/schematics/angular/application/files/root/karma.conf.js b/packages/schematics/angular/application/files/root/karma.conf.js index 15b5b0d5f7..c84a572acf 100644 --- a/packages/schematics/angular/application/files/root/karma.conf.js +++ b/packages/schematics/angular/application/files/root/karma.conf.js @@ -20,9 +20,6 @@ module.exports = function (config) { reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js index d5fd42ec88..937ad4a65b 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js +++ b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js @@ -20,9 +20,6 @@ module.exports = function (config) { reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js index 3aaab1c2f0..5a6979e5f6 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js +++ b/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js @@ -22,9 +22,6 @@ module.exports = function (config) { reports: [ 'html', 'lcovonly' ], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js index d5fd42ec88..937ad4a65b 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js @@ -20,9 +20,6 @@ module.exports = function (config) { reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js index 3aaab1c2f0..5a6979e5f6 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js +++ b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js @@ -22,9 +22,6 @@ module.exports = function (config) { reports: [ 'html', 'lcovonly' ], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, From 9c2a52da9a366d63b5cd17f27f478a865f3504f0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 16 Apr 2018 15:43:49 +0100 Subject: [PATCH 446/724] fix(@schematics/angular): fix universal tsconfig paths Fix https://github.com/angular/angular-cli/issues/10343 --- .../angular/universal/files/__tsconfigFileName__.json | 10 ++-------- packages/schematics/angular/universal/index.ts | 11 ++++++++++- packages/schematics/angular/universal/index_spec.ts | 11 ++++++++++- packages/schematics/angular/universal/schema.json | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/schematics/angular/universal/files/__tsconfigFileName__.json b/packages/schematics/angular/universal/files/__tsconfigFileName__.json index 552fe89351..c63eef6b08 100644 --- a/packages/schematics/angular/universal/files/__tsconfigFileName__.json +++ b/packages/schematics/angular/universal/files/__tsconfigFileName__.json @@ -1,15 +1,9 @@ { - "extends": "../tsconfig.json", + "extends": "./<%= tsConfigExtends %>", "compilerOptions": { "outDir": "<%= outDir %>-server", - "baseUrl": "./", - "module": "commonjs", - "types": [] + "module": "commonjs" }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ], "angularCompilerOptions": { "entryModule": "<%= appDir %>/<%= stripTsExtension(rootModuleFileName) %>#<%= rootModuleClassName %>" } diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 1f2bd165c9..2129b6ca98 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -5,7 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, experimental, normalize, parseJson, strings } from '@angular-devkit/core'; +import { + JsonObject, + basename, + experimental, + normalize, + parseJson, + strings, +} from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -197,12 +204,14 @@ export default function (options: UniversalOptions): Rule { const clientProject = getClientProject(host, options); const clientArchitect = getClientArchitect(host, options); const outDir = getTsConfigOutDir(host, clientArchitect); + const tsConfigExtends = basename(clientArchitect.build.options.tsConfig); const templateSource = apply(url('./files'), [ template({ ...strings, ...options as object, stripTsExtension: (s: string) => { return s.replace(/\.ts$/, ''); }, outDir, + tsConfigExtends, }), move(clientProject.root), ]); diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index c783384837..6dc3b92f02 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -62,7 +62,16 @@ describe('Universal Schematic', () => { const filePath = '/projects/bar/tsconfig.server.json'; expect(tree.exists(filePath)).toEqual(true); const contents = tree.readContent(filePath); - expect(contents).toMatch('../../out-tsc/app-server'); + expect(JSON.parse(contents)).toEqual({ + extends: './tsconfig.app.json', + compilerOptions: { + outDir: '../../out-tsc/app-server', + module: 'commonjs', + }, + angularCompilerOptions: { + entryModule: 'src/app/app.server.module#AppServerModule', + }, + }); }); it('should add dependency: @angular/platform-server', () => { diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index e289ff3670..79027f7ddc 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -40,7 +40,7 @@ "type": "string", "format": "path", "description": "The name of the application directory.", - "default": "app" + "default": "src/app" }, "rootModuleFileName": { "type": "string", From 3ce3dbd11caa3c12784a8155a2d4d69cf33c631f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 16 Apr 2018 16:17:07 +0100 Subject: [PATCH 447/724] fix(@schematics/angular): use string style for new app Followup to https://github.com/angular/devkit/pull/667 --- packages/schematics/angular/application/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 334755bb34..0a01b9ead5 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -133,9 +133,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, ], styles: [ - { - input: `${projectRoot}src/styles.${options.style}`, - }, + `${projectRoot}src/styles.${options.style}`, ], scripts: [], }, From 26cea6d50079de0e7656a37f3c0a45eddb1e81db Mon Sep 17 00:00:00 2001 From: Jiaren Liu Date: Mon, 16 Apr 2018 22:57:42 +0800 Subject: [PATCH 448/724] fix(@ngtools/webpack): `host` of Plugin Options should be optional --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 58318ccf4d..29136aba54 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -89,7 +89,7 @@ export interface AngularCompilerPluginOptions { // Use tsconfig to include path globs. compilerOptions?: ts.CompilerOptions; - host: virtualFs.Host; + host?: virtualFs.Host; } export enum PLATFORM { From e475f04f04fdf3b4bc1e7b19cdd4f0a69ee0ea8b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 16 Apr 2018 15:00:15 +0100 Subject: [PATCH 449/724] fix(@angular-devkit/build-angular): fix service worker assets paths Fix https://github.com/angular/angular-cli/issues/10297 --- .../utilities/service-worker/index.ts | 23 +++++- .../test/browser/service-worker_spec_large.ts | 73 ++++++++++++++++++- 2 files changed, 89 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts index f0427f0d21..e77a8ed4bd 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts @@ -1,14 +1,14 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. -import { Path, join, normalize, virtualFs, dirname, getSystemPath, tags } from '@angular-devkit/core'; +import { Path, join, normalize, virtualFs, dirname, getSystemPath, tags, fragment } from '@angular-devkit/core'; import { Filesystem } from '@angular/service-worker/config'; import * as crypto from 'crypto'; import * as fs from 'fs'; import * as semver from 'semver'; import { resolveProjectModule } from '../require-project-module'; -import { map, reduce, switchMap } from "rxjs/operators"; -import { Observable, merge, of } from "rxjs"; +import { map, reduce, switchMap, concatMap, mergeMap, toArray, tap } from "rxjs/operators"; +import { Observable, merge, of, from } from "rxjs"; export const NEW_SW_VERSION = '5.0.0-rc.0'; @@ -18,7 +18,22 @@ class CliFilesystem implements Filesystem { constructor(private _host: virtualFs.Host, private base: string) { } list(path: string): Promise { - return this._host.list(this._resolve(path)).toPromise().then(x => x, _err => []); + const recursiveList = (path: Path): Observable => this._host.list(path).pipe( + // Emit each fragment individually. + concatMap(fragments => from(fragments)), + // Join the path with fragment. + map(fragment => join(path, fragment)), + // Emit directory content paths instead of the directory path. + mergeMap(path => this._host.isDirectory(path).pipe( + concatMap(isDir => isDir ? recursiveList(path) : of(path)) + ) + ), + ); + + return recursiveList(this._resolve(path)).pipe( + map(path => path.replace(this.base, '')), + toArray(), + ).toPromise().then(x => x, _err => []); } read(path: string): Promise { diff --git a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts index c65292c6b5..ca23df7c2b 100644 --- a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts @@ -53,6 +53,7 @@ describe('Browser Builder', () => { it('works with service worker', (done) => { host.writeMultipleFiles({ 'src/ngsw-config.json': JSON.stringify(manifest), + 'src/assets/folder-asset.txt': 'folder-asset.txt', }); const overrides = { serviceWorker: true }; @@ -60,6 +61,40 @@ describe('Browser Builder', () => { tap(buildEvent => { expect(buildEvent.success).toBe(true); expect(host.scopedSync().exists(normalize('dist/ngsw.json'))); + const ngswJson = JSON.parse(virtualFs.fileBufferToString( + host.scopedSync().read(normalize('dist/ngsw.json')))); + // Verify index and assets are there. + expect(ngswJson).toEqual({ + configVersion: 1, + index: '/index.html', + assetGroups: [ + { + name: 'app', + installMode: 'prefetch', + updateMode: 'prefetch', + urls: [ + '/favicon.ico', + '/index.html', + ], + patterns: [], + }, + { + name: 'assets', + installMode: 'lazy', + updateMode: 'prefetch', + urls: [ + '/assets/folder-asset.txt', + ], + patterns: [], + }, + ], + dataGroups: [], + hashTable: { + '/favicon.ico': '460fcbd48b20fcc32b184388606af1238c890dba', + '/assets/folder-asset.txt': '617f202968a6a81050aa617c2e28e1dca11ce8d4', + '/index.html': '3e659d6e536916b7d178d02a2e6e5492f868bf68', + }, + }); }), ).subscribe(undefined, done.fail, done); }, Timeout.Basic); @@ -67,6 +102,7 @@ describe('Browser Builder', () => { it('works with service worker and baseHref', (done) => { host.writeMultipleFiles({ 'src/ngsw-config.json': JSON.stringify(manifest), + 'src/assets/folder-asset.txt': 'folder-asset.txt', }); const overrides = { serviceWorker: true, baseHref: '/foo/bar' }; @@ -74,9 +110,40 @@ describe('Browser Builder', () => { tap(buildEvent => { expect(buildEvent.success).toBe(true); expect(host.scopedSync().exists(normalize('dist/ngsw.json'))); - expect(virtualFs.fileBufferToString( - host.scopedSync().read(normalize('dist/ngsw.json')), - )).toMatch(/"\/foo\/bar\/index.html"/); + const ngswJson = JSON.parse(virtualFs.fileBufferToString( + host.scopedSync().read(normalize('dist/ngsw.json')))); + // Verify index and assets include the base href. + expect(ngswJson).toEqual({ + configVersion: 1, + index: '/foo/bar/index.html', + assetGroups: [ + { + name: 'app', + installMode: 'prefetch', + updateMode: 'prefetch', + urls: [ + '/foo/bar/favicon.ico', + '/foo/bar/index.html', + ], + patterns: [], + }, + { + name: 'assets', + installMode: 'lazy', + updateMode: 'prefetch', + urls: [ + '/foo/bar/assets/folder-asset.txt', + ], + patterns: [], + }, + ], + dataGroups: [], + hashTable: { + '/foo/bar/favicon.ico': '460fcbd48b20fcc32b184388606af1238c890dba', + '/foo/bar/assets/folder-asset.txt': '617f202968a6a81050aa617c2e28e1dca11ce8d4', + '/foo/bar/index.html': '5b53fa9e07e4111b8ef84613fb989a56fee502b0', + }, + }); }), ).subscribe(undefined, done.fail, done); }, Timeout.Basic); From 514a95797ddfdd833e13f66aa7a9dd6c0c4e2045 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 16 Apr 2018 17:51:47 +0100 Subject: [PATCH 450/724] fix(@angular-devkit/schematics): don't reduce directly on concat Note: I have no idea what the NodeWorkflow test should really look like. I just added it to have something failing that would be fixed by the changes. Fix https://github.com/angular/angular-cli/issues/10335 --- package-lock.json | 798 +++++++++++++++++- package.json | 2 +- .../tools/workflow/node-workflow.ts | 3 +- .../tools/workflow/node-workflow_spec.ts | 26 + 4 files changed, 823 insertions(+), 6 deletions(-) create mode 100644 packages/angular_devkit/schematics/tools/workflow/node-workflow_spec.ts diff --git a/package-lock.json b/package-lock.json index 5fcdedb84b..118c141fa3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1615,6 +1615,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -3642,6 +3643,795 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "optional": true, + "requires": { + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + } + } + }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -8767,9 +9557,9 @@ } }, "rxjs": { - "version": "6.0.0-tactical-rc.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0-tactical-rc.1.tgz", - "integrity": "sha512-PbAYwhl4VH5U4YzgzA4O5pCbDV5eBN9zNtcb8QyHXFVql3pAm3l1f+uoEcXsLlemuYdFGCYPbU+CYq9KCaIbBA==", + "version": "6.0.0-uncanny-rc.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0-uncanny-rc.7.tgz", + "integrity": "sha512-mXBJnSpbrotKF83b1sd5uSa7q/J/y99yBArB02l6B1v2QAP18FCn2BwRXfC9O4A+75mfwUAIUWJyLilboF5z2A==", "requires": { "tslib": "1.9.0" }, @@ -11072,6 +11862,7 @@ "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.1", + "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -11824,6 +12615,7 @@ "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.1", + "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", diff --git a/package.json b/package.json index 6704cd0231..eab3d4bfbf 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^6.0.0-tactical-rc.1", + "rxjs": "^6.0.0-uncanny-rc.7", "sass-loader": "^6.0.7", "semver": "^5.3.0", "semver-intersect": "^1.1.2", diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index c7b6ea5e66..f94e345e29 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -177,7 +177,6 @@ export class NodeWorkflow implements workflow.Workflow { obs.complete(); })), - reduce(() => {}), - ); + ).pipe(reduce(() => { })); } } diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow_spec.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow_spec.ts new file mode 100644 index 0000000000..ceefc4bb93 --- /dev/null +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow_spec.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { NodeWorkflow } from '@angular-devkit/schematics/tools'; +import * as path from 'path'; + + +describe('NodeWorkflow', () => { + // TODO: this test seems to either not work on windows or on linux. + xit('works', done => { + const workflow = new NodeWorkflow(new NodeJsSyncHost(), { dryRun: true }); + const collection = path.join(__dirname, '../../../../schematics/angular/package.json'); + + workflow.execute({ + collection, + schematic: 'ng-new', + options: { name: 'workflow-test', version: '6.0.0-rc.4' }, + }).subscribe(undefined, done.fail, done); + }); +}); From ca5beb98fedd42f9d9f438b02efcb8f1844e8bc4 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 16 Apr 2018 15:47:10 -0400 Subject: [PATCH 451/724] fix(@schematics/schematics): Allow smart default parser for blank schematic --- packages/schematics/schematics/blank/factory.ts | 5 +++++ packages/schematics/schematics/blank/schema.json | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/schematics/schematics/blank/factory.ts b/packages/schematics/schematics/blank/factory.ts index acbf7c5aeb..3d27d36c91 100644 --- a/packages/schematics/schematics/blank/factory.ts +++ b/packages/schematics/schematics/blank/factory.ts @@ -17,6 +17,7 @@ import { import { Rule, SchematicContext, + SchematicsException, Tree, UpdateRecorder, apply, @@ -93,6 +94,10 @@ export default function (options: Schema): Rule { // Verify if we need to create a full project, or just add a new schematic. return (tree: Tree, context: SchematicContext) => { + if (!options.name) { + throw new SchematicsException('name option is required.'); + } + let collectionPath: Path | undefined; try { const packageJsonContent = tree.read('/package.json'); diff --git a/packages/schematics/schematics/blank/schema.json b/packages/schematics/schematics/blank/schema.json index 0fa45450e2..81ac3231e5 100644 --- a/packages/schematics/schematics/blank/schema.json +++ b/packages/schematics/schematics/blank/schema.json @@ -6,14 +6,16 @@ "properties": { "name": { "type": "string", - "description": "The package name for the new schematic." + "description": "The package name for the new schematic.", + "$default": { + "$source": "argv", + "index": 0 + } }, "author": { "type": "string", "description": "Author for the new schematic." } }, - "required": [ - "name" - ] + "required": [] } From 113f054a5cdfde6a6fa0e40e3df8982c11e20931 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 16 Apr 2018 16:14:08 -0600 Subject: [PATCH 452/724] release: 6.0.0-rc.5 --- .monorepo.json | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 0bf4759b15..d8e265b7f0 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.6", + "version": "0.5.7", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.6", - "hash": "0f2c1274c1a33354e21586921fd4a29a" + "version": "0.5.7", + "hash": "38171d606cff5418beb2f0e06ab96de4" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.6", - "hash": "4cf615db59e59d114672e927f35c8973", + "version": "0.5.7", + "hash": "8c35f20a62110e0eb80a63fcb9db6644", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.6", - "hash": "67cca04a43ff8a1bc5f3c12423569752", + "version": "0.5.7", + "hash": "d2184feee5d0b2cb1c45f0ef30784dc6", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.6", - "hash": "437cdb100a812bc10a08131cde7c3028", + "version": "0.5.7", + "hash": "6b026137fdd3df43a7b456abad46fd70", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.6", + "version": "0.5.7", "hash": "31b9b564ff5e540ae704d8723445d1ad", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.6", - "hash": "ef46e636df1a32ffd43ca795dbe20607", + "version": "0.5.7", + "hash": "54f75e429c0ac5d4bc763d798a20b6c4", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.6", - "hash": "0de6ff5665a03357e496a40ebab64d84", + "version": "0.5.7", + "hash": "c47368b69e1d4a17e5aa2c53125f2949", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.6", - "hash": "89c39fd109e35cfc39ca2d45f6da29ee", + "version": "0.5.7", + "hash": "5de6c501fee8cce8a123679e82eae86a", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.6", - "hash": "5b1953260312043a7ad13929aaf62e3f", + "version": "0.5.7", + "hash": "57cf66c7bb6fcf22659bacaee0bebc87", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.6", - "hash": "8e8ed56f8334efecbbcdaa889fb5e5fd", + "version": "0.5.7", + "hash": "268c7b41b2c3afd164daa870a2dfff97", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.4", + "version": "6.0.0-rc.5", "section": "Misc", - "hash": "4346a38d1e70711671d3a5cac2959663", + "hash": "dc1d511afdeef962869661c4a76a9d93", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.6", - "hash": "8a0904c4dacef4ff1e27f4641adfe187", + "version": "0.5.7", + "hash": "50c9ec78fad2a2f08b08d5c58c76902d", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.6", + "version": "0.5.7", "section": "Schematics", - "hash": "81ea3d90a8e85b15fd83c847af72c26c", + "hash": "d460d80a8cfceada8397939737d2c259", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.6", + "version": "0.5.7", "section": "Schematics", - "hash": "53654c259405585a652ba71c93cf7269", + "hash": "f87aeeae9cf753879d4a581e54ca3723", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.6", + "version": "0.5.7", "section": "Schematics", - "hash": "ac963f112efee0a83293d6b7d24bca89", + "hash": "ca188bbd2b58925b2b65c70a1930f9d5", "snapshotRepo": "angular/schematics-update-builds" } } From c1ddbbfa5b1deac0b833d42c2c4bc2524b660980 Mon Sep 17 00:00:00 2001 From: Sylvain Dumont Date: Mon, 16 Apr 2018 18:48:38 +0200 Subject: [PATCH 453/724] fix(@angular-devkit/build-angular): add fileReplacements support to server --- .../build_angular/src/server/index.ts | 23 +++++---- .../build_angular/src/server/schema.d.ts | 4 +- .../build_angular/src/server/schema.json | 51 +++++++++++++++++-- 3 files changed, 63 insertions(+), 15 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index c147bb74d6..fa369b1899 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -34,6 +34,7 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; +import { addFileReplacements } from '../utils'; import { BuildWebpackServerSchema } from './schema'; const webpackMerge = require('webpack-merge'); @@ -46,17 +47,19 @@ export class ServerBuilder implements Builder { const options = builderConfig.options; const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); + const host = new virtualFs.AliasHost(this.context.host as virtualFs.Host); // TODO: verify using of(null) to kickstart things is a pattern. return of(null).pipe( concatMap(() => options.deleteOutputPath - ? this._deleteOutputDir(root, normalize(options.outputPath)) + ? this._deleteOutputDir(root, normalize(options.outputPath), this.context.host) : of(null)), - concatMap(() => new Observable(obs => { + concatMap(() => addFileReplacements(root, host, options.fileReplacements)), + concatMap(() => new Observable(obs => { // Ensure Build Optimizer is only used with AOT. let webpackConfig; try { - webpackConfig = this.buildWebpackConfig(root, projectRoot, options); + webpackConfig = this.buildWebpackConfig(root, projectRoot, host, options); } catch (e) { // TODO: why do I have to catch this error? I thought throwing inside an observable // always got converted into an error. @@ -103,7 +106,9 @@ export class ServerBuilder implements Builder { ); } - buildWebpackConfig(root: Path, projectRoot: Path, options: BuildWebpackServerSchema) { + buildWebpackConfig(root: Path, projectRoot: Path, + host: virtualFs.Host, + options: BuildWebpackServerSchema) { let wco: WebpackConfigOptions; // TODO: make target defaults into configurations instead @@ -145,24 +150,24 @@ export class ServerBuilder implements Builder { if (wco.buildOptions.main || wco.buildOptions.polyfills) { const typescriptConfigPartial = wco.buildOptions.aot - ? getAotConfig(wco, this.context.host as virtualFs.Host) - : getNonAotConfig(wco, this.context.host as virtualFs.Host); + ? getAotConfig(wco, host as virtualFs.Host) + : getNonAotConfig(wco, host as virtualFs.Host); webpackConfigs.push(typescriptConfigPartial); } return webpackMerge(webpackConfigs); } - private _deleteOutputDir(root: Path, outputPath: Path) { + private _deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host) { const resolvedOutputPath = resolve(root, outputPath); if (resolvedOutputPath === root) { throw new Error('Output path MUST not be project root directory!'); } - return this.context.host.exists(resolvedOutputPath).pipe( + return host.exists(resolvedOutputPath).pipe( concatMap(exists => exists // TODO: remove this concat once host ops emit an event. - ? concat(this.context.host.delete(resolvedOutputPath), of(null)).pipe(last()) + ? concat(host.delete(resolvedOutputPath), of(null)).pipe(last()) // ? of(null) : of(null)), ); diff --git a/packages/angular_devkit/build_angular/src/server/schema.d.ts b/packages/angular_devkit/build_angular/src/server/schema.d.ts index d4daa6557d..12ec739897 100644 --- a/packages/angular_devkit/build_angular/src/server/schema.d.ts +++ b/packages/angular_devkit/build_angular/src/server/schema.d.ts @@ -70,9 +70,9 @@ export interface BuildWebpackServerSchema { */ lazyModules?: string[]; /** - * Defines the build environment. + * Replace files with other files in the build. */ - environment?: string; + fileReplacements: FileReplacements[]; /** * Define the output filename cache-busting hashing mode. */ diff --git a/packages/angular_devkit/build_angular/src/server/schema.json b/packages/angular_devkit/build_angular/src/server/schema.json index 42b582a164..e3533f3fc9 100644 --- a/packages/angular_devkit/build_angular/src/server/schema.json +++ b/packages/angular_devkit/build_angular/src/server/schema.json @@ -32,9 +32,13 @@ "description": "Defines the optimization level of the build.", "default": false }, - "environment": { - "type": "string", - "description": "Defines the build environment." + "fileReplacements": { + "description": "Replace files with other files in the build.", + "type": "array", + "items": { + "$ref": "#/definitions/fileReplacement" + }, + "default": [] }, "outputPath": { "type": "string", @@ -155,5 +159,44 @@ "outputPath", "main", "tsConfig" - ] + ], + "definitions": { + "fileReplacement": { + "oneOf": [ + { + "type": "object", + "properties": { + "src": { + "type": "string" + }, + "replaceWith": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "src", + "replaceWith" + ] + }, + { + "type": "object", + "properties": { + "replace": { + "type": "string" + }, + "with": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "replace", + "with" + ] + } + ] + } + + } } \ No newline at end of file From cc6bcb1c0d8a8825f85849be27c6e0027880ee82 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 16 Apr 2018 13:11:50 -0400 Subject: [PATCH 454/724] refactor(@angular-devkit/core): support JSON schema draft 6 --- packages/angular_devkit/core/src/json/schema/registry.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index c6c14f1d0e..1613183a15 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -98,6 +98,7 @@ export class CoreSchemaRegistry implements SchemaRegistry { }); this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); + this._ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); this.addPostTransform(addUndefinedDefaults); } From a66d6a6441f8e6193cc6fad3961bd2a4e174c2ee Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 16 Apr 2018 23:17:46 +0200 Subject: [PATCH 455/724] feat(@angular-devkit/build-ng-packagr): add ng-packagr v3.0.0-rc as a peerDependency Ng-packagr v3 brings Angular Package Format V6 among some other changes --- packages/angular_devkit/build_ng_packagr/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 15c8441625..e003295420 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -15,6 +15,6 @@ "rxjs": "^6.0.0-beta.3" }, "peerDependencies": { - "ng-packagr": "^2.2.0" + "ng-packagr": "^2.2.0 || ^3.0.0-rc.0" } -} \ No newline at end of file +} From b32bc1e1ec66e99a9e8d7dc87e45f7aa3218b135 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Apr 2018 12:29:28 -0400 Subject: [PATCH 456/724] test: adjust timeouts for certain more complex tests --- .../build_angular/test/browser/rebuild_spec_large.ts | 2 +- .../build_angular/test/server/base_spec_large.ts | 4 ++-- .../build_ng_packagr/src/build/index_spec_large.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts index b4ab007b50..c9b36fcf02 100644 --- a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts @@ -132,7 +132,7 @@ describe('Browser Builder rebuilds', () => { tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), take(2), ).subscribe(undefined, done.fail, done); - }, Timeout.Complex); + }, Timeout.Massive); it('type checks on rebuilds', (done) => { host.writeMultipleFiles({ diff --git a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts index 159c1bd7a9..ccac7ea876 100644 --- a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts @@ -8,7 +8,7 @@ import { join, normalize, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; -import { host, runTargetSpec } from '../utils'; +import { Timeout, host, runTargetSpec } from '../utils'; describe('Server Builder', () => { @@ -29,5 +29,5 @@ describe('Server Builder', () => { expect(content).toMatch(/AppServerModuleNgFactory/); }), ).subscribe(undefined, done.fail, done); - }, 30000); + }, Timeout.Standard); }); diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 47e874528f..0749dc0730 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -48,7 +48,7 @@ describe('NgPackagr Builder', () => { concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 45000); it('lint works', (done) => { const targetSpec: TargetSpecifier = { project: 'lib', target: 'lint' }; From e86218e4c704e8d120eedbd998d911a9827f451e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 17 Apr 2018 14:12:42 -0400 Subject: [PATCH 457/724] fix(@angular-devkit/build-angular): prevent initial chunk splitting --- .../angular-cli-files/models/webpack-configs/browser.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index bf262f9c5c..d96f58e0b6 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -96,9 +96,14 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { optimization: { runtimeChunk: 'single', splitChunks: { - chunks: buildOptions.commonChunk ? 'all' : 'initial', maxAsyncRequests: Infinity, cacheGroups: { + default: buildOptions.commonChunk && { + chunks: 'async', + minChunks: 2, + reuseExistingChunk: true, + priority: 10, + }, vendors: false, vendor: buildOptions.vendorChunk && { name: 'vendor', From ecf8c34a9536884272eb20f8a15ccf05e7eb1d5e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 17 Apr 2018 14:19:13 -0400 Subject: [PATCH 458/724] fix(@angular-devkit/build-angular): split small common modules into one --- .../src/angular-cli-files/models/webpack-configs/browser.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index d96f58e0b6..080a804028 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -104,6 +104,12 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { reuseExistingChunk: true, priority: 10, }, + common: buildOptions.commonChunk && { + name: 'common', + chunks: 'async', + minChunks: 2, + priority: 5, + }, vendors: false, vendor: buildOptions.vendorChunk && { name: 'vendor', From f58186e63db483bb10cc3682af970f5498f7e013 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Tue, 17 Apr 2018 19:21:04 +0200 Subject: [PATCH 459/724] fix(@schematics/angular): use string style for new app in karma PR #712 fixed it in a new app, but not in the karma conf. --- packages/schematics/angular/application/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 0a01b9ead5..cffac00230 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -133,7 +133,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace }, ], styles: [ - `${projectRoot}src/styles.${options.style}`, + `${projectRoot}src/styles.${options.style}`, ], scripts: [], }, @@ -180,9 +180,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace tsConfig: `${rootFilesRoot}tsconfig.spec.json`, karmaConfig: `${rootFilesRoot}karma.conf.js`, styles: [ - { - input: `${projectRoot}styles.${options.style}`, - }, + `${projectRoot}styles.${options.style}`, ], scripts: [], assets: [ From 8f82969123f3b606841b03e77582505018dbb463 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 18 Apr 2018 10:14:27 -0600 Subject: [PATCH 460/724] fix(@schematics/angular): generate app-shell options properly Options are in the "options" key. Fix angular/angular-cli#10379 --- packages/schematics/angular/app-shell/index.ts | 9 ++++++--- packages/schematics/angular/app-shell/index_spec.ts | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 2513042a06..1dbb95d927 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -187,9 +187,12 @@ function addAppShellConfigToWorkspace(options: AppShellOptions): Rule { const workspacePath = getWorkspacePath(host); const appShellTarget: JsonObject = { - browserTarget: `${options.clientProject}:build`, - serverTarget: `${options.clientProject}:server`, - route: options.route, + builder: '@angular-devkit/build-angular:app-shell', + options: { + browserTarget: `${options.clientProject}:build`, + serverTarget: `${options.clientProject}:server`, + route: options.route, + }, }; if (!workspace.projects[options.clientProject]) { diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index 23c72d1749..ee56ba51b6 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -66,9 +66,9 @@ describe('App Shell Schematic', () => { const content = tree.readContent(filePath); const workspace = JSON.parse(content); const target = workspace.projects.bar.architect['app-shell']; - expect(target.browserTarget).toEqual('bar:build'); - expect(target.serverTarget).toEqual('bar:server'); - expect(target.route).toEqual('shell'); + expect(target.options.browserTarget).toEqual('bar:build'); + expect(target.options.serverTarget).toEqual('bar:server'); + expect(target.options.route).toEqual('shell'); }); it('should add router module to client app module', () => { From d00019294a493f022f1becef4ee60d922fc9b12f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 18 Apr 2018 09:48:40 -0600 Subject: [PATCH 461/724] fix(@angular-devkit/build-angular): support some browser options in dev-server This will allow people to override some flags from a base browser target, either from the command line or from their serve directly. The options chosen are kinda arbitrary. I simply looked at what made sense. Fix angular/angular-cli#10304 --- .../build_angular/src/dev-server/index.ts | 23 +++++++++++ .../build_angular/src/dev-server/schema.json | 40 +++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index ae3c6fb11e..c2bbdba012 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -51,6 +51,15 @@ export interface DevServerBuilderOptions { watch: boolean; hmrWarning: boolean; servePathDefaultWarning: boolean; + + optimization?: boolean; + aot?: boolean; + sourceMap?: boolean; + evalSourceMap?: boolean; + vendorChunk?: boolean; + commonChunk?: boolean; + baseHref?: string; + progress?: boolean; } interface WebpackDevServerConfigurationOptions { @@ -425,6 +434,20 @@ export class DevServerBuilder implements Builder { const builderConfig = architect.getBuilderConfiguration( browserTargetSpec); + // Update the browser options with the same options we support in serve, if defined. + builderConfig.options = { + ...(options.optimization !== undefined ? { optimization: options.optimization } : {}), + ...(options.aot !== undefined ? { aot: options.aot } : {}), + ...(options.sourceMap !== undefined ? { sourceMap: options.sourceMap } : {}), + ...(options.evalSourceMap !== undefined ? { evalSourceMap: options.evalSourceMap } : {}), + ...(options.vendorChunk !== undefined ? { vendorChunk: options.vendorChunk } : {}), + ...(options.commonChunk !== undefined ? { commonChunk: options.commonChunk } : {}), + ...(options.baseHref !== undefined ? { baseHref: options.baseHref } : {}), + ...(options.progress !== undefined ? { progress: options.progress } : {}), + + ...builderConfig.options, + }; + return architect.getBuilderDescription(builderConfig).pipe( concatMap(browserDescription => architect.validateBuilderOptions(builderConfig, browserDescription)), diff --git a/packages/angular_devkit/build_angular/src/dev-server/schema.json b/packages/angular_devkit/build_angular/src/dev-server/schema.json index 7cff55f8a6..d803bacd08 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/schema.json +++ b/packages/angular_devkit/build_angular/src/dev-server/schema.json @@ -77,6 +77,46 @@ "type": "boolean", "description": "Show a warning when deploy-url/base-href use unsupported serve path values.", "default": true + }, + "optimization": { + "type": "boolean", + "description": "Defines the optimization level of the build." + }, + "aot": { + "type": "boolean", + "description": "Build using Ahead of Time compilation." + }, + "sourceMap": { + "type": "boolean", + "description": "Output sourcemaps." + }, + "evalSourceMap": { + "type": "boolean", + "description": "Output in-file eval sourcemaps." + }, + "vendorChunk": { + "type": "boolean", + "description": "Use a separate bundle containing only vendor libraries." + }, + "commonChunk": { + "type": "boolean", + "description": "Use a separate bundle containing code used across multiple bundles." + }, + "baseHref": { + "type": "string", + "description": "Base url for the application being built." + }, + "deployUrl": { + "type": "string", + "description": "URL where files will be deployed." + }, + "verbose": { + "type": "boolean", + "description": "Adds more details to output logging." + }, + "progress": { + "type": "boolean", + "description": "Log progress to the console while building." } }, "additionalProperties": false, From 08935681cf8201b16567977a7b0bdfd4be27ee56 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Apr 2018 14:51:31 -0400 Subject: [PATCH 462/724] refactor(@schematics/update): use npm-registry-client to get data --- package-lock.json | 72 +++++++++- package.json | 1 + packages/schematics/update/package.json | 1 + .../schematics/update/update/index_spec.ts | 10 +- packages/schematics/update/update/npm.ts | 135 ++++++++++++------ packages/schematics/update/update/schema.json | 5 +- 6 files changed, 173 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 118c141fa3..c7df0e55e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1425,6 +1425,11 @@ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -7872,6 +7877,57 @@ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" }, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "requires": { + "hosted-git-info": "2.6.0", + "osenv": "0.1.5", + "semver": "5.5.0", + "validate-npm-package-name": "3.0.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + } + } + }, + "npm-registry-client": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", + "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", + "requires": { + "concat-stream": "1.6.1", + "graceful-fs": "4.1.11", + "normalize-package-data": "2.4.0", + "npm-package-arg": "6.1.0", + "npmlog": "4.1.2", + "once": "1.4.0", + "request": "2.83.0", + "retry": "0.10.1", + "safe-buffer": "5.1.1", + "semver": "5.4.1", + "slide": "1.1.6", + "ssri": "5.2.4" + } + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -9433,6 +9489,11 @@ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -10061,8 +10122,7 @@ "slide": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" }, "smart-buffer": { "version": "1.1.15", @@ -11748,6 +11808,14 @@ "spdx-expression-parse": "1.0.4" } }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "requires": { + "builtins": "1.0.3" + } + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/package.json b/package.json index eab3d4bfbf..4fcbf114b5 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "minimist": "^1.2.0", "ng-packagr": "^2.4.1", "node-sass": "^4.7.2", + "npm-registry-client": "^8.5.1", "opn": "^5.1.0", "parse5": "^4.0.0", "popper.js": "^1.14.1", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index d8f65c409a..b4e9394dfd 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,6 +15,7 @@ "dependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", + "npm-registry-client": "^8.5.1", "semver": "^5.3.0", "semver-intersect": "^1.1.2", "rxjs": "^6.0.0-beta.3" diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 8e7d42dd8c..21133be828 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -50,7 +50,7 @@ describe('@schematics/update', () => { ]); }), ).subscribe(undefined, done.fail, done); - }); + }, 45000); it('calls migration tasks', done => { // Add the basic migration package. @@ -86,7 +86,7 @@ describe('@schematics/update', () => { ]); }), ).subscribe(undefined, done.fail, done); - }); + }, 45000); it('can migrate only', done => { // Add the basic migration package. @@ -119,7 +119,7 @@ describe('@schematics/update', () => { ]); }), ).subscribe(undefined, done.fail, done); - }); + }, 45000); it('can migrate from only', done => { // Add the basic migration package. @@ -156,7 +156,7 @@ describe('@schematics/update', () => { ]); }), ).subscribe(undefined, done.fail, done); - }); + }, 45000); it('can install and migrate with --from (short version number)', done => { // Add the basic migration package. @@ -193,5 +193,5 @@ describe('@schematics/update', () => { ]); }), ).subscribe(undefined, done.fail, done); - }); + }, 45000); }); diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index c7d12be3f8..b57375db60 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -6,16 +6,41 @@ * found in the LICENSE file at https://angular.io/license */ import { logging } from '@angular-devkit/core'; -import * as http from 'http'; -import * as https from 'https'; -import { Observable, ReplaySubject } from 'rxjs'; +import { exec } from 'child_process'; +import { Observable, ReplaySubject, concat, of } from 'rxjs'; +import { concatMap, first, map, toArray } from 'rxjs/operators'; import * as url from 'url'; import { NpmRepositoryPackageJson } from './npm-package-json'; +const RegistryClient = require('npm-registry-client'); const npmPackageJsonCache = new Map>(); +function getNpmConfigOption(option: string) { + return new Observable(obs => { + try { + exec(`npm get ${option}`, (error, data) => { + if (error) { + obs.next(); + } else { + data = data.trim(); + if (!data || data === 'undefined' || data === 'null') { + obs.next(); + } else { + obs.next(data); + } + } + + obs.complete(); + }); + } catch { + obs.next(); + obs.complete(); + } + }); +} + /** * Get the NPM repository's package.json for a package. This is p * @param {string} packageName The package name to fetch. @@ -26,47 +51,75 @@ const npmPackageJsonCache = new Map */ export function getNpmPackageJson( packageName: string, - registryUrl: string, + registryUrl: string | undefined, logger: logging.LoggerApi, ): Observable> { - let fullUrl = new url.URL(`http://${registryUrl}/${packageName.replace(/\//g, '%2F')}`); - try { - const registry = new url.URL(registryUrl); - registry.pathname = (registry.pathname || '') - .replace(/\/?$/, '/' + packageName.replace(/\//g, '%2F')); - fullUrl = new url.URL(url.format(registry)); - } catch (_) { - } - - logger.debug( - `Getting package.json from ${JSON.stringify(packageName)} (url: ${JSON.stringify(fullUrl)})...`, - ); - let maybeRequest = npmPackageJsonCache.get(fullUrl.toString()); - if (!maybeRequest) { - const subject = new ReplaySubject(1); - - const protocolPackage = (fullUrl.protocol == 'https' ? https : http) as typeof http; - const request = protocolPackage.request(fullUrl, response => { - let data = ''; - response.on('data', chunk => data += chunk); - response.on('end', () => { - try { - const json = JSON.parse(data); - json.requestedName = packageName; - subject.next(json as NpmRepositoryPackageJson); - subject.complete(); - } catch (err) { - subject.error(err); - } - }); - response.on('error', err => subject.error(err)); - }); - request.end(); + return (registryUrl ? of(registryUrl) : getNpmConfigOption('registry')).pipe( + first(), + map(partialUrl => { + if (!partialUrl) { + partialUrl = 'https://registry.npmjs.org/'; + } + const partial = url.parse(partialUrl); + let fullUrl = new url.URL(`http://${partial.host}/${packageName.replace(/\//g, '%2F')}`); + try { + const registry = new url.URL(partialUrl); + registry.pathname = (registry.pathname || '') + .replace(/\/?$/, '/' + packageName.replace(/\//g, '%2F')); + fullUrl = new url.URL(url.format(registry)); + } catch {} - maybeRequest = subject.asObservable(); - npmPackageJsonCache.set(fullUrl.toString(), maybeRequest); - } + logger.debug( + `Getting package.json from '${packageName}' (url: ${JSON.stringify(fullUrl)})...`, + ); + + return fullUrl.toString(); + }), + concatMap(fullUrl => { + let maybeRequest = npmPackageJsonCache.get(fullUrl); + if (maybeRequest) { + return maybeRequest; + } + + return concat( + getNpmConfigOption('proxy'), + getNpmConfigOption('https-proxy'), + ).pipe( + toArray(), + concatMap(options => { + const subject = new ReplaySubject(1); + + const client = new RegistryClient({ + proxy: { + http: options[0], + https: options[1], + }, + }); + client.log.level = 'silent'; + const params = { + timeout: 30000, + }; + + client.get( + fullUrl, + params, + (error: object, data: NpmRepositoryPackageJson) => { + if (error) { + subject.error(error); + } + + subject.next(data); + subject.complete(); + }); + + maybeRequest = subject.asObservable(); + npmPackageJsonCache.set(fullUrl.toString(), maybeRequest); + + return maybeRequest; + }), + ); + }), + ); - return maybeRequest; } diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json index 621608cced..a7205a10d0 100644 --- a/packages/schematics/update/update/schema.json +++ b/packages/schematics/update/update/schema.json @@ -43,7 +43,7 @@ "type": "string" }, "registry": { - "description": "The NPM registry to use. If you have an NPM proxy, you need to use this flag and set it to point to the proxy.", + "description": "The NPM registry to use.", "type": "string", "oneOf": [ { @@ -52,8 +52,7 @@ { "format": "hostname" } - ], - "default": "http://registry.npmjs.org/" + ] } } } From 2ae66f5f166327a2ecb21792d086dabef01522ea Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Apr 2018 20:09:35 -0400 Subject: [PATCH 463/724] fix(@angular-devkit/build-angular): sync ajv versions --- package.json | 2 +- packages/angular_devkit/build_angular/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4fcbf114b5..0094d4f735 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@types/source-map": "0.5.2", "@types/webpack": "^3.8.2", "@types/webpack-sources": "^0.1.3", - "ajv": "^6.4.0", + "ajv": "~6.4.0", "autoprefixer": "^8.1.0", "bootstrap": "^4.0.0", "cache-loader": "^1.2.2", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 2f4555d536..0fef46fa95 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -13,7 +13,7 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/core": "0.0.0", "@ngtools/webpack": "0.0.0", - "ajv": "^6.0.0", + "ajv": "~6.4.0", "autoprefixer": "^8.1.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", From 421d5a05944ee7797544b19a6f37c0ad8e4bbe9e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Apr 2018 19:47:08 -0400 Subject: [PATCH 464/724] refactor(@angular-devkit/build-angular): update webpack related dependencies --- package-lock.json | 1853 ++++++++--------- package.json | 30 +- .../angular_devkit/build_angular/package.json | 24 +- 3 files changed, 949 insertions(+), 958 deletions(-) diff --git a/package-lock.json b/package-lock.json index c7df0e55e1..ebb14eb764 100644 --- a/package-lock.json +++ b/package-lock.json @@ -208,7 +208,7 @@ "integrity": "sha512-+R4A5pYLCUhchrZdmTt9FRhtHAACxkgtENPTrciuSlk9+bloMqKAri97+41rbNlboAuV9OQLjz90aTvbzR/S+A==", "requires": { "@types/minimatch": "3.0.3", - "@types/webpack": "3.8.2" + "@types/webpack": "4.1.3" } }, "@types/events": { @@ -264,12 +264,12 @@ "integrity": "sha512-BN0ho2/U55Td9k8RT2KqonDNmWZHTl1crIk8GIh+xNeCw8A60GMCIKN5a6u/Voz3pF3zzl3Ui+ldGrGxCSsYQw==" }, "@types/loader-utils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.1.tgz", - "integrity": "sha512-HG9SyNEyGuJXuaEjhoFeaZE1dZscmPx9svXExM/SKsF3Rh9Bdy4sJB7IJFgfYHIy2eWKmAkxGIvrHL+Kk8MEvw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.3.tgz", + "integrity": "sha512-euKGFr2oCB3ASBwG39CYJMR3N9T0nanVqXdiH7Zu/Nqddt6SmFRxytq/i2w9LQYNQekEtGBz+pE3qG6fQTNvRg==", "requires": { "@types/node": "8.9.3", - "@types/webpack": "3.8.2" + "@types/webpack": "4.1.3" } }, "@types/mime": { @@ -338,9 +338,9 @@ "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==" }, "@types/tapable": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-0.2.4.tgz", - "integrity": "sha512-pclMAvhPnXJcJu1ZZ8bQthuUcdDWzDuxDdbSf6l1U6s4fP6EBiZpPsOZYqFOrbqDV97sXGFSsb6AUpiLfv4xIA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.2.tgz", + "integrity": "sha512-42zEJkBpNfMEAvWR5WlwtTH22oDzcMjFsL9gDGExwF8X8WvAiw7Vwop7hPw03QT8TKfec83LwbHj6SvpqM4ELQ==" }, "@types/tough-cookie": { "version": "2.3.2", @@ -348,9 +348,9 @@ "integrity": "sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA==" }, "@types/uglify-js": { - "version": "2.6.30", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-2.6.30.tgz", - "integrity": "sha512-NjiBNGFl58vHJeijl63w1fWRIjLnrfOvimsXF5b3lTzEzkTV1BnVsbqQeLejg54upsHPWIF63aiub5TEwH619A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.2.tgz", + "integrity": "sha512-o8hU2+4xsyGC27Vujoklvxl88Ew5zmJuTBYMX1Uro2rYUt4HEFJKL6fuq8aGykvS+ssIsIzerWWP2DRxonownQ==", "requires": { "source-map": "0.6.1" }, @@ -363,13 +363,21 @@ } }, "@types/webpack": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-3.8.2.tgz", - "integrity": "sha512-q0MGM3Zfi63YQmj45j2pbfJ98GBbzVjMbJORe+O3T7X6aCyvJOd9e1fYsOPfwqpqD8Q/CfjyZOJmC/jE1WyYHg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.1.3.tgz", + "integrity": "sha512-NoGVTCumOsyFfuy3934f3ktiJi+wcXHJFxT47tby3iCpuo6M/WjFA9VqT5bYO+FE46i3R0N00RpJX75HxHKDaQ==", "requires": { "@types/node": "8.9.3", - "@types/tapable": "0.2.4", - "@types/uglify-js": "2.6.30" + "@types/tapable": "1.0.2", + "@types/uglify-js": "3.0.2", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } } }, "@types/webpack-sources": { @@ -762,9 +770,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", - "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", + "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==" }, "autoprefixer": { "version": "8.1.0", @@ -947,10 +955,41 @@ "is-descriptor": "1.0.2" } }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -1390,6 +1429,11 @@ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" + }, "buffer-indexof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", @@ -1450,7 +1494,7 @@ "move-concurrently": "1.0.1", "promise-inflight": "1.0.1", "rimraf": "2.6.2", - "ssri": "5.2.4", + "ssri": "5.3.0", "unique-filename": "1.1.0", "y18n": "4.0.0" }, @@ -1462,11 +1506,6 @@ "requires": { "glob": "7.1.2" } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" } } }, @@ -1635,9 +1674,9 @@ "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, "chrome-trace-event": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.2.tgz", - "integrity": "sha1-kPNohdU0WlBiEzLwcXtZWIPV2YI=" + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==" }, "ci-info": { "version": "1.1.2", @@ -1654,9 +1693,9 @@ } }, "circular-dependency-plugin": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.0.tgz", - "integrity": "sha512-mJzk5D+Uy/bVVk89GDfdgINMc03FaqfpHg+nx/D8l2okD48FPmB5nBlpXj6HcmBkCv5AhY5qEfvCXmszc9vXpA==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", + "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==" }, "class-utils": { "version": "0.3.6", @@ -1677,61 +1716,10 @@ "is-descriptor": "0.1.6" } }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -1772,6 +1760,32 @@ "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" }, + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "requires": { + "for-own": "1.0.0", + "is-plain-object": "2.0.4", + "kind-of": "6.0.2", + "shallow-clone": "1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "1.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1912,7 +1926,7 @@ }, "compression": { "version": "1.7.2", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { "accepts": "1.3.5", @@ -1954,10 +1968,11 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { + "buffer-from": "1.0.0", "inherits": "2.0.3", "readable-stream": "2.3.3", "typedarray": "0.0.6" @@ -2225,9 +2240,9 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-webpack-plugin": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.0.tgz", - "integrity": "sha512-ROQ85fWKuhJfUkBTdHvfV+Zv6Ltm3G/vPVFdLPFwzWzd9RUY1yLw3rt6FmKK2PaeNQCNvmwgFhuarkjuV4PVDQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", + "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", "requires": { "cacache": "10.0.4", "find-cache-dir": "1.0.0", @@ -2236,7 +2251,7 @@ "loader-utils": "1.1.0", "minimatch": "3.0.4", "p-limit": "1.2.0", - "serialize-javascript": "1.4.0" + "serialize-javascript": "1.5.0" }, "dependencies": { "is-extglob": { @@ -2557,10 +2572,41 @@ "isobject": "3.0.1" }, "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -2901,9 +2947,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "ejs": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", - "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=" + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.8.tgz", + "integrity": "sha512-QIDZL54fyV8MDcAsO91BMH1ft2qGGaHIJsJIA/+t+7uvXol1dm413fPcUgUb4k8F/9457rx4/KFE4XfDifrQxQ==" }, "electron-to-chromium": { "version": "1.3.37", @@ -3524,9 +3570,9 @@ } }, "flush-write-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", - "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "requires": { "inherits": "2.0.3", "readable-stream": "2.3.3" @@ -5112,115 +5158,368 @@ } }, "http-proxy-middleware": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz", - "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", "requires": { "http-proxy": "1.16.2", - "is-glob": "3.1.0", - "lodash": "4.17.4", - "micromatch": "2.3.11" + "is-glob": "4.0.0", + "lodash": "4.17.5", + "micromatch": "3.1.10" }, "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "is-extglob": "2.1.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } - } - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "httpntlm": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", - "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", - "requires": { - "httpreq": "0.4.24", - "underscore": "1.7.0" - } - }, - "httpreq": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", - "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=" - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - } - }, - "husky": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", - "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", - "requires": { - "is-ci": "1.1.0", - "normalize-path": "1.0.0", - "strip-indent": "2.0.0" - }, - "dependencies": { - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - } - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "httpntlm": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", + "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", + "requires": { + "httpreq": "0.4.24", + "underscore": "1.7.0" + } + }, + "httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=" + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, + "husky": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", + "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", + "requires": { + "is-ci": "1.1.0", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + } + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", "optional": true }, @@ -5382,18 +5681,11 @@ "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } + "kind-of": "3.2.2" } }, "is-arrayish": { @@ -5436,18 +5728,11 @@ } }, "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } + "kind-of": "3.2.2" } }, "is-date-object": { @@ -5456,19 +5741,19 @@ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" }, "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -5923,9 +6208,9 @@ "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" }, "js-base64": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.0.tgz", - "integrity": "sha512-Wehd+7Pf9tFvGb+ydPm9TjYjV8X1YHOVyG8QyELZxEMqOhemVwGRmoG8iQ/soqI3n8v4xn59zaLxiCJiaaRzKA==" + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", + "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==" }, "js-tokens": { "version": "3.0.2", @@ -6460,11 +6745,11 @@ } }, "license-webpack-plugin": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.2.3.tgz", - "integrity": "sha512-+sie46vNe5L48N94LEzEvreJqAdi+N3x3mXUx+iujuAmftWdJUh68RSDPgWK3DRJuu50dwiyH7MdVAx95zfKQA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", + "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", "requires": { - "ejs": "2.5.7" + "ejs": "2.5.8" } }, "lie": { @@ -6539,9 +6824,9 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, "lodash.mergewith": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz", - "integrity": "sha1-FQzwoWeR9ZA7iJHqsVRgknS96lU=" + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==" }, "lodash.tail": { "version": "4.1.1", @@ -6711,9 +6996,9 @@ "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=" }, "loglevelnext": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.3.tgz", - "integrity": "sha512-OCxd/b78TijTB4b6zVqLbMrxhebyvdZKwqpL0VHUZ0pYhavXaPD4l6Xrr4n5xqTYWiqtb0i7ikSoJY/myQ/Org==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.4.tgz", + "integrity": "sha512-V3N6LAJAiGwa/zjtvmgs2tyeiCJ23bGNhxXN8R+v7k6TNlSlTz40mIyZYdmO762eBnEFymn0Mhha+WuAhnwMBg==" }, "longest": { "version": "1.0.1", @@ -6988,9 +7273,9 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, "mini-css-extract-plugin": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.3.0.tgz", - "integrity": "sha512-xWifHy3fqq0HZeEZ0WTi22tek85YQqNFlGxtvSXJXBi1O6XgqKMyK6fsupSBaaIsyBdfpr9QsG93hrWu13pruQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", + "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", "requires": { "loader-utils": "1.1.0", "webpack-sources": "1.1.0" @@ -7047,10 +7332,10 @@ "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "requires": { - "concat-stream": "1.6.1", + "concat-stream": "1.6.2", "duplexify": "3.5.4", "end-of-stream": "1.4.1", - "flush-write-stream": "1.0.2", + "flush-write-stream": "1.0.3", "from2": "2.3.0", "parallel-transform": "1.1.0", "pump": "2.0.1", @@ -7218,7 +7503,8 @@ "nan": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "optional": true }, "nanomatch": { "version": "1.2.9", @@ -7235,7 +7521,7 @@ "kind-of": "6.0.2", "object.pick": "1.3.0", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -7295,7 +7581,7 @@ "glob": "7.1.2", "injection-js": "2.2.1", "less": "2.7.3", - "node-sass": "4.7.2", + "node-sass": "4.8.3", "node-sass-tilde-importer": "1.0.2", "postcss": "6.0.19", "postcss-clean": "1.1.0", @@ -7576,7 +7862,7 @@ "mkdirp": "0.5.1", "nopt": "3.0.6", "npmlog": "4.1.2", - "osenv": "0.1.4", + "osenv": "0.1.5", "request": "2.83.0", "rimraf": "2.2.8", "semver": "5.3.0", @@ -7624,7 +7910,7 @@ "stream-browserify": "2.0.1", "stream-http": "2.7.2", "string_decoder": "1.0.3", - "timers-browserify": "2.0.6", + "timers-browserify": "2.0.10", "tty-browserify": "0.0.0", "url": "0.11.0", "util": "0.10.3", @@ -7642,9 +7928,9 @@ } }, "timers-browserify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.6.tgz", - "integrity": "sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "requires": { "setimmediate": "1.0.5" } @@ -7652,9 +7938,9 @@ } }, "node-sass": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", - "integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.8.3.tgz", + "integrity": "sha512-tfFWhUsCk/Y19zarDcPo5xpj+IW3qCfOjVdHtYeG6S1CKbQOh1zqylnQK6cV3z9k80yxAnFX9Y+a9+XysDhhfg==", "requires": { "async-foreach": "0.1.3", "chalk": "1.1.3", @@ -7665,10 +7951,10 @@ "in-publish": "2.0.0", "lodash.assign": "4.2.0", "lodash.clonedeep": "4.5.0", - "lodash.mergewith": "4.6.0", + "lodash.mergewith": "4.6.1", "meow": "3.7.0", "mkdirp": "0.5.1", - "nan": "2.8.0", + "nan": "2.10.0", "node-gyp": "3.6.2", "npmlog": "4.1.2", "request": "2.79.0", @@ -7710,6 +7996,11 @@ "pinkie-promise": "2.0.1" } }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" + }, "qs": { "version": "6.3.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", @@ -8002,39 +8293,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } } } }, @@ -8209,9 +8467,9 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -8642,9 +8900,9 @@ } }, "postcss-loader": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.1.tgz", - "integrity": "sha512-f0J/DWE/hyO9/LH0WHpXkny/ZZ238sSaG3p1SRBtVZnFWUtD7GXIEgHoBg8cnAeRbmEvUxHQptY46zWfwNYj/w==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.4.tgz", + "integrity": "sha512-L2p654oK945B/gDFUGgOhh7uzj19RWoY1SVMeJVoKno1H2MdbQ0RppR/28JGju4pMb22iRC7BJ9aDzbxXSLf4A==", "requires": { "loader-utils": "1.1.0", "postcss": "6.0.19", @@ -8652,22 +8910,12 @@ "schema-utils": "0.4.5" }, "dependencies": { - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, "schema-utils": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "6.2.0", + "ajv": "6.4.0", "ajv-keywords": "3.1.0" } } @@ -9697,6 +9945,11 @@ "wrap-ansi": "2.1.0" } }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, "yargs": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", @@ -9720,9 +9973,9 @@ } }, "sass-loader": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz", - "integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.0.1.tgz", + "integrity": "sha512-MeVVJFejJELlAbA7jrRchi88PGP6U9yIfqyiG+bBC4a9s2PX+ulJB9h8bbEohtPBfZmlLhNZ0opQM9hovRXvlw==", "requires": { "clone-deep": "2.0.2", "loader-utils": "1.1.0", @@ -9730,52 +9983,11 @@ "neo-async": "2.5.0", "pify": "3.0.0" }, - "dependencies": { - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "requires": { - "for-own": "1.0.0", - "is-plain-object": "2.0.4", - "kind-of": "6.0.2", - "shallow-clone": "1.0.0" - } - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "requires": { - "for-in": "1.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", - "requires": { - "is-extendable": "0.1.1", - "kind-of": "5.1.0", - "mixin-object": "2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" } } }, @@ -9818,7 +10030,7 @@ "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "requires": { - "js-base64": "2.4.0", + "js-base64": "2.4.3", "source-map": "0.4.4" }, "dependencies": { @@ -9936,9 +10148,9 @@ } }, "serialize-javascript": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", - "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==" }, "serve-index": { "version": "1.9.1", @@ -9996,14 +10208,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "set-getter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", - "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", - "requires": { - "to-object-path": "0.3.0" - } - }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -10049,6 +10253,23 @@ "safe-buffer": "5.1.1" } }, + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "requires": { + "is-extendable": "0.1.1", + "kind-of": "5.1.0", + "mixin-object": "2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, "shasum": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", @@ -10139,9 +10360,9 @@ } }, "snapdragon": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", - "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { "base": "0.11.2", "debug": "2.6.9", @@ -10150,7 +10371,7 @@ "map-cache": "0.2.2", "source-map": "0.5.7", "source-map-resolve": "0.5.1", - "use": "2.0.2" + "use": "3.1.0" }, "dependencies": { "define-property": { @@ -10168,57 +10389,6 @@ "requires": { "is-extendable": "0.1.1" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -10240,10 +10410,41 @@ "is-descriptor": "1.0.2" } }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -10337,7 +10538,7 @@ "faye-websocket": "0.11.1", "inherits": "2.0.3", "json3": "3.3.2", - "url-parse": "1.2.0" + "url-parse": "1.3.0" }, "dependencies": { "faye-websocket": { @@ -10402,7 +10603,7 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "atob": "2.0.3", + "atob": "2.1.0", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -10573,9 +10774,9 @@ } }, "ssri": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.2.4.tgz", - "integrity": "sha512-UnEAgMZa15973iH7cUi0AHjJn1ACDIkaMyZILoqwN6yzt+4P81I8tBc5Hl+qwi5auMplZtPQsHrPBR5vJLcQtQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", "requires": { "safe-buffer": "5.1.1" } @@ -10596,57 +10797,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -10793,30 +10943,20 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "style-loader": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.20.2.tgz", - "integrity": "sha512-FrLMGaOLVhS5pvoez3eJyc0ktchT1inEZziBSjBq1hHQBK3GFkF57Qd825DcrUhjaAWQk70MKrIl5bfjadR/Dg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", + "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", "requires": { "loader-utils": "1.1.0", "schema-utils": "0.4.5" }, "dependencies": { - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, "schema-utils": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "6.2.0", + "ajv": "6.4.0", "ajv-keywords": "3.1.0" } } @@ -11309,27 +11449,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==" }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "requires": { - "commander": "2.13.0", - "source-map": "0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", @@ -11348,36 +11467,31 @@ "optional": true }, "uglifyjs-webpack-plugin": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz", - "integrity": "sha512-CG/NvzXfemUAm5Y4Guh5eEaJYHtkG7kKNpXEJHp9QpxsFVB5/qKvYWoMaq4sa99ccZ0hM3MK8vQV9XPZB4357A==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", + "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", "requires": { "cacache": "10.0.4", "find-cache-dir": "1.0.0", "schema-utils": "0.4.5", - "serialize-javascript": "1.4.0", + "serialize-javascript": "1.5.0", "source-map": "0.6.1", "uglify-es": "3.3.9", "webpack-sources": "1.1.0", - "worker-farm": "1.5.4" + "worker-farm": "1.6.0" }, "dependencies": { - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" }, "schema-utils": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "6.2.0", + "ajv": "6.4.0", "ajv-keywords": "3.1.0" } }, @@ -11385,6 +11499,15 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "requires": { + "commander": "2.13.0", + "source-map": "0.6.1" + } } } }, @@ -11620,9 +11743,9 @@ } }, "url-parse": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", - "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.3.0.tgz", + "integrity": "sha512-zPvPA3T7P6M+0iNsgX+iAcAz4GshKrowtQBHHc/28tVsBc8jK7VRCNX+2GEcoE6zDB6XqXhcyiUWPVZY6C70Cg==", "requires": { "querystringify": "1.0.0", "requires-port": "1.0.0" @@ -11644,86 +11767,17 @@ } }, "use": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", - "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "define-property": "0.2.5", - "isobject": "3.0.1", - "lazy-cache": "2.0.2" + "kind-of": "6.0.2" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "requires": { - "set-getter": "0.1.0" - } + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -11886,32 +11940,22 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { "arr-flatten": "1.1.0", "array-unique": "0.3.2", - "define-property": "1.0.0", "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", - "kind-of": "6.0.2", - "repeat-element": "1.1.2", - "snapdragon": "0.8.1", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -11929,7 +11973,7 @@ "requires": { "anymatch": "2.0.0", "async-each": "1.0.1", - "braces": "2.3.1", + "braces": "2.3.2", "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", @@ -11951,7 +11995,7 @@ "extend-shallow": "2.0.1", "posix-character-classes": "0.1.1", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -11971,6 +12015,42 @@ "is-extendable": "0.1.1" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -11999,7 +12079,7 @@ "extend-shallow": "2.0.1", "fragment-cache": "0.2.1", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -12062,39 +12142,29 @@ } }, "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" } }, "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-extglob": { @@ -12145,7 +12215,7 @@ "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "braces": "2.3.1", + "braces": "2.3.2", "define-property": "2.0.2", "extend-shallow": "3.0.2", "extglob": "2.0.4", @@ -12154,7 +12224,7 @@ "nanomatch": "1.2.9", "object.pick": "1.3.0", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" } } @@ -12225,15 +12295,15 @@ } }, "webpack": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.5.0.tgz", - "integrity": "sha512-6GrZsvQJnG7o7mjbfjp6s5CyMfdopjt1A/X8LcYwceis9ySjqBX6Lusso2wNZ06utHj2ZvfL6L3f7hfgVeJP6g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.6.0.tgz", + "integrity": "sha512-Fu/k/3fZeGtIhuFkiYpIy1UDHhMiGKjG4FFPVuvG+5Os2lWA1ttWpmi9Qnn6AgfZqj9MvhZW/rmj/ip+nHr06g==", "requires": { "acorn": "5.5.3", "acorn-dynamic-import": "3.0.0", "ajv": "6.4.0", "ajv-keywords": "3.1.0", - "chrome-trace-event": "0.1.2", + "chrome-trace-event": "0.1.3", "enhanced-resolve": "4.0.0", "eslint-scope": "3.7.1", "loader-runner": "2.3.0", @@ -12245,7 +12315,7 @@ "node-libs-browser": "2.1.0", "schema-utils": "0.4.5", "tapable": "1.0.0", - "uglifyjs-webpack-plugin": "1.2.4", + "uglifyjs-webpack-plugin": "1.2.5", "watchpack": "1.5.0", "webpack-sources": "1.1.0" }, @@ -12255,17 +12325,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" }, - "ajv": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", - "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1", - "uri-js": "3.0.2" - } - }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -12277,32 +12336,22 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { "arr-flatten": "1.1.0", "array-unique": "0.3.2", - "define-property": "1.0.0", "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", - "kind-of": "6.0.2", "repeat-element": "1.1.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "snapdragon-node": "2.1.1", "split-string": "3.1.0", "to-regex": "3.0.2" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -12323,7 +12372,7 @@ "extend-shallow": "2.0.1", "posix-character-classes": "0.1.1", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -12343,6 +12392,42 @@ "is-extendable": "0.1.1" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -12371,7 +12456,7 @@ "extend-shallow": "2.0.1", "fragment-cache": "0.2.1", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -12415,39 +12500,29 @@ } }, "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" } }, "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-number": { @@ -12485,7 +12560,7 @@ "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "braces": "2.3.1", + "braces": "2.3.2", "define-property": "2.0.2", "extend-shallow": "3.0.2", "extglob": "2.0.4", @@ -12494,7 +12569,7 @@ "nanomatch": "1.2.9", "object.pick": "1.3.0", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" } }, @@ -12506,26 +12581,6 @@ "ajv": "6.4.0", "ajv-keywords": "3.1.0" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "uglifyjs-webpack-plugin": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz", - "integrity": "sha512-z0IbjpW8b3O/OVn+TTZN4pI29RN1zktFBXLIzzfZ+++cUtZ1ERSlLWgpE/5OERuEUs1ijVQnpYAkSlpoVmQmSQ==", - "requires": { - "cacache": "10.0.4", - "find-cache-dir": "1.0.0", - "schema-utils": "0.4.5", - "serialize-javascript": "1.4.0", - "source-map": "0.6.1", - "uglify-es": "3.3.9", - "webpack-sources": "1.1.0", - "worker-farm": "1.5.4" - } } } }, @@ -12554,30 +12609,30 @@ } }, "webpack-dev-middleware": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.0.tgz", - "integrity": "sha512-UtAd5+J3IihQilwxOESie2BKaeo37yjmMSfV5G+UGEwPwqgL9+L/rShvjrfse8ARSRQGd3QwN2ANSk++KYZizQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.2.tgz", + "integrity": "sha512-Z11Zp3GTvCe6mGbbtma+lMB9xRfJcNtupXfmvFBujyXqLNms6onDnSi9f/Cb2rw6KkD5kgibOfxhN7npZwTiGA==", "requires": { "loud-rejection": "1.6.0", "memory-fs": "0.4.1", - "mime": "2.2.0", + "mime": "2.3.1", "path-is-absolute": "1.0.1", "range-parser": "1.2.0", "url-join": "4.0.0", - "webpack-log": "1.1.2" + "webpack-log": "1.2.0" }, "dependencies": { "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" } } }, "webpack-dev-server": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.1.tgz", - "integrity": "sha512-u5lz6REb3+KklgSIytUIOrmWgnpgFmfj/+I+GBXurhEoCsHXpG9twk4NO3bsu72GC9YtxIsiavjfRdhmNt0A/A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.3.tgz", + "integrity": "sha512-UXfgQIPpdw2rByoUnCrMAIXCS7IJJMp5N0MDQNk9CuQvirCkuWlu7gQpCS8Kaiz4kogC4TdAQHG3jzh/DdqEWg==", "requires": { "ansi-html": "0.0.7", "array-includes": "3.0.3", @@ -12589,7 +12644,7 @@ "del": "3.0.0", "express": "4.16.2", "html-entities": "1.2.1", - "http-proxy-middleware": "0.17.4", + "http-proxy-middleware": "0.18.0", "import-local": "1.0.0", "internal-ip": "1.2.0", "ip": "1.1.5", @@ -12603,10 +12658,10 @@ "sockjs-client": "1.1.4", "spdy": "3.4.7", "strip-ansi": "3.0.1", - "supports-color": "5.3.0", - "webpack-dev-middleware": "3.0.1", - "webpack-log": "1.1.2", - "yargs": "9.0.1" + "supports-color": "5.4.0", + "webpack-dev-middleware": "3.1.2", + "webpack-log": "1.2.0", + "yargs": "11.0.0" }, "dependencies": { "ansi-regex": { @@ -12634,32 +12689,22 @@ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { "arr-flatten": "1.1.0", "array-unique": "0.3.2", - "define-property": "1.0.0", "extend-shallow": "2.0.1", "fill-range": "4.0.0", "isobject": "3.0.1", - "kind-of": "6.0.2", "repeat-element": "1.1.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "snapdragon-node": "2.1.1", "split-string": "3.1.0", "to-regex": "3.0.2" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -12682,7 +12727,7 @@ "requires": { "anymatch": "2.0.0", "async-each": "1.0.1", - "braces": "2.3.1", + "braces": "2.3.2", "fsevents": "1.1.3", "glob-parent": "3.1.0", "inherits": "2.0.3", @@ -12695,23 +12740,21 @@ } }, "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", + "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", "wrap-ansi": "2.1.0" }, "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "ansi-regex": "3.0.0" } } } @@ -12747,7 +12790,7 @@ "extend-shallow": "2.0.1", "posix-character-classes": "0.1.1", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -12775,6 +12818,42 @@ "is-extendable": "0.1.1" } }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -12803,7 +12882,7 @@ "extend-shallow": "2.0.1", "fragment-cache": "0.2.1", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" }, "dependencies": { @@ -12903,39 +12982,29 @@ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" } }, "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-extglob": { @@ -12943,6 +13012,11 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -12979,24 +13053,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -13004,7 +13060,7 @@ "requires": { "arr-diff": "4.0.0", "array-unique": "0.3.2", - "braces": "2.3.1", + "braces": "2.3.2", "define-property": "2.0.2", "extend-shallow": "3.0.2", "extglob": "2.0.4", @@ -13013,15 +13069,10 @@ "nanomatch": "1.2.9", "object.pick": "1.3.0", "regex-not": "1.0.2", - "snapdragon": "0.8.1", + "snapdragon": "0.8.2", "to-regex": "3.0.2" } }, - "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" - }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -13032,45 +13083,11 @@ "mem": "1.1.0" } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -13080,11 +13097,6 @@ "strip-ansi": "4.0.0" }, "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -13095,67 +13107,47 @@ } } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { "has-flag": "3.0.0" } }, - "url-join": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", - "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" - }, - "webpack-dev-middleware": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.0.1.tgz", - "integrity": "sha512-JCturcEZNGA0KHEpOJVRTC/VVazTcPfpR9c1Au6NO9a+jxCRchMi87Qe7y3JeOzc0v5eMMKpuGBnPdN52NA+CQ==", - "requires": { - "loud-rejection": "1.6.0", - "memory-fs": "0.4.1", - "mime": "2.2.0", - "path-is-absolute": "1.0.1", - "range-parser": "1.2.0", - "url-join": "4.0.0", - "webpack-log": "1.1.2" - } - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", + "cliui": "4.0.0", "decamelize": "1.2.0", + "find-up": "2.1.0", "get-caller-file": "1.0.2", "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", "require-directory": "2.1.1", "require-main-filename": "1.0.1", "set-blocking": "2.0.0", "string-width": "2.1.1", "which-module": "2.0.0", "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "yargs-parser": "9.0.2" } }, "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "requires": { "camelcase": "4.1.0" } @@ -13163,13 +13155,13 @@ } }, "webpack-log": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.1.2.tgz", - "integrity": "sha512-B53SD4N4BHpZdUwZcj4st2QT7gVfqZtqHDruC1N+K2sciq0Rt/3F1Dx6RlylVkcrToMLTaiaeT48k9Lq4iDVDA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", + "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", "requires": { "chalk": "2.2.2", "log-symbols": "2.2.0", - "loglevelnext": "1.0.3", + "loglevelnext": "1.0.4", "uuid": "3.1.0" } }, @@ -13302,12 +13294,11 @@ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, "worker-farm": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz", - "integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "requires": { - "errno": "0.1.7", - "xtend": "4.0.1" + "errno": "0.1.7" }, "dependencies": { "errno": { @@ -13413,9 +13404,9 @@ } }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index 0094d4f735..9f881eacdb 100644 --- a/package.json +++ b/package.json @@ -71,25 +71,25 @@ "@types/glob": "^5.0.29", "@types/istanbul": "^0.4.29", "@types/jasmine": "^2.5.47", - "@types/loader-utils": "^1.1.1", + "@types/loader-utils": "^1.1.3", "@types/minimist": "^1.2.0", "@types/node": "^8.9.1", "@types/request": "^2.47.0", "@types/semver": "^5.3.30", "@types/source-map": "0.5.2", - "@types/webpack": "^3.8.2", - "@types/webpack-sources": "^0.1.3", + "@types/webpack": "^4.1.3", + "@types/webpack-sources": "^0.1.4", "ajv": "~6.4.0", "autoprefixer": "^8.1.0", "bootstrap": "^4.0.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", "chokidar": "^1.7.0", - "circular-dependency-plugin": "^5.0.0", + "circular-dependency-plugin": "^5.0.2", "clean-css": "^4.1.11", "codelyzer": "^4.2.1", "conventional-changelog": "^1.1.0", - "copy-webpack-plugin": "^4.5.0", + "copy-webpack-plugin": "^4.5.1", "express": "^4.16.2", "file-loader": "^1.1.11", "font-awesome": "^4.7.0", @@ -110,16 +110,16 @@ "karma-source-map-support": "^1.2.0", "less": "^3.0.1", "less-loader": "^4.1.0", - "license-webpack-plugin": "^1.2.3", + "license-webpack-plugin": "^1.3.1", "loader-utils": "^1.1.0", "lodash": "^4.17.4", "material-design-icons": "^3.0.1", "memory-fs": "^0.4.1", - "mini-css-extract-plugin": "~0.3.0", + "mini-css-extract-plugin": "~0.4.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", "ng-packagr": "^2.4.1", - "node-sass": "^4.7.2", + "node-sass": "^4.8.3", "npm-registry-client": "^8.5.1", "opn": "^5.1.0", "parse5": "^4.0.0", @@ -127,21 +127,21 @@ "portfinder": "^1.0.13", "postcss": "^6.0.19", "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.1", + "postcss-loader": "^2.1.4", "postcss-url": "^7.3.1", "protractor": "^5.3.1", "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", "rxjs": "^6.0.0-uncanny-rc.7", - "sass-loader": "^6.0.7", + "sass-loader": "^7.0.1", "semver": "^5.3.0", "semver-intersect": "^1.1.2", "silent-error": "^1.1.0", "source-map": "^0.5.6", "source-map-support": "^0.5.0", "stats-webpack-plugin": "^0.6.2", - "style-loader": "^0.20.2", + "style-loader": "^0.21.0", "stylus": "^0.54.5", "stylus-loader": "^3.0.2", "symbol-observable": "^1.2.0", @@ -152,11 +152,11 @@ "tslint": "^5.9.1", "tsutils": "~2.22.2", "typescript": "~2.7.2", - "uglifyjs-webpack-plugin": "^1.2.2", + "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", - "webpack": "~4.5.0", - "webpack-dev-middleware": "^3.1.0", - "webpack-dev-server": "^3.1.1", + "webpack": "~4.6.0", + "webpack-dev-middleware": "^3.1.2", + "webpack-dev-server": "^3.1.3", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 0fef46fa95..f1bcdbd682 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,9 +17,9 @@ "autoprefixer": "^8.1.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", - "circular-dependency-plugin": "^5.0.0", + "circular-dependency-plugin": "^5.0.2", "clean-css": "^4.1.11", - "copy-webpack-plugin": "^4.5.0", + "copy-webpack-plugin": "^4.5.1", "file-loader": "^1.1.11", "glob": "^7.0.3", "html-webpack-plugin": "^3.0.6", @@ -28,36 +28,36 @@ "karma-source-map-support": "^1.2.0", "less": "^3.0.1", "less-loader": "^4.1.0", - "license-webpack-plugin": "^1.2.3", + "license-webpack-plugin": "^1.3.1", "lodash": "^4.17.4", "memory-fs": "^0.4.1", - "mini-css-extract-plugin": "~0.3.0", + "mini-css-extract-plugin": "~0.4.0", "minimatch": "^3.0.4", - "node-sass": "^4.7.2", + "node-sass": "^4.8.3", "parse5": "^4.0.0", "opn": "^5.1.0", "portfinder": "^1.0.13", "postcss": "^6.0.19", "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.1", + "postcss-loader": "^2.1.4", "postcss-url": "^7.3.1", "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", "rxjs": "^6.0.0-beta.3", - "sass-loader": "^6.0.7", + "sass-loader": "^7.0.1", "silent-error": "^1.1.0", "source-map-support": "^0.5.0", "stats-webpack-plugin": "^0.6.2", - "style-loader": "^0.20.2", + "style-loader": "^0.21.0", "stylus": "^0.54.5", "stylus-loader": "^3.0.2", "tree-kill": "^1.2.0", - "uglifyjs-webpack-plugin": "^1.2.2", + "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", - "webpack": "~4.5.0", - "webpack-dev-middleware": "^3.1.0", - "webpack-dev-server": "^3.1.1", + "webpack": "~4.6.0", + "webpack-dev-middleware": "^3.1.2", + "webpack-dev-server": "^3.1.3", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4" From 771a5cc4858eff6abcfad3953ccb93b764001759 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 19 Apr 2018 14:21:52 -0400 Subject: [PATCH 465/724] fix(@schematics/angular): avoid adding default style ext to new projects --- packages/schematics/angular/application/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index cffac00230..86e51b2a3f 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -225,7 +225,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace if (options.inlineTemplate === true || options.inlineStyle === true - || options.style !== undefined) { + || options.style !== 'css') { schematics['@schematics/angular:component'] = {}; if (options.inlineTemplate === true) { (schematics['@schematics/angular:component'] as JsonObject).inlineTemplate = true; @@ -233,7 +233,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace if (options.inlineStyle === true) { (schematics['@schematics/angular:component'] as JsonObject).inlineStyle = true; } - if (options.style !== undefined) { + if (options.style && options.style !== 'css') { (schematics['@schematics/angular:component'] as JsonObject).styleext = options.style; } } From cdfa2b17c2c67d6cd90443d0738c5709d38c417a Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 20 Apr 2018 11:20:20 +0200 Subject: [PATCH 466/724] fix(@angular-devkit/build-angular): incorrect warning message for `hmrWarning` --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index c2bbdba012..ddf2394fa2 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -310,7 +310,9 @@ export class DevServerBuilder implements Builder { for information on working with HMR for Webpack.`, ); this.context.logger.warn( - tags.oneLine`To disable this warning use "ng set warnings.hmrWarning=false".`); + tags.oneLine`To disable this warning use "hmrWarning: false" under "serve" + options in "angular.json".`, + ); } entryPoints.push('webpack/hot/dev-server'); webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin()); From 988c289ee4f174809160348e4b23789bd885d8ff Mon Sep 17 00:00:00 2001 From: Noel Mace Date: Fri, 20 Apr 2018 13:28:39 +0200 Subject: [PATCH 467/724] feat(@angular-devkit/build-ng-packagr): tsConfig option permit to use a custom tsconfig.json file by setting its path with a new tsConfig option --- .../build_ng_packagr/src/build/index.ts | 13 ++++++++++--- .../build_ng_packagr/src/build/schema.json | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index.ts b/packages/angular_devkit/build_ng_packagr/src/build/index.ts index 20a3d672e3..2b57a40102 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index.ts @@ -27,6 +27,7 @@ function requireProjectModule(root: string, moduleName: string) { export interface NgPackagrBuilderOptions { project: string; + tsConfig?: string; } export class NgPackagrBuilder implements Builder { @@ -46,9 +47,15 @@ export class NgPackagrBuilder implements Builder { getSystemPath(root), 'ng-packagr') as typeof ngPackagr; const packageJsonPath = getSystemPath(resolve(root, normalize(options.project))); - projectNgPackagr.ngPackagr() - .forProject(packageJsonPath) - .build() + const ngPkgProject = projectNgPackagr.ngPackagr() + .forProject(packageJsonPath); + + if (options.tsConfig) { + const tsConfigPath = getSystemPath(resolve(root, normalize(options.tsConfig))); + ngPkgProject.withTsConfig(tsConfigPath); + } + + ngPkgProject.build() .then(() => { obs.next({ success: true }); obs.complete(); diff --git a/packages/angular_devkit/build_ng_packagr/src/build/schema.json b/packages/angular_devkit/build_ng_packagr/src/build/schema.json index 7c784f38bd..8f426a7f88 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/schema.json +++ b/packages/angular_devkit/build_ng_packagr/src/build/schema.json @@ -6,6 +6,10 @@ "project": { "type": "string", "description": "The file path of the package.json for distribution via npm." + }, + "tsConfig": { + "type": "string", + "description": "The file path of the TypeScript configuration file." } }, "additionalProperties": false, From 545a43c4c0d04eb74967351d7835681a217a972e Mon Sep 17 00:00:00 2001 From: Noel Mace Date: Fri, 20 Apr 2018 13:32:07 +0200 Subject: [PATCH 468/724] build: ignore ngPackagr temporary files ngPackagr may leave some .ng_pkg_build files after an error we may encounter this kind of errors when contributing to build_ng_packagr --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fb6668f33a..d46ee5f9af 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ node_modules/ tmp/ npm-debug.log* yarn-error.log* +.ng_pkg_build/ # Mac OSX Finder files. **/.DS_Store From 766059b32e7df49c4537d2dd33256f6ff56abf5b Mon Sep 17 00:00:00 2001 From: Noel Mace Date: Fri, 20 Apr 2018 13:45:00 +0200 Subject: [PATCH 469/724] test(@angular-devkit/build-ng-packagr): custom tsconfig Use the new tsConfig option in order to set a custom tsconfig file for the 'work' test this example show how to change the ES level in lib and target all the other options are required for now if we don't want to break the build their should be removed once / if dherges/ng-packagr#786 is released --- .../build_ng_packagr/ng-packaged/angular.json | 3 ++- .../ng-packaged/projects/lib/src/lib/lib.service.ts | 4 ++++ .../ng-packaged/projects/lib/tsconfig.lib.json | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json index f316e25c26..adfe4560aa 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json @@ -9,7 +9,8 @@ "build": { "builder": "../../../../packages/angular_devkit/build_ng_packagr:build", "options": { - "project": "projects/lib/ng-package.json" + "project": "projects/lib/ng-package.json", + "tsConfig": "projects/lib/tsconfig.lib.json" } }, "test": { diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts index 3e6c7e592b..e2527a2b6e 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts @@ -5,4 +5,8 @@ export class LibService { constructor() { } + testEs2016() { + return ['foo', 'bar'].includes('foo'); + } + } diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json new file mode 100644 index 0000000000..18fa595fa5 --- /dev/null +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es6", + "moduleResolution": "node", + "sourceMap": true, + "inlineSources": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "importHelpers": true, + "lib": ["dom", "es2016"] + } +} From a048a139cbdee3dab036d374e6bb2881b0aea9cd Mon Sep 17 00:00:00 2001 From: Cyrille Tuzi Date: Tue, 17 Apr 2018 17:20:20 +0200 Subject: [PATCH 470/724] fix(@angular/pwa): correct paths for manifest and icons --- .../angular/pwa/pwa/files/assets/manifest.json | 18 +++++++++--------- .../schematics/angular/service-worker/index.ts | 2 +- .../angular/service-worker/index_spec.ts | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/angular/pwa/pwa/files/assets/manifest.json b/packages/angular/pwa/pwa/files/assets/manifest.json index f9c9b4666f..12e8069803 100644 --- a/packages/angular/pwa/pwa/files/assets/manifest.json +++ b/packages/angular/pwa/pwa/files/assets/manifest.json @@ -4,46 +4,46 @@ "theme_color": "#1976d2", "background_color": "#fafafa", "display": "browser", - "Scope": "/", + "scope": "/", "start_url": "/", "icons": [ { - "src": "images/icons/icon-72x72.png", + "src": "/assets/icons/icon-72x72.png", "sizes": "72x72", "type": "image/png" }, { - "src": "images/icons/icon-96x96.png", + "src": "/assets/icons/icon-96x96.png", "sizes": "96x96", "type": "image/png" }, { - "src": "images/icons/icon-128x128.png", + "src": "/assets/icons/icon-128x128.png", "sizes": "128x128", "type": "image/png" }, { - "src": "images/icons/icon-144x144.png", + "src": "/assets/icons/icon-144x144.png", "sizes": "144x144", "type": "image/png" }, { - "src": "images/icons/icon-152x152.png", + "src": "/assets/icons/icon-152x152.png", "sizes": "152x152", "type": "image/png" }, { - "src": "images/icons/icon-192x192.png", + "src": "/assets/icons/icon-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "images/icons/icon-384x384.png", + "src": "/assets/icons/icon-384x384.png", "sizes": "384x384", "type": "image/png" }, { - "src": "images/icons/icon-512x512.png", + "src": "/assets/icons/icon-512x512.png", "sizes": "512x512", "type": "image/png" } diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index e8ac4d00ae..0845a3009f 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -189,7 +189,7 @@ function updateIndexFile(options: ServiceWorkerOptions): Rule { const indent = getIndent(closingHeadTagLine) + ' '; const itemsToAdd = [ - '', + '', '', '', ]; diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index b2d0255746..4c85acff9b 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -101,7 +101,7 @@ describe('Service Worker Schematic', () => { const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); const content = tree.readContent('projects/bar/src/index.html'); - expect(content).toMatch(//); + expect(content).toMatch(//); expect(content).toMatch(//); expect(content).toMatch(//); }); From 1326405464c3f65097d78d20ee0bb0ac0591c2d0 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 23 Apr 2018 13:37:52 -0700 Subject: [PATCH 471/724] fix(@angular/pwa): Install new dependencies fixes angular/angular-cli#10332 --- packages/angular/pwa/pwa/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index 11b30db275..eecb75c466 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -19,6 +19,7 @@ import { template, url, } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { getWorkspace } from '../utility/config'; import { Schema as PwaOptions } from './schema'; @@ -45,6 +46,8 @@ export default function (options: PwaOptions): Rule { move(assetPath), ]); + context.addTask(new NodePackageInstallTask()); + return chain([ addServiceWorker(options), branchAndMerge(chain([ From 06affd3a4ebba9434f7d616b388a63cd27fd4d99 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 23 Apr 2018 20:59:21 -0700 Subject: [PATCH 472/724] fix(@schematics/angular): Fix generation within a library project fixes angular/angular-cli#10344 --- packages/schematics/angular/class/index.ts | 3 ++- packages/schematics/angular/component/index.ts | 3 ++- packages/schematics/angular/directive/index.ts | 3 ++- packages/schematics/angular/enum/index.ts | 3 ++- packages/schematics/angular/guard/index.ts | 3 ++- packages/schematics/angular/interface/index.ts | 3 ++- packages/schematics/angular/library/index_spec.ts | 11 +++++++++++ packages/schematics/angular/module/index.ts | 3 ++- packages/schematics/angular/pipe/index.ts | 3 ++- packages/schematics/angular/service/index.ts | 3 ++- 10 files changed, 29 insertions(+), 9 deletions(-) diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index 058c6805e6..22e4a1cb68 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -32,7 +32,8 @@ export default function (options: ClassOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } options.type = !!options.type ? `.${options.type}` : ''; diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 026f3a1379..785ff99708 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -113,7 +113,8 @@ export default function(options: ComponentOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } options.module = findModuleFromOptions(host, options); diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index bcacb61ef4..e104bbf00b 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -110,7 +110,8 @@ export default function (options: DirectiveOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } options.module = findModuleFromOptions(host, options); diff --git a/packages/schematics/angular/enum/index.ts b/packages/schematics/angular/enum/index.ts index 29a40487fb..47c0071ab6 100644 --- a/packages/schematics/angular/enum/index.ts +++ b/packages/schematics/angular/enum/index.ts @@ -32,7 +32,8 @@ export default function (options: EnumOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } const parsedPath = parseName(options.path, options.name); diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index f57859e5de..151a831940 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -74,7 +74,8 @@ export default function (options: GuardOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } if (options.module) { diff --git a/packages/schematics/angular/interface/index.ts b/packages/schematics/angular/interface/index.ts index acf04d8d56..9c7b0c9af0 100644 --- a/packages/schematics/angular/interface/index.ts +++ b/packages/schematics/angular/interface/index.ts @@ -32,7 +32,8 @@ export default function (options: InterfaceOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } const parsedPath = parseName(options.path, options.name); diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 47a76f0c6c..9303897741 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -8,6 +8,7 @@ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; import { getFileContent } from '../../angular/utility/test'; +import { Schema as ComponentOptions } from '../component/schema'; import { latestVersions } from '../utility/latest-versions'; import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as GenerateLibrarySchema } from './schema'; @@ -203,4 +204,14 @@ describe('Library Schematic', () => { expect(tsConfigJson.compilerOptions.paths).toBeUndefined(); }); }); + + it('should generate inside of a library', () => { + let tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const componentOptions: ComponentOptions = { + name: 'comp', + project: 'foo', + }; + tree = schematicRunner.runSchematic('component', componentOptions, tree); + expect(tree.exists('/projects/foo/src/lib/comp/comp.component.ts')).toBe(true); + }); }); diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index f415419237..56fc2d6919 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -79,7 +79,8 @@ export default function (options: ModuleOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } if (options.module) { options.module = findModuleFromOptions(host, options); diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index 9de83edf8d..f6a90ff448 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -94,7 +94,8 @@ export default function (options: PipeOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } const parsedPath = parseName(options.path, options.name); diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index 5c2801725f..8ee762223d 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -31,7 +31,8 @@ export default function (options: ServiceOptions): Rule { const project = workspace.projects[options.project]; if (options.path === undefined) { - options.path = `/${project.root}/src/app`; + const projectDirName = project.projectType === 'application' ? 'app' : 'lib'; + options.path = `/${project.root}/src/${projectDirName}`; } const parsedPath = parseName(options.path, options.name); From 08995e90ab587a6581bae557b51f886b5e448b82 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 17 Apr 2018 10:40:53 +0100 Subject: [PATCH 473/724] fix(@angular-devkit/build-optimizer): don't assume enum values Enum values were assumed to start with 0 and be digits. But enum values can be anything really. When a enum declaration was not identified as an enum in a side effect free package, it would be identified as a top level IIFE (in another transform) and assumed pure. This drops the enum. This PR fixes the behaviour by allowing the enum to be initialized with anything that doesn't have whitespaces. This is still limited and might lead to other false negatives that break things. We should find a better way of identifying enums. /cc @clydin Fix https://github.com/angular/angular/issues/23400 --- .../src/transforms/wrap-enums.ts | 2 +- .../src/transforms/wrap-enums_spec.ts | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index 2506160d6b..e17cfb8f1f 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -13,7 +13,7 @@ export function testWrapEnums(content: string) { const regexes = [ // tslint:disable:max-line-length /var (\S+) = \{\};\r?\n(\1\.(\S+) = \d+;\r?\n)+\1\[\1\.(\S+)\] = "\4";\r?\n(\1\[\1\.(\S+)\] = "\S+";\r?\n*)+/, - /var (\S+);(\/\*@__PURE__\*\/)*\r?\n\(function \(\1\) \{\s+(\1\[\1\["(\S+)"\] = 0\] = "\4";(\s+\1\[\1\["\S+"\] = \d\] = "\S+";)*\r?\n)\}\)\(\1 \|\| \(\1 = \{\}\)\);/, + /var (\S+);(\/\*@__PURE__\*\/)*\r?\n\(function \(\1\) \{\s+(\1\[\1\["(\S+)"\] = (\S+)\] = "\4";(\s+\1\[\1\["\S+"\] = (\S+)\] = "\S+";)*\r?\n)\}\)\(\1 \|\| \(\1 = \{\}\)\);/, /\/\*\* @enum \{\w+\} \*\//, // tslint:enable:max-line-length ]; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index 899463c83f..e9a0e69743 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -58,6 +58,30 @@ describe('wrap-enums', () => { expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); + it('wraps ts 2.3 - 2.6 enums in IIFE, even if they have funny numbers', () => { + const input = tags.stripIndent` + export var AnimatorControlState; + (function (AnimatorControlState) { + AnimatorControlState[AnimatorControlState["INITIALIZED"] = 1] = "INITIALIZED"; + AnimatorControlState[AnimatorControlState["STARTED"] = 2] = "STARTED"; + AnimatorControlState[AnimatorControlState["FINISHED"] = 3] = "FINISHED"; + AnimatorControlState[AnimatorControlState["DESTROYED"] = 4] = "DESTROYED"; + })(AnimatorControlState || (AnimatorControlState = {})); + `; + const output = tags.stripIndent` + export var AnimatorControlState = /*@__PURE__*/ (function (AnimatorControlState) { + AnimatorControlState[AnimatorControlState["INITIALIZED"] = 1] = "INITIALIZED"; + AnimatorControlState[AnimatorControlState["STARTED"] = 2] = "STARTED"; + AnimatorControlState[AnimatorControlState["FINISHED"] = 3] = "FINISHED"; + AnimatorControlState[AnimatorControlState["DESTROYED"] = 4] = "DESTROYED"; + return AnimatorControlState; + })({}); + `; + + expect(testWrapEnums(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + it('wraps tsickle enums in IIFE', () => { const input = tags.stripIndent` /** @enum {number} */ From a6767dcc823187e0d4c46eea50385f82ec15db8e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 23 Apr 2018 16:17:57 -0700 Subject: [PATCH 474/724] feat(@angular-devkit/core): add default project Partially address https://github.com/angular/angular-cli/issues/10352 --- .../angular_devkit/architect/src/architect.ts | 2 +- .../core/src/workspace/workspace-schema.json | 4 ++ .../core/src/workspace/workspace-schema.ts | 52 +++++------------ .../core/src/workspace/workspace.ts | 42 ++++++-------- .../core/src/workspace/workspace_spec.ts | 56 ++++++++++++++----- .../schematics/angular/app-shell/index.ts | 14 +++-- .../schematics/angular/universal/index.ts | 8 ++- 7 files changed, 90 insertions(+), 88 deletions(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 00d8b0981b..1f1a2ade5f 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -188,7 +188,7 @@ export class Architect { } const builderConfiguration: BuilderConfiguration = { - root: project.root, + root: project.root as Path, projectType: project.projectType, builder: target.builder, options: { diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.json b/packages/angular_devkit/core/src/workspace/workspace-schema.json index 71acda0c48..e4b93267f4 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.json +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.json @@ -17,6 +17,10 @@ "description": "New project root.", "default": "./" }, + "defaultProject": { + "type": "string", + "description": "The default project." + }, "cli": { "$ref": "#/definitions/tool", "default": {} diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.ts b/packages/angular_devkit/core/src/workspace/workspace-schema.ts index ba907905cc..636bb3bd08 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.ts +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.ts @@ -19,47 +19,33 @@ export interface WorkspaceSchema { * New project root. */ newProjectRoot?: string; + /** + * The default project. + */ + defaultProject?: string; /** * Tool options. */ - cli?: { - /** - * Link to schema. - */ - $schema?: string; - [k: string]: any; - }; + cli?: WorkspaceTool; /** * Tool options. */ - schematics?: { - /** - * Link to schema. - */ - $schema?: string; - [k: string]: any; - }; + schematics?: WorkspaceTool; /** * Tool options. */ - architect?: { - /** - * Link to schema. - */ - $schema?: string; - [k: string]: any; - }; + architect?: WorkspaceTool; /** * A map of project names to project options. */ projects: { - [k: string]: Project; + [k: string]: WorkspaceProject; }; } /** * Project options. */ -export interface Project { +export interface WorkspaceProject { /** * Project type. */ @@ -75,32 +61,20 @@ export interface Project { /** * Tool options. */ - cli?: { - /** - * Link to schema. - */ - $schema?: string; - [k: string]: any; - }; + cli?: WorkspaceTool; /** * Tool options. */ - schematics?: { - /** - * Link to schema. - */ - $schema?: string; - [k: string]: any; - }; + schematics?: WorkspaceTool; /** * Tool options. */ - architect?: Architect; + architect?: WorkspaceTool; } /** * Architect options. */ -export interface Architect { +export interface WorkspaceTool { /** * Link to schema. */ diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index f863cd78ec..390b2689d3 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -19,9 +19,7 @@ import { virtualFs, } from '..'; import { BaseException } from '../exception/exception'; -// Note: importing BaseException from '..' seems to lead to odd circular dependency errors. -// TypeError: Class extends value undefined is not a constructor or null -// at Object. (\packages\angular_devkit\core\src\workspace\workspace.ts:19:44) +import { WorkspaceProject, WorkspaceSchema, WorkspaceTool } from './workspace-schema'; export class ProjectNotFoundException extends BaseException { @@ -46,30 +44,11 @@ export class WorkspaceNotYetLoadedException extends BaseException { constructor() { super(`Workspace needs to be loaded before it is used.`); } } -export interface WorkspaceJson { - version: number; - // TODO: figure out if newProjectRoot should stay here. - newProjectRoot: Path; - cli: WorkspaceTool; - schematics: WorkspaceTool; - architect: WorkspaceTool; - projects: { [k: string]: WorkspaceProject }; -} - -export interface WorkspaceProject { - projectType: 'application' | 'library'; - root: Path; - cli: WorkspaceTool; - schematics: WorkspaceTool; - architect: WorkspaceTool; -} - -export interface WorkspaceTool extends JsonObject { } export class Workspace { private readonly _workspaceSchemaPath = join(normalize(__dirname), 'workspace-schema.json'); private _workspaceSchema: JsonObject; - private _workspace: WorkspaceJson; + private _workspace: WorkspaceSchema; private _registry: schema.CoreSchemaRegistry; constructor(private _root: Path, private _host: virtualFs.Host<{}>) { @@ -79,7 +58,7 @@ export class Workspace { loadWorkspaceFromJson(json: {}) { return this._loadWorkspaceSchema().pipe( concatMap((workspaceSchema) => this.validateAgainstSchema(json, workspaceSchema)), - tap((validatedWorkspace: WorkspaceJson) => this._workspace = validatedWorkspace), + tap((validatedWorkspace: WorkspaceSchema) => this._workspace = validatedWorkspace), map(() => this), ); } @@ -149,6 +128,21 @@ export class Workspace { }; } + getDefaultProject() { + this._assertLoaded(); + + if (this._workspace.defaultProject) { + // If there is a default project name, return it. + return this.getProject(this._workspace.defaultProject); + } else if (this.listProjectNames().length === 1) { + // If there is only one project, return that one. + return this.getProject(this.listProjectNames()[0]); + } + + // Otherwise return null. + return null; + } + getCli() { return this._getTool('cli'); } diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index e22b3e4860..6282d9bb47 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -14,8 +14,8 @@ import { ProjectNotFoundException, Workspace, WorkspaceNotYetLoadedException, - WorkspaceProject, } from './workspace'; +import { WorkspaceProject, WorkspaceSchema, WorkspaceTool } from './workspace-schema'; describe('Workspace', () => { @@ -23,9 +23,10 @@ describe('Workspace', () => { const root = normalize(__dirname); // The content of this JSON object should be kept in sync with the path below: // tests/@angular_devkit/workspace/angular-workspace.json - const workspaceJson = { + const workspaceJson: WorkspaceSchema = { version: 1, newProjectRoot: './projects', + defaultProject: 'app', cli: { '$globalOverride': '${HOME}/.angular-cli.json', 'schematics': { @@ -98,6 +99,13 @@ describe('Workspace', () => { }, }, }; + const appProject = { + ...workspaceJson.projects['app'], + // Tools should not be returned when getting a project. + cli: {}, + schematics: {}, + architect: {}, + } as {} as WorkspaceProject; it('loads workspace from json', (done) => { const workspace = new Workspace(root, host); @@ -168,13 +176,7 @@ describe('Workspace', () => { it('gets project by name', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( - tap((ws) => expect(ws.getProject('app')).toEqual({ - ...workspaceJson.projects['app'], - // Tools should not be returned when getting a project. - cli: {}, - schematics: {}, - architect: {}, - } as {} as WorkspaceProject)), + tap((ws) => expect(ws.getProject('app')).toEqual(appProject)), ).subscribe(undefined, done.fail, done); }); @@ -185,31 +187,55 @@ describe('Workspace', () => { ).subscribe(undefined, done.fail, done); }); + it('gets default project', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getDefaultProject()).toEqual(appProject)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets default project when there is a single one', (done) => { + const customWorkspaceJson = { ...workspaceJson, defaultProject: undefined }; + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(customWorkspaceJson).pipe( + tap((ws) => expect(ws.getDefaultProject()).toEqual(appProject)), + ).subscribe(undefined, done.fail, done); + }); + + it('gets default project when there is a single one', (done) => { + const customWorkspaceJson = { ...workspaceJson, defaultProject: undefined, projects: {} }; + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(customWorkspaceJson).pipe( + tap((ws) => expect(ws.getDefaultProject()).toEqual(null)), + ).subscribe(undefined, done.fail, done); + }); + it('gets workspace cli', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( - tap((ws) => expect(ws.getCli()).toEqual(workspaceJson.cli)), + tap((ws) => expect(ws.getCli()).toEqual(workspaceJson.cli as WorkspaceTool)), ).subscribe(undefined, done.fail, done); }); it('gets workspace schematics', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( - tap((ws) => expect(ws.getSchematics()).toEqual(workspaceJson.schematics)), + tap((ws) => expect(ws.getSchematics()).toEqual(workspaceJson.schematics as WorkspaceTool)), ).subscribe(undefined, done.fail, done); }); it('gets workspace architect', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( - tap((ws) => expect(ws.getArchitect()).toEqual(workspaceJson.architect)), + tap((ws) => expect(ws.getArchitect()).toEqual(workspaceJson.architect as WorkspaceTool)), ).subscribe(undefined, done.fail, done); }); it('gets project cli', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( - tap((ws) => expect(ws.getProjectCli('app')).toEqual(workspaceJson.projects.app.cli)), + tap((ws) => expect(ws.getProjectCli('app')) + .toEqual(workspaceJson.projects.app.cli as WorkspaceTool)), ).subscribe(undefined, done.fail, done); }); @@ -217,7 +243,7 @@ describe('Workspace', () => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( tap((ws) => expect(ws.getProjectSchematics('app')) - .toEqual(workspaceJson.projects.app.schematics)), + .toEqual(workspaceJson.projects.app.schematics as WorkspaceTool)), ).subscribe(undefined, done.fail, done); }); @@ -225,7 +251,7 @@ describe('Workspace', () => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( tap((ws) => expect(ws.getProjectArchitect('app')) - .toEqual(workspaceJson.projects.app.architect)), + .toEqual(workspaceJson.projects.app.architect as WorkspaceTool)), ).subscribe(undefined, done.fail, done); }); diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 1dbb95d927..4911bb18d5 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -16,9 +16,9 @@ import { } from '@angular-devkit/schematics'; import * as ts from 'typescript'; import { - Architect, - Project, + WorkspaceProject, WorkspaceSchema, + WorkspaceTool, } from '../../../angular_devkit/core/src/workspace/workspace-schema'; import { Schema as ComponentOptions } from '../component/schema'; import { @@ -54,7 +54,9 @@ function getSourceFile(host: Tree, path: string): ts.SourceFile { return source; } -function getServerModulePath(host: Tree, project: Project, architect: Architect): string | null { +function getServerModulePath( + host: Tree, project: WorkspaceProject, architect: WorkspaceTool, +): string | null { const mainPath = architect.server.options.main; const mainSource = getSourceFile(host, mainPath); const allNodes = getSourceNodes(mainSource); @@ -102,7 +104,7 @@ function getComponentTemplate(host: Tree, compPath: string, tmplInfo: TemplateIn return template; } -function getBootstrapComponentPath(host: Tree, project: Project): string { +function getBootstrapComponentPath(host: Tree, project: WorkspaceProject): string { if (!project.architect) { throw new Error('Project architect not found.'); } @@ -317,7 +319,7 @@ function addShellComponent(options: AppShellOptions): Rule { }; } -function getClientProject(host: Tree, options: AppShellOptions): Project { +function getClientProject(host: Tree, options: AppShellOptions): WorkspaceProject { const workspace = getWorkspace(host); const clientProject = workspace.projects[options.clientProject]; if (!clientProject) { @@ -327,7 +329,7 @@ function getClientProject(host: Tree, options: AppShellOptions): Project { return clientProject; } -function getClientArchitect(host: Tree, options: AppShellOptions): Architect { +function getClientArchitect(host: Tree, options: AppShellOptions): WorkspaceTool { const clientArchitect = getClientProject(host, options).architect; if (!clientArchitect) { diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 2129b6ca98..211806edaa 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -39,7 +39,9 @@ function getWorkspacePath(host: Tree): string { return possibleFiles.filter(path => host.exists(path))[0]; } -function getClientProject(host: Tree, options: UniversalOptions): experimental.workspace.Project { +function getClientProject( + host: Tree, options: UniversalOptions, +): experimental.workspace.WorkspaceProject { const workspace = getWorkspace(host); const clientProject = workspace.projects[options.clientProject]; if (!clientProject) { @@ -52,7 +54,7 @@ function getClientProject(host: Tree, options: UniversalOptions): experimental.w function getClientArchitect( host: Tree, options: UniversalOptions, -): experimental.workspace.Architect { +): experimental.workspace.WorkspaceTool { const clientArchitect = getClientProject(host, options).architect; if (!clientArchitect) { @@ -181,7 +183,7 @@ function addDependencies(): Rule { }; } -function getTsConfigOutDir(host: Tree, architect: experimental.workspace.Architect): string { +function getTsConfigOutDir(host: Tree, architect: experimental.workspace.WorkspaceTool): string { const tsConfigPath = architect.build.options.tsConfig; const tsConfigBuffer = host.read(tsConfigPath); if (!tsConfigBuffer) { From 6b8a6e8ec0cc5392c21179312a8cc739a1f0f5b8 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 23 Apr 2018 16:50:53 -0700 Subject: [PATCH 475/724] fix(@schematics/angular): add schematics defaults to app instead of workspace --- .../schematics/angular/application/index.ts | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 86e51b2a3f..04992dc2b4 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -106,11 +106,38 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace ? projectRoot : projectRoot + 'src/'; + const schematics: JsonObject = {}; + + if (options.inlineTemplate === true + || options.inlineStyle === true + || options.style !== 'css') { + schematics['@schematics/angular:component'] = {}; + if (options.inlineTemplate === true) { + (schematics['@schematics/angular:component'] as JsonObject).inlineTemplate = true; + } + if (options.inlineStyle === true) { + (schematics['@schematics/angular:component'] as JsonObject).inlineStyle = true; + } + if (options.style && options.style !== 'css') { + (schematics['@schematics/angular:component'] as JsonObject).styleext = options.style; + } + } + + if (options.skipTests === true) { + ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { + if (!(`@schematics/angular:${type}` in schematics)) { + schematics[`@schematics/angular:${type}`] = {}; + } + (schematics[`@schematics/angular:${type}`] as JsonObject).spec = false; + }); + } + // tslint:disable-next-line:no-any const project: any = { root: projectRoot, projectType: 'application', prefix: options.prefix || 'app', + schematics, architect: { build: { builder: '@angular-devkit/build-angular:browser', @@ -221,34 +248,6 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace workspace.projects[options.name] = project; - const schematics: JsonObject = {}; - - if (options.inlineTemplate === true - || options.inlineStyle === true - || options.style !== 'css') { - schematics['@schematics/angular:component'] = {}; - if (options.inlineTemplate === true) { - (schematics['@schematics/angular:component'] as JsonObject).inlineTemplate = true; - } - if (options.inlineStyle === true) { - (schematics['@schematics/angular:component'] as JsonObject).inlineStyle = true; - } - if (options.style && options.style !== 'css') { - (schematics['@schematics/angular:component'] as JsonObject).styleext = options.style; - } - } - - if (options.skipTests === true) { - ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { - if (!(`@schematics/angular:${type}` in schematics)) { - schematics[`@schematics/angular:${type}`] = {}; - } - (schematics[`@schematics/angular:${type}`] as JsonObject).spec = false; - }); - } - - workspace.schematics = schematics; - host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); }; } From 49e92852e4e6f69942eff9d9af6a1cec373af74c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 23 Apr 2018 21:33:36 -0700 Subject: [PATCH 476/724] fix(@schematics/angular): make first project the default --- .../schematics/angular/application/index.ts | 304 +++++++++--------- .../angular/application/index_spec.ts | 1 + packages/schematics/angular/library/index.ts | 79 ++--- .../schematics/angular/library/index_spec.ts | 3 +- packages/schematics/angular/utility/config.ts | 26 +- 5 files changed, 219 insertions(+), 194 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 04992dc2b4..2c39be3b8d 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -6,7 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ import { JsonObject, normalize, relative, strings, tags } from '@angular-devkit/core'; -import { experimental } from '@angular-devkit/core'; import { MergeStrategy, Rule, @@ -24,11 +23,15 @@ import { url, } from '@angular-devkit/schematics'; import { Schema as E2eOptions } from '../e2e/schema'; -import { getWorkspace, getWorkspacePath } from '../utility/config'; +import { + WorkspaceProject, + WorkspaceSchema, + addProjectToWorkspace, + getWorkspace, +} from '../utility/config'; import { latestVersions } from '../utility/latest-versions'; import { Schema as ApplicationOptions } from './schema'; -type WorkspaceSchema = experimental.workspace.WorkspaceSchema; // TODO: use JsonAST // function appendPropertyInAstObject( @@ -85,171 +88,166 @@ function addDependenciesToPackageJson() { } function addAppToWorkspaceFile(options: ApplicationOptions, workspace: WorkspaceSchema): Rule { - return (host: Tree, context: SchematicContext) => { - // TODO: use JsonAST - // const workspacePath = '/angular.json'; - // const workspaceBuffer = host.read(workspacePath); - // if (workspaceBuffer === null) { - // throw new SchematicsException(`Configuration file (${workspacePath}) not found.`); - // } - // const workspaceJson = parseJson(workspaceBuffer.toString()); - // if (workspaceJson.value === null) { - // throw new SchematicsException(`Unable to parse configuration file (${workspacePath}).`); - // } - let projectRoot = options.projectRoot !== undefined - ? options.projectRoot - : `${workspace.newProjectRoot}/${options.name}`; - if (projectRoot !== '' && !projectRoot.endsWith('/')) { - projectRoot += '/'; - } - const rootFilesRoot = options.projectRoot === undefined - ? projectRoot - : projectRoot + 'src/'; + // TODO: use JsonAST + // const workspacePath = '/angular.json'; + // const workspaceBuffer = host.read(workspacePath); + // if (workspaceBuffer === null) { + // throw new SchematicsException(`Configuration file (${workspacePath}) not found.`); + // } + // const workspaceJson = parseJson(workspaceBuffer.toString()); + // if (workspaceJson.value === null) { + // throw new SchematicsException(`Unable to parse configuration file (${workspacePath}).`); + // } + let projectRoot = options.projectRoot !== undefined + ? options.projectRoot + : `${workspace.newProjectRoot}/${options.name}`; + if (projectRoot !== '' && !projectRoot.endsWith('/')) { + projectRoot += '/'; + } + const rootFilesRoot = options.projectRoot === undefined + ? projectRoot + : projectRoot + 'src/'; - const schematics: JsonObject = {}; + const schematics: JsonObject = {}; - if (options.inlineTemplate === true - || options.inlineStyle === true - || options.style !== 'css') { - schematics['@schematics/angular:component'] = {}; - if (options.inlineTemplate === true) { - (schematics['@schematics/angular:component'] as JsonObject).inlineTemplate = true; - } - if (options.inlineStyle === true) { - (schematics['@schematics/angular:component'] as JsonObject).inlineStyle = true; - } - if (options.style && options.style !== 'css') { - (schematics['@schematics/angular:component'] as JsonObject).styleext = options.style; - } + if (options.inlineTemplate === true + || options.inlineStyle === true + || options.style !== 'css') { + schematics['@schematics/angular:component'] = {}; + if (options.inlineTemplate === true) { + (schematics['@schematics/angular:component'] as JsonObject).inlineTemplate = true; } - - if (options.skipTests === true) { - ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { - if (!(`@schematics/angular:${type}` in schematics)) { - schematics[`@schematics/angular:${type}`] = {}; - } - (schematics[`@schematics/angular:${type}`] as JsonObject).spec = false; - }); + if (options.inlineStyle === true) { + (schematics['@schematics/angular:component'] as JsonObject).inlineStyle = true; } + if (options.style && options.style !== 'css') { + (schematics['@schematics/angular:component'] as JsonObject).styleext = options.style; + } + } - // tslint:disable-next-line:no-any - const project: any = { - root: projectRoot, - projectType: 'application', - prefix: options.prefix || 'app', - schematics, - architect: { - build: { - builder: '@angular-devkit/build-angular:browser', - options: { - outputPath: `dist/${options.name}`, - index: `${projectRoot}src/index.html`, - main: `${projectRoot}src/main.ts`, - polyfills: `${projectRoot}src/polyfills.ts`, - tsConfig: `${rootFilesRoot}tsconfig.app.json`, - assets: [ - { - glob: 'favicon.ico', - input: `${projectRoot}src`, - output: '/', - }, - { - glob: '**/*', - input: `${projectRoot}src/assets`, - output: '/assets', - }, - ], - styles: [ - `${projectRoot}src/styles.${options.style}`, - ], - scripts: [], - }, - configurations: { - production: { - fileReplacements: [{ - replace: `${projectRoot}src/environments/environment.ts`, - with: `${projectRoot}src/environments/environment.prod.ts`, - }], - optimization: true, - outputHashing: 'all', - sourceMap: false, - extractCss: true, - namedChunks: false, - aot: true, - extractLicenses: true, - vendorChunk: false, - buildOptimizer: true, + if (options.skipTests === true) { + ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { + if (!(`@schematics/angular:${type}` in schematics)) { + schematics[`@schematics/angular:${type}`] = {}; + } + (schematics[`@schematics/angular:${type}`] as JsonObject).spec = false; + }); + } + + const project: WorkspaceProject = { + root: projectRoot, + projectType: 'application', + prefix: options.prefix || 'app', + schematics, + architect: { + build: { + builder: '@angular-devkit/build-angular:browser', + options: { + outputPath: `dist/${options.name}`, + index: `${projectRoot}src/index.html`, + main: `${projectRoot}src/main.ts`, + polyfills: `${projectRoot}src/polyfills.ts`, + tsConfig: `${rootFilesRoot}tsconfig.app.json`, + assets: [ + { + glob: 'favicon.ico', + input: `${projectRoot}src`, + output: '/', }, - }, - }, - serve: { - builder: '@angular-devkit/build-angular:dev-server', - options: { - browserTarget: `${options.name}:build`, - }, - configurations: { - production: { - browserTarget: `${options.name}:build:production`, + { + glob: '**/*', + input: `${projectRoot}src/assets`, + output: '/assets', }, - }, + ], + styles: [ + `${projectRoot}src/styles.${options.style}`, + ], + scripts: [], }, - 'extract-i18n': { - builder: '@angular-devkit/build-angular:extract-i18n', - options: { - browserTarget: `${options.name}:build`, + configurations: { + production: { + fileReplacements: [{ + replace: `${projectRoot}src/environments/environment.ts`, + with: `${projectRoot}src/environments/environment.prod.ts`, + }], + optimization: true, + outputHashing: 'all', + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, }, }, - test: { - builder: '@angular-devkit/build-angular:karma', - options: { - main: `${projectRoot}src/test.ts`, - polyfills: `${projectRoot}src/polyfills.ts`, - tsConfig: `${rootFilesRoot}tsconfig.spec.json`, - karmaConfig: `${rootFilesRoot}karma.conf.js`, - styles: [ - `${projectRoot}styles.${options.style}`, - ], - scripts: [], - assets: [ - { - glob: 'favicon.ico', - input: `${projectRoot}src/`, - output: '/', - }, - { - glob: '**/*', - input: `${projectRoot}src/assets`, - output: '/assets', - }, - ], - }, + }, + serve: { + builder: '@angular-devkit/build-angular:dev-server', + options: { + browserTarget: `${options.name}:build`, }, - lint: { - builder: '@angular-devkit/build-angular:tslint', - options: { - tsConfig: [ - `${rootFilesRoot}tsconfig.app.json`, - `${rootFilesRoot}tsconfig.spec.json`, - ], - exclude: [ - '**/node_modules/**', - ], + configurations: { + production: { + browserTarget: `${options.name}:build:production`, }, }, }, - }; - // tslint:disable-next-line:no-any - // const projects: JsonObject = ( workspaceAst.value).projects || {}; - // tslint:disable-next-line:no-any - // if (!( workspaceAst.value).projects) { - // // tslint:disable-next-line:no-any - // ( workspaceAst.value).projects = projects; - // } - - workspace.projects[options.name] = project; - - host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); + 'extract-i18n': { + builder: '@angular-devkit/build-angular:extract-i18n', + options: { + browserTarget: `${options.name}:build`, + }, + }, + test: { + builder: '@angular-devkit/build-angular:karma', + options: { + main: `${projectRoot}src/test.ts`, + polyfills: `${projectRoot}src/polyfills.ts`, + tsConfig: `${rootFilesRoot}tsconfig.spec.json`, + karmaConfig: `${rootFilesRoot}karma.conf.js`, + styles: [ + `${projectRoot}styles.${options.style}`, + ], + scripts: [], + assets: [ + { + glob: 'favicon.ico', + input: `${projectRoot}src/`, + output: '/', + }, + { + glob: '**/*', + input: `${projectRoot}src/assets`, + output: '/assets', + }, + ], + }, + }, + lint: { + builder: '@angular-devkit/build-angular:tslint', + options: { + tsConfig: [ + `${rootFilesRoot}tsconfig.app.json`, + `${rootFilesRoot}tsconfig.spec.json`, + ], + exclude: [ + '**/node_modules/**', + ], + }, + }, + }, }; + // tslint:disable-next-line:no-any + // const projects: JsonObject = ( workspaceAst.value).projects || {}; + // tslint:disable-next-line:no-any + // if (!( workspaceAst.value).projects) { + // // tslint:disable-next-line:no-any + // ( workspaceAst.value).projects = projects; + // } + + return addProjectToWorkspace(workspace, options.name, project); } const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/; const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 018816559f..85d2b5fe62 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -69,6 +69,7 @@ describe('Application Schematic', () => { const tree = schematicRunner.runSchematic('application', options, workspaceTree); const workspace = JSON.parse(tree.readContent('/angular.json')); expect(workspace.projects.foo).toBeDefined(); + expect(workspace.defaultProject).toBe('foo'); }); it('should set the prefix to app if none is set', () => { diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 93c69c6fb7..afa84cb591 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -21,7 +21,12 @@ import { url, } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; -import { WorkspaceSchema, getWorkspace, getWorkspacePath } from '../utility/config'; +import { + WorkspaceProject, + WorkspaceSchema, + addProjectToWorkspace, + getWorkspace, +} from '../utility/config'; import { latestVersions } from '../utility/latest-versions'; import { Schema as LibraryOptions } from './schema'; @@ -121,51 +126,47 @@ function addDependenciesToPackageJson() { function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSchema, projectRoot: string): Rule { - return (host: Tree, context: SchematicContext) => { - // tslint:disable-next-line:no-any - const project: any = { - root: `${projectRoot}`, - projectType: 'library', - prefix: options.prefix || 'lib', - architect: { - build: { - builder: '@angular-devkit/build-ng-packagr:build', - options: { - project: `${projectRoot}/ng-package.json`, - }, - configurations: { - production: { - project: `${projectRoot}/ng-package.prod.json`, - }, - }, + const project: WorkspaceProject = { + root: `${projectRoot}`, + projectType: 'library', + prefix: options.prefix || 'lib', + architect: { + build: { + builder: '@angular-devkit/build-ng-packagr:build', + options: { + project: `${projectRoot}/ng-package.json`, }, - test: { - builder: '@angular-devkit/build-angular:karma', - options: { - main: `${projectRoot}/src/test.ts`, - tsConfig: `${projectRoot}/tsconfig.spec.json`, - karmaConfig: `${projectRoot}/karma.conf.js`, + configurations: { + production: { + project: `${projectRoot}/ng-package.prod.json`, }, }, - lint: { - builder: '@angular-devkit/build-angular:tslint', - options: { - tsConfig: [ - `${projectRoot}/tsconfig.lint.json`, - `${projectRoot}/tsconfig.spec.json`, - ], - exclude: [ - '**/node_modules/**', - ], - }, + }, + test: { + builder: '@angular-devkit/build-angular:karma', + options: { + main: `${projectRoot}/src/test.ts`, + tsConfig: `${projectRoot}/tsconfig.spec.json`, + karmaConfig: `${projectRoot}/karma.conf.js`, }, }, - }; - - workspace.projects[options.name] = project; - host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); + lint: { + builder: '@angular-devkit/build-angular:tslint', + options: { + tsConfig: [ + `${projectRoot}/tsconfig.lint.json`, + `${projectRoot}/tsconfig.spec.json`, + ], + exclude: [ + '**/node_modules/**', + ], + }, + }, + }, }; + + return addProjectToWorkspace(workspace, options.name, project); } export default function (options: LibraryOptions): Rule { diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 9303897741..20be0b45b6 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -78,11 +78,12 @@ describe('Library Schematic', () => { expect(tree.files.indexOf('/projects/foobar/src/public_api.ts')).toBeGreaterThanOrEqual(0); }); - it(`should add library workspace`, () => { + it(`should add library to workspace`, () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const workspace = getJsonFileContent(tree, '/angular.json'); expect(workspace.projects.foo).toBeDefined(); + expect(workspace.defaultProject).toBe('foo'); }); it('should set the prefix to lib if none is set', () => { diff --git a/packages/schematics/angular/utility/config.ts b/packages/schematics/angular/utility/config.ts index 3add859083..90d2a2de3f 100644 --- a/packages/schematics/angular/utility/config.ts +++ b/packages/schematics/angular/utility/config.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { experimental } from '@angular-devkit/core'; -import { SchematicsException, Tree } from '@angular-devkit/schematics'; +import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics'; // The interfaces below are generated from the Angular CLI configuration schema @@ -441,6 +441,7 @@ export interface CliConfig { } export type WorkspaceSchema = experimental.workspace.WorkspaceSchema; +export type WorkspaceProject = experimental.workspace.WorkspaceProject; export function getWorkspacePath(host: Tree): string { @@ -461,6 +462,29 @@ export function getWorkspace(host: Tree): WorkspaceSchema { return JSON.parse(config); } +export function addProjectToWorkspace( + workspace: WorkspaceSchema, + name: string, + project: WorkspaceProject, +): Rule { + return (host: Tree, context: SchematicContext) => { + + if (workspace.projects[name]) { + throw new Error(`Project '${name}' already exists in workspace.`); + } + + // Add project to workspace. + workspace.projects[name] = project; + + if (!workspace.defaultProject && Object.keys(workspace.projects).length === 1) { + // Make the new project the default one. + workspace.defaultProject = name; + } + + host.overwrite(getWorkspacePath(host), JSON.stringify(workspace, null, 2)); + }; +} + export const configPath = '/.angular-cli.json'; export function getConfig(host: Tree): CliConfig { From 54d5d566dfc14f860612fdb4e1d59bbd411cef0c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 24 Apr 2018 14:18:46 -0700 Subject: [PATCH 477/724] feat(@angular-devkit/core): add workspace getProjectByPath --- .../core/src/workspace/workspace.ts | 35 +++++++++++++++++++ .../core/src/workspace/workspace_spec.ts | 22 +++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 390b2689d3..5e441e3dcf 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -12,9 +12,12 @@ import { JsonObject, JsonParseMode, Path, + isAbsolute, join, normalize, parseJson, + relative, + resolve, schema, virtualFs, } from '..'; @@ -143,6 +146,38 @@ export class Workspace { return null; } + getProjectByPath(path: Path): string | null { + this._assertLoaded(); + + const projectNames = this.listProjectNames(); + if (projectNames.length === 1) { + return projectNames[0]; + } + + const isInside = (base: Path, potential: Path): boolean => { + const absoluteBase = resolve(this.root, base); + const absolutePotential = resolve(this.root, potential); + const relativePotential = relative(absoluteBase, absolutePotential); + if (!relativePotential.startsWith('..') && !isAbsolute(relativePotential)) { + return true; + } + + return false; + }; + + const projects = this.listProjectNames() + .map(name => [this.getProject(name).root, name] as [Path, string]) + .filter(tuple => isInside(tuple[0], path)) + // Sort tuples by depth, with the deeper ones first. + .sort((a, b) => isInside(a[0], b[0]) ? 1 : 0); + + if (projects[0]) { + return projects[0][1]; + } + + return null; + } + getCli() { return this._getTool('cli'); } diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index 6282d9bb47..cd47f8b9f8 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -202,7 +202,7 @@ describe('Workspace', () => { ).subscribe(undefined, done.fail, done); }); - it('gets default project when there is a single one', (done) => { + it('gets default project returns null when there is none', (done) => { const customWorkspaceJson = { ...workspaceJson, defaultProject: undefined, projects: {} }; const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(customWorkspaceJson).pipe( @@ -210,6 +210,26 @@ describe('Workspace', () => { ).subscribe(undefined, done.fail, done); }); + it('gets project by path', (done) => { + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(workspaceJson).pipe( + tap((ws) => expect(ws.getProjectByPath(ws.root)).toEqual('app')), + ).subscribe(undefined, done.fail, done); + }); + + it('gets closest project by path', (done) => { + const app = workspaceJson.projects['app']; + const anotherAppRoot = join(normalize(app.root), 'folder'); + const customWorkspaceJson = { ...workspaceJson, projects: { + 'app': app, + 'another-app': { ...app, root: anotherAppRoot}, + } }; + const workspace = new Workspace(root, host); + workspace.loadWorkspaceFromJson(customWorkspaceJson).pipe( + tap((ws) => expect(ws.getProjectByPath(anotherAppRoot)).toEqual('another-app')), + ).subscribe(undefined, done.fail, done); + }); + it('gets workspace cli', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( From be8c8721b668cda31eca4dfe63cd5bd89d957169 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 23 Apr 2018 16:58:54 -0700 Subject: [PATCH 478/724] fix(@schematics/angular): use updated CLI config schema --- packages/schematics/angular/migrations/update-6/index.ts | 2 +- packages/schematics/angular/workspace/files/angular.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 81c6920be5..a1d90d4976 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -73,7 +73,7 @@ function migrateConfiguration(oldConfig: CliConfig): Rule { const configPath = normalize('angular.json'); context.logger.info(`Updating configuration`); const config: JsonObject = { - '$schema': './node_modules/@angular-devkit/core/src/workspace/workspace-schema.json', + '$schema': './node_modules/@angular/cli/lib/config/schema.json', version: 1, newProjectRoot: 'projects', projects: extractProjectsConfig(oldConfig, host), diff --git a/packages/schematics/angular/workspace/files/angular.json b/packages/schematics/angular/workspace/files/angular.json index 5149ecd721..743540cbd1 100644 --- a/packages/schematics/angular/workspace/files/angular.json +++ b/packages/schematics/angular/workspace/files/angular.json @@ -1,5 +1,5 @@ { - "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json", + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "<%= newProjectRoot %>", "projects": {} From 648b9436d88191ace63293cf1b488cef994ba0ea Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 20 Apr 2018 21:01:09 -0400 Subject: [PATCH 479/724] test(@angular-devkit/build-angular): actually test lazyModules option --- .../build_angular/test/browser/lazy-module_spec_large.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index 0cbff858b1..68cb01b881 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -182,7 +182,6 @@ describe('Browser Builder lazy modules', () => { it(`supports extra lazy modules array`, (done) => { host.writeMultipleFiles(lazyModuleFiles); - host.writeMultipleFiles(lazyModuleImport); host.writeMultipleFiles({ 'src/app/app.component.ts': ` import { Component, SystemJsNgModuleLoader } from '@angular/core'; @@ -196,7 +195,7 @@ describe('Browser Builder lazy modules', () => { title = 'app'; constructor(loader: SystemJsNgModuleLoader) { // Module will be split at build time and loaded when requested below - loader.load('app/lazy/lazy.module#LazyModule') + loader.load('src/app/lazy/lazy.module#LazyModule') .then((factory) => { /* Use factory here */ }); } }`, @@ -207,7 +206,7 @@ describe('Browser Builder lazy modules', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), - tap(() => expect(host.scopedSync().exists(join(outputPath, 'lazy-lazy-module.js'))) + tap(() => expect(host.scopedSync().exists(join(outputPath, 'src-app-lazy-lazy-module.js'))) .toBe(true)), ).subscribe(undefined, done.fail, done); }, Timeout.Basic); From 7d3ee3cac8eeb93dad0043556ed97693c4912632 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 24 Apr 2018 14:18:18 -0700 Subject: [PATCH 480/724] fix(@angular-devkit/build-angular): avoid reusing main chunk for common modules --- .../src/angular-cli-files/models/webpack-configs/browser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index 080a804028..f02ccb74b0 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -101,13 +101,13 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { default: buildOptions.commonChunk && { chunks: 'async', minChunks: 2, - reuseExistingChunk: true, priority: 10, }, common: buildOptions.commonChunk && { name: 'common', chunks: 'async', minChunks: 2, + enforce: true, priority: 5, }, vendors: false, From 668fada9230dfa03c8f5a2b38ac912cc912fa797 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 19 Apr 2018 08:56:57 -0400 Subject: [PATCH 481/724] fix(@angular-devkit/build-angular): disable sourcemaps with JS styles --- .../src/angular-cli-files/models/webpack-configs/styles.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 9ed1c8ff06..df8ff6969b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -236,7 +236,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) { rules.push(...baseRules.map(({ test, use }) => { const extractTextPlugin = { use: [ - { loader: RawCssLoader }, + // style-loader still has issues with relative url()'s with sourcemaps enabled; + // even with the convertToAbsoluteUrls options as it uses 'document.location' + // which breaks when used with routing. + // Once style-loader 1.0 is released the following conditional won't be necessary + // due to this 1.0 PR: https://github.com/webpack-contrib/style-loader/pull/219 + { loader: buildOptions.extractCss ? RawCssLoader : 'raw-loader' }, { loader: 'postcss-loader', options: { From 3cb33fb9909b9f5676b3950ad9027724f263920b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 24 Apr 2018 17:08:41 -0700 Subject: [PATCH 482/724] fix(@ngtools/webpack): fix relative paths in module map imports Fix https://github.com/angular/devkit/issues/698 --- .../webpack/src/transformers/export_lazy_module_map.ts | 6 +++++- .../src/transformers/export_lazy_module_map_spec.ts | 8 ++++---- .../src/transformers/multiple_transformers_spec.ts | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts b/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts index 9947b3179e..9cfc9be42d 100644 --- a/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts +++ b/packages/ngtools/webpack/src/transformers/export_lazy_module_map.ts @@ -46,7 +46,11 @@ export function exportLazyModuleMap( return; } - const relativePath = path.relative(dirName, modulePath).replace(/\\/g, '/'); + let relativePath = path.relative(dirName, modulePath).replace(/\\/g, '/'); + if (!(relativePath.startsWith('./') || relativePath.startsWith('../'))) { + // 'a/b/c' is a relative path for Node but an absolute path for TS, so we must convert it. + relativePath = `./${relativePath}`; + } // Create the new namespace import node. const namespaceImport = ts.createNamespaceImport(ts.createIdentifier(`__lazy_${index}__`)); const importClause = ts.createImportClause(undefined, namespaceImport); diff --git a/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts b/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts index 0091d4659e..33af27da8d 100644 --- a/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts +++ b/packages/ngtools/webpack/src/transformers/export_lazy_module_map_spec.ts @@ -17,8 +17,8 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length const output = tags.stripIndent` - import * as __lazy_0__ from "app/lazy/lazy.module.ts"; - import * as __lazy_1__ from "app/lazy2/lazy2.module.ts"; + import * as __lazy_0__ from "./app/lazy/lazy.module.ts"; + import * as __lazy_1__ from "./app/lazy2/lazy2.module.ts"; export { AppModule } from './app/app.module'; export var LAZY_MODULE_MAP = { "./lazy/lazy.module#LazyModule": __lazy_0__.LazyModule, "./lazy2/lazy2.module#LazyModule2": __lazy_1__.LazyModule2 }; `; @@ -42,8 +42,8 @@ describe('@ngtools/webpack transformers', () => { `; // tslint:disable:max-line-length const expected = tags.stripIndent` - import * as __lazy_0__ from "app/lazy/lazy.module.ngfactory.ts"; - import * as __lazy_1__ from "app/lazy2/lazy2.module.ngfactory.ts"; + import * as __lazy_0__ from "./app/lazy/lazy.module.ngfactory.ts"; + import * as __lazy_1__ from "./app/lazy2/lazy2.module.ngfactory.ts"; export { AppModule } from './app/app.module'; export var LAZY_MODULE_MAP = { "./lazy/lazy.module#LazyModule": __lazy_0__.LazyModuleNgFactory, "./lazy2/lazy2.module#LazyModule2": __lazy_1__.LazyModule2NgFactory }; `; diff --git a/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts b/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts index 580f3851e1..0726efb20d 100644 --- a/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts +++ b/packages/ngtools/webpack/src/transformers/multiple_transformers_spec.ts @@ -42,8 +42,8 @@ describe('@ngtools/webpack transformers', () => { // tslint:disable:max-line-length const output = tags.stripIndent` - import * as __lazy_0__ from "app/lazy/lazy.module.ngfactory.ts"; - import * as __lazy_1__ from "app/lazy2/lazy2.module.ngfactory.ts"; + import * as __lazy_0__ from "./app/lazy/lazy.module.ngfactory.ts"; + import * as __lazy_1__ from "./app/lazy2/lazy2.module.ngfactory.ts"; import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; From 62ebcd3eed1ecaaacebac9c3ec193e78165596d8 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 6 Apr 2018 17:32:24 -0400 Subject: [PATCH 483/724] fix(@schematics/angular): Allow for scoped library names fixes angular/angular-cli#10172 --- .../schematics/angular/application/index.ts | 40 +--------------- .../angular/application/schema.json | 1 - .../files/__projectRoot__/ng-package.json | 2 +- .../files/__projectRoot__/package.json | 2 +- packages/schematics/angular/library/index.ts | 37 +++++++++++---- .../schematics/angular/library/index_spec.ts | 39 ++++++++++++++++ .../schematics/angular/utility/validation.ts | 46 +++++++++++++++++++ 7 files changed, 116 insertions(+), 51 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 2c39be3b8d..0847450db1 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, normalize, relative, strings, tags } from '@angular-devkit/core'; +import { JsonObject, normalize, relative, strings } from '@angular-devkit/core'; import { MergeStrategy, Rule, @@ -30,6 +30,7 @@ import { getWorkspace, } from '../utility/config'; import { latestVersions } from '../utility/latest-versions'; +import { validateProjectName } from '../utility/validation'; import { Schema as ApplicationOptions } from './schema'; @@ -249,43 +250,6 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace return addProjectToWorkspace(workspace, options.name, project); } -const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/; -const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; - -function getRegExpFailPosition(str: string): number | null { - const parts = str.indexOf('-') >= 0 ? str.split('-') : [str]; - const matched: string[] = []; - - parts.forEach(part => { - if (part.match(projectNameRegexp)) { - matched.push(part); - } - }); - - const compare = matched.join('-'); - - return (str !== compare) ? compare.length : null; -} - -function validateProjectName(projectName: string) { - const errorIndex = getRegExpFailPosition(projectName); - if (errorIndex !== null) { - const firstMessage = tags.oneLine` - Project name "${projectName}" is not valid. New project names must - start with a letter, and must contain only alphanumeric characters or dashes. - When adding a dash the segment after the dash must also start with a letter. - `; - const msg = tags.stripIndent` - ${firstMessage} - ${projectName} - ${Array(errorIndex + 1).join(' ') + '^'} - `; - throw new SchematicsException(msg); - } else if (unsupportedProjectNames.indexOf(projectName) !== -1) { - throw new SchematicsException(`Project name "${projectName}" is not a supported name.`); - } - -} export default function (options: ApplicationOptions): Rule { return (host: Tree, context: SchematicContext) => { diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 0bf4bd5469..9389d7ef95 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -12,7 +12,6 @@ "name": { "description": "The name of the application.", "type": "string", - "format": "html-selector", "$default": { "$source": "argv", "index": 0 diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json index 123cc3811b..97c51503bb 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/ng-package.schema.json", - "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/<%= dasherize(name) %>", + "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/<%= dasherize(packageName) %>", "deleteDestPath": false, "lib": { "entryFile": "src/<%= entryFile %>.ts" diff --git a/packages/schematics/angular/library/files/__projectRoot__/package.json b/packages/schematics/angular/library/files/__projectRoot__/package.json index 66125d35f0..f72ab5bfbc 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/package.json +++ b/packages/schematics/angular/library/files/__projectRoot__/package.json @@ -1,5 +1,5 @@ { - "name": "<%= dasherize(name) %>", + "name": "<%= dasherize(packageName) %>", "version": "0.0.1", "peerDependencies": { "@angular/common": "^6.0.0-rc.0 || ^6.0.0", diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index afa84cb591..c6a6ea3094 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -28,6 +28,7 @@ import { getWorkspace, } from '../utility/config'; import { latestVersions } from '../utility/latest-versions'; +import { validateProjectName } from '../utility/validation'; import { Schema as LibraryOptions } from './schema'; @@ -125,7 +126,7 @@ function addDependenciesToPackageJson() { } function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSchema, - projectRoot: string): Rule { + projectRoot: string, packageName: string): Rule { const project: WorkspaceProject = { root: `${projectRoot}`, @@ -166,7 +167,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche }, }; - return addProjectToWorkspace(workspace, options.name, project); + return addProjectToWorkspace(workspace, packageName, project); } export default function (options: LibraryOptions): Rule { @@ -174,12 +175,27 @@ export default function (options: LibraryOptions): Rule { if (!options.name) { throw new SchematicsException(`Invalid options, "name" is required.`); } - const name = options.name; const prefix = options.prefix || 'lib'; + validateProjectName(options.name); + + // If scoped project (i.e. "@foo/bar"), convert projectDir to "foo/bar". + const packageName = options.name; + let scopeName = ''; + if (/^@.*\/.*/.test(options.name)) { + const [scope, name] = options.name.split('/'); + scopeName = scope.replace(/^@/, ''); + options.name = name; + } + const workspace = getWorkspace(host); const newProjectRoot = workspace.newProjectRoot; - const projectRoot = `${newProjectRoot}/${strings.dasherize(options.name)}`; + let projectRoot = `${newProjectRoot}/${strings.dasherize(options.name)}`; + if (scopeName) { + projectRoot = + `${newProjectRoot}/${strings.dasherize(scopeName)}/${strings.dasherize(options.name)}`; + } + const sourceDir = `${projectRoot}/src/lib`; const relativeTsLintPath = projectRoot.split('/').map(x => '..').join('/'); @@ -187,6 +203,7 @@ export default function (options: LibraryOptions): Rule { template({ ...strings, ...options, + packageName, projectRoot, relativeTsLintPath, prefix, @@ -198,19 +215,19 @@ export default function (options: LibraryOptions): Rule { return chain([ branchAndMerge(mergeWith(templateSource)), - addAppToWorkspaceFile(options, workspace, projectRoot), + addAppToWorkspaceFile(options, workspace, projectRoot, packageName), options.skipPackageJson ? noop() : addDependenciesToPackageJson(), - options.skipTsConfig ? noop() : updateTsConfig(name), + options.skipTsConfig ? noop() : updateTsConfig(options.name), schematic('module', { - name: name, + name: options.name, commonModule: false, flat: true, path: sourceDir, spec: false, }), schematic('component', { - name: name, - selector: `${prefix}-${name}`, + name: options.name, + selector: `${prefix}-${options.name}`, inlineStyle: true, inlineTemplate: true, flat: true, @@ -218,7 +235,7 @@ export default function (options: LibraryOptions): Rule { export: true, }), schematic('service', { - name: name, + name: options.name, flat: true, path: sourceDir, }), diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 20be0b45b6..fcb17a69ed 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -215,4 +215,43 @@ describe('Library Schematic', () => { tree = schematicRunner.runSchematic('component', componentOptions, tree); expect(tree.exists('/projects/foo/src/lib/comp/comp.component.ts')).toBe(true); }); + + it(`should support creating scoped libraries`, () => { + const scopedName = '@myscope/mylib'; + const options = { ...defaultOptions, name: scopedName }; + const tree = schematicRunner.runSchematic('library', options, workspaceTree); + + const pkgJsonPath = '/projects/myscope/mylib/package.json'; + expect(tree.files).toContain(pkgJsonPath); + expect(tree.files).toContain('/projects/myscope/mylib/src/lib/mylib.module.ts'); + expect(tree.files).toContain('/projects/myscope/mylib/src/lib/mylib.component.ts'); + + const pkgJson = JSON.parse(tree.readContent(pkgJsonPath)); + expect(pkgJson.name).toEqual(scopedName); + + const tsConfigJson = JSON.parse(tree.readContent('/projects/myscope/mylib/tsconfig.spec.json')); + expect(tsConfigJson.extends).toEqual('../../../tsconfig.json'); + + const cfg = JSON.parse(tree.readContent('/angular.json')); + expect(cfg.projects['@myscope/mylib']).toBeDefined(); + }); + + it(`should dasherize scoped libraries`, () => { + const scopedName = '@myScope/myLib'; + const expectedScopeName = '@my-scope/my-lib'; + const options = { ...defaultOptions, name: scopedName }; + const tree = schematicRunner.runSchematic('library', options, workspaceTree); + + const pkgJsonPath = '/projects/my-scope/my-lib/package.json'; + expect(tree.readContent(pkgJsonPath)).toContain(expectedScopeName); + + const ngPkgJsonPath = '/projects/my-scope/my-lib/ng-package.json'; + expect(tree.readContent(ngPkgJsonPath)).toContain(expectedScopeName); + + const pkgJson = JSON.parse(tree.readContent(pkgJsonPath)); + expect(pkgJson.name).toEqual(expectedScopeName); + + const cfg = JSON.parse(tree.readContent('/angular.json')); + expect(cfg.projects['@myScope/myLib']).toBeDefined(); + }); }); diff --git a/packages/schematics/angular/utility/validation.ts b/packages/schematics/angular/utility/validation.ts index 0578d18948..e5d35cc965 100644 --- a/packages/schematics/angular/utility/validation.ts +++ b/packages/schematics/angular/utility/validation.ts @@ -25,3 +25,49 @@ export function validateHtmlSelector(selector: string): void { is invalid.`); } } + + +export function validateProjectName(projectName: string) { + const errorIndex = getRegExpFailPosition(projectName); + const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; + if (errorIndex !== null) { + const firstMessage = tags.oneLine` + Project name "${projectName}" is not valid. New project names must + start with a letter, and must contain only alphanumeric characters or dashes. + When adding a dash the segment after the dash must also start with a letter. + `; + const msg = tags.stripIndent` + ${firstMessage} + ${projectName} + ${Array(errorIndex + 1).join(' ') + '^'} + `; + throw new SchematicsException(msg); + } else if (unsupportedProjectNames.indexOf(projectName) !== -1) { + throw new SchematicsException(`Project name "${projectName}" is not a supported name.`); + } +} + +function getRegExpFailPosition(str: string): number | null { + const isScope = /^@.*\/.*/.test(str); + if (isScope) { + // Remove starting @ + str = str.replace(/^@/, ''); + // Change / to - for validation + str = str.replace(/\//g, '-'); + } + + const parts = str.indexOf('-') >= 0 ? str.split('-') : [str]; + const matched: string[] = []; + + const projectNameRegexp = /^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$/; + + parts.forEach(part => { + if (part.match(projectNameRegexp)) { + matched.push(part); + } + }); + + const compare = matched.join('-'); + + return (str !== compare) ? compare.length : null; +} From 760764ab31afdca9c32c037f096edb347a1bca07 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 23 Apr 2018 15:57:39 -0700 Subject: [PATCH 484/724] fix(@schematics/angular): Disallow paths in project names --- packages/schematics/angular/utility/validation.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/utility/validation.ts b/packages/schematics/angular/utility/validation.ts index e5d35cc965..1161483914 100644 --- a/packages/schematics/angular/utility/validation.ts +++ b/packages/schematics/angular/utility/validation.ts @@ -30,6 +30,7 @@ export function validateHtmlSelector(selector: string): void { export function validateProjectName(projectName: string) { const errorIndex = getRegExpFailPosition(projectName); const unsupportedProjectNames = ['test', 'ember', 'ember-cli', 'vendor', 'app']; + const packageNameRegex = /^(?:@[a-zA-Z0-9_-]+\/)?[a-zA-Z0-9_-]+$/; if (errorIndex !== null) { const firstMessage = tags.oneLine` Project name "${projectName}" is not valid. New project names must @@ -43,7 +44,10 @@ export function validateProjectName(projectName: string) { `; throw new SchematicsException(msg); } else if (unsupportedProjectNames.indexOf(projectName) !== -1) { - throw new SchematicsException(`Project name "${projectName}" is not a supported name.`); + throw new SchematicsException( + `Project name ${JSON.stringify(projectName)} is not a supported name.`); + } else if (!packageNameRegex.test(projectName)) { + throw new SchematicsException(`Project name ${JSON.stringify(projectName)} is invalid.`); } } From b1ce91724480ad464934c3a66686db5f3e6095f7 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Tue, 24 Apr 2018 18:03:29 -0700 Subject: [PATCH 485/724] fix(@schematics/angular): fix universal schematic - Create tsconfig.server.json inside the src/ directory - Set the `entryModule` to 'app/..' instead of 'src/app/..' to adjust for above - Set the `baseUrl` in tsconfig.server.json - Properly set the `main` and `tsConfig` entries in the server section of the config file Fixes https://github.com/angular/angular-cli/issues/10288 --- .../files/{ => src}/__tsconfigFileName__.json | 1 + .../schematics/angular/universal/index.ts | 21 ++++++++++--------- .../angular/universal/index_spec.ts | 7 ++++--- .../schematics/angular/universal/schema.json | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) rename packages/schematics/angular/universal/files/{ => src}/__tsconfigFileName__.json (93%) diff --git a/packages/schematics/angular/universal/files/__tsconfigFileName__.json b/packages/schematics/angular/universal/files/src/__tsconfigFileName__.json similarity index 93% rename from packages/schematics/angular/universal/files/__tsconfigFileName__.json rename to packages/schematics/angular/universal/files/src/__tsconfigFileName__.json index c63eef6b08..47a5d8858e 100644 --- a/packages/schematics/angular/universal/files/__tsconfigFileName__.json +++ b/packages/schematics/angular/universal/files/src/__tsconfigFileName__.json @@ -2,6 +2,7 @@ "extends": "./<%= tsConfigExtends %>", "compilerOptions": { "outDir": "<%= outDir %>-server", + "baseUrl": ".", "module": "commonjs" }, "angularCompilerOptions": { diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 211806edaa..2293b35ad0 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -66,24 +66,25 @@ function getClientArchitect( function updateConfigFile(options: UniversalOptions): Rule { return (host: Tree) => { - const builderOptions: JsonObject = { - outputPath: `dist/${options.clientProject}-server`, - main: `projects/${options.clientProject}/src/main.server.ts`, - tsConfig: `projects/${options.clientProject}/tsconfig.server.json`, - }; - const serverTarget: JsonObject = { - builder: '@angular-devkit/build-angular:server', - options: builderOptions, - }; const workspace = getWorkspace(host); - if (!workspace.projects[options.clientProject]) { throw new SchematicsException(`Client app ${options.clientProject} not found.`); } + const clientProject = workspace.projects[options.clientProject]; if (!clientProject.architect) { throw new Error('Client project architect not found.'); } + + const builderOptions: JsonObject = { + outputPath: `dist/${options.clientProject}-server`, + main: `${clientProject.root}src/main.server.ts`, + tsConfig: `${clientProject.root}src/tsconfig.server.json`, + }; + const serverTarget: JsonObject = { + builder: '@angular-devkit/build-angular:server', + options: builderOptions, + }; clientProject.architect.server = serverTarget; const workspacePath = getWorkspacePath(host); diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 6dc3b92f02..9adcb92315 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -59,17 +59,18 @@ describe('Universal Schematic', () => { it('should create a tsconfig file', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/projects/bar/tsconfig.server.json'; + const filePath = '/projects/bar/src/tsconfig.server.json'; expect(tree.exists(filePath)).toEqual(true); const contents = tree.readContent(filePath); expect(JSON.parse(contents)).toEqual({ extends: './tsconfig.app.json', compilerOptions: { outDir: '../../out-tsc/app-server', + baseUrl: '.', module: 'commonjs', }, angularCompilerOptions: { - entryModule: 'src/app/app.server.module#AppServerModule', + entryModule: 'app/app.server.module#AppServerModule', }, }); }); @@ -92,7 +93,7 @@ describe('Universal Schematic', () => { const opts = arch.server.options; expect(opts.outputPath).toEqual('dist/bar-server'); expect(opts.main).toEqual('projects/bar/src/main.server.ts'); - expect(opts.tsConfig).toEqual('projects/bar/tsconfig.server.json'); + expect(opts.tsConfig).toEqual('projects/bar/src/tsconfig.server.json'); }); it('should add a server transition to BrowerModule import', () => { diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index 79027f7ddc..e289ff3670 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -40,7 +40,7 @@ "type": "string", "format": "path", "description": "The name of the application directory.", - "default": "src/app" + "default": "app" }, "rootModuleFileName": { "type": "string", From a4fcf1814a497d0dae2abdb16b11c5802dc82fad Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 24 Apr 2018 20:54:19 -0700 Subject: [PATCH 486/724] release: 6.0.0-rc.6 --- .monorepo.json | 62 +++++++++--------- package-lock.json | 160 +++++++++++++--------------------------------- 2 files changed, 77 insertions(+), 145 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index d8e265b7f0..7e2c303a29 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.7", + "version": "0.5.8", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.7", - "hash": "38171d606cff5418beb2f0e06ab96de4" + "version": "0.5.8", + "hash": "b934cdc92a21bb891dded52d2436b8bc" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.7", - "hash": "8c35f20a62110e0eb80a63fcb9db6644", + "version": "0.5.8", + "hash": "a0067d6fde313b504b5d6f301911ce88", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.7", - "hash": "d2184feee5d0b2cb1c45f0ef30784dc6", + "version": "0.5.8", + "hash": "c585c142a6d0cd65d08d2ea38f78c640", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.7", - "hash": "6b026137fdd3df43a7b456abad46fd70", + "version": "0.5.8", + "hash": "7e6f1e19f794d6f1a8e10b867c24676f", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,8 +82,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.7", - "hash": "31b9b564ff5e540ae704d8723445d1ad", + "version": "0.5.8", + "hash": "40c26d3c33be648c3811639baeb487a9", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-ng-packagr": { @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.7", - "hash": "54f75e429c0ac5d4bc763d798a20b6c4", + "version": "0.5.8", + "hash": "19cff00ab716729f851e216edb5aa99d", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.7", - "hash": "c47368b69e1d4a17e5aa2c53125f2949", + "version": "0.5.8", + "hash": "b30bb99e0180d488f0d0919c1e6d6e93", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.7", - "hash": "5de6c501fee8cce8a123679e82eae86a", + "version": "0.5.8", + "hash": "654cc7dc27c49417c4651e763a5a510b", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.7", - "hash": "57cf66c7bb6fcf22659bacaee0bebc87", + "version": "0.5.8", + "hash": "d907eaf9020ce7060d6cd5eeb823a9ac", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.7", - "hash": "268c7b41b2c3afd164daa870a2dfff97", + "version": "0.5.8", + "hash": "4ed818e48776ed5d8fd4f2faa3cc80ee", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.5", + "version": "6.0.0-rc.6", "section": "Misc", - "hash": "dc1d511afdeef962869661c4a76a9d93", + "hash": "472cfc34af46b31e4b88036e8e8fb03c", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.7", - "hash": "50c9ec78fad2a2f08b08d5c58c76902d", + "version": "0.5.8", + "hash": "271b314d18e76330f8c908990cec1137", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.7", + "version": "0.5.8", "section": "Schematics", - "hash": "d460d80a8cfceada8397939737d2c259", + "hash": "1ff68560151977201e150c0d3904c045", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.7", + "version": "0.5.8", "section": "Schematics", - "hash": "f87aeeae9cf753879d4a581e54ca3723", + "hash": "32aeaea3341b41115cbddc5f87902a84", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.7", + "version": "0.5.8", "section": "Schematics", - "hash": "ca188bbd2b58925b2b65c70a1930f9d5", + "hash": "80483ab66a79038dbd309466c8fdbc06", "snapshotRepo": "angular/schematics-update-builds" } } diff --git a/package-lock.json b/package-lock.json index ebb14eb764..7e93b22175 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1926,7 +1926,7 @@ }, "compression": { "version": "1.7.2", - "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { "accepts": "1.3.5", @@ -3698,7 +3698,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "optional": true, "requires": { "nan": "2.8.0", "node-pre-gyp": "0.6.39" @@ -3706,13 +3705,11 @@ "dependencies": { "abbrev": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "ajv": { "version": "4.11.8", "bundled": true, - "optional": true, "requires": { "co": "4.6.0", "json-stable-stringify": "1.0.1" @@ -3724,13 +3721,11 @@ }, "aproba": { "version": "1.1.1", - "bundled": true, - "optional": true + "bundled": true }, "are-we-there-yet": { "version": "1.1.4", "bundled": true, - "optional": true, "requires": { "delegates": "1.0.0", "readable-stream": "2.2.9" @@ -3738,28 +3733,23 @@ }, "asn1": { "version": "0.2.3", - "bundled": true, - "optional": true + "bundled": true }, "assert-plus": { "version": "0.2.0", - "bundled": true, - "optional": true + "bundled": true }, "asynckit": { "version": "0.4.0", - "bundled": true, - "optional": true + "bundled": true }, "aws-sign2": { "version": "0.6.0", - "bundled": true, - "optional": true + "bundled": true }, "aws4": { "version": "1.6.0", - "bundled": true, - "optional": true + "bundled": true }, "balanced-match": { "version": "0.4.2", @@ -3801,13 +3791,11 @@ }, "caseless": { "version": "0.12.0", - "bundled": true, - "optional": true + "bundled": true }, "co": { "version": "4.6.0", - "bundled": true, - "optional": true + "bundled": true }, "code-point-at": { "version": "1.1.0", @@ -3842,30 +3830,26 @@ "dashdash": { "version": "1.14.1", "bundled": true, - "optional": true, "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true } } }, "debug": { "version": "2.6.8", "bundled": true, - "optional": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.4.2", - "bundled": true, - "optional": true + "bundled": true }, "delayed-stream": { "version": "1.0.0", @@ -3873,13 +3857,11 @@ }, "delegates": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "detect-libc": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "ecc-jsbn": { "version": "0.1.1", @@ -3891,8 +3873,7 @@ }, "extend": { "version": "3.0.1", - "bundled": true, - "optional": true + "bundled": true }, "extsprintf": { "version": "1.0.2", @@ -3900,13 +3881,11 @@ }, "forever-agent": { "version": "0.6.1", - "bundled": true, - "optional": true + "bundled": true }, "form-data": { "version": "2.1.4", "bundled": true, - "optional": true, "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.5", @@ -3930,7 +3909,6 @@ "fstream-ignore": { "version": "1.0.5", "bundled": true, - "optional": true, "requires": { "fstream": "1.0.11", "inherits": "2.0.3", @@ -3940,7 +3918,6 @@ "gauge": { "version": "2.7.4", "bundled": true, - "optional": true, "requires": { "aproba": "1.1.1", "console-control-strings": "1.1.0", @@ -3955,15 +3932,13 @@ "getpass": { "version": "0.1.7", "bundled": true, - "optional": true, "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -3985,13 +3960,11 @@ }, "har-schema": { "version": "1.0.5", - "bundled": true, - "optional": true + "bundled": true }, "har-validator": { "version": "4.2.1", "bundled": true, - "optional": true, "requires": { "ajv": "4.11.8", "har-schema": "1.0.5" @@ -3999,8 +3972,7 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "hawk": { "version": "3.1.3", @@ -4019,7 +3991,6 @@ "http-signature": { "version": "1.1.1", "bundled": true, - "optional": true, "requires": { "assert-plus": "0.2.0", "jsprim": "1.4.0", @@ -4040,8 +4011,7 @@ }, "ini": { "version": "1.3.4", - "bundled": true, - "optional": true + "bundled": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -4052,8 +4022,7 @@ }, "is-typedarray": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "isarray": { "version": "1.0.0", @@ -4061,8 +4030,7 @@ }, "isstream": { "version": "0.1.2", - "bundled": true, - "optional": true + "bundled": true }, "jodid25519": { "version": "1.0.2", @@ -4079,31 +4047,26 @@ }, "json-schema": { "version": "0.2.3", - "bundled": true, - "optional": true + "bundled": true }, "json-stable-stringify": { "version": "1.0.1", "bundled": true, - "optional": true, "requires": { "jsonify": "0.0.0" } }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true, - "optional": true + "bundled": true }, "jsonify": { "version": "0.0.0", - "bundled": true, - "optional": true + "bundled": true }, "jsprim": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.0.2", @@ -4113,8 +4076,7 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -4149,13 +4111,11 @@ }, "ms": { "version": "2.0.0", - "bundled": true, - "optional": true + "bundled": true }, "node-pre-gyp": { "version": "0.6.39", "bundled": true, - "optional": true, "requires": { "detect-libc": "1.0.2", "hawk": "3.1.3", @@ -4173,7 +4133,6 @@ "nopt": { "version": "4.0.1", "bundled": true, - "optional": true, "requires": { "abbrev": "1.1.0", "osenv": "0.1.4" @@ -4182,7 +4141,6 @@ "npmlog": { "version": "4.1.0", "bundled": true, - "optional": true, "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -4196,13 +4154,11 @@ }, "oauth-sign": { "version": "0.8.2", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", - "bundled": true, - "optional": true + "bundled": true }, "once": { "version": "1.4.0", @@ -4213,18 +4169,15 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "osenv": { "version": "0.1.4", "bundled": true, - "optional": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -4236,8 +4189,7 @@ }, "performance-now": { "version": "0.2.0", - "bundled": true, - "optional": true + "bundled": true }, "process-nextick-args": { "version": "1.0.7", @@ -4245,18 +4197,15 @@ }, "punycode": { "version": "1.4.1", - "bundled": true, - "optional": true + "bundled": true }, "qs": { "version": "6.4.0", - "bundled": true, - "optional": true + "bundled": true }, "rc": { "version": "1.2.1", "bundled": true, - "optional": true, "requires": { "deep-extend": "0.4.2", "ini": "1.3.4", @@ -4266,8 +4215,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -4287,7 +4235,6 @@ "request": { "version": "2.81.0", "bundled": true, - "optional": true, "requires": { "aws-sign2": "0.6.0", "aws4": "1.6.0", @@ -4326,18 +4273,15 @@ }, "semver": { "version": "5.3.0", - "bundled": true, - "optional": true + "bundled": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, - "optional": true + "bundled": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, - "optional": true + "bundled": true }, "sntp": { "version": "1.0.9", @@ -4349,7 +4293,6 @@ "sshpk": { "version": "1.13.0", "bundled": true, - "optional": true, "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -4364,8 +4307,7 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -4387,8 +4329,7 @@ }, "stringstream": { "version": "0.0.5", - "bundled": true, - "optional": true + "bundled": true }, "strip-ansi": { "version": "3.0.1", @@ -4399,8 +4340,7 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "tar": { "version": "2.2.1", @@ -4414,7 +4354,6 @@ "tar-pack": { "version": "3.4.0", "bundled": true, - "optional": true, "requires": { "debug": "2.6.8", "fstream": "1.0.11", @@ -4429,7 +4368,6 @@ "tough-cookie": { "version": "2.3.2", "bundled": true, - "optional": true, "requires": { "punycode": "1.4.1" } @@ -4437,7 +4375,6 @@ "tunnel-agent": { "version": "0.6.0", "bundled": true, - "optional": true, "requires": { "safe-buffer": "5.0.1" } @@ -4449,8 +4386,7 @@ }, "uid-number": { "version": "0.0.6", - "bundled": true, - "optional": true + "bundled": true }, "util-deprecate": { "version": "1.0.2", @@ -4458,13 +4394,11 @@ }, "uuid": { "version": "3.0.1", - "bundled": true, - "optional": true + "bundled": true }, "verror": { "version": "1.3.6", "bundled": true, - "optional": true, "requires": { "extsprintf": "1.0.2" } @@ -4472,7 +4406,6 @@ "wide-align": { "version": "1.1.2", "bundled": true, - "optional": true, "requires": { "string-width": "1.0.2" } @@ -7503,8 +7436,7 @@ "nan": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", - "optional": true + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" }, "nanomatch": { "version": "1.2.9", @@ -8205,7 +8137,7 @@ "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", "requires": { - "concat-stream": "1.6.1", + "concat-stream": "1.6.2", "graceful-fs": "4.1.11", "normalize-package-data": "2.4.0", "npm-package-arg": "6.1.0", @@ -8216,7 +8148,7 @@ "safe-buffer": "5.1.1", "semver": "5.4.1", "slide": "1.1.6", - "ssri": "5.2.4" + "ssri": "5.3.0" } }, "npm-run-path": { From fb9daada54c00535b90e8cc0ef4c10e867216bfe Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 25 Apr 2018 08:10:35 -0700 Subject: [PATCH 487/724] fix(@schematics/angular): sync browserslist with polyfills --- .../schematics/angular/application/files/root/browserslist | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/root/browserslist b/packages/schematics/angular/application/files/root/browserslist index 1b1be90441..8e09ab492e 100644 --- a/packages/schematics/angular/application/files/root/browserslist +++ b/packages/schematics/angular/application/files/root/browserslist @@ -1,5 +1,9 @@ +# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries +# For IE 9-11 support, please uncomment the last line of the file and adjust as needed > 0.5% last 2 versions Firefox ESR not dead -IE 9-11 \ No newline at end of file +# IE 9-11 \ No newline at end of file From fb78b20b5b5d46795f31b03ce3c02ed25432bee6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 20 Apr 2018 12:49:43 -0400 Subject: [PATCH 488/724] fix(@schematics/angular): update serviceworker config for 6.x files --- .../angular/service-worker/files/ngsw-config.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/schematics/angular/service-worker/files/ngsw-config.json b/packages/schematics/angular/service-worker/files/ngsw-config.json index b9bf3a5570..7c6b82cdb4 100644 --- a/packages/schematics/angular/service-worker/files/ngsw-config.json +++ b/packages/schematics/angular/service-worker/files/ngsw-config.json @@ -6,12 +6,9 @@ "resources": { "files": [ "/favicon.ico", - "/index.html" - ], - "versionedFiles": [ - "/*.bundle.css", - "/*.bundle.js", - "/*.chunk.js" + "/index.html", + "/*.css", + "/*.js" ] } }, { From 0b0cf63afce0477f1bb036325172fb7b889d44e2 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 25 Apr 2018 11:59:45 -0700 Subject: [PATCH 489/724] fix(@angular/pwa): Set manifest name if no title is provided Partially addresses #775 --- packages/angular/pwa/pwa/index.ts | 2 ++ packages/angular/pwa/pwa/index_spec.ts | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index eecb75c466..4558eb42b5 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -39,6 +39,8 @@ export default function (options: PwaOptions): Rule { const assetPath = join(project.root as Path, 'src', 'assets'); + options.title = options.title || options.project; + const tempalteSource = apply(url('./files/assets'), [ template({ ...options, diff --git a/packages/angular/pwa/pwa/index_spec.ts b/packages/angular/pwa/pwa/index_spec.ts index 13a995f9f7..97d5fb6ac1 100644 --- a/packages/angular/pwa/pwa/index_spec.ts +++ b/packages/angular/pwa/pwa/index_spec.ts @@ -77,4 +77,13 @@ describe('PWA Schematic', () => { expect(manifest.name).toEqual(defaultOptions.title); expect(manifest.short_name).toEqual(defaultOptions.title); }); + + it('should set the name & short_name in the manifest file when no title provided', () => { + const options = {...defaultOptions, title: undefined}; + const tree = schematicRunner.runSchematic('ng-add', options, appTree); + const manifestText = tree.readContent('/projects/bar/src/assets/manifest.json'); + const manifest = JSON.parse(manifestText); + expect(manifest.name).toEqual(defaultOptions.project); + expect(manifest.short_name).toEqual(defaultOptions.project); + }); }); From d1c2e188a9434e9f59e9a83edf72ce16babe4fef Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 25 Apr 2018 14:34:23 -0700 Subject: [PATCH 490/724] fix(@angular-devkit/core): return name for default project --- packages/angular_devkit/core/src/workspace/workspace.ts | 6 +++--- .../angular_devkit/core/src/workspace/workspace_spec.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 5e441e3dcf..703dd263a4 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -131,15 +131,15 @@ export class Workspace { }; } - getDefaultProject() { + getDefaultProjectName(): string | null { this._assertLoaded(); if (this._workspace.defaultProject) { // If there is a default project name, return it. - return this.getProject(this._workspace.defaultProject); + return this._workspace.defaultProject; } else if (this.listProjectNames().length === 1) { // If there is only one project, return that one. - return this.getProject(this.listProjectNames()[0]); + return this.listProjectNames()[0]; } // Otherwise return null. diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index cd47f8b9f8..9b8fc95172 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -190,7 +190,7 @@ describe('Workspace', () => { it('gets default project', (done) => { const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(workspaceJson).pipe( - tap((ws) => expect(ws.getDefaultProject()).toEqual(appProject)), + tap((ws) => expect(ws.getDefaultProjectName()).toEqual('app')), ).subscribe(undefined, done.fail, done); }); @@ -198,7 +198,7 @@ describe('Workspace', () => { const customWorkspaceJson = { ...workspaceJson, defaultProject: undefined }; const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(customWorkspaceJson).pipe( - tap((ws) => expect(ws.getDefaultProject()).toEqual(appProject)), + tap((ws) => expect(ws.getDefaultProjectName()).toEqual('app')), ).subscribe(undefined, done.fail, done); }); @@ -206,7 +206,7 @@ describe('Workspace', () => { const customWorkspaceJson = { ...workspaceJson, defaultProject: undefined, projects: {} }; const workspace = new Workspace(root, host); workspace.loadWorkspaceFromJson(customWorkspaceJson).pipe( - tap((ws) => expect(ws.getDefaultProject()).toEqual(null)), + tap((ws) => expect(ws.getDefaultProjectName()).toEqual(null)), ).subscribe(undefined, done.fail, done); }); From eba96c030cc20b23178a38874c8015411b4a7086 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 25 Apr 2018 20:58:59 +0200 Subject: [PATCH 491/724] feat(@schematics/angular): add `tsconfig` for `ng-packagr` --- .../files/__projectRoot__/tsconfig.lib.json | 31 +++++++++++++++++++ .../files/__projectRoot__/tsconfig.lint.json | 12 ------- packages/schematics/angular/library/index.ts | 3 +- .../schematics/angular/library/index_spec.ts | 6 ++++ .../build_ng_packagr/ng-packaged/angular.json | 2 +- .../projects/lib/tsconfig.lib.json | 22 +++++++++++-- .../projects/lib/tsconfig.lint.json | 12 ------- 7 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json delete mode 100644 packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json delete mode 100644 tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json new file mode 100644 index 0000000000..21a704caa8 --- /dev/null +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json @@ -0,0 +1,31 @@ +{ + "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/lib", + "target": "es2015", + "module": "es2015", + "moduleResolution": "node", + "declaration": true, + "sourceMap": true, + "inlineSources": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "importHelpers": true, + "types": [], + "lib": [ + "dom", + "es2015" + ] + }, + "angularCompilerOptions": { + "annotateForClosureCompiler": true, + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json deleted file mode 100644 index 2a80c8ebc4..0000000000 --- a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lint.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", - "compilerOptions": { - "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/spec", - "module": "es2015", - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index c6a6ea3094..eca14badb9 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -136,6 +136,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche build: { builder: '@angular-devkit/build-ng-packagr:build', options: { + tsConfig: `${projectRoot}/tsconfig.lib.json`, project: `${projectRoot}/ng-package.json`, }, configurations: { @@ -156,7 +157,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ - `${projectRoot}/tsconfig.lint.json`, + `${projectRoot}/tsconfig.lib.json`, `${projectRoot}/tsconfig.spec.json`, ], exclude: [ diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index fcb17a69ed..61612c24df 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -62,6 +62,12 @@ describe('Library Schematic', () => { expect(fileContent).toMatch(/"name": "foo"/); }); + it('should create a tsconfig for library', () => { + const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); + const fileContent = getJsonFileContent(tree, '/projects/foo/tsconfig.lib.json'); + expect(fileContent).toBeDefined(); + }); + it('should create a ng-package.json with ngPackage conf', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const fileContent = getJsonFileContent(tree, '/projects/foo/ng-package.json'); diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json index adfe4560aa..6909a5c3d4 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/angular.json @@ -28,7 +28,7 @@ "builder": "../../../../packages/angular_devkit/build_angular:tslint", "options": { "tsConfig": [ - "projects/lib/tsconfig.lint.json", + "projects/lib/tsconfig.lib.json", "projects/lib/tsconfig.spec.json" ], "exclude": [ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json index 18fa595fa5..6b9d3422f2 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json @@ -1,12 +1,28 @@ { "compilerOptions": { - "target": "es6", + "target": "es2015", + "module": "es2015", "moduleResolution": "node", + "declaration": true, "sourceMap": true, "inlineSources": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, - "lib": ["dom", "es2016"] - } + "lib": [ + "dom", + "es2016" + ] + }, + "angularCompilerOptions": { + "annotateForClosureCompiler": true, + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] } diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json deleted file mode 100644 index f098e3ea6a..0000000000 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lint.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "module": "es2015", - "types": [] - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} From 73cdc0b9bcd69b5ef6c2aa8427d0faacd5ac5a09 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 25 Apr 2018 21:10:47 +0200 Subject: [PATCH 492/724] build: update angular and rxjs --- package-lock.json | 226 ++++++++++++++++++++++++++++++---------------- package.json | 24 ++--- 2 files changed, 159 insertions(+), 91 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e93b22175..6ac230330b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@angular/animations": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.3.tgz", - "integrity": "sha512-uUx8n3rnORn3pVb1sPiPYRhCETsaLLLeygPKlfqcTqdO8/hUEdumGI0hfrn0rW8qK2x2Pwxvz2qNPkn4iGgwTg==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.5.tgz", + "integrity": "sha512-dJAqLU8kTkW6W84q0VH5oX06CwMX4VXKokn2sMqboOZ5iHkZWfA+lO6wTjS+1pQ2jJ4EOc2HSyBovdGo7jPbLQ==", "requires": { "tslib": "1.9.0" }, @@ -28,9 +28,9 @@ } }, "@angular/common": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.3.tgz", - "integrity": "sha512-arc0LoT2opge2CDUXufN+TIjTUUx+N46MSWW1sKiLUzbK38E2nZ4S1RHoVDR6P7c6ruKMmaqZFJkOn6wd5Oi0w==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.5.tgz", + "integrity": "sha512-1NKIKHz7Zqt+OOOp6lF4w/O2/iKjhhYEYpjYG7MRzwQOJmSzxK2KEpw2m80I+rF/SqGakZ46MPthAwa9XC2IBw==", "requires": { "tslib": "1.9.0" }, @@ -43,9 +43,9 @@ } }, "@angular/compiler": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.3.tgz", - "integrity": "sha512-ZRsAtThpSrXKQ0N64Wa7ovDXXQ333uyRKUqApNo0NskvWwURiiBU9gACR4KmJmBRo4PUyITkFnyOM+6QMFDGQQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.5.tgz", + "integrity": "sha512-Re2oVZd2HRwkbuu5OR1pkgf3vIUZwzezLuOv/NzRgEY/v67cCeYit16Eg/0iGnwLybD3ptqrBtMls1X/ydssZA==", "requires": { "tslib": "1.9.0" }, @@ -58,9 +58,9 @@ } }, "@angular/compiler-cli": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.3.tgz", - "integrity": "sha512-hpVAb3BaX7TaK2iUW91poi1txZv5GeP97qX5c1vTTzGfFveGT5a5zkTee9ihCdelYIl5wBObkRrcXWjVLSXIzw==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.5.tgz", + "integrity": "sha512-5awnVkoNEqVfjGGzU/K1pTbFdZ2pmbrFqlgcN0lvLpuF7MmNTFDRs/Z/aSNe1BNDZqMbJvpzSH5+GcWuY0BrjA==", "requires": { "chokidar": "1.7.0", "minimist": "1.2.0", @@ -69,9 +69,9 @@ } }, "@angular/core": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.3.tgz", - "integrity": "sha512-zB6bpFNx6Iefko6HKYMSKjyB0XJj8yAgK1G/Ozzb+hbSMmkVi+HetG4v0WXg4sn2mD5NGxj+7qz7tGAzhlBgdA==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.5.tgz", + "integrity": "sha512-2pZ0HgLBU5BcR8+S1Ju0FLMG15W0TgVS1I7AWE+CO/4TYDsC8/WYfQFuPNZvqwEU6M9yedWKjaNQB/Xzb32Sqg==", "requires": { "tslib": "1.9.0" }, @@ -84,9 +84,9 @@ } }, "@angular/http": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.3.tgz", - "integrity": "sha512-PN8W2OSeptAIJ5/CeZNGdRiTVHjuYfFSB+ZgBeWhQVBmIV5Lp5iTNDcGslEB9diMkJSNsh/jYtcA0YAFhirYhw==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.5.tgz", + "integrity": "sha512-PNGL4MJ71KD3nWyRsr6SQTRhmAuuwpPFB9O29ibbwGcRvJ9d2RHlvL34GEeduNhD8RzuVV0R4DbpZv8D1F+IIA==", "requires": { "tslib": "1.9.0" }, @@ -107,9 +107,9 @@ } }, "@angular/platform-browser": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.3.tgz", - "integrity": "sha512-uMUAImcIbunqp9DKRSqokeAYWlyYFrqQAUpJNTeksUO9zkP2rPXlUi8ogZtEybHCc9XuoByC+UgC2IOMtmS82g==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.5.tgz", + "integrity": "sha512-65B6mC3qkMCl7iDI8q8t7N9yj6i4gTStupi5j4VeB0TRTnlAnXBFM3fiy43svVyuQE42qVO0MrJQ3wleJmUN5g==", "requires": { "tslib": "1.9.0" }, @@ -122,9 +122,9 @@ } }, "@angular/platform-browser-dynamic": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.3.tgz", - "integrity": "sha512-q5ZUvgGUuIVKx9I9++ovKXRssu5czNzr/1jgfzvh72a2+s5aVyVB8Zd164pdS6GSvi8lyApSNPBnBlRROHklbg==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.5.tgz", + "integrity": "sha512-FvOyyhSLbFPtR1YsWX3UI7QoHutUjHE68ilcm0DVL2IOKiop7ofGHyBlUcHuy4JEWzqzHQYtXVDDk2jfI+gTMA==", "requires": { "tslib": "1.9.0" }, @@ -137,9 +137,9 @@ } }, "@angular/platform-server": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.3.tgz", - "integrity": "sha512-gIzmma1RWrCwWnaqkOwaSAgNTjRASiCb5iPcOpYoAVwpbkhmRg2UWUYJNI0eDc/p4DHYyM2jET7IdbGrgy3hVw==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.5.tgz", + "integrity": "sha512-dDOP1xHs0brp5uxt6yy04Hf2oM0W3XJfvKRY44MejYlwpyCfotbUw2t2H+Mt8suhr0vt27K/+lceZ8HevlbM1Q==", "requires": { "domino": "2.0.2", "tslib": "1.9.0", @@ -154,9 +154,9 @@ } }, "@angular/router": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.3.tgz", - "integrity": "sha512-H621WrhkGayCZlr7f6V2czVAZPPXCeAXqsGjt5MWgB+MzpPP/+lrqKMhku9ZDE0OrlDucU2g34oipGoh0tJW2g==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.5.tgz", + "integrity": "sha512-8IREGDhMVMai8l8AxlIujR2dtkEW4QKQ6Ifv5zd2R2fLEIIsGBSe+jahPpZNKAOc3Nt74HJ1gA96exFPLp0DnQ==", "requires": { "tslib": "1.9.0" }, @@ -169,9 +169,9 @@ } }, "@angular/service-worker": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.3.tgz", - "integrity": "sha512-MQXu3XlqbtSvhBfe07kO7tJo61mMRSvcMMbO8ZmICGX3hXIwJUrAVRA6RzGIR1j67Z4nYkGIs7stZJ3nwF7GzA==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.5.tgz", + "integrity": "sha512-8d+mhADeUt/H0Um9AwqTmBfM3ZS1EA3Bk+qf1JfGAubPrREEWx97P2Lwa7OgY+w/D5JjWbWiNDWE1SsKcSPQiQ==", "requires": { "tslib": "1.9.0" }, @@ -3698,6 +3698,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "optional": true, "requires": { "nan": "2.8.0", "node-pre-gyp": "0.6.39" @@ -3705,11 +3706,13 @@ "dependencies": { "abbrev": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "ajv": { "version": "4.11.8", "bundled": true, + "optional": true, "requires": { "co": "4.6.0", "json-stable-stringify": "1.0.1" @@ -3721,11 +3724,13 @@ }, "aproba": { "version": "1.1.1", - "bundled": true + "bundled": true, + "optional": true }, "are-we-there-yet": { "version": "1.1.4", "bundled": true, + "optional": true, "requires": { "delegates": "1.0.0", "readable-stream": "2.2.9" @@ -3733,23 +3738,28 @@ }, "asn1": { "version": "0.2.3", - "bundled": true + "bundled": true, + "optional": true }, "assert-plus": { "version": "0.2.0", - "bundled": true + "bundled": true, + "optional": true }, "asynckit": { "version": "0.4.0", - "bundled": true + "bundled": true, + "optional": true }, "aws-sign2": { "version": "0.6.0", - "bundled": true + "bundled": true, + "optional": true }, "aws4": { "version": "1.6.0", - "bundled": true + "bundled": true, + "optional": true }, "balanced-match": { "version": "0.4.2", @@ -3791,11 +3801,13 @@ }, "caseless": { "version": "0.12.0", - "bundled": true + "bundled": true, + "optional": true }, "co": { "version": "4.6.0", - "bundled": true + "bundled": true, + "optional": true }, "code-point-at": { "version": "1.1.0", @@ -3830,26 +3842,30 @@ "dashdash": { "version": "1.14.1", "bundled": true, + "optional": true, "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true } } }, "debug": { "version": "2.6.8", "bundled": true, + "optional": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.4.2", - "bundled": true + "bundled": true, + "optional": true }, "delayed-stream": { "version": "1.0.0", @@ -3857,11 +3873,13 @@ }, "delegates": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "detect-libc": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "ecc-jsbn": { "version": "0.1.1", @@ -3873,7 +3891,8 @@ }, "extend": { "version": "3.0.1", - "bundled": true + "bundled": true, + "optional": true }, "extsprintf": { "version": "1.0.2", @@ -3881,11 +3900,13 @@ }, "forever-agent": { "version": "0.6.1", - "bundled": true + "bundled": true, + "optional": true }, "form-data": { "version": "2.1.4", "bundled": true, + "optional": true, "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.5", @@ -3909,6 +3930,7 @@ "fstream-ignore": { "version": "1.0.5", "bundled": true, + "optional": true, "requires": { "fstream": "1.0.11", "inherits": "2.0.3", @@ -3918,6 +3940,7 @@ "gauge": { "version": "2.7.4", "bundled": true, + "optional": true, "requires": { "aproba": "1.1.1", "console-control-strings": "1.1.0", @@ -3932,13 +3955,15 @@ "getpass": { "version": "0.1.7", "bundled": true, + "optional": true, "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -3960,11 +3985,13 @@ }, "har-schema": { "version": "1.0.5", - "bundled": true + "bundled": true, + "optional": true }, "har-validator": { "version": "4.2.1", "bundled": true, + "optional": true, "requires": { "ajv": "4.11.8", "har-schema": "1.0.5" @@ -3972,7 +3999,8 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true + "bundled": true, + "optional": true }, "hawk": { "version": "3.1.3", @@ -3991,6 +4019,7 @@ "http-signature": { "version": "1.1.1", "bundled": true, + "optional": true, "requires": { "assert-plus": "0.2.0", "jsprim": "1.4.0", @@ -4011,7 +4040,8 @@ }, "ini": { "version": "1.3.4", - "bundled": true + "bundled": true, + "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -4022,7 +4052,8 @@ }, "is-typedarray": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "isarray": { "version": "1.0.0", @@ -4030,7 +4061,8 @@ }, "isstream": { "version": "0.1.2", - "bundled": true + "bundled": true, + "optional": true }, "jodid25519": { "version": "1.0.2", @@ -4047,26 +4079,31 @@ }, "json-schema": { "version": "0.2.3", - "bundled": true + "bundled": true, + "optional": true }, "json-stable-stringify": { "version": "1.0.1", "bundled": true, + "optional": true, "requires": { "jsonify": "0.0.0" } }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true + "bundled": true, + "optional": true }, "jsonify": { "version": "0.0.0", - "bundled": true + "bundled": true, + "optional": true }, "jsprim": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.0.2", @@ -4076,7 +4113,8 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -4111,11 +4149,13 @@ }, "ms": { "version": "2.0.0", - "bundled": true + "bundled": true, + "optional": true }, "node-pre-gyp": { "version": "0.6.39", "bundled": true, + "optional": true, "requires": { "detect-libc": "1.0.2", "hawk": "3.1.3", @@ -4133,6 +4173,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "optional": true, "requires": { "abbrev": "1.1.0", "osenv": "0.1.4" @@ -4141,6 +4182,7 @@ "npmlog": { "version": "4.1.0", "bundled": true, + "optional": true, "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -4154,11 +4196,13 @@ }, "oauth-sign": { "version": "0.8.2", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true + "bundled": true, + "optional": true }, "once": { "version": "1.4.0", @@ -4169,15 +4213,18 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "osenv": { "version": "0.1.4", "bundled": true, + "optional": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -4189,7 +4236,8 @@ }, "performance-now": { "version": "0.2.0", - "bundled": true + "bundled": true, + "optional": true }, "process-nextick-args": { "version": "1.0.7", @@ -4197,15 +4245,18 @@ }, "punycode": { "version": "1.4.1", - "bundled": true + "bundled": true, + "optional": true }, "qs": { "version": "6.4.0", - "bundled": true + "bundled": true, + "optional": true }, "rc": { "version": "1.2.1", "bundled": true, + "optional": true, "requires": { "deep-extend": "0.4.2", "ini": "1.3.4", @@ -4215,7 +4266,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -4235,6 +4287,7 @@ "request": { "version": "2.81.0", "bundled": true, + "optional": true, "requires": { "aws-sign2": "0.6.0", "aws4": "1.6.0", @@ -4273,15 +4326,18 @@ }, "semver": { "version": "5.3.0", - "bundled": true + "bundled": true, + "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true + "bundled": true, + "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true }, "sntp": { "version": "1.0.9", @@ -4293,6 +4349,7 @@ "sshpk": { "version": "1.13.0", "bundled": true, + "optional": true, "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -4307,7 +4364,8 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -4329,7 +4387,8 @@ }, "stringstream": { "version": "0.0.5", - "bundled": true + "bundled": true, + "optional": true }, "strip-ansi": { "version": "3.0.1", @@ -4340,7 +4399,8 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true + "bundled": true, + "optional": true }, "tar": { "version": "2.2.1", @@ -4354,6 +4414,7 @@ "tar-pack": { "version": "3.4.0", "bundled": true, + "optional": true, "requires": { "debug": "2.6.8", "fstream": "1.0.11", @@ -4368,6 +4429,7 @@ "tough-cookie": { "version": "2.3.2", "bundled": true, + "optional": true, "requires": { "punycode": "1.4.1" } @@ -4375,6 +4437,7 @@ "tunnel-agent": { "version": "0.6.0", "bundled": true, + "optional": true, "requires": { "safe-buffer": "5.0.1" } @@ -4386,7 +4449,8 @@ }, "uid-number": { "version": "0.0.6", - "bundled": true + "bundled": true, + "optional": true }, "util-deprecate": { "version": "1.0.2", @@ -4394,11 +4458,13 @@ }, "uuid": { "version": "3.0.1", - "bundled": true + "bundled": true, + "optional": true }, "verror": { "version": "1.3.6", "bundled": true, + "optional": true, "requires": { "extsprintf": "1.0.2" } @@ -4406,6 +4472,7 @@ "wide-align": { "version": "1.1.2", "bundled": true, + "optional": true, "requires": { "string-width": "1.0.2" } @@ -7436,7 +7503,8 @@ "nan": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "optional": true }, "nanomatch": { "version": "1.2.9", @@ -9798,9 +9866,9 @@ } }, "rxjs": { - "version": "6.0.0-uncanny-rc.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0-uncanny-rc.7.tgz", - "integrity": "sha512-mXBJnSpbrotKF83b1sd5uSa7q/J/y99yBArB02l6B1v2QAP18FCn2BwRXfC9O4A+75mfwUAIUWJyLilboF5z2A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", + "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", "requires": { "tslib": "1.9.0" }, diff --git a/package.json b/package.json index 9f881eacdb..bc7d1e15b4 100644 --- a/package.json +++ b/package.json @@ -52,19 +52,19 @@ }, "homepage": "https://github.com/angular/devkit", "dependencies": { - "@angular/animations": "6.0.0-rc.3", + "@angular/animations": "6.0.0-rc.5", "@angular/cdk": "6.0.0-rc.1", - "@angular/common": "6.0.0-rc.3", - "@angular/compiler": "6.0.0-rc.3", - "@angular/compiler-cli": "6.0.0-rc.3", - "@angular/core": "6.0.0-rc.3", - "@angular/http": "6.0.0-rc.3", + "@angular/common": "6.0.0-rc.5", + "@angular/compiler": "6.0.0-rc.5", + "@angular/compiler-cli": "6.0.0-rc.5", + "@angular/core": "6.0.0-rc.5", + "@angular/http": "6.0.0-rc.5", "@angular/material": "6.0.0-rc.1", - "@angular/platform-browser": "6.0.0-rc.3", - "@angular/platform-browser-dynamic": "6.0.0-rc.3", - "@angular/platform-server": "6.0.0-rc.3", - "@angular/router": "6.0.0-rc.3", - "@angular/service-worker": "6.0.0-rc.3", + "@angular/platform-browser": "6.0.0-rc.5", + "@angular/platform-browser-dynamic": "6.0.0-rc.5", + "@angular/platform-server": "6.0.0-rc.5", + "@angular/router": "6.0.0-rc.5", + "@angular/service-worker": "6.0.0-rc.5", "@ngtools/json-schema": "^1.0.9", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", @@ -133,7 +133,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^6.0.0-uncanny-rc.7", + "rxjs": "^6.0.0", "sass-loader": "^7.0.1", "semver": "^5.3.0", "semver-intersect": "^1.1.2", From cb4f19da95389a251de6ee880cd680ce602181cc Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 25 Apr 2018 23:52:15 +0200 Subject: [PATCH 493/724] test: fix failing service workers tests Tests are failing due to a change in upstream. https://github.com/angular/angular/commit/08325aa --- .../test/browser/service-worker_spec_large.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts index ca23df7c2b..6b2acb7df0 100644 --- a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts @@ -19,7 +19,7 @@ describe('Browser Builder', () => { name: 'app', installMode: 'prefetch', resources: { - files: [ '/favicon.ico', '/index.html' ], + files: ['/favicon.ico', '/index.html'], versionedFiles: [ '/*.bundle.css', '/*.bundle.js', @@ -32,7 +32,7 @@ describe('Browser Builder', () => { installMode: 'lazy', updateMode: 'prefetch', resources: { - files: [ '/assets/**' ], + files: ['/assets/**'], }, }, ], @@ -67,6 +67,12 @@ describe('Browser Builder', () => { expect(ngswJson).toEqual({ configVersion: 1, index: '/index.html', + navigationUrls: [ + { positive: true, regex: '^\\\/.*$' }, + { positive: false, regex: '^\\\/(?:.+\\\/)?[^\\\/]*\\.[^\\\/]*$' }, + { positive: false, regex: '^\\\/(?:.+\\\/)?[^\\\/]*__[^\\\/]*$' }, + { positive: false, regex: '^\\\/(?:.+\\\/)?[^\\\/]*__[^\\\/]*\\\/.*$' }, + ], assetGroups: [ { name: 'app', @@ -116,6 +122,12 @@ describe('Browser Builder', () => { expect(ngswJson).toEqual({ configVersion: 1, index: '/foo/bar/index.html', + navigationUrls: [ + { positive: true, regex: '^\\\/.*$' }, + { positive: false, regex: '^\\\/(?:.+\\\/)?[^\\\/]*\\.[^\\\/]*$' }, + { positive: false, regex: '^\\\/(?:.+\\\/)?[^\\\/]*__[^\\\/]*$' }, + { positive: false, regex: '^\\\/(?:.+\\\/)?[^\\\/]*__[^\\\/]*\\\/.*$' }, + ], assetGroups: [ { name: 'app', From 4446d21681d5e2fd080afaf01b1d96ff5dfa386e Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 25 Apr 2018 15:12:59 -0700 Subject: [PATCH 494/724] fix(@schematics/update): fallback to latest if next isnt defined Everywhere. Fix angular/angular-cli#10252 --- packages/schematics/update/update/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index ec29859a30..0f6c278a9d 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -334,7 +334,8 @@ function _usageMessage( const packageGroups = new Map(); const packagesToUpdate = [...infoMap.entries()] .map(([name, info]) => { - const tag = options.next ? 'next' : 'latest'; + const tag = options.next + ? (info.npmPackageJson['dist-tags']['next'] ? 'next' : 'latest') : 'latest'; const version = info.npmPackageJson['dist-tags'][tag]; const target = info.npmPackageJson.versions[version]; @@ -460,6 +461,8 @@ function _buildPackageInfo( if (targetVersion) { if (npmPackageJson['dist-tags'][targetVersion]) { targetVersion = npmPackageJson['dist-tags'][targetVersion] as VersionRange; + } else if (targetVersion == 'next') { + targetVersion = npmPackageJson['dist-tags']['latest'] as VersionRange; } else { targetVersion = semver.maxSatisfying( Object.keys(npmPackageJson.versions), From 71c387f8be83080e80de371353b8e2707151fb4c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 25 Apr 2018 15:38:47 -0700 Subject: [PATCH 495/724] fix(@angular-devkit/build-angular): properly account for AOT in lazyModules option --- .../test/browser/lazy-module_spec_large.ts | 53 ++++++++++++++++++- .../webpack/src/angular_compiler_plugin.ts | 3 +- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index 68cb01b881..61ac885895 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -76,7 +76,7 @@ describe('Browser Builder lazy modules', () => { beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - it('supports lazy bundle for lazy routes', (done) => { + it('supports lazy bundle for lazy routes with JIT', (done) => { host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles(lazyModuleImport); @@ -88,6 +88,19 @@ describe('Browser Builder lazy modules', () => { ).subscribe(undefined, done.fail, done); }, Timeout.Basic); + it('supports lazy bundle for lazy routes with AOT', (done) => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleImport); + + runTargetSpec(host, browserTargetSpec, { aot: true }).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + expect(host.scopedSync() + .exists(join(outputPath, 'lazy-lazy-module-ngfactory.js'))).toBe(true); + }), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); + it(`supports lazy bundle for import() calls`, (done) => { host.writeMultipleFiles({ 'src/lazy-module.ts': 'export const value = 42;', @@ -180,7 +193,7 @@ describe('Browser Builder lazy modules', () => { ).subscribe(undefined, done.fail, done); }, Timeout.Basic); - it(`supports extra lazy modules array`, (done) => { + it(`supports extra lazy modules array in JIT`, (done) => { host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles({ 'src/app/app.component.ts': ` @@ -210,4 +223,40 @@ describe('Browser Builder lazy modules', () => { .toBe(true)), ).subscribe(undefined, done.fail, done); }, Timeout.Basic); + + it(`supports extra lazy modules array in AOT`, (done) => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles({ + 'src/app/app.component.ts': ` + import { Component, SystemJsNgModuleLoader } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'], + }) + export class AppComponent { + title = 'app'; + constructor(loader: SystemJsNgModuleLoader) { + // Module will be split at build time and loaded when requested below + loader.load('src/app/lazy/lazy.module#LazyModule') + .then((factory) => { /* Use factory here */ }); + } + }`, + }); + host.replaceInFile('src/tsconfig.app.json', `"module": "es2015"`, `"module": "esnext"`); + + const overrides: Partial = { + lazyModules: ['src/app/lazy/lazy.module'], + aot: true, + optimization: true, + }; + + runTargetSpec(host, browserTargetSpec, overrides).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => expect(host.scopedSync() + .exists(join(outputPath, 'src-app-lazy-lazy-module-ngfactory.js'))) + .toBe(true)), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); }); diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 29136aba54..d39cfebd57 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -492,7 +492,8 @@ export class AngularCompilerPlugin { modulePath = lazyRouteTSFile; moduleKey = `${lazyRouteModule}${moduleName ? '#' + moduleName : ''}`; } else { - modulePath = lazyRouteTSFile.replace(/(\.d)?\.ts$/, `.ngfactory.js`); + modulePath = lazyRouteTSFile.replace(/(\.d)?\.ts$/, ''); + modulePath += '.ngfactory.js'; const factoryModuleName = moduleName ? `#${moduleName}NgFactory` : ''; moduleKey = `${lazyRouteModule}.ngfactory${factoryModuleName}`; } From ea69628696ea7dad047c87bd30e1ab978187e77c Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 25 Apr 2018 14:59:26 -0700 Subject: [PATCH 496/724] fix(@schematics/angular): Add npm script warning for after updating related to angular/angular-cli#10311 --- packages/schematics/angular/migrations/update-6/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index a1d90d4976..011c6ee313 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, Path, join, normalize } from '@angular-devkit/core'; +import { JsonObject, Path, join, normalize, tags } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -608,6 +608,12 @@ export default function (): Rule { updateSpecTsConfig(config), updatePackageJson(config.packageManager), updateTsLintConfig(), + (host: Tree, context: SchematicContext) => { + context.logger.warn(tags.oneLine`Some configuration options have been changed, + please make sure to update any npm scripts which you may have modified.`); + + return host; + }, ])(host, context); }; } From 11c4aa119738e8d5787c7d86c9eff77b5ac30dfc Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 17 Apr 2018 17:46:55 -0600 Subject: [PATCH 497/724] fix(@angular-devkit/schematics): fix __dasherize__ name Sometimes, some actions are not properly optimized. I havent had time to fully investigate, and we will rework the ActionList entirely (making it more solid and in line with the rest of the pipeline), so this error will move away properly. In the meantime, when creating a source, optimizing the tree early helps tremendously, and since it is not merged (and built from an empty tree), there is no side effect to optimizing. --- .../schematics/src/rules/base.ts | 18 +++++++++++++++++- packages/schematics/angular/ng-new/index.ts | 1 - 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/src/rules/base.ts b/packages/angular_devkit/schematics/src/rules/base.ts index 347d2ba833..b52a14d134 100644 --- a/packages/angular_devkit/schematics/src/rules/base.ts +++ b/packages/angular_devkit/schematics/src/rules/base.ts @@ -14,6 +14,7 @@ import { branch, empty as staticEmpty, merge as staticMerge, + optimize as staticOptimize, partition as staticPartition, } from '../tree/static'; import { VirtualTree } from '../tree/virtual'; @@ -53,7 +54,22 @@ export function chain(rules: Rule[]): Rule { */ export function apply(source: Source, rules: Rule[]): Source { return (context: SchematicContext) => { - return callRule(chain(rules), callSource(source, context), context); + return callRule(chain([ + ...rules, + // Optimize the tree. Since this is a source tree, there's not much harm here and this might + // avoid further issues. + tree => { + if (tree instanceof VirtualTree) { + tree.optimize(); + + return tree; + } else if (tree.actions.length != 0) { + return staticOptimize(tree); + } else { + return tree; + } + }, + ]), callSource(source, context), context); }; } diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index 1862d086f2..1728de90fd 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -60,7 +60,6 @@ export default function (options: NgNewOptions): Rule { schematic('workspace', workspaceOptions), schematic('application', applicationOptions), move(options.directory || options.name), - tree => Tree.optimize(tree), ]), ), (host: Tree, context: SchematicContext) => { From 9795bb430609bae05a55d3934334091896dab428 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 24 Apr 2018 17:45:47 -0700 Subject: [PATCH 498/724] fix(@schematics/update): support Angular 6.x when peerDep is 5.x Fix https://github.com/angular/angular-cli/issues/10367 --- packages/schematics/update/update/index.ts | 59 ++++++++++++++++++- .../schematics/update/update/index_spec.ts | 41 +++++++++++++ .../package.json | 8 +++ 3 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 tests/schematics/update/packages/update-peer-dependencies-angular-5/package.json diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 0f6c278a9d..7bd06c71fd 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -7,7 +7,10 @@ */ import { logging } from '@angular-devkit/core'; import { - Rule, SchematicContext, SchematicsException, TaskId, + Rule, + SchematicContext, + SchematicsException, + TaskId, Tree, } from '@angular-devkit/schematics'; import { NodePackageInstallTask, RunSchematicTask } from '@angular-devkit/schematics/tasks'; @@ -19,7 +22,30 @@ import { NpmRepositoryPackageJson } from './npm-package-json'; import { JsonSchemaForNpmPackageJsonFiles } from './package-json'; import { UpdateSchema } from './schema'; -type VersionRange = string & { __: void; }; +type VersionRange = string & { __VERSION_RANGE: void; }; +type PeerVersionTransform = string | ((range: string) => string); + +// This is a map of packageGroupName to range extending function. If it isn't found, the range is +// kept the same. +// Angular guarantees that a major is compatible with its following major (so packages that depend +// on Angular 5 are also compatible with Angular 6). This is, in code, represented by verifying +// that all other packages that have a peer dependency of `"@angular/core": "^5.0.0"` actually +// supports 6.0, by adding that compatibility to the range, so it is `^5.0.0 || ^6.0.0`. +const peerCompatibleWhitelist: { [name: string]: PeerVersionTransform } = { + '@angular/core': (range: string) => { + range = semver.validRange(range); + let major = 1; + while (semver.ltr(major + '.0.0', range)) { + major++; + if (major >= 99) { + throw new SchematicsException(`Invalid range: ${JSON.stringify(range)}`); + } + } + + // Add the major - 1 version as compatible with the angular compatible. + return semver.validRange(`^${major + 1}.0.0-rc.0 || ${range}`) || range; + }, +}; interface PackageVersionInfo { version: VersionRange; @@ -41,6 +67,30 @@ interface UpdateMetadata { migrations?: string; } +function _updatePeerVersion(infoMap: Map, name: string, range: string) { + // Resolve packageGroupName. + const maybePackageInfo = infoMap.get(name); + if (!maybePackageInfo) { + return range; + } + if (maybePackageInfo.target) { + name = maybePackageInfo.target.updateMetadata.packageGroup[0] || name; + } else { + name = maybePackageInfo.installed.updateMetadata.packageGroup[0] || name; + } + + const maybeTransform = peerCompatibleWhitelist[name]; + if (maybeTransform) { + if (typeof maybeTransform == 'function') { + return maybeTransform(range); + } else { + return maybeTransform; + } + } + + return range; +} + function _validateForwardPeerDependencies( name: string, infoMap: Map, @@ -90,13 +140,16 @@ function _validateReversePeerDependencies( installedLogger.debug(`${installed}...`); const peers = (installedInfo.target || installedInfo.installed).packageJson.peerDependencies; - for (const [peer, range] of Object.entries(peers || {})) { + for (let [peer, range] of Object.entries(peers || {})) { if (peer != name) { // Only check peers to the packages we're updating. We don't care about peers // that are unmet but we have no effect on. continue; } + // Override the peer version range if it's whitelisted. + range = _updatePeerVersion(infoMap, peer, range); + if (!semver.satisfies(version, range)) { logger.error([ `Package ${JSON.stringify(installed)} has an incompatible peer dependency to`, diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 21133be828..6bc1292e1d 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -88,6 +88,47 @@ describe('@schematics/update', () => { ).subscribe(undefined, done.fail, done); }, 45000); + it('updates Angular as compatible with Angular N-1', done => { + // Add the basic migration package. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + const dependencies = packageJson['dependencies']; + dependencies['@angular-devkit-tests/update-peer-dependencies-angular-5'] = '1.0.0'; + dependencies['@angular/core'] = '5.1.0'; + dependencies['rxjs'] = '5.5.0'; + dependencies['zone.js'] = '0.8.26'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { + packages: ['@angular/core'], + next: true, + }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular/core'][0]).toBe('6'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'node-package', + options: jasmine.objectContaining({ + command: 'install', + }), + }, + { + name: 'run-schematic', + options: jasmine.objectContaining({ + name: 'migrate', + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); + it('can migrate only', done => { // Add the basic migration package. const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); diff --git a/tests/schematics/update/packages/update-peer-dependencies-angular-5/package.json b/tests/schematics/update/packages/update-peer-dependencies-angular-5/package.json new file mode 100644 index 0000000000..57c3fdd07d --- /dev/null +++ b/tests/schematics/update/packages/update-peer-dependencies-angular-5/package.json @@ -0,0 +1,8 @@ +{ + "name": "@angular-devkit-tests/update-peer-dependencies-angular-5", + "version": "1.0.0", + "description": "Tests", + "peerDependencies": { + "@angular/core": "^5.0.0" + } +} From 77e53a6adbfcc96dd15fdfe714e7ea3ea86fe580 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Tue, 24 Apr 2018 22:54:08 -0700 Subject: [PATCH 499/724] fix(@schematics/angular): `npm install` at the end of `ng g universal` --- packages/schematics/angular/universal/index.ts | 8 ++++++++ packages/schematics/angular/universal/index_spec.ts | 7 +++++++ packages/schematics/angular/universal/schema.d.ts | 4 ++++ packages/schematics/angular/universal/schema.json | 5 +++++ 4 files changed, 24 insertions(+) diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 2293b35ad0..34b8b7df95 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -25,6 +25,9 @@ import { template, url, } from '@angular-devkit/schematics'; +import { + NodePackageInstallTask, +} from '@angular-devkit/schematics/tasks'; import * as ts from 'typescript'; import { findNode, getDecoratorMetadata } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; @@ -208,6 +211,11 @@ export default function (options: UniversalOptions): Rule { const clientArchitect = getClientArchitect(host, options); const outDir = getTsConfigOutDir(host, clientArchitect); const tsConfigExtends = basename(clientArchitect.build.options.tsConfig); + + if (!options.skipInstall) { + context.addTask(new NodePackageInstallTask()); + } + const templateSource = apply(url('./files'), [ template({ ...strings, diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 9adcb92315..9049ed690b 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -109,4 +109,11 @@ describe('Universal Schematic', () => { const contents = tree.readContent(filePath); expect(contents).toMatch(/document.addEventListener\('DOMContentLoaded', \(\) => {/); }); + + it('should install npm dependencies', () => { + schematicRunner.runSchematic('universal', defaultOptions, appTree); + expect(schematicRunner.tasks.length).toBe(1); + expect(schematicRunner.tasks[0].name).toBe('node-package'); + expect((schematicRunner.tasks[0].options as {command: string}).command).toBe('install'); + }); }); diff --git a/packages/schematics/angular/universal/schema.d.ts b/packages/schematics/angular/universal/schema.d.ts index 119fae33ea..7823e3754d 100644 --- a/packages/schematics/angular/universal/schema.d.ts +++ b/packages/schematics/angular/universal/schema.d.ts @@ -43,4 +43,8 @@ export interface Schema { * The name of the root module class. */ rootModuleClassName?: string; + /** + * Skip installing dependency packages. + */ + skipInstall?: boolean; } diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index e289ff3670..ee2bda67be 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -52,6 +52,11 @@ "type": "string", "description": "The name of the root module class.", "default": "AppServerModule" + }, + "skipInstall": { + "description": "Skip installing dependency packages.", + "type": "boolean", + "default": false } }, "required": [ From c33cf0c62307d7a249cba933b01e3748e9eb25c6 Mon Sep 17 00:00:00 2001 From: Stephen Fluin Date: Wed, 25 Apr 2018 19:47:34 -0700 Subject: [PATCH 500/724] fix(@angular/pwa): fix typo in variable name --- packages/angular/pwa/pwa/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index 4558eb42b5..8819daedf7 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -41,7 +41,7 @@ export default function (options: PwaOptions): Rule { options.title = options.title || options.project; - const tempalteSource = apply(url('./files/assets'), [ + const templateSource = apply(url('./files/assets'), [ template({ ...options, }), @@ -53,7 +53,7 @@ export default function (options: PwaOptions): Rule { return chain([ addServiceWorker(options), branchAndMerge(chain([ - mergeWith(tempalteSource), + mergeWith(templateSource), ])), ])(host, context); }; From 7a627b4c9dd9ca3726796d823e581ea919092f70 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 25 Apr 2018 16:14:10 -0700 Subject: [PATCH 501/724] fix(@angular-devkit/build-angular): Allow for config of ngsw-config.json path. fixes angular/angular-cli#10357 --- .../src/angular-cli-files/utilities/service-worker/index.ts | 3 ++- packages/angular_devkit/build_angular/src/browser/index.ts | 1 + .../angular_devkit/build_angular/src/browser/schema.d.ts | 5 +++++ .../angular_devkit/build_angular/src/browser/schema.json | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts index e77a8ed4bd..edf02c6178 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts @@ -94,6 +94,7 @@ export function augmentAppWithServiceWorker( appRoot: Path, outputPath: Path, baseHref: string, + ngswConfigPath?: string, ): Promise { // Path to the worker script itself. const distPath = normalize(outputPath); @@ -105,7 +106,7 @@ export function augmentAppWithServiceWorker( '@angular/service-worker/config', ); const safetyPath = join(dirname(workerPath), 'safety-worker.js'); - const configPath = join(appRoot, 'ngsw-config.json'); + const configPath = ngswConfigPath as Path || join(appRoot, 'ngsw-config.json'); return host.exists(configPath).pipe( switchMap(exists => { diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 9402e23cb9..eb85dfa911 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -111,6 +111,7 @@ export class BrowserBuilder implements Builder { projectRoot, resolve(root, normalize(options.outputPath)), options.baseHref || '/', + options.ngswConfigPath, ).then( () => { obs.next({ success: !stats.hasErrors() }); diff --git a/packages/angular_devkit/build_angular/src/browser/schema.d.ts b/packages/angular_devkit/build_angular/src/browser/schema.d.ts index 7a551cf926..f6dcf584e7 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.d.ts +++ b/packages/angular_devkit/build_angular/src/browser/schema.d.ts @@ -181,6 +181,11 @@ export interface BrowserBuilderSchema { */ serviceWorker: boolean; + /** + * Path to ngsw-config.json. + */ + ngswConfigPath?: string; + /** * Flag to prevent building an app shell. */ diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index ad40b49955..0117057aa8 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -194,6 +194,10 @@ "description": "Generates a service worker config for production builds.", "default": false }, + "ngswConfigPath": { + "type": "string", + "description": "Path to ngsw-config.json." + }, "skipAppShell": { "type": "boolean", "description": "Flag to prevent building an app shell.", From e7f54884b5204cbde2ed75432fcd757856746cf8 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 25 Apr 2018 16:14:42 -0700 Subject: [PATCH 502/724] fix(@schematics/angular): Update update logic to set service worker configuration --- .../schematics/angular/migrations/update-6/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 011c6ee313..c96a782ebb 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -273,6 +273,14 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { configurationName = environment; } + let swConfig: JsonObject | null = null; + if (serviceWorker) { + swConfig = { + serviceWorker: true, + ngswConfigPath: '/src/ngsw-config.json', + }; + } + acc[configurationName] = { ...(isProduction ? { @@ -288,7 +296,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { } : {} ), - ...(isProduction && serviceWorker ? { serviceWorker: true } : {}), + ...(isProduction && swConfig ? swConfig : {}), fileReplacements: [ { replace: `${app.root}/${source}`, From a719c6ed73b008d9ad8a0474c2a8f30c0903738c Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 26 Apr 2018 08:35:10 -0500 Subject: [PATCH 503/724] fix(@schematics/angular): Update environment reference to Angular CLI configuration file --- .../application/files/src/environments/environment.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/application/files/src/environments/environment.ts b/packages/schematics/angular/application/files/src/environments/environment.ts index 4b5d1b15e9..012182efa3 100644 --- a/packages/schematics/angular/application/files/src/environments/environment.ts +++ b/packages/schematics/angular/application/files/src/environments/environment.ts @@ -1,7 +1,6 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. export const environment = { production: false From f2c624bcc3cb4d03646fbc1caaeabf26ed71f9f9 Mon Sep 17 00:00:00 2001 From: "sergey.sokolov" Date: Mon, 23 Apr 2018 11:03:01 +0300 Subject: [PATCH 504/724] fix(@ngtools/webpack): Do not apply ts mappings to webpack amd requests Fix #758 --- packages/ngtools/webpack/src/paths-plugin.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/ngtools/webpack/src/paths-plugin.ts b/packages/ngtools/webpack/src/paths-plugin.ts index 846648d0ae..4816aa2d99 100644 --- a/packages/ngtools/webpack/src/paths-plugin.ts +++ b/packages/ngtools/webpack/src/paths-plugin.ts @@ -42,6 +42,13 @@ export function resolveWithPaths( return; } + // Amd requests are not mapped + if (originalRequest.startsWith('!!webpack amd')) { + callback(null, request); + + return; + } + // check if any path mapping rules are relevant const pathMapOptions = []; for (const pattern in compilerOptions.paths) { From 3ba25805e42e8d85730a5b3db658c22a69bdfdd1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 26 Apr 2018 12:06:16 -0700 Subject: [PATCH 505/724] fix(@schematics/angular): update latest known versions --- packages/schematics/angular/utility/latest-versions.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index bb03fdad13..df36b226d5 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,11 +8,11 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '^6.0.0-rc.1', - RxJs: '^6.0.0-rc.0', - ZoneJs: '^0.8.24', + Angular: '^6.0.0-rc.5', + RxJs: '^6.0.0', + ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.5.0', - DevkitBuildNgPackagr: '~0.5.0', + DevkitBuildAngular: '~0.5.8', + DevkitBuildNgPackagr: '~0.5.8', }; From b91ba173821fbaaf247850304e158bb10f0192fd Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 26 Apr 2018 11:50:17 -0700 Subject: [PATCH 506/724] fix(@schematics/angular): Restrict some schematics to type of application fixes #789 --- packages/angular/pwa/pwa/index.ts | 4 ++++ packages/schematics/angular/app-shell/index.ts | 3 +++ packages/schematics/angular/service-worker/index.ts | 3 +++ packages/schematics/angular/universal/index.ts | 3 +++ 4 files changed, 13 insertions(+) diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index 8819daedf7..c7f88c894b 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -9,6 +9,7 @@ import { Path, join } from '@angular-devkit/core'; import { Rule, SchematicContext, + SchematicsException, Tree, apply, branchAndMerge, @@ -36,6 +37,9 @@ export default function (options: PwaOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); const project = workspace.projects[options.project]; + if (project.projectType !== 'application') { + throw new SchematicsException(`PWA requires a project type of "application".`); + } const assetPath = join(project.root as Path, 'src', 'assets'); diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 4911bb18d5..99077dd185 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -144,6 +144,9 @@ function validateProject(options: AppShellOptions): Rule { const routerOutletCheckRegex = /([\s\S]*?)<\/router\-outlet>/; const clientProject = getClientProject(host, options); + if (clientProject.projectType !== 'application') { + throw new SchematicsException(`App shell requires a project type of "application".`); + } const componentPath = getBootstrapComponentPath(host, clientProject); const tmpl = getComponentTemplateInfo(host, componentPath); const template = getComponentTemplate(host, componentPath, tmpl); diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 0845a3009f..ba6276bd90 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -232,6 +232,9 @@ export default function (options: ServiceWorkerOptions): Rule { if (!project) { throw new SchematicsException(`Invalid project name (${options.project})`); } + if (project.projectType !== 'application') { + throw new SchematicsException(`Service worker requires a project type of "application".`); + } const templateSource = apply(url('./files'), [ template({...options}), diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 34b8b7df95..f03a2e0361 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -208,6 +208,9 @@ function getTsConfigOutDir(host: Tree, architect: experimental.workspace.Workspa export default function (options: UniversalOptions): Rule { return (host: Tree, context: SchematicContext) => { const clientProject = getClientProject(host, options); + if (clientProject.projectType !== 'application') { + throw new SchematicsException(`Universal requires a project type of "application".`); + } const clientArchitect = getClientArchitect(host, options); const outDir = getTsConfigOutDir(host, clientArchitect); const tsConfigExtends = basename(clientArchitect.build.options.tsConfig); From 4fd323fc507fa7b6ffe97323ccc26237aa2c5f34 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 26 Apr 2018 11:50:56 -0700 Subject: [PATCH 507/724] fix(@angular-devkit/schematics): better error when no schematics field in package.json cf. angular/angular-cli#10467 --- .../schematics/tools/node-module-engine-host.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts index e0dd10d578..6a3656ce1d 100644 --- a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { BaseException } from '@angular-devkit/core'; import * as core from '@angular-devkit/core/node'; import { dirname, join, resolve as resolvePath } from 'path'; import { RuleFactory } from '../src'; @@ -22,6 +23,13 @@ import { FileSystemEngineHostBase } from './file-system-engine-host-base'; import { readJsonFile } from './file-system-utility'; +export class NodePackageDoesNotSupportSchematics extends BaseException { + constructor(name: string) { + super(`Package ${JSON.stringify(name)} was found but does not support schematics.`); + } +} + + /** * A simple EngineHost that uses NodeModules to resolve collections. */ @@ -81,6 +89,9 @@ export class NodeModulesEngineHost extends FileSystemEngineHostBase { } const pkgJsonSchematics = require(packageJsonPath)['schematics']; + if (!pkgJsonSchematics || typeof pkgJsonSchematics != 'string') { + throw new NodePackageDoesNotSupportSchematics(name); + } collectionPath = this._resolvePath(pkgJsonSchematics, dirname(packageJsonPath)); } From 58154c98c98e78f31984a8058543c322f1c422f7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 26 Apr 2018 14:28:54 -0700 Subject: [PATCH 508/724] release: 6.0.0-rc.7 --- .monorepo.json | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 7e2c303a29..e033751019 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.8", + "version": "0.5.9", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.8", - "hash": "b934cdc92a21bb891dded52d2436b8bc" + "version": "0.5.9", + "hash": "68ede5da854a21d3077ee337e9e7948b" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.8", - "hash": "a0067d6fde313b504b5d6f301911ce88", + "version": "0.5.9", + "hash": "c203b0bc5127d90dea4d4a972c207cee", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.8", - "hash": "c585c142a6d0cd65d08d2ea38f78c640", + "version": "0.5.9", + "hash": "1d0af0d9a49365956b9cfa0434d38111", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.8", - "hash": "7e6f1e19f794d6f1a8e10b867c24676f", + "version": "0.5.9", + "hash": "0cc3e657940eaf82c7f3625ec6b53145", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.8", + "version": "0.5.9", "hash": "40c26d3c33be648c3811639baeb487a9", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.8", - "hash": "19cff00ab716729f851e216edb5aa99d", + "version": "0.5.9", + "hash": "aaaa270a8ff940c84c2a6db4b5cf8852", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.8", - "hash": "b30bb99e0180d488f0d0919c1e6d6e93", + "version": "0.5.9", + "hash": "ddf40c50f4382e53b88aa5adec296486", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.8", - "hash": "654cc7dc27c49417c4651e763a5a510b", + "version": "0.5.9", + "hash": "10634650ce62549315edcbb909a5d5c9", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.8", - "hash": "d907eaf9020ce7060d6cd5eeb823a9ac", + "version": "0.5.9", + "hash": "240bd443a87aeb367d3b94505ab1b23c", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.8", - "hash": "4ed818e48776ed5d8fd4f2faa3cc80ee", + "version": "0.5.9", + "hash": "bc959765b7f8d01da28b1b90684c1772", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.6", + "version": "6.0.0-rc.7", "section": "Misc", - "hash": "472cfc34af46b31e4b88036e8e8fb03c", + "hash": "a0c2ff190d167097de741e94dd80e234", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.8", - "hash": "271b314d18e76330f8c908990cec1137", + "version": "0.5.9", + "hash": "d6d7d3949185648b98aa0ba712763be7", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.8", + "version": "0.5.9", "section": "Schematics", - "hash": "1ff68560151977201e150c0d3904c045", + "hash": "bbf0bca054ea720671cb9234e9f593c5", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.8", + "version": "0.5.9", "section": "Schematics", - "hash": "32aeaea3341b41115cbddc5f87902a84", + "hash": "e6a4bb78af3a07ace42a3501c3992c2b", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.8", + "version": "0.5.9", "section": "Schematics", - "hash": "80483ab66a79038dbd309466c8fdbc06", + "hash": "028163a4b5962e505f4841a5a4b45de6", "snapshotRepo": "angular/schematics-update-builds" } } From 1f7493d12d2a9511809b8be4eefa13368c83eacd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 26 Apr 2018 14:44:05 -0700 Subject: [PATCH 509/724] fix(@schematics/angular): fix lib flatModule options These two options not being there breaks AOT builds on consuming apps. --- .../angular/library/files/__projectRoot__/tsconfig.lib.json | 4 +++- .../ng-packaged/projects/lib/tsconfig.lib.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json index 21a704caa8..8103443b0b 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json @@ -22,7 +22,9 @@ "skipTemplateCodegen": true, "strictMetadataEmit": true, "fullTemplateTypeCheck": true, - "strictInjectionParameters": true + "strictInjectionParameters": true, + "flatModuleId": "AUTOGENERATED", + "flatModuleOutFile": "AUTOGENERATED" }, "exclude": [ "src/test.ts", diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json index 6b9d3422f2..b4a8cf9227 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.lib.json @@ -19,7 +19,9 @@ "skipTemplateCodegen": true, "strictMetadataEmit": true, "fullTemplateTypeCheck": true, - "strictInjectionParameters": true + "strictInjectionParameters": true, + "flatModuleId": "AUTOGENERATED", + "flatModuleOutFile": "AUTOGENERATED" }, "exclude": [ "src/test.ts", From 1d2dd2034982343e0d9f34fb7d1422a1977cbba7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 27 Apr 2018 10:25:56 -0700 Subject: [PATCH 510/724] fix(@angular-devkit/schematics): export additional exception cf. https://github.com/angular/angular-cli/issues/10467 --- packages/angular_devkit/schematics/tools/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/tools/index.ts b/packages/angular_devkit/schematics/tools/index.ts index 02a352ac8c..e0cb930dab 100644 --- a/packages/angular_devkit/schematics/tools/index.ts +++ b/packages/angular_devkit/schematics/tools/index.ts @@ -12,7 +12,10 @@ export * from './file-system-host'; export * from './workflow/node-workflow'; export { FileSystemEngineHost } from './file-system-engine-host'; -export { NodeModulesEngineHost } from './node-module-engine-host'; +export { + NodeModulesEngineHost, + NodePackageDoesNotSupportSchematics, +} from './node-module-engine-host'; export { NodeModulesTestEngineHost } from './node-modules-test-engine-host'; export { validateOptionsWithSchema } from './schema-option-transform'; From 4f12acf0ae7e82cd9ec933265d238ff72af6880a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 27 Apr 2018 10:41:58 -0700 Subject: [PATCH 511/724] fix(@schematics/angular): migrate style preprocessor options Fixes: angular/angular-cli#10473 --- .../schematics/angular/migrations/update-6/index.ts | 10 ++++++++++ .../angular/migrations/update-6/index_spec.ts | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index c96a782ebb..61243de452 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -366,6 +366,16 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { buildOptions.polyfills = appRoot + '/' + app.polyfills; } + if (app.stylePreprocessorOptions + && app.stylePreprocessorOptions.includePaths + && Array.isArray(app.stylePreprocessorOptions.includePaths) + && app.stylePreprocessorOptions.includePaths.length > 0) { + buildOptions.stylePreprocessorOptions = { + includePaths: app.stylePreprocessorOptions.includePaths + .map(includePath => join(app.root as Path, includePath)), + }; + } + buildOptions.assets = (app.assets || []).map(_mapAssets); buildOptions.styles = (app.styles || []).map(_extraEntryMapper); buildOptions.scripts = (app.scripts || []).map(_extraEntryMapper); diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index b19fa3b5af..538e744b37 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -50,6 +50,11 @@ describe('Migration to v6', () => { styles: [ 'styles.css', ], + stylePreprocessorOptions: { + includePaths: [ + 'styleInc', + ], + }, scripts: [], environmentSource: 'environments/environment.ts', environments: { @@ -506,6 +511,7 @@ describe('Migration to v6', () => { expect(build.builder).toEqual('@angular-devkit/build-angular:browser'); expect(build.options.scripts).toEqual([]); expect(build.options.styles).toEqual(['src/styles.css']); + expect(build.options.stylePreprocessorOptions).toEqual({includePaths: ['src/styleInc']}); expect(build.options.assets).toEqual([ { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, From 2f8f4736cb3683361e1c578c40f6517031eb1d69 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 26 Apr 2018 14:28:00 -0700 Subject: [PATCH 512/724] fix(@schematics/angular): Resolve project by new smart default provider. fixes #788 --- packages/schematics/angular/application/index.ts | 2 ++ packages/schematics/angular/class/index.ts | 3 ++- packages/schematics/angular/class/index_spec.ts | 1 + packages/schematics/angular/class/schema.json | 4 +++- packages/schematics/angular/component/index.ts | 2 +- packages/schematics/angular/component/index_spec.ts | 3 ++- packages/schematics/angular/component/schema.json | 4 +++- packages/schematics/angular/directive/index.ts | 2 +- packages/schematics/angular/directive/index_spec.ts | 1 + packages/schematics/angular/directive/schema.json | 4 +++- packages/schematics/angular/enum/index.ts | 3 ++- packages/schematics/angular/enum/index_spec.ts | 1 + packages/schematics/angular/enum/schema.json | 4 +++- packages/schematics/angular/guard/index.ts | 2 +- packages/schematics/angular/guard/index_spec.ts | 1 + packages/schematics/angular/guard/schema.json | 4 +++- packages/schematics/angular/interface/index.ts | 3 ++- packages/schematics/angular/interface/index_spec.ts | 1 + packages/schematics/angular/interface/schema.json | 4 +++- packages/schematics/angular/library/index.ts | 3 +++ packages/schematics/angular/module/index.ts | 2 +- packages/schematics/angular/module/index_spec.ts | 1 + packages/schematics/angular/module/schema.json | 4 +++- packages/schematics/angular/pipe/index.ts | 2 +- packages/schematics/angular/pipe/index_spec.ts | 1 + packages/schematics/angular/pipe/schema.json | 4 +++- packages/schematics/angular/service/index.ts | 3 ++- packages/schematics/angular/service/index_spec.ts | 1 + packages/schematics/angular/service/schema.json | 4 +++- 29 files changed, 55 insertions(+), 19 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 0847450db1..ccbd8d2025 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -346,6 +346,7 @@ export default function (options: ApplicationOptions): Rule { routingScope: 'Root', path: sourceDir, spec: false, + project: options.name, }), schematic('component', { name: 'app', @@ -353,6 +354,7 @@ export default function (options: ApplicationOptions): Rule { flat: true, path: sourceDir, skipImport: true, + project: options.name, ...componentOptions, }), mergeWith( diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index 22e4a1cb68..6b3f5b55e6 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -9,6 +9,7 @@ import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, + SchematicsException, Tree, apply, branchAndMerge, @@ -27,7 +28,7 @@ export default function (options: ClassOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index 694e9573ff..bd484afaf9 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -21,6 +21,7 @@ describe('Class Schematic', () => { name: 'foo', type: '', spec: false, + project: 'bar', }; diff --git a/packages/schematics/angular/class/schema.json b/packages/schematics/angular/class/schema.json index 9e257aaaed..5ec33658e0 100644 --- a/packages/schematics/angular/class/schema.json +++ b/packages/schematics/angular/class/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "spec": { "type": "boolean", diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 785ff99708..925eb28e42 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -108,7 +108,7 @@ export default function(options: ComponentOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index b145633db6..3f7bb78e99 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -28,6 +28,7 @@ describe('Component Schematic', () => { spec: true, module: undefined, export: false, + project: 'bar', }; @@ -253,7 +254,7 @@ describe('Component Schematic', () => { }); it('should handle a path in the name and module options', () => { - appTree = schematicRunner.runSchematic('module', { name: 'admin/module' }, appTree); + appTree = schematicRunner.runSchematic('module', { name: 'admin/module', project: 'bar' }, appTree); const options = { ...defaultOptions, name: 'other/test-component', module: 'admin/module' }; appTree = schematicRunner.runSchematic('component', options, appTree); diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 0507039984..83fe73570a 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -13,7 +13,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "name": { "type": "string", diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index e104bbf00b..81ac7ffdce 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -105,7 +105,7 @@ export default function (options: DirectiveOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index 9673e3cd2c..5684aa575a 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -24,6 +24,7 @@ describe('Directive Schematic', () => { export: false, prefix: 'app', flat: true, + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index d0f0353313..ec4fcb3533 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "prefix": { "type": "string", diff --git a/packages/schematics/angular/enum/index.ts b/packages/schematics/angular/enum/index.ts index 47c0071ab6..a101740027 100644 --- a/packages/schematics/angular/enum/index.ts +++ b/packages/schematics/angular/enum/index.ts @@ -9,6 +9,7 @@ import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, + SchematicsException, Tree, apply, branchAndMerge, @@ -27,7 +28,7 @@ export default function (options: EnumOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/enum/index_spec.ts b/packages/schematics/angular/enum/index_spec.ts index cf028d9f21..0db0e1e46f 100644 --- a/packages/schematics/angular/enum/index_spec.ts +++ b/packages/schematics/angular/enum/index_spec.ts @@ -19,6 +19,7 @@ describe('Enum Schematic', () => { ); const defaultOptions: EnumOptions = { name: 'foo', + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/enum/schema.json b/packages/schematics/angular/enum/schema.json index a46f149e54..8718249ccd 100644 --- a/packages/schematics/angular/enum/schema.json +++ b/packages/schematics/angular/enum/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } } }, "required": [] diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index 151a831940..1749ad66fe 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -69,7 +69,7 @@ export default function (options: GuardOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index ef5a298759..f405a5c4be 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -22,6 +22,7 @@ describe('Guard Schematic', () => { spec: true, module: undefined, flat: true, + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { name: 'workspace', diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index 521ec6f629..db636a336f 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -36,7 +36,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } } }, "required": [] diff --git a/packages/schematics/angular/interface/index.ts b/packages/schematics/angular/interface/index.ts index 9c7b0c9af0..d8c15f5471 100644 --- a/packages/schematics/angular/interface/index.ts +++ b/packages/schematics/angular/interface/index.ts @@ -9,6 +9,7 @@ import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, + SchematicsException, Tree, apply, branchAndMerge, @@ -27,7 +28,7 @@ export default function (options: InterfaceOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/interface/index_spec.ts b/packages/schematics/angular/interface/index_spec.ts index 2f9d8232ba..68459e210a 100644 --- a/packages/schematics/angular/interface/index_spec.ts +++ b/packages/schematics/angular/interface/index_spec.ts @@ -21,6 +21,7 @@ describe('Interface Schematic', () => { name: 'foo', prefix: '', type: '', + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/interface/schema.json b/packages/schematics/angular/interface/schema.json index a13f65c1da..4115b9f674 100644 --- a/packages/schematics/angular/interface/schema.json +++ b/packages/schematics/angular/interface/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "prefix": { "type": "string", diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index eca14badb9..b5c303a3db 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -225,6 +225,7 @@ export default function (options: LibraryOptions): Rule { flat: true, path: sourceDir, spec: false, + project: options.name, }), schematic('component', { name: options.name, @@ -234,11 +235,13 @@ export default function (options: LibraryOptions): Rule { flat: true, path: sourceDir, export: true, + project: options.name, }), schematic('service', { name: options.name, flat: true, path: sourceDir, + project: options.name, }), (_tree: Tree, context: SchematicContext) => { context.addTask(new NodePackageInstallTask()); diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index 56fc2d6919..65471cd351 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -74,7 +74,7 @@ export default function (options: ModuleOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts index 35d02fa277..b941c6aa8b 100644 --- a/packages/schematics/angular/module/index_spec.ts +++ b/packages/schematics/angular/module/index_spec.ts @@ -22,6 +22,7 @@ describe('Module Schematic', () => { spec: true, module: undefined, flat: false, + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index fae4ef7b51..949916637a 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "routing": { "type": "boolean", diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index f6a90ff448..6c24134830 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -89,7 +89,7 @@ export default function (options: PipeOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/pipe/index_spec.ts b/packages/schematics/angular/pipe/index_spec.ts index 4991ce809e..482a8538a1 100644 --- a/packages/schematics/angular/pipe/index_spec.ts +++ b/packages/schematics/angular/pipe/index_spec.ts @@ -24,6 +24,7 @@ describe('Pipe Schematic', () => { module: undefined, export: false, flat: true, + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/pipe/schema.json b/packages/schematics/angular/pipe/schema.json index e57787103d..ad739ea1df 100644 --- a/packages/schematics/angular/pipe/schema.json +++ b/packages/schematics/angular/pipe/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "flat": { "type": "boolean", diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index 8ee762223d..7d134e558b 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -9,6 +9,7 @@ import { strings } from '@angular-devkit/core'; import { Rule, SchematicContext, + SchematicsException, Tree, apply, filter, @@ -26,7 +27,7 @@ export default function (options: ServiceOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); if (!options.project) { - options.project = Object.keys(workspace.projects)[0]; + throw new SchematicsException('Option (project) is required.'); } const project = workspace.projects[options.project]; diff --git a/packages/schematics/angular/service/index_spec.ts b/packages/schematics/angular/service/index_spec.ts index 0ac6d3df44..f651c2fb41 100644 --- a/packages/schematics/angular/service/index_spec.ts +++ b/packages/schematics/angular/service/index_spec.ts @@ -21,6 +21,7 @@ describe('Service Schematic', () => { name: 'foo', spec: true, flat: false, + project: 'bar', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/service/schema.json b/packages/schematics/angular/service/schema.json index 44c0cb365e..a2774ed3e6 100644 --- a/packages/schematics/angular/service/schema.json +++ b/packages/schematics/angular/service/schema.json @@ -21,7 +21,9 @@ "project": { "type": "string", "description": "The name of the project.", - "visible": false + "$default": { + "$source": "projectName" + } }, "flat": { "type": "boolean", From 0f65111557435e65430544085b0dbd0b108bdf60 Mon Sep 17 00:00:00 2001 From: Maxim Salnikov Date: Wed, 25 Apr 2018 20:02:15 +0200 Subject: [PATCH 513/724] fix(@schematics/angular): Make manifest.json correct and consistent Closes #776 --- packages/angular/pwa/pwa/files/assets/manifest.json | 5 ++--- packages/schematics/angular/service-worker/index.ts | 3 +-- packages/schematics/angular/service-worker/index_spec.ts | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/angular/pwa/pwa/files/assets/manifest.json b/packages/angular/pwa/pwa/files/assets/manifest.json index 12e8069803..00feeb763d 100644 --- a/packages/angular/pwa/pwa/files/assets/manifest.json +++ b/packages/angular/pwa/pwa/files/assets/manifest.json @@ -3,7 +3,7 @@ "short_name": "<%= title %>", "theme_color": "#1976d2", "background_color": "#fafafa", - "display": "browser", + "display": "standalone", "scope": "/", "start_url": "/", "icons": [ @@ -47,6 +47,5 @@ "sizes": "512x512", "type": "image/png" } - ], - "splash_pages": null + ] } \ No newline at end of file diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index ba6276bd90..87b013080f 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -190,8 +190,7 @@ function updateIndexFile(options: ServiceWorkerOptions): Rule { const indent = getIndent(closingHeadTagLine) + ' '; const itemsToAdd = [ '', - '', - '', + '', ]; const textToInsert = itemsToAdd diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index 4c85acff9b..747167c6e6 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -102,7 +102,6 @@ describe('Service Worker Schematic', () => { const content = tree.readContent('projects/bar/src/index.html'); expect(content).toMatch(//); - expect(content).toMatch(//); - expect(content).toMatch(//); + expect(content).toMatch(//); }); }); From 27cecc64a9f88fe5a8c88e39c77de2b6a434f8c6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 27 Apr 2018 10:23:10 -0700 Subject: [PATCH 514/724] feat(@schematics/angular): update ng-packagr 3.0.0-rc.2 --- package-lock.json | 331 +++++++----------- package.json | 2 +- .../src/build/index_spec_large.ts | 2 +- packages/schematics/angular/library/index.ts | 2 +- .../schematics/angular/library/index_spec.ts | 2 +- 5 files changed, 139 insertions(+), 200 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ac230330b..da9414d5bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -188,6 +188,14 @@ "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, + "@types/acorn": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.3.tgz", + "integrity": "sha512-gou/kWQkGPMZjdCKNZGDpqxLm9+ErG/pFZKPX4tvCjr0Xf4FCYYX3nAsu7aDVKJV3KUe27+mvqqyWT/9VZoM/A==", + "requires": { + "@types/estree": "0.0.39" + } + }, "@types/body-parser": { "version": "1.16.8", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz", @@ -211,6 +219,11 @@ "@types/webpack": "4.1.3" } }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" + }, "@types/events": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", @@ -1875,11 +1888,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, - "commenting": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.0.5.tgz", - "integrity": "sha512-U7qGbcDLSNpOcV3RQRKHp7hFpy9WUmfawbkPdS4R2RhrSu4dOF85QQpx/Zjcv7uLF6tWSUKEKUIkxknPCrVjwg==" - }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -2498,6 +2506,14 @@ "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" }, + "date-time": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", + "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", + "requires": { + "time-zone": "1.0.0" + } + }, "dateformat": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", @@ -3670,14 +3686,6 @@ "universalify": "0.1.1" } }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "requires": { - "minipass": "2.2.1" - } - }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -5680,6 +5688,11 @@ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=" + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -5923,6 +5936,21 @@ "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" }, + "is-reference": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.0.tgz", + "integrity": "sha512-h37O/IX4efe56o9k41II1ECMqKwtqHa7/12dLDEzJIFux2x15an4WCDb0/eKdmUgRpLJ3bR0DrzDc7vOrVgRDw==", + "requires": { + "@types/estree": "0.0.38" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.38.tgz", + "integrity": "sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA==" + } + } + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -6787,6 +6815,11 @@ "json5": "0.5.1" } }, + "locate-character": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-2.0.5.tgz", + "integrity": "sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==" + }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -7453,11 +7486,6 @@ } } }, - "moment": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", - "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==" - }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -7567,20 +7595,20 @@ "optional": true }, "ng-packagr": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-2.4.1.tgz", - "integrity": "sha512-cOKF59RzAftlLNgGGasTaczJ2GD7NZmA2GWmqXK7/BJFiRX2xMeYbbJke5dpYw7yUIkHJbZMd7WtcKSlVpJ4TQ==", + "version": "3.0.0-rc.2", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-3.0.0-rc.2.tgz", + "integrity": "sha512-NhIQcIvHiOqHblSmtTgECSsfL59V6lfn6Ris9byXN7NaTaUxOF9EWZQqQC09mu8a+YW/H+6Pk2uAjQ99DH9NQw==", "requires": { "@ngtools/json-schema": "1.1.0", - "autoprefixer": "7.2.6", - "browserslist": "2.11.3", - "chalk": "2.3.2", + "autoprefixer": "8.1.0", + "browserslist": "3.1.2", + "chalk": "2.4.1", "commander": "2.12.2", "cpx": "1.5.0", "fs-extra": "5.0.0", "glob": "7.1.2", "injection-js": "2.2.1", - "less": "2.7.3", + "less": "3.0.1", "node-sass": "4.8.3", "node-sass-tilde-importer": "1.0.2", "postcss": "6.0.19", @@ -7588,18 +7616,15 @@ "postcss-url": "7.3.1", "read-pkg-up": "3.0.0", "rimraf": "2.6.2", - "rollup": "0.55.5", - "rollup-plugin-cleanup": "2.0.0", - "rollup-plugin-commonjs": "8.3.0", - "rollup-plugin-license": "0.6.0", + "rollup": "0.57.1", + "rollup-plugin-commonjs": "9.1.0", "rollup-plugin-node-resolve": "3.3.0", - "rxjs": "5.5.8", + "rxjs": "5.5.10", "sorcery": "0.10.0", "strip-bom": "3.0.0", "stylus": "0.54.5", - "tar": "4.4.1", - "uglify-js": "3.3.16", - "update-notifier": "2.4.0" + "uglify-js": "3.3.22", + "update-notifier": "2.5.0" }, "dependencies": { "ansi-styles": { @@ -7610,36 +7635,14 @@ "color-convert": "1.9.1" } }, - "autoprefixer": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", - "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", - "requires": { - "browserslist": "2.11.3", - "caniuse-lite": "1.0.30000813", - "normalize-range": "0.1.2", - "num2fraction": "1.2.2", - "postcss": "6.0.19", - "postcss-value-parser": "3.3.0" - } - }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", - "requires": { - "caniuse-lite": "1.0.30000813", - "electron-to-chromium": "1.3.37" - } - }, "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" + "supports-color": "5.4.0" } }, "find-up": { @@ -7655,21 +7658,6 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - "less": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", - "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", - "requires": { - "errno": "0.1.4", - "graceful-fs": "4.1.11", - "image-size": "0.5.5", - "mime": "1.6.0", - "mkdirp": "0.5.1", - "promise": "7.3.1", - "request": "2.81.0", - "source-map": "0.5.7" - } - }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -7681,15 +7669,6 @@ "strip-bom": "3.0.0" } }, - "minipass": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", - "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", - "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" - } - }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -7731,36 +7710,6 @@ "read-pkg": "3.0.0" } }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - } - }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -7770,22 +7719,27 @@ } }, "rxjs": { - "version": "5.5.8", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.8.tgz", - "integrity": "sha512-Bz7qou7VAIoGiglJZbzbXa4vpX5BmTTN2Dj/se6+SwADtw4SihqBIiEa7VmTXJ8pynvq0iFr5Gx9VLyye1rIxQ==", + "version": "5.5.10", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.10.tgz", + "integrity": "sha512-SRjimIDUHJkon+2hFo7xnvNC4ZEHGzCRwh9P7nzX3zPkCGFEg/tuElrNR7L/rZMagnK2JeH2jQwPRpmyXyLB6A==", "requires": { "symbol-observable": "1.0.1" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { "has-flag": "3.0.0" } @@ -7795,24 +7749,10 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, - "tar": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", - "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", - "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" - } - }, "uglify-js": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.16.tgz", - "integrity": "sha512-FMh5SRqJRGhv9BbaTffENIpDDQIoPDR8DBraunGORGhySArsXlw9++CN+BWzPBLpoI4RcSnpfGPnilTxWL3Vvg==", + "version": "3.3.22", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", + "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { "commander": "2.15.1", "source-map": "0.6.1" @@ -7822,18 +7762,8 @@ "version": "2.15.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } - }, - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, @@ -8622,6 +8552,11 @@ "error-ex": "1.3.1" } }, + "parse-ms": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=" + }, "parse5": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", @@ -8782,6 +8717,14 @@ } } }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "requires": { + "irregular-plurals": "1.4.0" + } + }, "popper.js": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.1.tgz", @@ -8962,6 +8905,15 @@ "utila": "0.4.0" } }, + "pretty-ms": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", + "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", + "requires": { + "parse-ms": "1.0.1", + "plur": "2.1.2" + } + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -9701,6 +9653,11 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, + "require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=" + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -9766,37 +9723,41 @@ } }, "rollup": { - "version": "0.55.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.55.5.tgz", - "integrity": "sha512-2hke9NOy332kxvnmMQOgl7DHm94zihNyYJNd8ZLWo4U0EjFvjUkeWa0+ge+70bTg+mY0xJ7NUsf5kIhDtrGrtA==" - }, - "rollup-plugin-cleanup": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-2.0.0.tgz", - "integrity": "sha1-hZdzGaO/VHUKnXX7kJx+UfWaLaQ=", + "version": "0.57.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.57.1.tgz", + "integrity": "sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA==", "requires": { - "acorn": "4.0.13", - "magic-string": "0.22.5", - "rollup-pluginutils": "2.0.1" + "@types/acorn": "4.0.3", + "acorn": "5.5.3", + "acorn-dynamic-import": "3.0.0", + "date-time": "2.1.0", + "is-reference": "1.1.0", + "locate-character": "2.0.5", + "pretty-ms": "3.1.0", + "require-relative": "0.8.7", + "rollup-pluginutils": "2.0.1", + "signal-exit": "3.0.2", + "sourcemap-codec": "1.4.1" + }, + "dependencies": { + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" + } } }, "rollup-plugin-commonjs": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz", - "integrity": "sha512-PYs3OiYgENFYEmI3vOEm5nrp3eY90YZqd5vGmQqeXmhJsAWFIrFdROCvOasqJ1HgeTvqyYo9IGXnFDyoboNcgQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.0.tgz", + "integrity": "sha512-NrfE0g30QljNCnlJr7I2Xguz+44mh0dCxvfxwLnCwtaCK2LwFUp1zzAs8MQuOfhH4mRskqsjfOwGUap/L+WtEw==", "requires": { - "acorn": "5.5.3", "estree-walker": "0.5.1", "magic-string": "0.22.5", "resolve": "1.5.0", "rollup-pluginutils": "2.0.1" }, "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" - }, "estree-walker": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", @@ -9804,33 +9765,6 @@ } } }, - "rollup-plugin-license": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.6.0.tgz", - "integrity": "sha512-Ttz65oRtNKcfV5icDkQTixc8ja64ueoXejRJoAtmjXYAWVg0qx+tu5rXmEOXWXmUXeGs0ARUVIAG0p1JK0gACQ==", - "requires": { - "commenting": "1.0.5", - "lodash": "4.17.5", - "magic-string": "0.22.4", - "mkdirp": "0.5.1", - "moment": "2.21.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "magic-string": { - "version": "0.22.4", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", - "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", - "requires": { - "vlq": "0.2.3" - } - } - } - }, "rollup-plugin-node-resolve": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", @@ -11120,6 +11054,11 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -11644,9 +11583,9 @@ "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" }, "update-notifier": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.4.0.tgz", - "integrity": "sha1-+bTHAPv9TsEsgRWHJYd31WPYyGY=", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "requires": { "boxen": "1.3.0", "chalk": "2.2.2", diff --git a/package.json b/package.json index bc7d1e15b4..99020beccc 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "mini-css-extract-plugin": "~0.4.0", "minimatch": "^3.0.4", "minimist": "^1.2.0", - "ng-packagr": "^2.4.1", + "ng-packagr": "^3.0.0-rc.2", "node-sass": "^4.8.3", "npm-registry-client": "^8.5.1", "opn": "^5.1.0", diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 0749dc0730..352a2b6828 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -38,7 +38,7 @@ describe('NgPackagr Builder', () => { concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 30000); + }, 60000); linuxOnlyIt('tests works', (done) => { const targetSpec: TargetSpecifier = { project: 'lib', target: 'test' }; diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index b5c303a3db..c47a09faf8 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -114,7 +114,7 @@ function addDependenciesToPackageJson() { '@angular/compiler-cli': latestVersions.Angular, '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, '@angular-devkit/build-angular': latestVersions.DevkitBuildNgPackagr, - 'ng-packagr': '^2.4.1', + 'ng-packagr': '^3.0.0-rc.2', 'tsickle': '>=0.25.5', 'tslib': '^1.7.1', 'typescript': latestVersions.TypeScript, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 61612c24df..fe0e87dad1 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -138,7 +138,7 @@ describe('Library Schematic', () => { const tree = schematicRunner.runSchematic('library', defaultOptions, workspaceTree); const packageJson = getJsonFileContent(tree, 'package.json'); - expect(packageJson.devDependencies['ng-packagr']).toEqual('^2.4.1'); + expect(packageJson.devDependencies['ng-packagr']).toEqual('^3.0.0-rc.2'); expect(packageJson.devDependencies['@angular-devkit/build-ng-packagr']) .toEqual(latestVersions.DevkitBuildNgPackagr); }); From d779e8afc94dec14e00e227dac583564b96294fd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 11:25:29 -0700 Subject: [PATCH 515/724] feat(@angular-devkit/core): add sourceRoot to workspace --- .../angular_devkit/core/src/workspace/workspace-schema.json | 4 ++++ .../angular_devkit/core/src/workspace/workspace-schema.ts | 6 +++++- .../angular_devkit/core/src/workspace/workspace_spec.ts | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.json b/packages/angular_devkit/core/src/workspace/workspace-schema.json index e4b93267f4..c63a175095 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.json +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.json @@ -64,6 +64,10 @@ "type": "string", "description": "Root of the project sourcefiles." }, + "sourceRoot": { + "type": "string", + "description": "The root of the source files, assets and index.html file structure." + }, "prefix": { "type": "string", "description": "The prefix to apply to generated selectors." diff --git a/packages/angular_devkit/core/src/workspace/workspace-schema.ts b/packages/angular_devkit/core/src/workspace/workspace-schema.ts index 636bb3bd08..665e96808e 100644 --- a/packages/angular_devkit/core/src/workspace/workspace-schema.ts +++ b/packages/angular_devkit/core/src/workspace/workspace-schema.ts @@ -55,7 +55,11 @@ export interface WorkspaceProject { */ root: string; /** - * The prefix to apply to generated selectors." + * The root of the source files, assets and index.html file structure. + */ + sourceRoot?: string; + /** + * The prefix to apply to generated selectors. */ prefix: string; /** diff --git a/packages/angular_devkit/core/src/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/workspace/workspace_spec.ts index 9b8fc95172..a27661a42a 100644 --- a/packages/angular_devkit/core/src/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/workspace/workspace_spec.ts @@ -51,6 +51,7 @@ describe('Workspace', () => { projects: { app: { root: 'projects/app', + sourceRoot: 'projects/app/src', projectType: 'application', prefix: 'app', cli: {}, From dacf1d0c25453dd8da38e9a3bfafd8cad801df2e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 11:30:42 -0700 Subject: [PATCH 516/724] fix(@schematics/angular): use sourceRoot in app and lib --- packages/schematics/angular/application/index.ts | 1 + packages/schematics/angular/library/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index ccbd8d2025..a32e6f9d4e 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -137,6 +137,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace const project: WorkspaceProject = { root: projectRoot, + sourceRoot: `${projectRoot}/src`, projectType: 'application', prefix: options.prefix || 'app', schematics, diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index c47a09faf8..da7bc93c0b 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -130,6 +130,7 @@ function addAppToWorkspaceFile(options: LibraryOptions, workspace: WorkspaceSche const project: WorkspaceProject = { root: `${projectRoot}`, + sourceRoot: `${projectRoot}/src`, projectType: 'library', prefix: options.prefix || 'lib', architect: { From 0635d9c0a0a6636cdd7f23761231995f54350553 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 11:45:09 -0700 Subject: [PATCH 517/724] fix(@angular-devkit/architect): support sourceRoot in project --- packages/angular_devkit/architect/src/architect.ts | 2 ++ packages/angular_devkit/architect/src/architect_spec.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 1f1a2ade5f..5143204494 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -70,6 +70,7 @@ export class BuilderNotFoundException extends BaseException { export interface BuilderConfiguration { root: Path; + sourceRoot?: Path; projectType: string; builder: string; options: OptionsT; @@ -189,6 +190,7 @@ export class Architect { const builderConfiguration: BuilderConfiguration = { root: project.root as Path, + sourceRoot: project.sourceRoot as Path | undefined, projectType: project.projectType, builder: target.builder, options: { diff --git a/packages/angular_devkit/architect/src/architect_spec.ts b/packages/angular_devkit/architect/src/architect_spec.ts index a040a2793e..b6865483a7 100644 --- a/packages/angular_devkit/architect/src/architect_spec.ts +++ b/packages/angular_devkit/architect/src/architect_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { experimental, normalize, schema } from '@angular-devkit/core'; +import { Path, experimental, normalize, schema } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { concatMap, tap, toArray } from 'rxjs/operators'; import { BrowserTargetOptions } from '../test/browser'; @@ -29,6 +29,7 @@ describe('Architect', () => { projects: { app: { root: 'app', + sourceRoot: 'app/src', projectType: 'application', architect: { browser: { @@ -66,6 +67,7 @@ describe('Architect', () => { const targetSpec = { project: 'app', target: 'browser', configuration: 'prod' }; const builderConfig = architect.getBuilderConfiguration(targetSpec); expect(builderConfig.root).toBe('app'); + expect(builderConfig.sourceRoot).toBe('app/src' as Path); expect(builderConfig.projectType).toBe('application'); expect(builderConfig.builder).toBe('../test:browser'); expect(builderConfig.options.browserOption).toBe(1); From e791db2c6f07c74aab5f1e80ad6c5d9d805312ff Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 15:17:02 -0700 Subject: [PATCH 518/724] feat(@angular-devkit/build-angular): support string shorthand for assets Fix https://github.com/angular/angular-cli/issues/10270 --- .../angular-cli-files/models/build-options.ts | 4 +- .../models/webpack-configs/common.ts | 20 ++--- .../build_angular/src/browser/index.ts | 33 ++++--- .../build_angular/src/browser/schema.d.ts | 4 +- .../build_angular/src/browser/schema.json | 43 ++++++---- .../build_angular/src/dev-server/index.ts | 10 ++- .../build_angular/src/extract-i18n/index.ts | 3 +- .../build_angular/src/karma/index.ts | 24 ++++-- .../build_angular/src/karma/schema.json | 43 ++++++---- .../build_angular/src/utils/index.ts | 1 + .../src/utils/normalize-asset-patterns.ts | 85 +++++++++++++++++++ .../test/browser/assets_spec_large.ts | 27 +++++- .../test/karma/assets_spec_large.ts | 10 ++- .../test/karma/code-coverage_spec_large.ts | 6 +- .../hello-world-app/.angular.json | 1 + 15 files changed, 229 insertions(+), 85 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index de7fc607d6..26c060e964 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -10,7 +10,7 @@ // tslint:disable-next-line:no-implicit-dependencies import * as ts from 'typescript'; -import { AssetPattern, Budget, ExtraEntryPoint } from '../../browser/schema'; +import { AssetPatternObject, Budget, ExtraEntryPoint } from '../../browser/schema'; export interface BuildOptions { optimization: boolean; @@ -51,7 +51,7 @@ export interface BuildOptions { index: string; polyfills?: string; budgets: Budget[]; - assets: AssetPattern[]; + assets: AssetPatternObject[]; scripts: ExtraEntryPoint[]; styles: ExtraEntryPoint[]; stylePreprocessorOptions?: { includePaths: string[] }; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 5e22fd11f1..bb5837280e 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -12,7 +12,7 @@ import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; import { findUp } from '../../utilities/find-up'; -import { AssetPattern, ExtraEntryPoint } from '../../../browser/schema'; +import { AssetPatternObject, ExtraEntryPoint } from '../../../browser/schema'; import { normalizeExtraEntryPoints } from './utils'; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); @@ -105,7 +105,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { // process asset entries if (buildOptions.assets) { - const copyWebpackPluginPatterns = buildOptions.assets.map((asset: AssetPattern) => { + const copyWebpackPluginPatterns = buildOptions.assets.map((asset: AssetPatternObject) => { // Resolve input paths relative to workspace root and add slash at the end. asset.input = path.resolve(root, asset.input).replace(/\\/g, '/'); @@ -113,20 +113,14 @@ export function getCommonConfig(wco: WebpackConfigOptions) { asset.output = asset.output.endsWith('/') ? asset.output : asset.output + '/'; if (asset.output.startsWith('..')) { - const message = 'An asset cannot be written to a location outside of the . ' - + 'You can override this message by setting the `allowOutsideOutDir` ' - + 'property on the asset to true in the CLI configuration.'; + const message = 'An asset cannot be written to a location outside of the output path.'; throw new Error(message); } - if (asset.output.startsWith('/')) { - // Now we remove starting slash to make Webpack place it from the output root. - asset.output = asset.output.slice(1); - } - return { context: asset.input, - to: asset.output, + // Now we remove starting slash to make Webpack place it from the output root. + to: asset.output.replace(/^\//, ''), from: { glob: asset.glob, dot: true @@ -164,8 +158,8 @@ export function getCommonConfig(wco: WebpackConfigOptions) { if (buildOptions.buildOptimizer) { // Set the cache directory to the Build Optimizer dir, so that package updates will delete it. const buildOptimizerDir = g['_DevKitIsLocal'] - ? nodeModules - : path.dirname(resolve.sync('@angular-devkit/build-optimizer', { basedir: projectRoot })); + ? nodeModules + : path.dirname(resolve.sync('@angular-devkit/build-optimizer', { basedir: projectRoot })); const cacheDirectory = path.resolve(buildOptimizerDir, './.cache/'); buildOptimizerUseRule = { diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index eb85dfa911..d43fecc4dd 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -14,9 +14,10 @@ import { import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable, concat, of } from 'rxjs'; -import { concatMap, last } from 'rxjs/operators'; +import { concatMap, last, tap } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import * as webpack from 'webpack'; +import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; import { getAotConfig, getBrowserConfig, @@ -33,18 +34,19 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; -import { addFileReplacements } from '../utils'; -import { BrowserBuilderSchema } from './schema'; +import { addFileReplacements, normalizeAssetPatterns } from '../utils'; +import { AssetPatternObject, BrowserBuilderSchema, CurrentFileReplacement } from './schema'; const webpackMerge = require('webpack-merge'); -export interface WebpackConfigOptions { - root: string; - projectRoot: string; - buildOptions: BrowserBuilderSchema; - tsConfig: ts.ParsedCommandLine; - tsConfigPath: string; - supportES2015: boolean; +// TODO: figure out a better way to normalize assets, extra entry points, file replacements, +// and whatever else needs to be normalized, while keeping type safety. +// Right now this normalization has to be done in all other builders that make use of the +// BrowserBuildSchema and BrowserBuilder.buildWebpackConfig. +// It would really help if it happens during architect.validateBuilderOptions, or similar. +export interface NormalizedBrowserBuilderSchema extends BrowserBuilderSchema { + assets: AssetPatternObject[]; + fileReplacements: CurrentFileReplacement[]; } export class BrowserBuilder implements Builder { @@ -62,6 +64,10 @@ export class BrowserBuilder implements Builder { ? this._deleteOutputDir(root, normalize(options.outputPath), this.context.host) : of(null)), concatMap(() => addFileReplacements(root, host, options.fileReplacements)), + concatMap(() => normalizeAssetPatterns( + options.assets, host, root, projectRoot, builderConfig.sourceRoot)), + // Replace the assets in options with the normalized version. + tap((assetPatternObjects => options.assets = assetPatternObjects)), concatMap(() => new Observable(obs => { // Ensure Build Optimizer is only used with AOT. if (options.buildOptimizer && !options.aot) { @@ -70,7 +76,8 @@ export class BrowserBuilder implements Builder { let webpackConfig; try { - webpackConfig = this.buildWebpackConfig(root, projectRoot, host, options); + webpackConfig = this.buildWebpackConfig(root, projectRoot, host, + options as NormalizedBrowserBuilderSchema); } catch (e) { obs.error(e); @@ -153,9 +160,9 @@ export class BrowserBuilder implements Builder { root: Path, projectRoot: Path, host: virtualFs.Host, - options: BrowserBuilderSchema, + options: NormalizedBrowserBuilderSchema, ) { - let wco: WebpackConfigOptions; + let wco: WebpackConfigOptions; const tsConfigPath = getSystemPath(normalize(resolve(root, normalize(options.tsConfig)))); const tsConfig = readTsconfig(tsConfigPath); diff --git a/packages/angular_devkit/build_angular/src/browser/schema.d.ts b/packages/angular_devkit/build_angular/src/browser/schema.d.ts index f6dcf584e7..ab4350460b 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.d.ts +++ b/packages/angular_devkit/build_angular/src/browser/schema.d.ts @@ -219,7 +219,9 @@ export interface BrowserBuilderSchema { budgets: Budget[]; } -export interface AssetPattern { +export type AssetPattern = string | AssetPatternObject; + +export interface AssetPatternObject { /** * The pattern to match. */ diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index 0117057aa8..029817f708 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -243,26 +243,33 @@ ], "definitions": { "assetPattern": { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input path dir in which to apply 'glob'. Defaults to the project root." + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input path dir in which to apply 'glob'. Defaults to the project root." + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": [ + "glob", + "input", + "output" + ] }, - "output": { - "type": "string", - "description": "Absolute path within the output." + { + "type": "string" } - }, - "additionalProperties": false, - "required": [ - "glob", - "input", - "output" ] }, "fileReplacement": { diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index ddf2394fa2..d3fc730398 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -27,9 +27,9 @@ import { statsToString, statsWarningsToString, } from '../angular-cli-files/utilities/stats'; -import { BrowserBuilder } from '../browser/'; +import { BrowserBuilder, NormalizedBrowserBuilderSchema } from '../browser/'; import { BrowserBuilderSchema } from '../browser/schema'; -import { addFileReplacements } from '../utils'; +import { addFileReplacements, normalizeAssetPatterns } from '../utils'; const opn = require('opn'); const WebpackDevServer = require('webpack-dev-server'); @@ -104,10 +104,14 @@ export class DevServerBuilder implements Builder { concatMap(() => this._getBrowserOptions(options)), tap((opts) => browserOptions = opts), concatMap(() => addFileReplacements(root, host, browserOptions.fileReplacements)), + concatMap(() => normalizeAssetPatterns( + browserOptions.assets, host, root, projectRoot, builderConfig.sourceRoot)), + // Replace the assets in options with the normalized version. + tap((assetPatternObjects => browserOptions.assets = assetPatternObjects)), concatMap(() => new Observable(obs => { const browserBuilder = new BrowserBuilder(this.context); const webpackConfig = browserBuilder.buildWebpackConfig( - root, projectRoot, host, browserOptions); + root, projectRoot, host, browserOptions as NormalizedBrowserBuilderSchema); const statsConfig = getWebpackStatsConfig(browserOptions.verbose); let webpackDevServerConfig: WebpackDevServerConfigurationOptions; diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index e6fdc0ebc7..9a8fd2a3c1 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -26,6 +26,7 @@ import { import { getWebpackStatsConfig } from '../angular-cli-files/models/webpack-configs/utils'; import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; +import { NormalizedBrowserBuilderSchema } from '../browser'; import { BrowserBuilderSchema } from '../browser/schema'; const MemoryFS = require('memory-fs'); const webpackMerge = require('webpack-merge'); @@ -122,7 +123,7 @@ export class ExtractI18nBuilder implements Builder { buildWebpackConfig( root: Path, projectRoot: Path, - options: BrowserBuilderSchema, + options: NormalizedBrowserBuilderSchema, ) { let wco: WebpackConfigOptions; diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index 9e44e70ade..4248dd325a 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -15,7 +15,7 @@ import { import { Path, getSystemPath, normalize, resolve, virtualFs } from '@angular-devkit/core'; import * as fs from 'fs'; import { Observable, of } from 'rxjs'; -import { concatMap } from 'rxjs/operators'; +import { concatMap, tap } from 'rxjs/operators'; import * as ts from 'typescript'; // tslint:disable-line:no-implicit-dependencies import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; import { @@ -26,20 +26,21 @@ import { } from '../angular-cli-files/models/webpack-configs'; import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { requireProjectModule } from '../angular-cli-files/utilities/require-project-module'; -import { CurrentFileReplacement } from '../browser/schema'; -import { addFileReplacements } from '../utils'; +import { AssetPatternObject, CurrentFileReplacement } from '../browser/schema'; +import { addFileReplacements, normalizeAssetPatterns } from '../utils'; import { KarmaBuilderSchema } from './schema'; const webpackMerge = require('webpack-merge'); -export interface KarmaBuilderOptions extends KarmaBuilderSchema { +export interface NormalizedKarmaBuilderSchema extends KarmaBuilderSchema { + assets: AssetPatternObject[]; fileReplacements: CurrentFileReplacement[]; } -export class KarmaBuilder implements Builder { +export class KarmaBuilder implements Builder { constructor(public context: BuilderContext) { } - run(builderConfig: BuilderConfiguration): Observable { + run(builderConfig: BuilderConfiguration): Observable { const options = builderConfig.options; const root = this.context.workspace.root; const projectRoot = resolve(root, builderConfig.root); @@ -47,6 +48,10 @@ export class KarmaBuilder implements Builder { return of(null).pipe( concatMap(() => addFileReplacements(root, host, options.fileReplacements)), + concatMap(() => normalizeAssetPatterns( + options.assets, host, root, projectRoot, builderConfig.sourceRoot)), + // Replace the assets in options with the normalized version. + tap((assetPatternObjects => options.assets = assetPatternObjects)), concatMap(() => new Observable(obs => { const karma = requireProjectModule(getSystemPath(projectRoot), 'karma'); const karmaConfig = getSystemPath(resolve(root, normalize(options.karmaConfig))); @@ -66,8 +71,9 @@ export class KarmaBuilder implements Builder { karmaOptions.buildWebpack = { root: getSystemPath(root), projectRoot: getSystemPath(projectRoot), - options: options, - webpackConfig: this._buildWebpackConfig(root, projectRoot, host, options), + options: options as NormalizedKarmaBuilderSchema, + webpackConfig: this._buildWebpackConfig(root, projectRoot, host, + options as NormalizedKarmaBuilderSchema), // Pass onto Karma to emit BuildEvents. successCb: () => obs.next({ success: true }), failureCb: () => obs.next({ success: false }), @@ -100,7 +106,7 @@ export class KarmaBuilder implements Builder { root: Path, projectRoot: Path, host: virtualFs.Host, - options: KarmaBuilderOptions, + options: NormalizedKarmaBuilderSchema, ) { let wco: WebpackConfigOptions; diff --git a/packages/angular_devkit/build_angular/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json index 5b7115c979..111c00ddae 100644 --- a/packages/angular_devkit/build_angular/src/karma/schema.json +++ b/packages/angular_devkit/build_angular/src/karma/schema.json @@ -153,26 +153,33 @@ ], "definitions": { "assetPattern": { - "type": "object", - "properties": { - "glob": { - "type": "string", - "description": "The pattern to match." - }, - "input": { - "type": "string", - "description": "The input path dir in which to apply 'glob'. Defaults to the project root." + "oneOf": [ + { + "type": "object", + "properties": { + "glob": { + "type": "string", + "description": "The pattern to match." + }, + "input": { + "type": "string", + "description": "The input path dir in which to apply 'glob'. Defaults to the project root." + }, + "output": { + "type": "string", + "description": "Absolute path within the output." + } + }, + "additionalProperties": false, + "required": [ + "glob", + "input", + "output" + ] }, - "output": { - "type": "string", - "description": "Absolute path within the output." + { + "type": "string" } - }, - "additionalProperties": false, - "required": [ - "glob", - "input", - "output" ] }, "extraEntryPoint": { diff --git a/packages/angular_devkit/build_angular/src/utils/index.ts b/packages/angular_devkit/build_angular/src/utils/index.ts index 9e6614690f..edfd8da816 100644 --- a/packages/angular_devkit/build_angular/src/utils/index.ts +++ b/packages/angular_devkit/build_angular/src/utils/index.ts @@ -8,3 +8,4 @@ export * from './run-module-as-observable-fork'; export * from './add-file-replacements'; +export * from './normalize-asset-patterns'; diff --git a/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts b/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts new file mode 100644 index 0000000000..27d2d9d995 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts @@ -0,0 +1,85 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { + BaseException, + Path, + basename, + dirname, + join, + normalize, + relative, + resolve, + virtualFs, +} from '@angular-devkit/core'; +import { Observable, forkJoin, of } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; +import { AssetPattern, AssetPatternObject } from '../browser/schema'; + + +export class MissingAssetSourceRootException extends BaseException { + constructor(path: String) { + super(`The ${path} asset path must start with the project source root.`); + } +} + +export function normalizeAssetPatterns( + assetPatterns: AssetPattern[], + host: virtualFs.Host, + root: Path, + projectRoot: Path, + maybeSourceRoot: Path | undefined, +): Observable { + // When sourceRoot is not available, we default to ${projectRoot}/src. + const sourceRoot = maybeSourceRoot || join(projectRoot, 'src'); + const resolvedSourceRoot = resolve(root, sourceRoot); + + const assetPatternObjectObservables: Observable[] = assetPatterns + .map(assetPattern => { + // Normalize string asset patterns to objects. + if (typeof assetPattern === 'string') { + const assetPath = normalize(assetPattern); + const resolvedAssetPath = resolve(root, assetPath); + + // Check if the string asset is within sourceRoot. + if (!resolvedAssetPath.startsWith(resolvedSourceRoot)) { + throw new MissingAssetSourceRootException(assetPattern); + } + + return host.isDirectory(resolvedAssetPath).pipe( + // If the path doesn't exist at all, pretend it is a directory. + catchError(() => of(true)), + map(isDirectory => { + let glob: string, input: Path, output: Path; + if (isDirectory) { + // Folders get a recursive star glob. + glob = '**/*'; + // Input directory is their original path. + input = assetPath; + } else { + // Files are their own glob. + glob = basename(assetPath); + // Input directory is their original dirname. + input = dirname(assetPath); + } + + // Output directory for both is the relative path from source root to input. + output = relative(resolvedSourceRoot, resolve(root, input)); + + // Return the asset pattern in object format. + return { glob, input, output }; + }), + ); + } else { + // It's already an AssetPatternObject, no need to convert. + return of(assetPattern); + } + }); + + // Wait for all the asset patterns and return them as an array. + return forkJoin(assetPatternObjectObservables); +} diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index 5cd705258b..183973b822 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -18,19 +18,26 @@ describe('Browser Builder assets', () => { it('works', (done) => { const assets: { [path: string]: string } = { './src/folder/.gitkeep': '', - './src/folder/folder-asset.txt': 'folder-asset.txt', + './src/string-file-asset.txt': 'string-file-asset.txt', + './src/string-folder-asset/file.txt': 'string-folder-asset.txt', './src/glob-asset.txt': 'glob-asset.txt', + './src/folder/folder-asset.txt': 'folder-asset.txt', './src/output-asset.txt': 'output-asset.txt', }; const matches: { [path: string]: string } = { - './dist/folder/folder-asset.txt': 'folder-asset.txt', + './dist/string-file-asset.txt': 'string-file-asset.txt', + './dist/string-folder-asset/file.txt': 'string-folder-asset.txt', './dist/glob-asset.txt': 'glob-asset.txt', + './dist/folder/folder-asset.txt': 'folder-asset.txt', './dist/output-folder/output-asset.txt': 'output-asset.txt', }; host.writeMultipleFiles(assets); const overrides = { assets: [ + 'src/string-file-asset.txt', + 'src/string-folder-asset', + { glob: 'glob-asset.txt', input: 'src/', output: '/' }, { glob: 'glob-asset.txt', input: 'src/', output: '/' }, { glob: 'output-asset.txt', input: 'src/', output: '/output-folder' }, { glob: '**/*', input: 'src/folder', output: '/folder' }, @@ -68,4 +75,20 @@ describe('Browser Builder assets', () => { // node_modules folder will hit this one and can fail. host.scopedSync().delete(normalize('./node_modules')); }, Timeout.Basic); + + it('fails with non-source root input path', (done) => { + const assets: { [path: string]: string } = { + './node_modules/some-package/node_modules-asset.txt': 'node_modules-asset.txt', + }; + host.writeMultipleFiles(assets); + const overrides = { + assets: ['not-source-root/file.txt'], + }; + + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + + // The node_modules folder must be deleted, otherwise code that tries to find the + // node_modules folder will hit this one and can fail. + host.scopedSync().delete(normalize('./node_modules')); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts index 2dd1b5d192..992e9b8962 100644 --- a/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/assets_spec_large.ts @@ -16,8 +16,10 @@ describe('Karma Builder assets', () => { it('works', (done) => { const assets: { [path: string]: string } = { - './src/folder/folder-asset.txt': 'folder-asset.txt', + './src/string-file-asset.txt': 'string-file-asset.txt', + './src/string-folder-asset/file.txt': 'string-folder-asset.txt', './src/glob-asset.txt': 'glob-asset.txt', + './src/folder/folder-asset.txt': 'folder-asset.txt', './src/output-asset.txt': 'output-asset.txt', }; host.writeMultipleFiles(assets); @@ -51,8 +53,10 @@ describe('Karma Builder assets', () => { }) export class AppComponent { public assets = [ - { path: './folder/folder-asset.txt', content: '' }, + { path: './string-file-asset.txt', content: '' }, + { path: './string-folder-asset/file.txt', content: '' }, { path: './glob-asset.txt', content: '' }, + { path: './folder/folder-asset.txt', content: '' }, { path: './output-folder/output-asset.txt', content: '' }, ]; constructor(private http: Http) { @@ -87,6 +91,8 @@ describe('Karma Builder assets', () => { const overrides = { assets: [ + 'src/string-file-asset.txt', + 'src/string-folder-asset', { glob: 'glob-asset.txt', input: 'src/', output: '/' }, { glob: 'output-asset.txt', input: 'src/', output: '/output-folder' }, { glob: '**/*', input: 'src/folder', output: '/folder' }, diff --git a/packages/angular_devkit/build_angular/test/karma/code-coverage_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/code-coverage_spec_large.ts index 9365ca8085..5fd535c83c 100644 --- a/packages/angular_devkit/build_angular/test/karma/code-coverage_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/code-coverage_spec_large.ts @@ -8,7 +8,7 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { debounceTime, tap } from 'rxjs/operators'; -import { KarmaBuilderOptions } from '../../src'; +import { NormalizedKarmaBuilderSchema } from '../../src'; import { host, karmaTargetSpec, runTargetSpec } from '../utils'; @@ -19,7 +19,7 @@ describe('Karma Builder code coverage', () => { afterEach(done => host.restore().subscribe(undefined, done.fail, done)); it('works', (done) => { - const overrides: Partial = { codeCoverage: true }; + const overrides: Partial = { codeCoverage: true }; runTargetSpec(host, karmaTargetSpec, overrides).pipe( // It seems like the coverage files take a while being written to disk, so we wait 500ms here. @@ -35,7 +35,7 @@ describe('Karma Builder code coverage', () => { }, 120000); it('supports exclude', (done) => { - const overrides: Partial = { + const overrides: Partial = { codeCoverage: true, codeCoverageExclude: [ 'src/polyfills.ts', diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index c3c338ff3e..dd93d9ccba 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -8,6 +8,7 @@ "projects": { "app": { "root": "src", + "sourceRoot": "src", "projectType": "application", "prefix": "app", "schematics": {}, From 1fcb7440e37be88d98ff9fe6fdf724fcda8d4abe Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 15:27:32 -0700 Subject: [PATCH 519/724] fix(@schematics/angular): use string assets when updating --- .../schematics/angular/migrations/update-6/index.ts | 11 +++-------- .../angular/migrations/update-6/index_spec.ts | 8 ++++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 61243de452..3ea4ec2b6b 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -216,14 +216,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { function _mapAssets(asset: string | JsonObject) { if (typeof asset === 'string') { - if (tree.exists(app.root + '/' + asset)) { - // If it exists in the tree, then it is a file. - return { glob: asset, input: normalize(appRoot + '/'), output: '/' }; - } else { - // If it does not exist, it is either a folder or something we can't statically know. - // Folders must get a recursive star glob. - return { glob: '**/*', input: normalize(appRoot + '/' + asset), output: '/' + asset }; - } + return normalize(appRoot + '/' + asset); } else { if (asset.output) { return { @@ -346,6 +339,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { const project: JsonObject = { root: '', + sourceRoot: 'src', projectType: 'application', }; @@ -482,6 +476,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { } const e2eProject: JsonObject = { root: project.root, + sourceRoot: project.root, projectType: 'application', cli: {}, schematics: {}, diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 538e744b37..573e7fd776 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -513,8 +513,8 @@ describe('Migration to v6', () => { expect(build.options.styles).toEqual(['src/styles.css']); expect(build.options.stylePreprocessorOptions).toEqual({includePaths: ['src/styleInc']}); expect(build.options.assets).toEqual([ - { glob: '**/*', input: 'src/assets', output: '/assets' }, - { glob: 'favicon.ico', input: 'src', output: '/' }, + 'src/assets', + 'src/favicon.ico', { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, ]); @@ -574,8 +574,8 @@ describe('Migration to v6', () => { expect(test.options.scripts).toEqual([]); expect(test.options.styles).toEqual(['src/styles.css']); expect(test.options.assets).toEqual([ - { glob: '**/*', input: 'src/assets', output: '/assets' }, - { glob: 'favicon.ico', input: 'src', output: '/' }, + 'src/assets', + 'src/favicon.ico', { glob: '**/*', input: 'src/assets', output: '/assets' }, { glob: 'favicon.ico', input: 'src', output: '/' }, ]); From 57731deec2cde5b9a6c4e5a5905cfd3b55b94139 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 27 Apr 2018 13:24:24 +0300 Subject: [PATCH 520/724] fix(@angular-devkit/build-angular): hash files as binary For most files it doesn't make a difference, but for files that are not UTF-8 encoded (such as `*.ico`, `*.png`, etc) converting to string before hashing creates a different digest than what the ServiceWorker will generate (see [here][1]). This in turn causes the SW to think the config is wrong and enter a degraded state. This commit ensures that `ngsw.json` will contain hashes computed in the same way as the SW will compute them. [1]: https://github.com/angular/angular/blob/c8a1a14b87e5907458e8e87021e47f9796cb3257/packages/service-worker/worker/src/assets.ts#L418 --- .../utilities/service-worker/index.ts | 12 ++++++++---- .../test/browser/service-worker_spec_large.ts | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts index edf02c6178..a45a957f0c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts @@ -37,16 +37,15 @@ class CliFilesystem implements Filesystem { } read(path: string): Promise { - return this._host.read(this._resolve(path)) - .toPromise() + return this._readIntoBuffer(path) .then(content => virtualFs.fileBufferToString(content)); } hash(path: string): Promise { const sha1 = crypto.createHash('sha1'); - return this.read(path) - .then(content => sha1.update(content)) + return this._readIntoBuffer(path) + .then(content => sha1.update(Buffer.from(content))) .then(() => sha1.digest('hex')); } @@ -55,6 +54,11 @@ class CliFilesystem implements Filesystem { .toPromise(); } + private _readIntoBuffer(path: string): Promise { + return this._host.read(this._resolve(path)) + .toPromise(); + } + private _resolve(path: string): Path { return join(normalize(this.base), path); } diff --git a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts index 6b2acb7df0..081faac7ee 100644 --- a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts @@ -96,7 +96,7 @@ describe('Browser Builder', () => { ], dataGroups: [], hashTable: { - '/favicon.ico': '460fcbd48b20fcc32b184388606af1238c890dba', + '/favicon.ico': '84161b857f5c547e3699ddfbffc6d8d737542e01', '/assets/folder-asset.txt': '617f202968a6a81050aa617c2e28e1dca11ce8d4', '/index.html': '3e659d6e536916b7d178d02a2e6e5492f868bf68', }, @@ -151,7 +151,7 @@ describe('Browser Builder', () => { ], dataGroups: [], hashTable: { - '/foo/bar/favicon.ico': '460fcbd48b20fcc32b184388606af1238c890dba', + '/foo/bar/favicon.ico': '84161b857f5c547e3699ddfbffc6d8d737542e01', '/foo/bar/assets/folder-asset.txt': '617f202968a6a81050aa617c2e28e1dca11ce8d4', '/foo/bar/index.html': '5b53fa9e07e4111b8ef84613fb989a56fee502b0', }, From a2920041524002cb014a1030478f2432e04614ae Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 27 Apr 2018 18:41:30 -0700 Subject: [PATCH 521/724] test: limit ng-packagr works test to linux --- .../build_ng_packagr/src/build/index_spec_large.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 352a2b6828..5913061465 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -30,7 +30,7 @@ describe('NgPackagr Builder', () => { const host = new NodeJsSyncHost(); const workspace = new experimental.workspace.Workspace(workspaceRoot, host); - it('works', (done) => { + linuxOnlyIt('works', (done) => { const targetSpec: TargetSpecifier = { project: 'lib', target: 'build' }; return workspace.loadWorkspaceFromHost(workspaceFile).pipe( @@ -38,7 +38,7 @@ describe('NgPackagr Builder', () => { concatMap(arch => arch.run(arch.getBuilderConfiguration(targetSpec))), tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, 60000); + }, 30000); linuxOnlyIt('tests works', (done) => { const targetSpec: TargetSpecifier = { project: 'lib', target: 'test' }; From 506f715b164efa71b051b1bbfaacd367842ecbdb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 29 Apr 2018 19:41:43 -0700 Subject: [PATCH 522/724] ci: fix codeowners Cover subdirectories and add backup for each package. --- .github/CODEOWNERS | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e4c28efb37..bf74e13acf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,8 +1,17 @@ -packages/_/* @hansl -packages/angular_devkit/build_optimizer/* @filipesilva -packages/angular_devkit/core/* @hansl -packages/angular_devkit/schematics/* @hansl -packages/schematics/angular/* @hansl @Brocco -packages/schematics/schematics/* @hansl -rules/* @hansl -scripts/* @hansl +/packages/_/ @hansl @clydin +/packages/angular/pwa @hansl @Brocco +/packages/angular_devkit/architect/ @filipesilva @hansl +/packages/angular_devkit/architect_cli/ @filipesilva @hansl +/packages/angular_devkit/build_angular/ @filipesilva @clydin +/packages/angular_devkit/build_ng_packagr/ @filipesilva @clydin +/packages/angular_devkit/build_optimizer/ @filipesilva @clydin +/packages/angular_devkit/core/ @hansl @clydin +/packages/angular_devkit/schematics/ @hansl @Brocco +/packages/angular_devkit/schematics_cli/ @hansl @Brocco +/packages/ngtools/webpack/ @hansl @Brocco +/packages/schematics/angular/ @hansl @Brocco +/packages/schematics/package_update/ @hansl @Brocco +/packages/schematics/schematics/ @hansl @Brocco +/packages/schematics/update/ @hansl @Brocco +/rules/ @hansl @clydin +/scripts/ @hansl @clydin From 99b3ca95cd394217180e5d21663742af988ce74b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sun, 29 Apr 2018 09:30:51 -0700 Subject: [PATCH 523/724] fix(@schematics/angular): use asset strings in new application --- .../schematics/angular/application/index.ts | 26 ++++--------------- .../hello-world-app/.angular.json | 24 +++-------------- 2 files changed, 9 insertions(+), 41 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index a32e6f9d4e..788e39fe8d 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, normalize, relative, strings } from '@angular-devkit/core'; +import { JsonObject, join, normalize, relative, strings } from '@angular-devkit/core'; import { MergeStrategy, Rule, @@ -151,16 +151,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace polyfills: `${projectRoot}src/polyfills.ts`, tsConfig: `${rootFilesRoot}tsconfig.app.json`, assets: [ - { - glob: 'favicon.ico', - input: `${projectRoot}src`, - output: '/', - }, - { - glob: '**/*', - input: `${projectRoot}src/assets`, - output: '/assets', - }, + join(normalize(projectRoot), 'src', 'favicon.ico'), + join(normalize(projectRoot), 'src', 'assets'), ], styles: [ `${projectRoot}src/styles.${options.style}`, @@ -214,16 +206,8 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace ], scripts: [], assets: [ - { - glob: 'favicon.ico', - input: `${projectRoot}src/`, - output: '/', - }, - { - glob: '**/*', - input: `${projectRoot}src/assets`, - output: '/assets', - }, + join(normalize(projectRoot), 'src', 'favicon.ico'), + join(normalize(projectRoot), 'src', 'assets'), ], }, }, diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index dd93d9ccba..b5b4f4c05d 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -23,16 +23,8 @@ "tsConfig": "src/tsconfig.app.json", "progress": false, "assets": [ - { - "glob": "favicon.ico", - "input": "src/", - "output": "/" - }, - { - "glob": "**/*", - "input": "src/assets", - "output": "/assets" - } + "src/favicon.ico", + "src/assets" ], "styles": [ "src/styles.css" @@ -109,16 +101,8 @@ ], "scripts": [], "assets": [ - { - "glob": "favicon.ico", - "input": "src/", - "output": "/" - }, - { - "glob": "**/*", - "input": "src/assets", - "output": "/assets" - } + "src/favicon.ico", + "src/assets" ] } }, From 7c96a3f6042c7e7b99d19ed921887e2177684207 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 21:55:39 -0700 Subject: [PATCH 524/724] fix(@schematics/angular): use join for sourceRoot It was using '/src' for the base new project. --- packages/schematics/angular/application/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 788e39fe8d..4dbcd14549 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -137,7 +137,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace const project: WorkspaceProject = { root: projectRoot, - sourceRoot: `${projectRoot}/src`, + sourceRoot: join(normalize(projectRoot), 'src'), projectType: 'application', prefix: options.prefix || 'app', schematics, From e2a9ceefd2d4da2ac87ebd3d542319d184404c38 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 21:36:42 -0700 Subject: [PATCH 525/724] fix(@angular-devkit/schematics): remove unused dependency --- packages/angular_devkit/schematics/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index c3cfde8549..91bcb26523 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,7 +17,6 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "@ngtools/json-schema": "^1.1.0", "rxjs": "^6.0.0-beta.3" } } From fe477b6f1320b1eec9bd6e26bb41800e4ac9c81e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Apr 2018 21:38:14 -0700 Subject: [PATCH 526/724] build: use rxjs 6 final --- packages/angular_devkit/architect/package.json | 2 +- packages/angular_devkit/architect/test/package.json | 2 +- packages/angular_devkit/architect_cli/package.json | 2 +- packages/angular_devkit/build_angular/package.json | 2 +- packages/angular_devkit/build_ng_packagr/package.json | 2 +- packages/angular_devkit/core/package.json | 2 +- packages/angular_devkit/schematics/package.json | 2 +- packages/angular_devkit/schematics_cli/package.json | 2 +- packages/schematics/package_update/package.json | 2 +- packages/schematics/update/package.json | 2 +- .../@angular_devkit/build_angular/hello-world-app/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json index a9c0d5004b..ba6a2a7493 100644 --- a/packages/angular_devkit/architect/package.json +++ b/packages/angular_devkit/architect/package.json @@ -9,6 +9,6 @@ }, "dependencies": { "@angular-devkit/core": "0.0.0", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } \ No newline at end of file diff --git a/packages/angular_devkit/architect/test/package.json b/packages/angular_devkit/architect/test/package.json index ae8e52521e..b4617c03ea 100644 --- a/packages/angular_devkit/architect/test/package.json +++ b/packages/angular_devkit/architect/test/package.json @@ -1,6 +1,6 @@ { "builders": "builders.json", "dependencies": { - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } diff --git a/packages/angular_devkit/architect_cli/package.json b/packages/angular_devkit/architect_cli/package.json index 16ffb9972e..a09520e231 100644 --- a/packages/angular_devkit/architect_cli/package.json +++ b/packages/angular_devkit/architect_cli/package.json @@ -19,6 +19,6 @@ "@angular-devkit/architect": "0.0.0", "minimist": "^1.2.0", "symbol-observable": "^1.2.0", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index f1bcdbd682..f386fc8dbd 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -44,7 +44,7 @@ "raw-loader": "^0.5.1", "request": "^2.83.0", "resolve": "^1.5.0", - "rxjs": "^6.0.0-beta.3", + "rxjs": "^6.0.0", "sass-loader": "^7.0.1", "silent-error": "^1.1.0", "source-map-support": "^0.5.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index e003295420..a1c83cc8b8 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -12,7 +12,7 @@ "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", "resolve": "^1.5.0", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" }, "peerDependencies": { "ng-packagr": "^2.2.0 || ^3.0.0-rc.0" diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 6d501d9c5c..6675b847e1 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -14,6 +14,6 @@ "ajv": "~6.4.0", "chokidar": "^1.7.0", "source-map": "^0.5.6", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 91bcb26523..67b630f5c4 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -17,6 +17,6 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index 6aaa5c332f..2fdfb74bfb 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -26,6 +26,6 @@ "@schematics/schematics": "0.0.0", "minimist": "^1.2.0", "symbol-observable": "^1.2.0", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } diff --git a/packages/schematics/package_update/package.json b/packages/schematics/package_update/package.json index 32b74ab808..cf42459fbc 100644 --- a/packages/schematics/package_update/package.json +++ b/packages/schematics/package_update/package.json @@ -17,6 +17,6 @@ "@angular-devkit/schematics": "0.0.0", "semver": "^5.3.0", "semver-intersect": "^1.1.2", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } \ No newline at end of file diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index b4e9394dfd..6d3673a2fb 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -18,6 +18,6 @@ "npm-registry-client": "^8.5.1", "semver": "^5.3.0", "semver-intersect": "^1.1.2", - "rxjs": "^6.0.0-beta.3" + "rxjs": "^6.0.0" } } \ No newline at end of file diff --git a/tests/@angular_devkit/build_angular/hello-world-app/package.json b/tests/@angular_devkit/build_angular/hello-world-app/package.json index 1c11bcc465..bae1070fa2 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/package.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/package.json @@ -22,7 +22,7 @@ "@angular/platform-browser-dynamic": "^6.0.0-rc.0", "@angular/router": "^6.0.0-rc.0", "core-js": "^2.4.1", - "rxjs": "^6.0.0-beta.3", + "rxjs": "^6.0.0", "zone.js": "^0.8.19" }, "devDependencies": { From aae5e42d1ee71b5aa3043051c608d5bd6cfdfb76 Mon Sep 17 00:00:00 2001 From: Cyrille Tuzi Date: Sun, 29 Apr 2018 13:44:57 +0200 Subject: [PATCH 527/724] fix(@angular/pwa): use default project --- packages/angular/pwa/pwa/index.ts | 3 +++ packages/angular/pwa/pwa/schema.d.ts | 2 +- packages/angular/pwa/pwa/schema.json | 9 +++++---- packages/schematics/angular/service-worker/index.ts | 9 ++++++--- packages/schematics/angular/service-worker/schema.d.ts | 2 +- packages/schematics/angular/service-worker/schema.json | 9 +++++---- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index c7f88c894b..0d7c963742 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -36,6 +36,9 @@ function addServiceWorker(options: PwaOptions): Rule { export default function (options: PwaOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); + if (!options.project) { + throw new SchematicsException('Option "project" is required.'); + } const project = workspace.projects[options.project]; if (project.projectType !== 'application') { throw new SchematicsException(`PWA requires a project type of "application".`); diff --git a/packages/angular/pwa/pwa/schema.d.ts b/packages/angular/pwa/pwa/schema.d.ts index 1331fdaebf..55091c336f 100644 --- a/packages/angular/pwa/pwa/schema.d.ts +++ b/packages/angular/pwa/pwa/schema.d.ts @@ -10,7 +10,7 @@ export interface Schema { /** * The name of the project. */ - project: string; + project?: string; /** * ": "The target to apply service worker to. */ diff --git a/packages/angular/pwa/pwa/schema.json b/packages/angular/pwa/pwa/schema.json index 05a34fcbd6..b06bd47d1d 100644 --- a/packages/angular/pwa/pwa/schema.json +++ b/packages/angular/pwa/pwa/schema.json @@ -6,7 +6,10 @@ "properties": { "project": { "type": "string", - "description": "The name of the project." + "description": "The name of the project.", + "$default": { + "$source": "projectName" + } }, "target": { "type": "string", @@ -23,7 +26,5 @@ "description": "The title of the application." } }, - "required": [ - "project" - ] + "required": [] } \ No newline at end of file diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 87b013080f..55e8af392d 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -38,7 +38,7 @@ function updateConfigFile(options: ServiceWorkerOptions): Rule { const workspace = getWorkspace(host); - const project = workspace.projects[options.project]; + const project = workspace.projects[options.project as string]; if (!project) { throw new Error(`Project is not defined in this workspace.`); @@ -94,7 +94,7 @@ function updateAppModule(options: ServiceWorkerOptions): Rule { // find app module const workspace = getWorkspace(host); - const project = workspace.projects[options.project]; + const project = workspace.projects[options.project as string]; if (!project.architect) { throw new Error('Project architect not found.'); } @@ -164,7 +164,7 @@ function getTsSourceFile(host: Tree, path: string): ts.SourceFile { function updateIndexFile(options: ServiceWorkerOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); - const project = workspace.projects[options.project]; + const project = workspace.projects[options.project as string]; let path: string; if (project && project.architect && project.architect.build && project.architect.build.options.index) { @@ -227,6 +227,9 @@ function getIndent(text: string): string { export default function (options: ServiceWorkerOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); + if (!options.project) { + throw new SchematicsException('Option "project" is required.'); + } const project = workspace.projects[options.project]; if (!project) { throw new SchematicsException(`Invalid project name (${options.project})`); diff --git a/packages/schematics/angular/service-worker/schema.d.ts b/packages/schematics/angular/service-worker/schema.d.ts index 624ffaadde..aa66e38820 100644 --- a/packages/schematics/angular/service-worker/schema.d.ts +++ b/packages/schematics/angular/service-worker/schema.d.ts @@ -10,7 +10,7 @@ export interface Schema { /** * The name of the project. */ - project: string; + project?: string; /** * ": "The target to apply service worker to. */ diff --git a/packages/schematics/angular/service-worker/schema.json b/packages/schematics/angular/service-worker/schema.json index 8f84154b17..4ec3fe49e3 100644 --- a/packages/schematics/angular/service-worker/schema.json +++ b/packages/schematics/angular/service-worker/schema.json @@ -6,7 +6,10 @@ "properties": { "project": { "type": "string", - "description": "The name of the project." + "description": "The name of the project.", + "$default": { + "$source": "projectName" + } }, "target": { "type": "string", @@ -19,7 +22,5 @@ "default": "production" } }, - "required": [ - "project" - ] + "required": [] } \ No newline at end of file From 709fd4815a782987bec35a211fca442dcbc62c56 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 26 Apr 2018 11:21:28 -0700 Subject: [PATCH 528/724] refactor(@angular-devkit/build-angular): cleanup index processing --- .../models/webpack-configs/browser.ts | 1 + .../plugins/index-html-webpack-plugin.ts | 50 ++++++++++++------- .../subresource-integrity_spec_large.ts | 3 +- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index f02ccb74b0..f2254a6770 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -132,6 +132,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { baseHref: buildOptions.baseHref, entrypoints: generateEntryPoints(buildOptions), deployUrl: buildOptions.deployUrl, + sri: buildOptions.subresourceIntegrity, }), ]), node: false, diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts index ede8470dcf..a8805ef8f0 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts @@ -1,6 +1,3 @@ -// tslint:disable -// TODO: cleanup this file, it's copied as is from Angular CLI. - /** * @license * Copyright Google Inc. All Rights Reserved. @@ -8,7 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ - +import { createHash } from 'crypto'; +import { Compiler, compilation } from 'webpack'; import { RawSource } from 'webpack-sources'; const parse5 = require('parse5'); @@ -19,13 +17,15 @@ export interface IndexHtmlWebpackPluginOptions { baseHref?: string; entrypoints: string[]; deployUrl?: string; + sri: boolean; } -function readFile(filename: string, compilation: any): Promise { +function readFile(filename: string, compilation: compilation.Compilation): Promise { return new Promise((resolve, reject) => { compilation.inputFileSystem.readFile(filename, (err: Error, data: Buffer) => { if (err) { reject(err); + return; } @@ -53,23 +53,25 @@ export class IndexHtmlWebpackPlugin { input: 'index.html', output: 'index.html', entrypoints: ['polyfills', 'main'], - ...options + sri: false, + ...options, }; } - apply(compiler: any) { - compiler.hooks.emit.tapPromise('index-html-webpack-plugin', async (compilation: any) => { + apply(compiler: Compiler) { + compiler.hooks.emit.tapPromise('index-html-webpack-plugin', async compilation => { // Get input html file const inputContent = await readFile(this._options.input, compilation); - compilation.fileDependencies.add(this._options.input); + (compilation as compilation.Compilation & { fileDependencies: Set }) + .fileDependencies.add(this._options.input); // Get all files for selected entrypoints - const unfilteredSortedFiles: string[] = []; + let unfilteredSortedFiles: string[] = []; for (const entryName of this._options.entrypoints) { const entrypoint = compilation.entrypoints.get(entryName); - if (entrypoint) { - unfilteredSortedFiles.push(...entrypoint.getFiles()); + if (entrypoint && entrypoint.getFiles) { + unfilteredSortedFiles = unfilteredSortedFiles.concat(entrypoint.getFiles() || []); } } @@ -116,13 +118,25 @@ export class IndexHtmlWebpackPlugin { } for (const script of scripts) { + const attrs = [ + { name: 'type', value: 'text/javascript' }, + { name: 'src', value: (this._options.deployUrl || '') + script }, + ]; + if (this._options.sri) { + const algo = 'sha384'; + const hash = createHash(algo) + .update(compilation.assets[script].source(), 'utf8') + .digest('base64'); + attrs.push( + { name: 'integrity', value: `${algo}-${hash}` }, + { name: 'crossorigin', value: 'anonymous' }, + ); + } + const element = treeAdapter.createElement( 'script', undefined, - [ - { name: 'type', value: 'text/javascript' }, - { name: 'src', value: (this._options.deployUrl || '') + script }, - ] + attrs, ); treeAdapter.appendChild(bodyElement, element); } @@ -143,7 +157,7 @@ export class IndexHtmlWebpackPlugin { undefined, [ { name: 'href', value: this._options.baseHref }, - ] + ], ); treeAdapter.appendChild(headElement, element); } else { @@ -168,7 +182,7 @@ export class IndexHtmlWebpackPlugin { [ { name: 'rel', value: 'stylesheet' }, { name: 'href', value: (this._options.deployUrl || '') + stylesheet }, - ] + ], ); treeAdapter.appendChild(headElement, element); } diff --git a/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts index c619e87f86..1539eddef6 100644 --- a/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/subresource-integrity_spec_large.ts @@ -17,8 +17,7 @@ describe('Browser Builder subresource integrity', () => { beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - // TODO: WEBPACK4_DISABLED - disabled pending a webpack 4 version - xit('works', (done) => { + it('works', (done) => { host.writeMultipleFiles({ 'src/my-js-file.js': `console.log(1); export const a = 2;`, 'src/main.ts': `import { a } from './my-js-file'; console.log(a);`, From 6e736009681b61face0e7ecd9465953ffea55652 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 27 Apr 2018 17:59:12 -0700 Subject: [PATCH 529/724] fix(@angular-devkit/schematics): use correct command on yarn --- .../schematics/tasks/node-package/executor.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index 3b008f7972..ff6f5b986e 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -14,15 +14,22 @@ import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options type PackageManagerProfile = { quietArgument?: string; + commands: { [name: string]: string }, }; const packageManagers: { [name: string]: PackageManagerProfile } = { 'npm': { quietArgument: '--quiet', + commands: { }, }, - 'cnpm': { }, + 'cnpm': { + commands: { }, + }, 'yarn': { quietArgument: '--silent', + commands: { + 'install': 'add', + }, }, }; @@ -61,7 +68,9 @@ export default function( shell: true, cwd: path.join(rootDirectory, options.workingDirectory || ''), }; - const args = [ options.command ]; + const args = [ + taskPackageManagerProfile.commands[options.command] || options.command, + ]; if (options.packageName) { args.push(options.packageName); From c827938d313b6ad2e8a28092acd11bc16dd8fb1e Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 27 Apr 2018 14:52:40 -0700 Subject: [PATCH 530/724] ci: update hoek version or packages in between to latest. Fixes angular/angular-cli#10480 --- package-lock.json | 18264 +++++++--------- package.json | 7 +- .../angular_devkit/build_angular/package.json | 3 +- .../build_angular/test/utils/request.ts | 51 +- packages/angular_devkit/core/package.json | 2 +- 5 files changed, 8253 insertions(+), 10074 deletions(-) diff --git a/package-lock.json b/package-lock.json index da9414d5bc..c2473d5824 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,6 @@ "integrity": "sha512-dJAqLU8kTkW6W84q0VH5oX06CwMX4VXKokn2sMqboOZ5iHkZWfA+lO6wTjS+1pQ2jJ4EOc2HSyBovdGo7jPbLQ==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/cdk": { @@ -24,7 +17,7 @@ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.0.0-rc.1.tgz", "integrity": "sha512-V4nJwF9uchgqi1noRSd/Jm0mZ9yzFFeYzZ5mHZ7scXo0c2sXpEclsEjsnzb6YQo4NENEig8qrjOdYI+M7bd5zQ==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" } }, "@angular/common": { @@ -33,13 +26,6 @@ "integrity": "sha512-1NKIKHz7Zqt+OOOp6lF4w/O2/iKjhhYEYpjYG7MRzwQOJmSzxK2KEpw2m80I+rF/SqGakZ46MPthAwa9XC2IBw==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/compiler": { @@ -48,13 +34,6 @@ "integrity": "sha512-Re2oVZd2HRwkbuu5OR1pkgf3vIUZwzezLuOv/NzRgEY/v67cCeYit16Eg/0iGnwLybD3ptqrBtMls1X/ydssZA==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/compiler-cli": { @@ -66,6 +45,24 @@ "minimist": "1.2.0", "reflect-metadata": "0.1.12", "tsickle": "0.27.5" + }, + "dependencies": { + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + } } }, "@angular/core": { @@ -74,13 +71,6 @@ "integrity": "sha512-2pZ0HgLBU5BcR8+S1Ju0FLMG15W0TgVS1I7AWE+CO/4TYDsC8/WYfQFuPNZvqwEU6M9yedWKjaNQB/Xzb32Sqg==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/http": { @@ -89,13 +79,6 @@ "integrity": "sha512-PNGL4MJ71KD3nWyRsr6SQTRhmAuuwpPFB9O29ibbwGcRvJ9d2RHlvL34GEeduNhD8RzuVV0R4DbpZv8D1F+IIA==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/material": { @@ -103,7 +86,7 @@ "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-rc.1.tgz", "integrity": "sha512-53ak9Oi3BJN0ZaYoqWHtgm0dXkmjkZrCWeOuJFy2nM0NtWObv2SUYMd7bss7bSX0GlU/gQD+aBrHF40RwfQjQw==", "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" } }, "@angular/platform-browser": { @@ -112,13 +95,6 @@ "integrity": "sha512-65B6mC3qkMCl7iDI8q8t7N9yj6i4gTStupi5j4VeB0TRTnlAnXBFM3fiy43svVyuQE42qVO0MrJQ3wleJmUN5g==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/platform-browser-dynamic": { @@ -127,13 +103,6 @@ "integrity": "sha512-FvOyyhSLbFPtR1YsWX3UI7QoHutUjHE68ilcm0DVL2IOKiop7ofGHyBlUcHuy4JEWzqzHQYtXVDDk2jfI+gTMA==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/platform-server": { @@ -144,13 +113,6 @@ "domino": "2.0.2", "tslib": "1.9.0", "xhr2": "0.1.4" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/router": { @@ -159,13 +121,6 @@ "integrity": "sha512-8IREGDhMVMai8l8AxlIujR2dtkEW4QKQ6Ifv5zd2R2fLEIIsGBSe+jahPpZNKAOc3Nt74HJ1gA96exFPLp0DnQ==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@angular/service-worker": { @@ -174,13 +129,6 @@ "integrity": "sha512-8d+mhADeUt/H0Um9AwqTmBfM3ZS1EA3Bk+qf1JfGAubPrREEWx97P2Lwa7OgY+w/D5JjWbWiNDWE1SsKcSPQiQ==", "requires": { "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } } }, "@ngtools/json-schema": { @@ -197,12 +145,12 @@ } }, "@types/body-parser": { - "version": "1.16.8", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz", - "integrity": "sha512-BdN2PXxOFnTXFcyONPW6t0fHjz2fvRZHVMFpaS0wYr+Y8fWEaNOs4V8LEu/fpzQlMx+ahdndgTaGTwPC+J/EeA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", + "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", "requires": { - "@types/express": "4.11.1", - "@types/node": "8.9.3" + "@types/connect": "3.4.32", + "@types/node": "8.10.10" } }, "@types/caseless": { @@ -210,13 +158,21 @@ "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.1.tgz", "integrity": "sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A==" }, + "@types/connect": { + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", + "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", + "requires": { + "@types/node": "8.10.10" + } + }, "@types/copy-webpack-plugin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz", - "integrity": "sha512-+R4A5pYLCUhchrZdmTt9FRhtHAACxkgtENPTrciuSlk9+bloMqKAri97+41rbNlboAuV9OQLjz90aTvbzR/S+A==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", + "integrity": "sha512-fX0dYslF2/WowV3vbsOYdn7GGYKLnX3bq7exG7qWVSmA/EsDYcMAvktTJY+xLbGfE/CouwWPns+ljMGCe4FCRA==", "requires": { "@types/minimatch": "3.0.3", - "@types/webpack": "4.1.3" + "@types/webpack": "4.1.4" } }, "@types/estree": { @@ -225,16 +181,16 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" }, "@types/events": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", - "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" }, "@types/express": { "version": "4.11.1", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz", "integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==", "requires": { - "@types/body-parser": "1.16.8", + "@types/body-parser": "1.17.0", "@types/express-serve-static-core": "4.11.1", "@types/serve-static": "1.13.1" } @@ -244,8 +200,8 @@ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz", "integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==", "requires": { - "@types/events": "1.1.0", - "@types/node": "8.9.3" + "@types/events": "1.2.0", + "@types/node": "8.10.10" } }, "@types/form-data": { @@ -253,36 +209,36 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "8.9.3" + "@types/node": "8.10.10" } }, "@types/glob": { - "version": "5.0.34", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", - "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", + "version": "5.0.35", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", + "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", "requires": { - "@types/events": "1.1.0", + "@types/events": "1.2.0", "@types/minimatch": "3.0.3", - "@types/node": "8.9.3" + "@types/node": "8.10.10" } }, "@types/istanbul": { - "version": "0.4.29", - "resolved": "https://registry.npmjs.org/@types/istanbul/-/istanbul-0.4.29.tgz", - "integrity": "sha1-KcjLt0esVygJZVRdxYUUug27ma8=" + "version": "0.4.30", + "resolved": "https://registry.npmjs.org/@types/istanbul/-/istanbul-0.4.30.tgz", + "integrity": "sha512-+hQU4fh2G96ze78uI5/V6+SRDZD1UnVrFn23i2eDetwfbBq3s0/zYP92xj/3qyvVMM3WnvS88N56zjz+HmL04A==" }, "@types/jasmine": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.3.tgz", - "integrity": "sha512-BN0ho2/U55Td9k8RT2KqonDNmWZHTl1crIk8GIh+xNeCw8A60GMCIKN5a6u/Voz3pF3zzl3Ui+ldGrGxCSsYQw==" + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.6.tgz", + "integrity": "sha512-clg9raJTY0EOo5pVZKX3ZlMjlYzVU73L71q5OV1jhE2Uezb7oF94jh4CvwrW6wInquQAdhOxJz5VDF2TLUGmmA==" }, "@types/loader-utils": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.3.tgz", "integrity": "sha512-euKGFr2oCB3ASBwG39CYJMR3N9T0nanVqXdiH7Zu/Nqddt6SmFRxytq/i2w9LQYNQekEtGBz+pE3qG6fQTNvRg==", "requires": { - "@types/node": "8.9.3", - "@types/webpack": "4.1.3" + "@types/node": "8.10.10", + "@types/webpack": "4.1.4" } }, "@types/mime": { @@ -301,9 +257,9 @@ "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" }, "@types/node": { - "version": "8.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.3.tgz", - "integrity": "sha512-wqrPE4Uvj2fmL0E5JFQiY7D/5bAKvVUfWTnQ5NEV35ULkAU0j3QuqIi9Qyrytz8M5hsrh8Kijt+FsdLQaZR+IA==" + "version": "8.10.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.10.tgz", + "integrity": "sha512-p3W/hFzQs76RlYRIZsZc5a9bht6m0TspmWYYbKhRswmLnwj9fsE40EbuGifeu/XWR/c0UJQ1DDbvTxIsm/OOAA==" }, "@types/q": { "version": "0.0.32", @@ -317,7 +273,7 @@ "requires": { "@types/caseless": "0.12.1", "@types/form-data": "2.2.1", - "@types/node": "8.9.3", + "@types/node": "8.10.10", "@types/tough-cookie": "2.3.2" } }, @@ -327,9 +283,9 @@ "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==" }, "@types/semver": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.4.0.tgz", - "integrity": "sha512-PBHCvO98hNec9A491vBbh0ZNDOVxccwKL1u2pm6fs9oDgm7SEnw0lEHqHfjsYryDxnE3zaf7LvERWEXjOp1hig==" + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" }, "@types/serve-static": { "version": "1.13.1", @@ -376,11 +332,11 @@ } }, "@types/webpack": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.1.3.tgz", - "integrity": "sha512-NoGVTCumOsyFfuy3934f3ktiJi+wcXHJFxT47tby3iCpuo6M/WjFA9VqT5bYO+FE46i3R0N00RpJX75HxHKDaQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.1.4.tgz", + "integrity": "sha512-/4sQPb5QVB3kYWaNRoFmVrCkWI+PEuHPACXE79RUx/igiVd72x7hHlA7SCql9QbnjBEUEjYtpSjFDu65gybcWQ==", "requires": { - "@types/node": "8.9.3", + "@types/node": "8.10.10", "@types/tapable": "1.0.2", "@types/uglify-js": "3.0.2", "source-map": "0.6.1" @@ -398,7 +354,7 @@ "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.4.tgz", "integrity": "sha512-IMdz6ipvym7Vag2a1pkfGqONZDE84+RRqeAZxGEFvBq2el82ymla4qvUVQt6+Kj+3OLRDeHnc2jCiSYAlPnHCw==", "requires": { - "@types/node": "8.9.3", + "@types/node": "8.10.10", "@types/source-list-map": "0.1.2", "source-map": "0.6.1" }, @@ -425,18 +381,18 @@ "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" }, "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { - "mime-types": "2.1.17", + "mime-types": "2.1.18", "negotiator": "0.6.1" } }, "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -444,21 +400,8 @@ "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "requires": { "acorn": "5.5.3" - }, - "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" - } } }, - "addressparser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", - "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", - "optional": true - }, "adm-zip": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", @@ -490,7 +433,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", "requires": { - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1", "uri-js": "3.0.2" @@ -564,9 +507,9 @@ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { "color-convert": "1.9.1" } @@ -604,15 +547,22 @@ "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "requires": { "delegates": "1.0.0", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { "sprintf-js": "1.0.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + } } }, "arr-diff": { @@ -644,9 +594,9 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" }, "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-ify": { "version": "1.0.0", @@ -659,7 +609,7 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "requires": { "define-properties": "1.1.2", - "es-abstract": "1.10.0" + "es-abstract": "1.11.0" } }, "array-map": { @@ -716,13 +666,13 @@ "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "asn1.js": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", - "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "requires": { "bn.js": "4.11.8", "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "minimalistic-assert": "1.0.1" } }, "assert": { @@ -734,29 +684,15 @@ } }, "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, - "ast-types": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz", - "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==", - "optional": true - }, - "astw": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", - "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", - "requires": { - "acorn": "4.0.13" - } - }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", @@ -772,52 +708,38 @@ "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=" }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", - "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "autoprefixer": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.1.0.tgz", - "integrity": "sha512-b6mjq6VZ0guW6evRkKXL5sSSvIXICAE9dyWReZ3l/riidU7bVaJMe5cQ512SmaLA4Pvgnhi5MFsMs/Mvyh9//Q==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.3.0.tgz", + "integrity": "sha512-HY2K4efAvC97v6j83pgV97Lieal51xhIV8EitvS4SrWcI+IGVZgjpihvXImsmIUzA6kb/tglPKzERG1oRFOvRA==", "requires": { - "browserslist": "3.1.2", - "caniuse-lite": "1.0.30000813", + "browserslist": "3.2.6", + "caniuse-lite": "1.0.30000830", "normalize-range": "0.1.2", "num2fraction": "1.2.2", - "postcss": "6.0.19", + "postcss": "6.0.21", "postcss-value-parser": "3.3.0" } }, "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "axios": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", - "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", - "optional": true, - "requires": { - "follow-redirects": "1.0.0" - } + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" }, "babel-code-frame": { "version": "6.26.0", @@ -854,16 +776,16 @@ } }, "babel-generator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "requires": { "babel-messages": "6.23.0", "babel-runtime": "6.26.0", "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.4", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" }, @@ -888,8 +810,8 @@ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.0" + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -901,7 +823,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.4" + "lodash": "4.17.10" } }, "babel-traverse": { @@ -916,8 +838,8 @@ "babylon": "6.18.0", "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "invariant": "2.2.4", + "lodash": "4.17.10" } }, "babel-types": { @@ -927,7 +849,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.4", + "lodash": "4.17.10", "to-fast-properties": "1.0.3" } }, @@ -1012,9 +934,9 @@ "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" }, "base64-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "base64id": { "version": "1.0.0", @@ -1053,37 +975,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" }, - "bl": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", - "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", - "optional": true, - "requires": { - "readable-stream": "2.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "optional": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "optional": true - } - } - }, "blob": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", @@ -1123,20 +1014,13 @@ "bytes": "3.0.0", "content-type": "1.0.4", "debug": "2.6.9", - "depd": "1.1.1", - "http-errors": "1.6.2", + "depd": "1.1.2", + "http-errors": "1.6.3", "iconv-lite": "0.4.19", "on-finished": "2.3.0", "qs": "6.5.1", "raw-body": "2.3.2", - "type-is": "1.6.15" - }, - "dependencies": { - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - } + "type-is": "1.6.16" } }, "bonjour": { @@ -1150,6 +1034,13 @@ "dns-txt": "2.0.2", "multicast-dns": "6.2.3", "multicast-dns-service-types": "1.1.0" + }, + "dependencies": { + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=" + } } }, "boolbase": { @@ -1158,17 +1049,17 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "hoek": "2.16.3" + "hoek": "4.2.1" } }, "bootstrap": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0.tgz", - "integrity": "sha512-gulJE5dGFo6Q61V/whS6VM4WIyrlydXfCgkE+Gxe5hjrJ8rXLLZlALq7zq2RPhOc45PSwQpJkrTnc2KgD6cvmA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.0.tgz", + "integrity": "sha512-kCo82nE8qYVfOa/Z3hL98CPgPIEkh6iPdiJrUJMQ9n9r0+6PEET7cmhLlV0XVYmEj5QtKIOaSGMLxy5jSFhKog==" }, "boxen": { "version": "1.3.0", @@ -1219,9 +1110,9 @@ } }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" @@ -1242,146 +1133,33 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "browser-pack": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", - "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", - "requires": { - "JSONStream": "1.3.2", - "combine-source-map": "0.7.2", - "defined": "1.0.0", - "through2": "2.0.3", - "umd": "3.0.1" - } - }, - "browser-resolve": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", - "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - } - } - }, - "browserify": { - "version": "14.5.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", - "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", - "requires": { - "JSONStream": "1.3.2", - "assert": "1.4.1", - "browser-pack": "6.0.2", - "browser-resolve": "1.11.2", - "browserify-zlib": "0.2.0", - "buffer": "5.0.8", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "defined": "1.0.0", - "deps-sort": "2.0.0", - "domain-browser": "1.1.7", - "duplexer2": "0.1.4", - "events": "1.1.1", - "glob": "7.1.2", - "has": "1.0.1", - "htmlescape": "1.1.1", - "https-browserify": "1.0.0", - "inherits": "2.0.3", - "insert-module-globals": "7.0.1", - "labeled-stream-splicer": "2.0.0", - "module-deps": "4.1.1", - "os-browserify": "0.3.0", - "parents": "1.0.1", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "read-only-stream": "2.0.0", - "readable-stream": "2.3.3", - "resolve": "1.5.0", - "shasum": "1.0.2", - "shell-quote": "1.6.1", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "1.0.3", - "subarg": "1.0.0", - "syntax-error": "1.3.0", - "through2": "2.0.3", - "timers-browserify": "1.4.2", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", - "vm-browserify": "0.0.4", - "xtend": "4.0.1" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - } - } - }, "browserify-aes": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", - "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "1.0.3", "cipher-base": "1.0.4", - "create-hash": "1.1.3", + "create-hash": "1.2.0", "evp_bytestokey": "1.0.3", "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "requires": { - "browserify-aes": "1.1.1", - "browserify-des": "1.0.0", + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", "evp_bytestokey": "1.0.3" } }, "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", "requires": { "cipher-base": "1.0.4", "des.js": "1.0.0", @@ -1394,7 +1172,7 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { "bn.js": "4.11.8", - "randombytes": "2.0.5" + "randombytes": "2.0.6" } }, "browserify-sign": { @@ -1404,11 +1182,11 @@ "requires": { "bn.js": "4.11.8", "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", "elliptic": "6.4.0", "inherits": "2.0.3", - "parse-asn1": "5.1.0" + "parse-asn1": "5.1.1" } }, "browserify-zlib": { @@ -1420,21 +1198,22 @@ } }, "browserslist": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.1.2.tgz", - "integrity": "sha512-iO5MiK7MZXejqfnCK8onktxxb+mcW+KMiL/5gGF/UCWvVgPzbgbkA5cyYfqj/IIHHo7X1z0znrSHPw9AIfpvrw==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.6.tgz", + "integrity": "sha512-XCsMSg9V4S1VRdcp265dJ+8kBRjfuFXcavbisY7G6T9QI0H1Z24PP53vvs0WDYWqm38Mco1ILDtafcS8ZR4xiw==", "requires": { - "caniuse-lite": "1.0.30000813", - "electron-to-chromium": "1.3.37" + "caniuse-lite": "1.0.30000830", + "electron-to-chromium": "1.3.44" } }, "buffer": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz", - "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8" + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" } }, "buffer-crc32": { @@ -1457,21 +1236,6 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, - "buildmail": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", - "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", - "optional": true, - "requires": { - "addressparser": "1.0.1", - "libbase64": "0.1.0", - "libmime": "3.0.0", - "libqp": "1.1.0", - "nodemailer-fetch": "1.6.0", - "nodemailer-shared": "1.1.0", - "punycode": "1.4.1" - } - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -1501,7 +1265,7 @@ "chownr": "1.0.1", "glob": "7.1.2", "graceful-fs": "4.1.11", - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "mississippi": "2.0.0", "mkdirp": "0.5.1", "move-concurrently": "1.0.1", @@ -1510,16 +1274,6 @@ "ssri": "5.3.0", "unique-filename": "1.1.0", "y18n": "4.0.0" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - } } }, "cache-base": { @@ -1552,41 +1306,10 @@ "requires": { "loader-utils": "1.1.0", "mkdirp": "0.5.1", - "neo-async": "2.5.0", + "neo-async": "2.5.1", "schema-utils": "0.4.5" - }, - "dependencies": { - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "ajv-keywords": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", - "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=" - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.2.0", - "ajv-keywords": "3.1.0" - } - } } }, - "cached-path-relative": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", - "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=" - }, "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -1602,23 +1325,32 @@ } }, "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "optional": true }, "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "4.1.0", + "map-obj": "2.0.0", + "quick-lru": "1.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + } } }, "caniuse-lite": { - "version": "1.0.30000813", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000813.tgz", - "integrity": "sha512-A8ITSmH5SFdMFdC704ggjg+x2z5PzQmVlG8tavwnfvbC33Q1UYrj0+G+Xm0SNAnd4He36fwUE/KEWytOEchw+A==" + "version": "1.0.30000830", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz", + "integrity": "sha512-yMqGkujkoOIZfvOYiWdqPALgY/PVGiqCHUJb6yNq7xhI/pR+gQO0U2K6lRDqAiJv4+CIU3CtTLblNGw0QGnr6g==" }, "capture-stack-trace": { "version": "1.0.0", @@ -1645,7 +1377,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", "requires": { - "ansi-styles": "3.2.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", "supports-color": "4.5.0" }, @@ -1666,3690 +1398,1253 @@ } }, "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", "requires": { - "anymatch": "1.3.2", + "anymatch": "2.0.0", "async-each": "1.0.1", - "fsevents": "1.1.3", - "glob-parent": "2.0.0", + "braces": "2.3.2", + "fsevents": "1.2.3", + "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", - "is-glob": "2.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" - }, - "chrome-trace-event": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", - "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==" - }, - "ci-info": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", - "integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==" - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - }, - "circular-dependency-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", - "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==" - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } - } - }, - "clean-css": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", - "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", - "requires": { - "source-map": "0.5.7" - } - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=" - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "optional": true, - "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "optional": true - } - } - }, - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "requires": { - "for-own": "1.0.0", - "is-plain-object": "2.0.4", - "kind-of": "6.0.2", - "shallow-clone": "1.0.0" + "readdirp": "2.1.0", + "upath": "1.0.5" }, "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "for-in": "1.0.2" + "micromatch": "3.1.10", + "normalize-path": "2.1.1" } }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "codelyzer": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.2.1.tgz", - "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", - "requires": { - "app-root-path": "2.0.1", - "css-selector-tokenizer": "0.7.0", - "cssauron": "1.4.0", - "semver-dsl": "1.0.1", - "source-map": "0.5.7", - "sprintf-js": "1.0.3" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" - } - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" - }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "requires": { - "lodash": "4.17.4" - } - }, - "combine-source-map": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", - "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", - "requires": { - "convert-source-map": "1.1.3", - "inline-source-map": "0.6.2", - "lodash.memoize": "3.0.4", - "source-map": "0.5.7" - }, - "dependencies": { - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" - } - } - }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "compare-func": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", - "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", - "requires": { - "array-ify": "1.0.0", - "dot-prop": "3.0.0" - } - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" - }, - "compressible": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", - "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", - "requires": { - "mime-db": "1.33.0" - }, - "dependencies": { - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - } - } - }, - "compression": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", - "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", - "requires": { - "accepts": "1.3.5", - "bytes": "3.0.0", - "compressible": "2.0.13", - "debug": "2.6.9", - "on-headers": "1.0.1", - "safe-buffer": "5.1.1", - "vary": "1.1.2" - }, - "dependencies": { - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "requires": { - "mime-types": "2.1.18", - "negotiator": "0.6.1" - } + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "mime-db": "1.33.0" - } - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" - } - }, - "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", - "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.2.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" - }, - "dependencies": { - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "requires": { - "is-obj": "1.0.1" - } - } - } - }, - "connect": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz", - "integrity": "sha1-+43ee6B2OHfQ7J352sC0tA5yx9o=", - "requires": { - "debug": "2.6.9", - "finalhandler": "1.0.6", - "parseurl": "1.3.2", - "utils-merge": "1.0.1" - } - }, - "connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=" - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "requires": { - "date-now": "0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "conventional-changelog": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.7.tgz", - "integrity": "sha1-kVGmKx2O2y2CcR2r9bfPcQQfgrE=", - "requires": { - "conventional-changelog-angular": "1.6.0", - "conventional-changelog-atom": "0.1.2", - "conventional-changelog-codemirror": "0.2.1", - "conventional-changelog-core": "1.9.5", - "conventional-changelog-ember": "0.2.10", - "conventional-changelog-eslint": "0.2.1", - "conventional-changelog-express": "0.2.1", - "conventional-changelog-jquery": "0.1.0", - "conventional-changelog-jscs": "0.1.0", - "conventional-changelog-jshint": "0.2.1" - } - }, - "conventional-changelog-angular": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.0.tgz", - "integrity": "sha1-CiagcfLJ/PzyuGugz79uYwG3W/o=", - "requires": { - "compare-func": "1.3.2", - "q": "1.5.1" - } - }, - "conventional-changelog-atom": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.1.2.tgz", - "integrity": "sha1-Ella1SZ6aTfDTPkAKBscZRmKTGM=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-codemirror": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.1.tgz", - "integrity": "sha1-KZpPcUe681DmyBWPxUlUopHFzAk=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-core": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-1.9.5.tgz", - "integrity": "sha1-XbdWba18DLddr0f7spdve/mSjB0=", - "requires": { - "conventional-changelog-writer": "2.0.3", - "conventional-commits-parser": "2.1.0", - "dateformat": "1.0.12", - "get-pkg-repo": "1.4.0", - "git-raw-commits": "1.3.0", - "git-remote-origin-url": "2.0.0", - "git-semver-tags": "1.2.3", - "lodash": "4.17.4", - "normalize-package-data": "2.4.0", - "q": "1.5.1", - "read-pkg": "1.1.0", - "read-pkg-up": "1.0.1", - "through2": "2.0.3" - } - }, - "conventional-changelog-ember": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.2.10.tgz", - "integrity": "sha512-LBBBZO6Q7ib4HhSdyCNVR25OtaXl710UJg1aSHCLmR8AjuXKs3BO8tnbY1MH+D1C+z5IFoEDkpjOddefNTyhCQ==", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-eslint": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.1.tgz", - "integrity": "sha1-LCoRvrIW+AZJunKDQYApO2h8BmI=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-express": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.2.1.tgz", - "integrity": "sha1-g42eHmyQmXA7FQucGaoteBdCvWw=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-jquery": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", - "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-jscs": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", - "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-jshint": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.1.tgz", - "integrity": "sha1-hhObs6yZiZ8rF36WF+CbN9mbzzo=", - "requires": { - "compare-func": "1.3.2", - "q": "1.5.1" - } - }, - "conventional-changelog-writer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-2.0.3.tgz", - "integrity": "sha512-2E1h7UXL0fhRO5h0CxDZ5EBc5sfBZEQePvuZ+gPvApiRrICUyNDy/NQIP+2TBd4wKZQf2Zm7TxbzXHG5HkPIbA==", - "requires": { - "compare-func": "1.3.2", - "conventional-commits-filter": "1.1.1", - "dateformat": "1.0.12", - "handlebars": "4.0.11", - "json-stringify-safe": "5.0.1", - "lodash": "4.17.4", - "meow": "3.7.0", - "semver": "5.4.1", - "split": "1.0.1", - "through2": "2.0.3" - } - }, - "conventional-commits-filter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.1.tgz", - "integrity": "sha512-bQyatySNKHhcaeKVr9vFxYWA1W1Tdz6ybVMYDmv4/FhOXY1+fchiW07TzRbIQZhVa4cvBwrEaEUQBbCncFSdJQ==", - "requires": { - "is-subset": "0.1.1", - "modify-values": "1.0.0" - } - }, - "conventional-commits-parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.0.tgz", - "integrity": "sha512-8MD05yN0Zb6aRsZnFX1ET+8rHWfWJk+my7ANCJZBU2mhz7TSB1fk2vZhkrwVy/PCllcTYAP/1T1NiWQ7Z01mKw==", - "requires": { - "JSONStream": "1.3.2", - "is-text-path": "1.0.1", - "lodash": "4.17.4", - "meow": "3.7.0", - "split2": "2.2.0", - "through2": "2.0.3", - "trim-off-newlines": "1.0.1" - } - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "requires": { - "aproba": "1.2.0", - "fs-write-stream-atomic": "1.0.10", - "iferr": "0.1.5", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - } - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "copy-webpack-plugin": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", - "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", - "requires": { - "cacache": "10.0.4", - "find-cache-dir": "1.0.0", - "globby": "7.1.1", - "is-glob": "4.0.0", - "loader-utils": "1.1.0", - "minimatch": "3.0.4", - "p-limit": "1.2.0", - "serialize-javascript": "1.5.0" - }, - "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "2.1.1" - } - } - } - }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cosmiconfig": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", - "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", - "requires": { - "is-directory": "0.3.1", - "js-yaml": "3.10.0", - "minimist": "1.2.0", - "object-assign": "4.1.1", - "os-homedir": "1.0.2", - "parse-json": "2.2.0", - "require-from-string": "1.2.1" - } - }, - "cpx": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", - "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", - "requires": { - "babel-runtime": "6.26.0", - "chokidar": "1.7.0", - "duplexer": "0.1.1", - "glob": "7.1.2", - "glob2base": "0.0.12", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "resolve": "1.5.0", - "safe-buffer": "5.1.1", - "shell-quote": "1.6.1", - "subarg": "1.0.0" - } - }, - "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", - "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "requires": { - "capture-stack-trace": "1.0.0" - } - }, - "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "sha.js": "2.4.9" - } - }, - "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", - "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.9" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "requires": { - "boom": "2.10.1" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "requires": { - "browserify-cipher": "1.0.0", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", - "inherits": "2.0.3", - "pbkdf2": "3.0.14", - "public-encrypt": "4.0.0", - "randombytes": "2.0.5", - "randomfill": "1.0.3" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=" - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "requires": { - "boolbase": "1.0.0", - "css-what": "2.1.0", - "domutils": "1.5.1", - "nth-check": "1.0.1" - } - }, - "css-selector-tokenizer": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", - "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", - "requires": { - "cssesc": "0.1.0", - "fastparse": "1.1.1", - "regexpu-core": "1.0.0" - } - }, - "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" - }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", - "requires": { - "through": "2.3.8" - } - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=" - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=" - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "1.0.2" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" - }, - "dargs": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", - "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", - "optional": true - }, - "date-format": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", - "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=" - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" - }, - "date-time": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", - "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", - "requires": { - "time-zone": "1.0.0" - } - }, - "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "requires": { - "get-stdin": "4.0.1", - "meow": "3.7.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "default-require-extensions": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", - "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", - "requires": { - "strip-bom": "2.0.0" - } - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "6.0.2" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "6.0.2" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "optional": true, - "requires": { - "ast-types": "0.10.1", - "escodegen": "1.8.1", - "esprima": "3.1.3" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "optional": true - } - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.2.8" - }, - "dependencies": { - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "deps-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", - "requires": { - "JSONStream": "1.3.2", - "shasum": "1.0.2", - "subarg": "1.0.0", - "through2": "2.0.3" - } - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "requires": { - "repeating": "2.0.1" - } - }, - "detect-node": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", - "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=" - }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "requires": { - "acorn": "5.4.1", - "defined": "1.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==" - } - } - }, - "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", - "dev": true, - "requires": { - "asap": "2.0.6", - "wrappy": "1.0.2" - } - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=" - }, - "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==" - }, - "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", - "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.5" - } - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "requires": { - "arrify": "1.0.1", - "path-type": "3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "requires": { - "ip": "1.1.5", - "safe-buffer": "5.1.1" - }, - "dependencies": { - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - } - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "requires": { - "buffer-indexof": "1.1.1" - } - }, - "dom-converter": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", - "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", - "requires": { - "utila": "0.3.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" - } - } - }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", - "requires": { - "custom-event": "1.0.1", - "ent": "2.2.0", - "extend": "3.0.1", - "void-elements": "2.0.1" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" - } - } - }, - "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=" - }, - "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" - }, - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "requires": { - "domelementtype": "1.3.0" - } - }, - "domino": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/domino/-/domino-2.0.2.tgz", - "integrity": "sha512-vzykUakUw5s1p0RrN/vI2sShYo3pLRy/z7PM1PuOIZIlMOJ0XfOnrckGE5f4MxIQVe5XcrH7yG9mR+l77mgLVA==" - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" - } - }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", - "requires": { - "is-obj": "1.0.1" - } - }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", - "optional": true - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "requires": { - "readable-stream": "2.3.3" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "duplexify": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", - "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", - "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "ejs": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.8.tgz", - "integrity": "sha512-QIDZL54fyV8MDcAsO91BMH1ft2qGGaHIJsJIA/+t+7uvXol1dm413fPcUgUb4k8F/9457rx4/KFE4XfDifrQxQ==" - }, - "electron-to-chromium": { - "version": "1.3.37", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.37.tgz", - "integrity": "sha1-SpJzTgBEyM8LFVO+V+riGkxuX6s=" - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" - }, - "encodeurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", - "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "1.4.0" - } - }, - "engine.io": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.4.tgz", - "integrity": "sha1-PQIRtwpVLOhB/8fahiezAamkFi4=", - "requires": { - "accepts": "1.3.3", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "2.6.9", - "engine.io-parser": "2.1.1", - "uws": "0.14.5", - "ws": "3.3.2" - } - }, - "engine.io-client": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.4.tgz", - "integrity": "sha1-T88TcLRxY70s6b4nM5ckMDUNTqE=", - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "2.6.9", - "engine.io-parser": "2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "3.3.2", - "xmlhttprequest-ssl": "1.5.4", - "yeast": "0.1.2" - } - }, - "engine.io-parser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.1.tgz", - "integrity": "sha1-4Ps/DgRi9/WLt3waUun1p+JuRmg=", - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "0.0.6", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.4", - "has-binary2": "1.0.2" - } - }, - "enhanced-resolve": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", - "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", - "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "tapable": "1.0.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" - }, - "errno": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", - "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", - "requires": { - "prr": "0.0.0" - } - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "requires": { - "is-arrayish": "0.2.1" - } - }, - "es-abstract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", - "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", - "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" - } - }, - "es6-promise": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", - "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "requires": { - "esprima": "2.7.3", - "estraverse": "1.9.3", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.2.0" - }, - "dependencies": { - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "optional": true, - "requires": { - "amdefine": "1.0.1" - } - } - } - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "4.2.0" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - } - } - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" - }, - "estree-walker": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz", - "integrity": "sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "eventemitter3": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", - "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" - }, - "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", - "requires": { - "original": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.1" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - } - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "requires": { - "array-slice": "0.2.3", - "array-unique": "0.2.1", - "braces": "0.1.5" - }, - "dependencies": { - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "requires": { - "expand-range": "0.1.1" - } - }, - "expand-range": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "requires": { - "is-number": "0.1.1", - "repeat-string": "0.2.2" - } - }, - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=" - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=" - } - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "requires": { - "fill-range": "2.2.3" - } - }, - "express": { - "version": "4.16.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", - "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", - "requires": { - "accepts": "1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.2", - "content-disposition": "0.5.2", - "content-type": "1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "1.1.1", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.1", - "finalhandler": "1.1.0", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "1.1.2", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.3", - "qs": "6.5.1", - "range-parser": "1.2.0", - "safe-buffer": "5.1.1", - "send": "0.16.1", - "serve-static": "1.13.1", - "setprototypeof": "1.1.0", - "statuses": "1.3.1", - "type-is": "1.6.15", - "utils-merge": "1.0.1", - "vary": "1.1.2" - }, - "dependencies": { - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "requires": { - "mime-types": "2.1.18", - "negotiator": "0.6.1" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "requires": { - "debug": "2.6.9", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" - } - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" - } - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "2.0.4" - } - } - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "1.0.0" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fastparse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", - "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=" - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "requires": { - "websocket-driver": "0.7.0" - } - }, - "file-loader": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", - "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", - "requires": { - "loader-utils": "1.1.0", - "schema-utils": "0.4.5" - }, - "dependencies": { - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.2.0", - "ajv-keywords": "3.1.0" - } - } - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "optional": true - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "requires": { - "glob": "7.1.2", - "minimatch": "3.0.4" - } - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "finalhandler": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", - "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", - "requires": { - "debug": "2.6.9", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" - }, - "dependencies": { - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" - } - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "requires": { - "commondir": "1.0.1", - "make-dir": "1.2.0", - "pkg-dir": "2.0.0" - } - }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" - }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "follow-redirects": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", - "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", - "optional": true, - "requires": { - "debug": "2.6.9" - } - }, - "font-awesome": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", - "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "requires": { - "for-in": "1.0.2" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "requires": { - "null-check": "1.0.0" - } - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "requires": { - "graceful-fs": "4.1.11", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "readable-stream": "2.3.3" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "optional": true, - "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "optional": true, - "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } } } }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "glob": "7.1.2" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "hoek": "2.16.3" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "optional": true, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } } } }, - "string-width": { - "version": "1.0.2", - "bundled": true, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "2.1.1" + } + } } }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "safe-buffer": "5.0.1" + "kind-of": "6.0.2" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "ansi-regex": "2.1.1" + "kind-of": "6.0.2" } }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "optional": true, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "punycode": "1.4.1" + "is-extglob": "2.1.1" } }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "optional": true, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "safe-buffer": "5.0.1" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { + "isobject": { "version": "3.0.1", - "bundled": true, - "optional": true + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, - "verror": { - "version": "1.3.6", - "bundled": true, - "optional": true, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" + }, + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==" + }, + "ci-info": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.2" + } + }, + "circular-dependency-plugin": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", + "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==" + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "extsprintf": "1.0.2" + "is-descriptor": "0.1.6" } }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "optional": true, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "clean-css": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", + "requires": { + "source-map": "0.5.7" + } + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "optional": true + } + } + }, + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" + }, + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "requires": { + "for-own": "1.0.0", + "is-plain-object": "2.0.4", + "kind-of": "6.0.2", + "shallow-clone": "1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "requires": { - "string-width": "1.0.2" + "for-in": "1.0.2" } }, - "wrappy": { - "version": "1.0.2", - "bundled": true + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "codelyzer": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.3.0.tgz", + "integrity": "sha512-RLMrtLwrBS0dfo2/KTP+2NHofCpzcuh0bEp/A/naqvQonbUL4AW/qWQdbpn8dMNudtpmzEx9eS8KEpGdVPg1BA==", + "requires": { + "app-root-path": "2.0.1", + "css-selector-tokenizer": "0.7.0", + "cssauron": "1.4.0", + "semver-dsl": "1.0.1", + "source-map": "0.5.7", + "sprintf-js": "1.1.1" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.2.8" + "color-name": "1.1.3" } }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "optional": true, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + }, + "combine-lists": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", + "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", + "requires": { + "lodash": "4.17.10" + } + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "requires": { + "array-ify": "1.0.0", + "dot-prop": "3.0.0" + } + }, + "compare-versions": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.1.0.tgz", + "integrity": "sha512-4hAxDSBypT/yp2ySFD346So6Ragw5xmBn/e/agIGl3bZr6DLUqnoRZPusxKrXdYRZpgexO9daejmIenlq/wrIQ==" + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" + }, + "compressible": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", + "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", + "requires": { + "mime-db": "1.33.0" + } + }, + "compression": { + "version": "1.7.2", + "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" + "accepts": "1.3.5", + "bytes": "3.0.0", + "compressible": "2.0.13", + "debug": "2.6.9", + "on-headers": "1.0.1", + "safe-buffer": "5.1.1", + "vary": "1.1.2" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "optional": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "optional": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "optional": true + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" } } }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "buffer-from": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, - "gaze": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", - "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", + "configstore": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "requires": { - "globule": "1.2.0" + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.2.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "requires": { + "is-obj": "1.0.1" + } + } } }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", "requires": { - "is-property": "1.0.2" + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "1.3.2", + "utils-merge": "1.0.1" + }, + "dependencies": { + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + } } }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=" }, - "get-pkg-repo": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", - "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "requires": { - "hosted-git-info": "2.5.0", - "meow": "3.7.0", - "normalize-package-data": "2.4.0", - "parse-github-repo-url": "1.4.1", - "through2": "2.0.3" + "date-now": "0.1.4" } }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "optional": true, - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.3" - } + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "conventional-changelog": { + "version": "1.1.24", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.24.tgz", + "integrity": "sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q==", + "requires": { + "conventional-changelog-angular": "1.6.6", + "conventional-changelog-atom": "0.2.8", + "conventional-changelog-codemirror": "0.3.8", + "conventional-changelog-core": "2.0.11", + "conventional-changelog-ember": "0.3.12", + "conventional-changelog-eslint": "1.0.9", + "conventional-changelog-express": "0.3.6", + "conventional-changelog-jquery": "0.1.0", + "conventional-changelog-jscs": "0.1.0", + "conventional-changelog-jshint": "0.3.8", + "conventional-changelog-preset-loader": "1.1.8" + } }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "conventional-changelog-angular": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", + "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } + "compare-func": "1.3.2", + "q": "1.5.1" } }, - "git-raw-commits": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.0.tgz", - "integrity": "sha1-C8hZbpDV/+c29/VUa9LRL3OrqsY=", + "conventional-changelog-atom": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz", + "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==", "requires": { - "dargs": "4.1.0", - "lodash.template": "4.4.0", - "meow": "3.7.0", - "split2": "2.2.0", - "through2": "2.0.3" + "q": "1.5.1" } }, - "git-remote-origin-url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", - "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "conventional-changelog-codemirror": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz", + "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==", "requires": { - "gitconfiglocal": "1.0.0", - "pify": "2.3.0" + "q": "1.5.1" } }, - "git-semver-tags": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.3.tgz", - "integrity": "sha1-GItFOIK/nXojr9Mbq6U32rc4jV0=", + "conventional-changelog-core": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz", + "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==", "requires": { - "meow": "3.7.0", - "semver": "5.4.1" + "conventional-changelog-writer": "3.0.9", + "conventional-commits-parser": "2.1.7", + "dateformat": "3.0.3", + "get-pkg-repo": "1.4.0", + "git-raw-commits": "1.3.6", + "git-remote-origin-url": "2.0.0", + "git-semver-tags": "1.3.6", + "lodash": "4.17.10", + "normalize-package-data": "2.4.0", + "q": "1.5.1", + "read-pkg": "1.1.0", + "read-pkg-up": "1.0.1", + "through2": "2.0.3" } }, - "gitconfiglocal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", - "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "conventional-changelog-ember": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz", + "integrity": "sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ==", "requires": { - "ini": "1.3.5" + "q": "1.5.1" } }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "conventional-changelog-eslint": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz", + "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "q": "1.5.1" } }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "conventional-changelog-express": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz", + "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==", "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "q": "1.5.1" } }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "conventional-changelog-jquery": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", + "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", "requires": { - "is-glob": "2.0.1" + "q": "1.5.1" } }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "conventional-changelog-jscs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", + "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", "requires": { - "find-index": "0.1.1" + "q": "1.5.1" } }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "conventional-changelog-jshint": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz", + "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==", "requires": { - "ini": "1.3.5" + "compare-func": "1.3.2", + "q": "1.5.1" } }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + "conventional-changelog-preset-loader": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz", + "integrity": "sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw==" }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "conventional-changelog-writer": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", + "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.7", - "pify": "3.0.0", - "slash": "1.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } + "compare-func": "1.3.2", + "conventional-commits-filter": "1.1.6", + "dateformat": "3.0.3", + "handlebars": "4.0.11", + "json-stringify-safe": "5.0.1", + "lodash": "4.17.10", + "meow": "4.0.1", + "semver": "5.5.0", + "split": "1.0.1", + "through2": "2.0.3" } }, - "globule": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", - "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", + "conventional-commits-filter": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", + "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==", "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "minimatch": "3.0.4" + "is-subset": "0.1.1", + "modify-values": "1.0.1" } }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "conventional-commits-parser": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", + "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "JSONStream": "1.3.2", + "is-text-path": "1.0.1", + "lodash": "4.17.10", + "meow": "4.0.1", + "split2": "2.2.0", + "through2": "2.0.3", + "trim-off-newlines": "1.0.1" } }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" }, - "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=" + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - } - } + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, - "har-schema": { + "copy-concurrently": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - } - } - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "requires": { - "function-bind": "1.1.1" + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - } + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, - "has-binary2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.2.tgz", - "integrity": "sha1-6D26SfC5vk0CbSc2U1DZ8D9Uvpg=", + "copy-webpack-plugin": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", + "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", "requires": { - "isarray": "2.0.1" + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "globby": "7.1.1", + "is-glob": "4.0.0", + "loader-utils": "1.1.0", + "minimatch": "3.0.4", + "p-limit": "1.2.0", + "serialize-javascript": "1.5.0" }, "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } } } }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + "core-js": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "is-directory": "0.3.1", + "js-yaml": "3.11.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "require-from-string": "1.2.1" }, "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } } } }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "cpx": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", + "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "babel-runtime": "6.26.0", + "chokidar": "1.7.0", + "duplexer": "0.1.1", + "glob": "7.1.2", + "glob2base": "0.0.12", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "resolve": "1.7.1", + "safe-buffer": "5.1.2", + "shell-quote": "1.6.1", + "subarg": "1.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "is-buffer": "1.1.6" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } } } }, - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "requires": { - "inherits": "2.0.3" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "create-ecdh": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.1.tgz", + "integrity": "sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ==", "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "bn.js": "4.11.8", + "elliptic": "6.4.0" } }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "capture-stack-trace": "1.0.0" } }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" - }, - "hipchat-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", - "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", - "optional": true, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { - "lodash": "4.17.4", - "request": "2.83.0" + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" } }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" } }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "cross-spawn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", "requires": { - "inherits": "2.0.3", - "obuf": "1.1.2", - "readable-stream": "2.3.3", - "wbuf": "1.7.3" + "lru-cache": "4.1.2", + "which": "1.3.0" } }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" - }, - "html-minifier": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.9.tgz", - "integrity": "sha512-EZqO91XJwkj8BeLx9C12sKB/AHoTANaZax39vEOP9f/X/9jgJ3r1O2+neabuHqpz5kJO71TapP9JrtCY39su1A==", + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "requires": { - "camel-case": "3.0.0", - "clean-css": "4.1.11", - "commander": "2.14.1", - "he": "1.1.1", - "ncname": "1.0.0", - "param-case": "2.1.1", - "relateurl": "0.2.7", - "uglify-js": "3.3.12" + "boom": "5.2.0" }, "dependencies": { - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "uglify-js": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.12.tgz", - "integrity": "sha512-4jxrTXlV0HaXTsNILfXW0eey7Qo8qHYM6ih5ZNh45erDWU2GHmKDmekwBTskDb12h+kdd2DBvdzqVb47YzNmTA==", + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "requires": { - "commander": "2.14.1", - "source-map": "0.6.1" + "hoek": "4.2.1" } } } }, - "html-webpack-plugin": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.0.6.tgz", - "integrity": "sha1-01sEUqrhKaip8/rEShaaYl2M8/o=", + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "requires": { - "html-minifier": "3.5.9", - "loader-utils": "0.2.17", - "lodash": "4.17.4", - "pretty-error": "2.1.1", - "tapable": "1.0.0", - "toposort": "1.0.6", - "util.promisify": "1.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" } }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.1.0", - "domutils": "1.1.6", - "readable-stream": "1.0.34" - }, - "dependencies": { - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "requires": { - "domelementtype": "1.3.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } + "css-parse": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=" + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" } }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "requires": { + "cssesc": "0.1.0", + "fastparse": "1.1.1", + "regexpu-core": "1.0.0" + } }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + }, + "cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" + "through": "2.3.8" } }, - "http-parser-js": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.11.tgz", - "integrity": "sha512-QCR5O2AjjMW8Mo4HyI1ctFcv+O99j/0g367V3YoVnrNw5hkDvAWZD0lWGcc+F4yN3V55USPCVix4efb75HxFfA==" + "cssesc": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=" }, - "http-proxy": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz", - "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=", + "cuint": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", + "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=" + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "requires": { - "eventemitter3": "1.2.0", - "requires-port": "1.0.0" + "array-find-index": "1.0.2" } }, - "http-proxy-agent": { + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + }, + "d": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" + "es5-ext": "0.10.42" } }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", "requires": { - "http-proxy": "1.16.2", - "is-glob": "4.0.0", - "lodash": "4.17.5", - "micromatch": "3.1.10" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "number-is-nan": "1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "date-time": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", + "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", + "requires": { + "time-zone": "1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "requires": { + "decamelize": "1.2.0", + "map-obj": "1.0.1" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "default-require-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "requires": { + "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } + "is-utf8": "0.2.1" } - }, + } + } + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", @@ -5376,37 +2671,6 @@ "kind-of": "6.0.2" } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -5416,1107 +2680,1834 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + } + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "2.0.1" + } + }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=" + }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "2.0.6", + "wrappy": "1.0.2" + } + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "requires": { + "arrify": "1.0.1", + "path-type": "3.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" + "ip": "1.1.5", + "safe-buffer": "5.1.2" } }, - "httpntlm": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", - "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", "requires": { - "httpreq": "0.4.24", - "underscore": "1.7.0" + "buffer-indexof": "1.1.1" } }, - "httpreq": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", - "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=" - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + "dom-converter": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "requires": { + "utila": "0.3.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" + } + } }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" + "custom-event": "1.0.1", + "ent": "2.2.0", + "extend": "3.0.1", + "void-elements": "2.0.1" } }, - "husky": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", - "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "requires": { - "is-ci": "1.1.0", - "normalize-path": "1.0.0", - "strip-indent": "2.0.0" + "domelementtype": "1.1.3", + "entities": "1.1.1" }, "dependencies": { - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" } } }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "requires": { + "domelementtype": "1.3.0" + } }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" + "domino": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/domino/-/domino-2.0.2.tgz", + "integrity": "sha512-vzykUakUw5s1p0RrN/vI2sShYo3pLRy/z7PM1PuOIZIlMOJ0XfOnrckGE5f4MxIQVe5XcrH7yG9mR+l77mgLVA==" }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "optional": true + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "requires": { + "is-obj": "1.0.1" + } }, - "import-lazy": { + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "duplexify": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", + "requires": { + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.5.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.9.tgz", + "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ==" + }, + "electron-to-chromium": { + "version": "1.3.44", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.44.tgz", + "integrity": "sha1-72sVCmDVIwgjiMra2ICF7NL9RoQ=" + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" }, - "import-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", - "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "once": "1.4.0" + } + }, + "engine.io": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.8.3.tgz", + "integrity": "sha1-jef5eJXSDTm4X4ju7nd7K9QrE9Q=", + "requires": { + "accepts": "1.3.3", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "2.3.3", + "engine.io-parser": "1.3.2", + "ws": "1.1.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + } + }, + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" + } + } + }, + "engine.io-client": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.3.tgz", + "integrity": "sha1-F5jtk0USRkU9TG9jXXogH+lA1as=", + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "2.3.3", + "engine.io-parser": "1.3.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parsejson": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "1.1.2", + "xmlhttprequest-ssl": "1.5.3", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" + } + } + }, + "engine.io-parser": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz", + "integrity": "sha1-k3sHnwAH0Ik+xW1GyyILjLQ1Igo=", + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.4", + "has-binary": "0.1.7", + "wtf-8": "1.0.0" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "tapable": "1.0.0" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=" + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "requires": { - "repeating": "2.0.1" + "prr": "1.0.1" } }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } }, - "inflection": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.10.0.tgz", - "integrity": "sha1-W//LEZetPoEFD44X4hZoCH7p6y8=", - "optional": true + "es-abstract": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", + "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.1", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" } }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "es5-ext": { + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" + } }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-symbol": "3.1.1" + } }, - "injection-js": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.2.1.tgz", - "integrity": "sha512-zHI+E+dM0PXix5FFTO1Y4/UOyAzE7zG1l/QwAn4jchTThOoBq+UYRFK4AVG7lQgFL+go62SbrzSsjXy9DFEZUg==" + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "requires": { - "source-map": "0.5.7" + "d": "1.0.0", + "es5-ext": "0.10.42" } }, - "insert-module-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", - "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "requires": { - "JSONStream": "1.3.2", - "combine-source-map": "0.7.2", - "concat-stream": "1.5.2", - "is-buffer": "1.1.6", - "lexical-scope": "1.2.0", - "process": "0.11.10", - "through2": "2.0.3", - "xtend": "4.0.1" + "esprima": "2.7.3", + "estraverse": "1.9.3", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.2.0" }, "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - } - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" + "amdefine": "1.0.1" } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, - "internal-ip": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", - "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "requires": { - "meow": "3.7.0" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + } } }, - "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { - "loose-envify": "1.3.1" + "estraverse": "4.2.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + } } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" }, - "ip": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.0.1.tgz", - "integrity": "sha1-x+NWzeoiWucbNtcPLnGpK6TkJZA=", - "optional": true + "estree-walker": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz", + "integrity": "sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao=" }, - "ipaddr.js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", - "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, - "irregular-plurals": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", - "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=" + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, - "is-accessor-descriptor": { + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "eventsource": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", "requires": { - "kind-of": "3.2.2" + "original": "1.0.0" } }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "requires": { - "binary-extensions": "1.11.0" + "md5.js": "1.3.4", + "safe-buffer": "5.1.2" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "requires": { - "builtin-modules": "1.1.1" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } } }, - "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" }, - "is-ci": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", - "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "expand-braces": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", + "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", "requires": { - "ci-info": "1.1.2" + "array-slice": "0.2.3", + "array-unique": "0.2.1", + "braces": "0.1.5" + }, + "dependencies": { + "braces": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", + "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", + "requires": { + "expand-range": "0.1.1" + } + }, + "expand-range": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", + "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", + "requires": { + "is-number": "0.1.1", + "repeat-string": "0.2.2" + } + }, + "is-number": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", + "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=" + }, + "repeat-string": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", + "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=" + } } }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "requires": { - "kind-of": "3.2.2" + "is-posix-bracket": "0.1.1" } }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "accepts": "1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "1.1.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "2.0.3", + "qs": "6.5.1", + "range-parser": "1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "1.4.0", + "type-is": "1.6.16", + "utils-merge": "1.0.1", + "vary": "1.1.2" }, "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" } } }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "is-primitive": "2.0.0" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } } }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "requires": { - "number-is-nan": "1.0.1" + "is-extglob": "1.0.0" } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "1.0.0" - } + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" - } + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, - "is-my-json-valid": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", - "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "fastparse": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=" + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" + "websocket-driver": "0.7.0" } }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=" - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "file-loader": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "requires": { - "kind-of": "3.2.2" + "loader-utils": "1.1.0", + "schema-utils": "0.4.5" } }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "requires": { - "is-number": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" - } + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" } }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "requires": { - "is-path-inside": "1.0.1" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { - "path-is-inside": "1.0.2" + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.4.0", + "unpipe": "1.0.0" } }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } + "commondir": "1.0.1", + "make-dir": "1.2.0", + "pkg-dir": "2.0.0" } }, - "is-posix-bracket": { + "find-index": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } }, - "is-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.0.tgz", - "integrity": "sha512-h37O/IX4efe56o9k41II1ECMqKwtqHa7/12dLDEzJIFux2x15an4WCDb0/eKdmUgRpLJ3bR0DrzDc7vOrVgRDw==", + "follow-redirects": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", "requires": { - "@types/estree": "0.0.38" + "debug": "3.1.0" }, "dependencies": { - "@types/estree": { - "version": "0.0.38", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.38.tgz", - "integrity": "sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA==" + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } } } }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "1.0.1" - } + "font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } }, - "is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, - "is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "text-extensions": "1.7.0" + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, - "is-utf8": { + "fragment-cache": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "0.2.2" + } }, - "isbinaryfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", - "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=" + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "requires": { - "isarray": "1.0.0" + "null-check": "1.0.0" } }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "requires": { - "abbrev": "1.0.9", - "async": "1.5.2", - "escodegen": "1.8.1", - "esprima": "2.7.3", - "glob": "5.0.15", - "handlebars": "4.0.11", - "js-yaml": "3.10.0", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "once": "1.4.0", - "resolve": "1.1.7", - "supports-color": "3.2.3", - "which": "1.3.0", - "wordwrap": "1.0.0" + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.6" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", + "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.9.1" }, "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "version": "7.1.2", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.9.1", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, "requires": { - "inflight": "1.0.6", + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.6", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + "rimraf": { + "version": "2.6.2", + "bundled": true, + "optional": true, + "requires": { + "glob": "7.1.2" + } }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - } - } - }, - "istanbul-api": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.2.1.tgz", - "integrity": "sha512-oFCwXvd65amgaPCzqrR+a2XjanS1MvpXN6l/MlMUTv6uiA1NOgGX+I0uyq8Lg3GDxsxPsaP1049krz3hIJ5+KA==", - "requires": { - "async": "2.6.0", - "fileset": "2.0.3", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "js-yaml": "3.10.0", - "mkdirp": "0.5.1", - "once": "1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "optional": true, + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, "requires": { - "lodash": "4.17.4" + "string-width": "1.0.2" } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true } } }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "requires": { - "convert-source-map": "1.5.1", - "istanbul-lib-instrument": "1.9.1", - "loader-utils": "1.1.0", - "schema-utils": "0.3.0" - }, - "dependencies": { - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" - } + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" } }, - "istanbul-lib-coverage": { + "function-bind": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", - "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==" + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, - "istanbul-lib-hook": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz", - "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "requires": { - "append-transform": "0.4.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" } }, - "istanbul-lib-instrument": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz", - "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", + "gaze": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", + "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "globule": "1.2.0" } }, - "istanbul-lib-report": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz", - "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "is-property": "1.0.2" } }, - "istanbul-lib-source-maps": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz", - "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", - "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "requires": { + "hosted-git-info": "2.6.0", + "meow": "3.7.0", + "normalize-package-data": "2.4.0", + "parse-github-repo-url": "1.4.1", + "through2": "2.0.3" }, "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "ms": "2.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "glob": "7.1.2" + "repeating": "2.0.1" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "requires": { + "get-stdin": "4.0.1" } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" } } }, - "istanbul-reports": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.3.tgz", - "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", - "requires": { - "handlebars": "4.0.11" - } + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" }, - "jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", - "requires": { - "exit": "0.1.2", - "glob": "7.1.2", - "jasmine-core": "2.8.0" - } + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" }, - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=" + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, - "jasmine-spec-reporter": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-3.3.0.tgz", - "integrity": "sha1-xjw9Q7rP0W5tqGxG0mWVfgB18Uw=", + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "colors": "1.1.2" + "assert-plus": "1.0.0" } }, - "jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=" - }, - "jquery": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", - "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" - }, - "js-base64": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", - "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + "git-raw-commits": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", + "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", + "requires": { + "dargs": "4.1.0", + "lodash.template": "4.4.0", + "meow": "4.0.1", + "split2": "2.2.0", + "through2": "2.0.3" + } }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" + "gitconfiglocal": "1.0.0", + "pify": "2.3.0" }, "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" - }, - "json-parse-better-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "optional": true, + "git-semver-tags": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", + "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==", "requires": { - "jsonify": "0.0.0" + "meow": "4.0.1", + "semver": "5.5.0" } }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", "requires": { - "graceful-fs": "4.1.11" + "ini": "1.3.5" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } + "glob-parent": "2.0.0", + "is-glob": "2.0.1" } }, - "jszip": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", - "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "requires": { - "core-js": "2.3.0", - "es6-promise": "3.0.2", - "lie": "3.1.1", - "pako": "1.0.6", - "readable-stream": "2.0.6" - }, - "dependencies": { - "core-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", - "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } + "is-glob": "2.0.1" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "requires": { + "find-index": "0.1.1" } }, - "karma": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.0.tgz", - "integrity": "sha512-K9Kjp8CldLyL9ANSUctDyxC7zH3hpqXj/K09qVf06K3T/kXaHtFZ5tQciK7OzQu68FLvI89Na510kqQ2LCbpIw==", + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "requires": { - "bluebird": "3.5.1", - "body-parser": "1.18.2", - "browserify": "14.5.0", - "chokidar": "1.7.0", - "colors": "1.1.2", - "combine-lists": "1.0.1", - "connect": "3.6.5", - "core-js": "2.5.3", - "di": "0.0.1", - "dom-serialize": "2.2.1", - "expand-braces": "0.1.2", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "http-proxy": "1.16.2", - "isbinaryfile": "3.0.2", - "lodash": "4.17.4", - "log4js": "2.3.12", - "mime": "1.6.0", - "minimatch": "3.0.4", - "optimist": "0.6.1", - "qjobs": "1.1.5", - "range-parser": "1.2.0", - "rimraf": "2.6.2", - "safe-buffer": "5.1.1", - "socket.io": "2.0.4", - "source-map": "0.6.1", - "tmp": "0.0.33", - "useragent": "2.2.1" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } + "ini": "1.3.5" } }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "requires": { - "fs-access": "1.0.1", - "which": "1.3.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.8", + "pify": "3.0.0", + "slash": "1.0.0" } }, - "karma-cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", - "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", + "globule": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", + "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", "requires": { - "resolve": "1.5.0" + "glob": "7.1.2", + "lodash": "4.17.10", + "minimatch": "3.0.4" } }, - "karma-coverage-istanbul-reporter": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.3.3.tgz", - "integrity": "sha512-MFkB6bh11J8nKygUdqyHb9sMz17XoBRYR4tiNxnSpi/UtDk0wk8eRGa0jRSJaILgCl4xyq1TL6Jidww1OWly/Q==", + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "requires": { - "istanbul-api": "1.2.1", - "minimatch": "3.0.4" + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" } }, - "karma-jasmine": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.1.tgz", - "integrity": "sha1-b+hA51oRYAydkehLM8RY4cRqNSk=" + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=" + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "requires": { - "karma-jasmine": "1.1.1" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } } }, - "karma-source-map-support": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz", - "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=", + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "source-map-support": "0.4.18" + "ajv": "5.5.2", + "har-schema": "2.0.0" }, "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "source-map": "0.5.7" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } } } }, - "killable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", - "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=" - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "requires": { - "is-buffer": "1.1.6" + "function-bind": "1.1.1" } }, - "labeled-stream-splicer": { + "has-ansi": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", - "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { - "inherits": "2.0.3", - "isarray": "0.0.1", - "stream-splicer": "2.0.0" + "ansi-regex": "2.1.1" + } + }, + "has-binary": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", + "integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=", + "requires": { + "isarray": "0.0.1" }, "dependencies": { "isarray": { @@ -6526,2455 +4517,2666 @@ } } }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "requires": { - "package-json": "4.0.1" - } + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "optional": true + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - "lcid": { + "has-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "invert-kv": "1.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } } }, - "less": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/less/-/less-3.0.1.tgz", - "integrity": "sha512-qUR4uNv88/c0mpnGOULgMLRXXSD6X0tYo4cVrokzsvn68+nuj8rskInCSe2eLAVYWGD/oAlq8P7J/FeZ/euKiw==", + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "errno": "0.1.4", - "graceful-fs": "4.1.11", - "image-size": "0.5.5", - "mime": "1.6.0", - "mkdirp": "0.5.1", - "promise": "7.3.1", - "request": "2.81.0", - "source-map": "0.5.7" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "optional": true, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" } } } }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "requires": { - "clone": "2.1.1", - "loader-utils": "1.1.0", - "pify": "3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, - "lexical-scope": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", - "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "requires": { - "astw": "2.2.0" + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" } }, - "libbase64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", - "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=" + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" }, - "libmime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", - "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { - "iconv-lite": "0.4.15", - "libbase64": "0.1.0", - "libqp": "1.1.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" - } + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, - "libqp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", - "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=" + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" }, - "license-checker": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-16.0.0.tgz", - "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", - "dev": true, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==" + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "requires": { - "chalk": "0.5.1", - "debug": "2.6.9", - "mkdirp": "0.3.5", - "nopt": "2.2.1", - "read-installed": "4.0.3", - "semver": "5.4.1", - "spdx": "0.5.1", - "spdx-correct": "2.0.4", - "spdx-satisfies": "0.1.3", - "treeify": "1.0.1" + "inherits": "2.0.3", + "obuf": "1.1.2", + "readable-stream": "2.3.6", + "wbuf": "1.7.3" + } + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, + "html-minifier": { + "version": "3.5.15", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.15.tgz", + "integrity": "sha512-OZa4rfb6tZOZ3Z8Xf0jKxXkiDcFWldQePGYFDcgKqES2sXeWaEv9y6QQvWUtX3ySI3feApQi5uCsHLINQ6NoAw==", + "requires": { + "camel-case": "3.0.0", + "clean-css": "4.1.11", + "commander": "2.15.1", + "he": "1.1.1", + "param-case": "2.1.1", + "relateurl": "0.2.7", + "uglify-js": "3.3.22" }, "dependencies": { - "ansi-regex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", - "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", - "dev": true - }, - "ansi-styles": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", - "dev": true - }, - "chalk": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", - "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", - "dev": true, - "requires": { - "ansi-styles": "1.1.0", - "escape-string-regexp": "1.0.5", - "has-ansi": "0.1.0", - "strip-ansi": "0.3.0", - "supports-color": "0.2.0" - } - }, - "has-ansi": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", - "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", - "dev": true, - "requires": { - "ansi-regex": "0.2.1" - } - }, - "mkdirp": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", - "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=", - "dev": true - }, - "nopt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.2.1.tgz", - "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", - "dev": true, - "requires": { - "abbrev": "1.0.9" - } - }, - "spdx-correct": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-2.0.4.tgz", - "integrity": "sha512-c+4gPpt9YDhz7cHlz5UrsHzxxRi4ksclxnEEKsuGT9JdwSC+ZNmsGbYRzzgxyZaBYpcWnlu+4lPcdLKx4DOCmA==", - "dev": true, - "requires": { - "spdx-expression-parse": "2.0.2", - "spdx-license-ids": "2.0.1" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-2.0.2.tgz", - "integrity": "sha512-oFxOkWCfFS0ltNp0H66gXlU4NF6bxg7RkoTYR0413t+yTY9zyj+AIWsjtN8dcVp6703ijDYBWBIARlJ7DkyP9Q==", - "dev": true, - "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "2.0.1" - } - }, - "spdx-license-ids": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-2.0.1.tgz", - "integrity": "sha1-AgF7zDU07k/+9tWNIOfT6aHDyOw=", - "dev": true + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, - "strip-ansi": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", - "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", - "dev": true, + "uglify-js": { + "version": "3.3.22", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", + "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { - "ansi-regex": "0.2.1" + "commander": "2.15.1", + "source-map": "0.6.1" } - }, - "supports-color": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", - "dev": true } } }, - "license-webpack-plugin": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", - "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", - "requires": { - "ejs": "2.5.8" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "requires": { - "immediate": "3.0.6" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1" + "html-minifier": "3.5.15", + "loader-utils": "0.2.17", + "lodash": "4.17.10", + "pretty-error": "2.1.1", + "tapable": "1.0.0", + "toposort": "1.0.6", + "util.promisify": "1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1", + "object-assign": "4.1.1" + } + } } }, - "locate-character": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-2.0.5.tgz", - "integrity": "sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==" - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "domelementtype": "1.3.0", + "domhandler": "2.1.0", + "domutils": "1.1.6", + "readable-stream": "1.0.34" }, "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==" - }, - "lodash.tail": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", - "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=" - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" - } + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { - "lodash._reinterpolate": "3.0.0" + "depd": "1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": "1.4.0" } }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "requires": { - "chalk": "2.2.2" - } + "http-parser-js": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.12.tgz", + "integrity": "sha1-uc+/Sizybw/DSxDKFImid3HjR08=" }, - "log4js": { - "version": "2.3.12", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.3.12.tgz", - "integrity": "sha1-vAObJ6VOhRYp2IE8XaZTG8pTiGY=", + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", "requires": { - "axios": "0.15.3", - "date-format": "1.2.0", - "debug": "2.6.9", - "hipchat-notifier": "1.1.0", - "loggly": "1.1.1", - "mailgun-js": "0.7.15", - "nodemailer": "2.7.2", - "redis": "2.8.0", - "semver": "5.4.1", - "slack-node": "0.2.0", - "streamroller": "0.6.0" + "eventemitter3": "3.1.0", + "follow-redirects": "1.4.1", + "requires-port": "1.0.0" } }, - "loggly": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", - "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", - "optional": true, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", "requires": { - "json-stringify-safe": "5.0.1", - "request": "2.75.0", - "timespan": "2.3.0" + "http-proxy": "1.17.0", + "is-glob": "4.0.0", + "lodash": "4.17.10", + "micromatch": "3.1.10" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "optional": true + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "optional": true + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "optional": true, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "kind-of": "6.0.2" } }, - "form-data": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", - "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", - "optional": true, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "kind-of": "6.0.2" } }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "optional": true, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "chalk": "1.1.3", - "commander": "2.12.2", - "is-my-json-valid": "2.16.1", - "pinkie-promise": "2.0.1" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", - "optional": true + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, - "qs": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", - "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", - "optional": true + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "2.1.1" + } }, - "request": { - "version": "2.75.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", - "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", - "optional": true, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "bl": "1.1.2", - "caseless": "0.11.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.0.0", - "har-validator": "2.0.6", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "node-uuid": "1.4.8", - "oauth-sign": "0.8.2", - "qs": "6.2.3", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.4.3" + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "optional": true + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "optional": true + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } } } }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=" + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" + } }, - "loglevelnext": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.4.tgz", - "integrity": "sha512-V3N6LAJAiGwa/zjtvmgs2tyeiCJ23bGNhxXN8R+v7k6TNlSlTz40mIyZYdmO762eBnEFymn0Mhha+WuAhnwMBg==" + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" + } }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "husky": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", + "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", "requires": { - "js-tokens": "3.0.2" + "is-ci": "1.1.0", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", + "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" + } } }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "ieee754": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==" + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "ignore": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", + "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==" + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "optional": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" } }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "in-publish": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", + "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=" + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "once": "1.4.0", + "wrappy": "1.0.2" } }, - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "requires": { - "vlq": "0.2.3" - } + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "mailcomposer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", - "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", - "optional": true, - "requires": { - "buildmail": "4.0.1", - "libmime": "3.0.0" - } + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, - "mailgun-js": { - "version": "0.7.15", - "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.7.15.tgz", - "integrity": "sha1-7jZqINrGTDwVwD1sGz4O15UlKrs=", - "optional": true, + "injection-js": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.2.1.tgz", + "integrity": "sha512-zHI+E+dM0PXix5FFTO1Y4/UOyAzE7zG1l/QwAn4jchTThOoBq+UYRFK4AVG7lQgFL+go62SbrzSsjXy9DFEZUg==" + }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", "requires": { - "async": "2.1.5", - "debug": "2.2.0", - "form-data": "2.1.4", - "inflection": "1.10.0", - "is-stream": "1.1.0", - "path-proxy": "1.0.0", - "proxy-agent": "2.0.0", - "q": "1.4.1", - "tsscmp": "1.0.5" + "meow": "3.7.0" }, "dependencies": { - "async": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz", - "integrity": "sha1-5YfGhYCZSsZ/xW/4bTrFa9voELw=", - "optional": true, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "lodash": "4.17.4" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "optional": true, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "ms": "0.7.1" + "repeating": "2.0.1" } }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "optional": true + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", - "optional": true + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "requires": { + "get-stdin": "4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" } } }, - "make-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", - "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "requires": { - "pify": "3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } + "loose-envify": "1.3.1" } }, - "make-error": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.2.tgz", - "integrity": "sha512-l9ra35l5VWLF24y75Tg8XgfGLX0ueRhph118WKM6H5denx4bB5QF59+4UAm9oJ2qsPQZas/CQUDdtDdfvYHBdQ==" + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + "ipaddr.js": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "object-visit": "1.0.1" + "kind-of": "3.2.2" } }, - "material-design-icons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/material-design-icons/-/material-design-icons-3.0.1.tgz", - "integrity": "sha1-mnHEh0chjrylHlGmbaaCA4zct78=" + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" - }, - "dependencies": { - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - } + "binary-extensions": "1.11.0" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { - "mimic-fn": "1.2.0" + "builtin-modules": "1.1.1" } }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" + }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "requires": { - "errno": "0.1.4", - "readable-stream": "2.3.3" + "ci-info": "1.1.3" } }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "kind-of": "3.2.2" } }, - "merge-descriptors": { + "is-date-object": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "requires": { - "mime-db": "1.30.0" + "is-primitive": "2.0.0" } }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, - "mini-css-extract-plugin": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", - "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "requires": { - "loader-utils": "1.1.0", - "webpack-sources": "1.1.0" + "number-is-nan": "1.0.1" } }, - "minimalistic-assert": { + "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "brace-expansion": "1.1.8" + "number-is-nan": "1.0.1" } }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } }, - "minipass": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz", - "integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==", + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "requires": { - "yallist": "3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" - } + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" } }, - "minizlib": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==" + }, + "is-my-json-valid": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "requires": { - "minipass": "2.2.1" + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "is-my-ip-valid": "1.0.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" } }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "requires": { - "concat-stream": "1.6.2", - "duplexify": "3.5.4", - "end-of-stream": "1.4.1", - "flush-write-stream": "1.0.3", - "from2": "2.3.0", - "parallel-transform": "1.1.0", - "pump": "2.0.1", - "pumpify": "1.4.0", - "stream-each": "1.2.2", - "through2": "2.0.3" + "kind-of": "3.2.2" } }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "is-number": "4.0.0" }, "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "2.0.4" - } + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" } } }, - "mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "requires": { - "for-in": "0.1.8", - "is-extendable": "0.1.1" - }, - "dependencies": { - "for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" - } + "is-path-inside": "1.0.1" } }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } + "path-is-inside": "1.0.2" } }, - "modify-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz", - "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=" + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" }, - "module-deps": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", - "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "JSONStream": "1.3.2", - "browser-resolve": "1.11.2", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "defined": "1.0.0", - "detective": "4.7.1", - "duplexer2": "0.1.4", - "inherits": "2.0.3", - "parents": "1.0.1", - "readable-stream": "2.3.3", - "resolve": "1.5.0", - "stream-combiner2": "1.1.1", - "subarg": "1.0.0", - "through2": "2.0.3", - "xtend": "4.0.1" + "isobject": "3.0.1" }, "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - } - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" + }, + "is-reference": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.0.tgz", + "integrity": "sha512-h37O/IX4efe56o9k41II1ECMqKwtqHa7/12dLDEzJIFux2x15an4WCDb0/eKdmUgRpLJ3bR0DrzDc7vOrVgRDw==", "requires": { - "aproba": "1.2.0", - "copy-concurrently": "1.0.5", - "fs-write-stream-atomic": "1.0.10", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "@types/estree": "0.0.38" }, "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } + "@types/estree": { + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.38.tgz", + "integrity": "sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA==" } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "requires": { - "dns-packet": "1.3.1", - "thunky": "1.0.2" + "has": "1.0.1" } }, - "multicast-dns-service-types": { + "is-retry-allowed": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" }, - "nan": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", - "optional": true + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, - "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } + "text-extensions": "1.7.0" } }, - "ncname": { + "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", - "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", - "requires": { - "xml-char-classes": "1.0.0" - } + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, - "neo-async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz", - "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==" + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", - "optional": true + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" }, - "ng-packagr": { - "version": "3.0.0-rc.2", - "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-3.0.0-rc.2.tgz", - "integrity": "sha512-NhIQcIvHiOqHblSmtTgECSsfL59V6lfn6Ris9byXN7NaTaUxOF9EWZQqQC09mu8a+YW/H+6Pk2uAjQ99DH9NQw==", + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isbinaryfile": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", + "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "@ngtools/json-schema": "1.1.0", - "autoprefixer": "8.1.0", - "browserslist": "3.1.2", - "chalk": "2.4.1", - "commander": "2.12.2", - "cpx": "1.5.0", - "fs-extra": "5.0.0", - "glob": "7.1.2", - "injection-js": "2.2.1", - "less": "3.0.1", - "node-sass": "4.8.3", - "node-sass-tilde-importer": "1.0.2", - "postcss": "6.0.19", - "postcss-clean": "1.1.0", - "postcss-url": "7.3.1", - "read-pkg-up": "3.0.0", - "rimraf": "2.6.2", - "rollup": "0.57.1", - "rollup-plugin-commonjs": "9.1.0", - "rollup-plugin-node-resolve": "3.3.0", - "rxjs": "5.5.10", - "sorcery": "0.10.0", - "strip-bom": "3.0.0", - "stylus": "0.54.5", - "uglify-js": "3.3.22", - "update-notifier": "2.5.0" + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "requires": { + "abbrev": "1.0.9", + "async": "1.5.2", + "escodegen": "1.8.1", + "esprima": "2.7.3", + "glob": "5.0.15", + "handlebars": "4.0.11", + "js-yaml": "3.11.0", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "once": "1.4.0", + "resolve": "1.1.7", + "supports-color": "3.2.3", + "which": "1.3.0", + "wordwrap": "1.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "locate-path": "2.0.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "3.0.0" - } + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "load-json-file": "4.0.0", - "normalize-package-data": "2.4.0", - "path-type": "3.0.0" + "has-flag": "1.0.0" } }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + } + } + }, + "istanbul-api": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", + "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "requires": { + "async": "2.6.0", + "compare-versions": "3.1.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.2.0", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-report": "1.1.4", + "istanbul-lib-source-maps": "1.2.4", + "istanbul-reports": "1.3.0", + "js-yaml": "3.11.0", + "mkdirp": "0.5.1", + "once": "1.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "find-up": "2.1.0", - "read-pkg": "3.0.0" + "lodash": "4.17.10" } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + } + } + }, + "istanbul-instrumenter-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", + "requires": { + "convert-source-map": "1.5.1", + "istanbul-lib-instrument": "1.10.1", + "loader-utils": "1.1.0", + "schema-utils": "0.3.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "glob": "7.1.2" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, - "rxjs": { - "version": "5.5.10", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.10.tgz", - "integrity": "sha512-SRjimIDUHJkon+2hFo7xnvNC4ZEHGzCRwh9P7nzX3zPkCGFEg/tuElrNR7L/rZMagnK2JeH2jQwPRpmyXyLB6A==", + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "requires": { - "symbol-observable": "1.0.1" + "ajv": "5.5.2" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==" + }, + "istanbul-lib-hook": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz", + "integrity": "sha512-p3En6/oGkFQV55Up8ZPC2oLxvgSxD8CzA0yBrhRZSh3pfv3OFj9aSGVC0yoerAi/O4u7jUVnOGVX1eVFM+0tmQ==", + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "requires": { + "babel-generator": "6.26.1", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.2.0", + "semver": "5.5.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "requires": { + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "has-flag": "3.0.0" + "has-flag": "1.0.0" } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "uglify-js": { - "version": "3.3.22", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", - "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz", + "integrity": "sha512-UzuK0g1wyQijiaYQxj/CdNycFhAd2TLtO2obKQMTZrZ1jzEMRY3rvpASEKkaxbRR6brvdovfA03znPa/pXcejg==", + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { - "commander": "2.15.1", - "source-map": "0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" - } + "ms": "2.0.0" } } } }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "istanbul-reports": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", "requires": { - "lower-case": "1.1.4" + "handlebars": "4.0.11" } }, - "node-forge": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", - "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" - }, - "node-gyp": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", - "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", + "jasmine": { + "version": "2.99.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", + "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=", "requires": { - "fstream": "1.0.11", + "exit": "0.1.2", "glob": "7.1.2", - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "npmlog": "4.1.2", - "osenv": "0.1.5", - "request": "2.83.0", - "rimraf": "2.2.8", - "semver": "5.3.0", - "tar": "2.2.1", - "which": "1.3.0" + "jasmine-core": "2.99.1" + } + }, + "jasmine-core": { + "version": "2.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=" + }, + "jasmine-spec-reporter": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-3.3.0.tgz", + "integrity": "sha1-xjw9Q7rP0W5tqGxG0mWVfgB18Uw=", + "requires": { + "colors": "1.1.2" + } + }, + "jasminewd2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", + "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=" + }, + "jquery": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" + }, + "js-base64": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", + "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" }, "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" } } }, - "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.2.0", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "domain-browser": "1.1.7", - "events": "1.1.1", - "https-browserify": "1.0.0", - "os-browserify": "0.3.0", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.3", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "1.0.3", - "timers-browserify": "2.0.10", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8", - "isarray": "1.0.0" - } - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "requires": { - "setimmediate": "1.0.5" - } - } + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" } }, - "node-sass": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.8.3.tgz", - "integrity": "sha512-tfFWhUsCk/Y19zarDcPo5xpj+IW3qCfOjVdHtYeG6S1CKbQOh1zqylnQK6cV3z9k80yxAnFX9Y+a9+XysDhhfg==", + "jszip": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", + "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", "requires": { - "async-foreach": "0.1.3", - "chalk": "1.1.3", - "cross-spawn": "3.0.1", - "gaze": "1.1.2", - "get-stdin": "4.0.1", - "glob": "7.1.2", - "in-publish": "2.0.0", - "lodash.assign": "4.2.0", - "lodash.clonedeep": "4.5.0", - "lodash.mergewith": "4.6.1", - "meow": "3.7.0", - "mkdirp": "0.5.1", - "nan": "2.10.0", - "node-gyp": "3.6.2", - "npmlog": "4.1.2", - "request": "2.79.0", - "sass-graph": "2.2.4", - "stdout-stream": "1.4.0", - "true-case-path": "1.0.2" + "core-js": "2.3.0", + "es6-promise": "3.0.2", + "lie": "3.1.1", + "pako": "1.0.6", + "readable-stream": "2.0.6" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "core-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", + "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" + "es6-promise": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", + "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, - "har-validator": { + "readable-stream": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "requires": { - "chalk": "1.1.3", - "commander": "2.12.2", - "is-my-json-valid": "2.16.1", - "pinkie-promise": "2.0.1" - } - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=" - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.11.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "2.0.6", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "qs": "6.3.2", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.4.3", - "uuid": "3.1.0" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, - "node-sass-tilde-importer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", - "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", - "requires": { - "find-parent-dir": "0.3.0" - } - }, - "nodemailer": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", - "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", - "optional": true, + "karma": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", + "integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", "requires": { - "libmime": "3.0.0", - "mailcomposer": "4.0.1", - "nodemailer-direct-transport": "3.3.2", - "nodemailer-shared": "1.1.0", - "nodemailer-smtp-pool": "2.8.2", - "nodemailer-smtp-transport": "2.7.2", - "socks": "1.1.9" + "bluebird": "3.5.1", + "body-parser": "1.18.2", + "chokidar": "1.7.0", + "colors": "1.1.2", + "combine-lists": "1.0.1", + "connect": "3.6.6", + "core-js": "2.5.5", + "di": "0.0.1", + "dom-serialize": "2.2.1", + "expand-braces": "0.1.2", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "http-proxy": "1.17.0", + "isbinaryfile": "3.0.2", + "lodash": "3.10.1", + "log4js": "0.6.38", + "mime": "1.4.1", + "minimatch": "3.0.4", + "optimist": "0.6.1", + "qjobs": "1.2.0", + "range-parser": "1.2.0", + "rimraf": "2.6.2", + "safe-buffer": "5.1.2", + "socket.io": "1.7.3", + "source-map": "0.5.7", + "tmp": "0.0.31", + "useragent": "2.3.0" }, "dependencies": { - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "optional": true - }, - "socks": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", - "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", - "optional": true, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" } } }, - "nodemailer-direct-transport": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", - "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-fetch": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", - "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=" - }, - "nodemailer-shared": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", - "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", - "requires": { - "nodemailer-fetch": "1.6.0" - } - }, - "nodemailer-smtp-pool": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", - "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", - "optional": true, + "karma-chrome-launcher": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" + "fs-access": "1.0.1", + "which": "1.3.0" } }, - "nodemailer-smtp-transport": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", - "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", - "optional": true, + "karma-cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", + "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" + "resolve": "1.7.1" } }, - "nodemailer-wellknown": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", - "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=" - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "karma-coverage-istanbul-reporter": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.2.tgz", + "integrity": "sha512-sQHexslLF+QHzaKfK8+onTYMyvSwv+p5cDayVxhpEELGa3z0QuB+l0IMsicIkkBNMOJKQaqueiRoW7iuo7lsog==", "requires": { - "abbrev": "1.0.9" + "istanbul-api": "1.3.1", + "minimatch": "3.0.4" } }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - } + "karma-jasmine": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.1.tgz", + "integrity": "sha1-b+hA51oRYAydkehLM8RY4cRqNSk=" }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "karma-jasmine-html-reporter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", + "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", "requires": { - "remove-trailing-separator": "1.1.0" + "karma-jasmine": "1.1.1" } }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" - }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "karma-source-map-support": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz", + "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=", "requires": { - "hosted-git-info": "2.6.0", - "osenv": "0.1.5", - "semver": "5.5.0", - "validate-npm-package-name": "3.0.0" + "source-map-support": "0.4.18" }, "dependencies": { - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "source-map": "0.5.7" } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" } } }, - "npm-registry-client": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", - "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", + "killable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", + "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "concat-stream": "1.6.2", - "graceful-fs": "4.1.11", - "normalize-package-data": "2.4.0", - "npm-package-arg": "6.1.0", - "npmlog": "4.1.2", - "once": "1.4.0", - "request": "2.83.0", - "retry": "0.10.1", - "safe-buffer": "5.1.1", - "semver": "5.4.1", - "slide": "1.1.6", - "ssri": "5.3.0" + "is-buffer": "1.1.6" } }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "requires": { - "path-key": "2.0.1" + "package-json": "4.0.1" } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "invert-kv": "1.0.0" } }, - "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "less": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/less/-/less-3.0.2.tgz", + "integrity": "sha512-konnFwWXpUQwzuwyN3Zfw/2Ziah2BKzqTfGoHBZjJdQWCmR+yrjmIG3QLwnlXNFWz27QetOmhGNSbHgGRdqhYQ==", "requires": { - "boolbase": "1.0.0" + "errno": "0.1.7", + "graceful-fs": "4.1.11", + "image-size": "0.5.5", + "mime": "1.4.1", + "mkdirp": "0.5.1", + "promise": "7.3.1", + "request": "2.85.0", + "source-map": "0.5.7" } }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=" - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "less-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", + "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - } + "clone": "2.1.1", + "loader-utils": "1.1.0", + "pify": "3.0.0" } }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "license-checker": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-16.0.0.tgz", + "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", + "dev": true, "requires": { - "isobject": "3.0.1" + "chalk": "0.5.1", + "debug": "2.6.9", + "mkdirp": "0.3.5", + "nopt": "2.2.1", + "read-installed": "4.0.3", + "semver": "5.5.0", + "spdx": "0.5.1", + "spdx-correct": "2.0.4", + "spdx-satisfies": "0.1.3", + "treeify": "1.1.0" }, "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true, + "requires": { + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" + } + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "dev": true, + "requires": { + "ansi-regex": "0.2.1" + } + }, + "mkdirp": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", + "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=", + "dev": true + }, + "nopt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.2.1.tgz", + "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", + "dev": true, + "requires": { + "abbrev": "1.0.9" + } + }, + "spdx-correct": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-2.0.4.tgz", + "integrity": "sha512-c+4gPpt9YDhz7cHlz5UrsHzxxRi4ksclxnEEKsuGT9JdwSC+ZNmsGbYRzzgxyZaBYpcWnlu+4lPcdLKx4DOCmA==", + "dev": true, + "requires": { + "spdx-expression-parse": "2.0.2", + "spdx-license-ids": "2.0.1" + } + }, + "spdx-expression-parse": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-2.0.2.tgz", + "integrity": "sha512-oFxOkWCfFS0ltNp0H66gXlU4NF6bxg7RkoTYR0413t+yTY9zyj+AIWsjtN8dcVp6703ijDYBWBIARlJ7DkyP9Q==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "2.0.1" + } + }, + "spdx-license-ids": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-2.0.1.tgz", + "integrity": "sha1-AgF7zDU07k/+9tWNIOfT6aHDyOw=", + "dev": true + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true, + "requires": { + "ansi-regex": "0.2.1" + } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true } } }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "license-webpack-plugin": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", + "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.10.0" + "ejs": "2.5.9" } }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "immediate": "3.0.6" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { - "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" } }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" - }, - "on-finished": { + "loader-runner": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "requires": { - "ee-first": "1.1.1" + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" } }, - "on-headers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + "locate-character": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-2.0.5.tgz", + "integrity": "sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==" }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "requires": { - "wrappy": "1.0.2" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, - "opn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.1.0.tgz", - "integrity": "sha512-iPNl7SyM8L30Rm1sjGdLLheyHVw5YXVfi3SKWJzBI7efxRwHojfRFjwE/OLM6qp9xJYMgab8WicTU1cPoY+Hpg==", + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, + "lodash.mergewith": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==" + }, + "lodash.tail": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", + "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=" + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", "requires": { - "is-wsl": "1.1.0" + "lodash._reinterpolate": "3.0.0", + "lodash.templatesettings": "4.1.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.3" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - } + "lodash._reinterpolate": "3.0.0" } }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - } + "chalk": "2.2.2" } }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" - }, - "original": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", - "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", + "log4js": { + "version": "0.6.38", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", + "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", "requires": { - "url-parse": "1.0.5" + "readable-stream": "1.0.34", + "semver": "4.3.6" }, "dependencies": { - "url-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", - "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "querystringify": "0.0.4", - "requires-port": "1.0.0" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" } + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + "loglevel": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=" }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "loglevelnext": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", + "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", "requires": { - "lcid": "1.0.0" + "es6-symbol": "3.1.1", + "object.assign": "4.1.0" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "js-tokens": "3.0.2" } }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "requires": { - "p-try": "1.0.0" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "magic-string": { + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "requires": { - "p-limit": "1.2.0" + "vlq": "0.2.3" } }, - "p-map": { + "make-dir": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "pac-proxy-agent": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz", - "integrity": "sha512-QBELCWyLYPgE2Gj+4wUEiMscHrQ8nRPBzYItQNOHWavwBt25ohZHQC4qnd5IszdVVrFbLsQ+dPkm6eqdjJAmwQ==", - "optional": true, + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "2.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "2.1.1" + "pify": "3.0.0" } }, - "pac-resolver": { + "make-error": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", + "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-obj": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-2.0.0.tgz", - "integrity": "sha1-mbiNLxk/ve78HJpSnB8yYKtSd80=", - "optional": true, + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "co": "3.0.6", - "degenerator": "1.0.4", - "ip": "1.0.1", - "netmask": "1.0.6", - "thunkify": "2.1.2" - }, - "dependencies": { - "co": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/co/-/co-3.0.6.tgz", - "integrity": "sha1-FEXyJsXrlWE45oyawwFn6n0ua9o=", - "optional": true - } + "object-visit": "1.0.1" } }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "material-design-icons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/material-design-icons/-/material-design-icons-3.0.1.tgz", + "integrity": "sha1-mnHEh0chjrylHlGmbaaCA4zct78=" + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.4.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, - "parallel-transform": { + "mem": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "requires": { - "cyclist": "0.2.2", - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "mimic-fn": "1.2.0" } }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "requires": { - "no-case": "2.3.2" + "errno": "0.1.7", + "readable-stream": "2.3.6" } }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", "requires": { - "path-platform": "0.11.15" + "camelcase-keys": "4.2.0", + "decamelize-keys": "1.1.0", + "loud-rejection": "1.6.0", + "minimist": "1.2.0", + "minimist-options": "3.0.2", + "normalize-package-data": "2.4.0", + "read-pkg-up": "3.0.0", + "redent": "2.0.0", + "trim-newlines": "2.0.0" + }, + "dependencies": { + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "requires": { + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "3.0.0" + } + } } }, - "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", - "requires": { - "asn1.js": "4.9.2", - "browserify-aes": "1.1.1", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.14" - } + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, - "parse-github-repo-url": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", - "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=" + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { - "error-ex": "1.3.1" + "bn.js": "4.11.8", + "brorand": "1.1.0" } }, - "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=" - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "requires": { - "better-assert": "1.0.2" - } + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "better-assert": "1.0.2" + "mime-db": "1.33.0" } }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "mini-css-extract-plugin": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", + "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", "requires": { - "pinkie-promise": "2.0.1" + "loader-utils": "1.1.0", + "webpack-sources": "1.1.0" } }, - "path-is-absolute": { + "minimalistic-assert": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "requires": { + "arrify": "1.0.1", + "is-plain-obj": "1.1.0" + } }, - "path-proxy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", - "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", - "optional": true, + "minipass": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "requires": { - "inflection": "1.3.8" + "safe-buffer": "5.1.2", + "yallist": "3.0.2" }, "dependencies": { - "inflection": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", - "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", - "optional": true + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "path-type": { + "minizlib": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "minipass": "2.2.4" } }, - "pbkdf2": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", - "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "requires": { - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.9" + "concat-stream": "1.6.2", + "duplexify": "3.5.4", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.3", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.4.0", + "stream-each": "1.2.2", + "through2": "2.0.3" } }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "optional": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "2.0.4" + } + } + } }, - "pinkie-promise": { + "mixin-object": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", "requires": { - "pinkie": "2.0.4" + "for-in": "0.1.8", + "is-extendable": "0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + } } }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { - "find-up": "2.1.0" + "minimist": "0.0.8" }, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, - "plur": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", - "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==" + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "requires": { - "irregular-plurals": "1.4.0" + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, - "popper.js": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.1.tgz", - "integrity": "sha1-uIFeXNpvYvwgQuR2GGSfdYZuZ1M=" + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "portfinder": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", - "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", "requires": { - "async": "1.5.2", - "debug": "2.6.9", - "mkdirp": "0.5.1" + "dns-packet": "1.3.1", + "thunky": "1.0.2" } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" }, - "postcss": { - "version": "6.0.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", - "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { - "chalk": "2.3.2", - "source-map": "0.6.1", - "supports-color": "5.3.0" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "ng-packagr": { + "version": "3.0.0-rc.2", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-3.0.0-rc.2.tgz", + "integrity": "sha512-NhIQcIvHiOqHblSmtTgECSsfL59V6lfn6Ris9byXN7NaTaUxOF9EWZQqQC09mu8a+YW/H+6Pk2uAjQ99DH9NQw==", + "requires": { + "@ngtools/json-schema": "1.1.0", + "autoprefixer": "8.3.0", + "browserslist": "3.2.6", + "chalk": "2.4.1", + "commander": "2.15.1", + "cpx": "1.5.0", + "fs-extra": "5.0.0", + "glob": "7.1.2", + "injection-js": "2.2.1", + "less": "3.0.2", + "node-sass": "4.9.0", + "node-sass-tilde-importer": "1.0.2", + "postcss": "6.0.21", + "postcss-clean": "1.1.0", + "postcss-url": "7.3.2", + "read-pkg-up": "3.0.0", + "rimraf": "2.6.2", + "rollup": "0.57.1", + "rollup-plugin-commonjs": "9.1.0", + "rollup-plugin-node-resolve": "3.3.0", + "rxjs": "5.5.10", + "sorcery": "0.10.0", + "strip-bom": "3.0.0", + "stylus": "0.54.5", + "uglify-js": "3.3.22", + "update-notifier": "2.5.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "color-convert": "1.9.1" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "requires": { + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "requires": { + "find-up": "2.1.0", + "read-pkg": "3.0.0" + } + }, + "rxjs": { + "version": "5.5.10", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.10.tgz", + "integrity": "sha512-SRjimIDUHJkon+2hFo7xnvNC4ZEHGzCRwh9P7nzX3zPkCGFEg/tuElrNR7L/rZMagnK2JeH2jQwPRpmyXyLB6A==", "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" + "symbol-observable": "1.0.1" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + }, + "uglify-js": { + "version": "3.3.22", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", + "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { - "has-flag": "3.0.0" + "commander": "2.15.1", + "source-map": "0.6.1" } } } }, - "postcss-clean": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-clean/-/postcss-clean-1.1.0.tgz", - "integrity": "sha512-83g3GqMbCM5NL6MlbbPLJ/m2NrUepBF44MoDk4Gt04QGXeXKh9+ilQa0DzLnYnvqYHQCw83nckuEzBFr2muwbg==", - "requires": { - "clean-css": "4.1.11", - "postcss": "6.0.19" - } - }, - "postcss-import": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", - "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", - "requires": { - "postcss": "6.0.19", - "postcss-value-parser": "3.3.0", - "read-cache": "1.0.0", - "resolve": "1.5.0" - } - }, - "postcss-load-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", - "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", - "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1", - "postcss-load-options": "1.2.0", - "postcss-load-plugins": "2.3.0" - } - }, - "postcss-load-options": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", - "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" + "lower-case": "1.1.4" } }, - "postcss-load-plugins": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", - "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", - "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" - } + "node-forge": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", + "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=" }, - "postcss-loader": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.4.tgz", - "integrity": "sha512-L2p654oK945B/gDFUGgOhh7uzj19RWoY1SVMeJVoKno1H2MdbQ0RppR/28JGju4pMb22iRC7BJ9aDzbxXSLf4A==", + "node-gyp": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", + "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", "requires": { - "loader-utils": "1.1.0", - "postcss": "6.0.19", - "postcss-load-config": "1.2.0", - "schema-utils": "0.4.5" + "fstream": "1.0.11", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "npmlog": "4.1.2", + "osenv": "0.1.5", + "request": "2.85.0", + "rimraf": "2.6.2", + "semver": "5.3.0", + "tar": "2.2.1", + "which": "1.3.0" }, "dependencies": { - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { - "ajv": "6.4.0", - "ajv-keywords": "3.1.0" + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" } } } }, - "postcss-url": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.1.tgz", - "integrity": "sha512-Ya5KIjGptgz0OtrVYfi2UbLxVAZ6Emc4Of+Grx4Sf1deWlRpFwLr8FrtkUxfqh+XiZIVkXbjQrddE10ESpNmdA==", - "requires": { - "mime": "1.6.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "postcss": "6.0.19", - "xxhashjs": "0.2.1" - } - }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "requires": { - "renderkid": "2.0.1", - "utila": "0.4.0" - } - }, - "pretty-ms": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", - "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", - "requires": { - "parse-ms": "1.0.1", - "plur": "2.1.2" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "optional": true, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "requires": { - "asap": "2.0.6" + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.1", + "string_decoder": "1.1.1", + "timers-browserify": "2.0.10", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } } }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "protractor": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.1.tgz", - "integrity": "sha512-AW9qJ0prx2QEMy1gnhJ1Sl1WBQL2R3fx/VnG09FEmWprPIQPK14t0B83OB/pAGddpxiDCAAV0KiNNLf2c2Y/lQ==", + "node-sass": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", + "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", "requires": { - "@types/node": "6.0.104", - "@types/q": "0.0.32", - "@types/selenium-webdriver": "2.53.43", - "blocking-proxy": "1.0.1", + "async-foreach": "0.1.3", "chalk": "1.1.3", + "cross-spawn": "3.0.1", + "gaze": "1.1.2", + "get-stdin": "4.0.1", "glob": "7.1.2", - "jasmine": "2.8.0", - "jasminewd2": "2.2.0", - "optimist": "0.6.1", - "q": "1.4.1", - "saucelabs": "1.3.0", - "selenium-webdriver": "3.6.0", - "source-map-support": "0.4.18", - "webdriver-js-extender": "1.0.0", - "webdriver-manager": "12.0.6" + "in-publish": "2.0.0", + "lodash.assign": "4.2.0", + "lodash.clonedeep": "4.5.0", + "lodash.mergewith": "4.6.1", + "meow": "3.7.0", + "mkdirp": "0.5.1", + "nan": "2.10.0", + "node-gyp": "3.6.2", + "npmlog": "4.1.2", + "request": "2.79.0", + "sass-graph": "2.2.4", + "stdout-stream": "1.4.0", + "true-case-path": "1.0.2" }, "dependencies": { - "@types/node": { - "version": "6.0.104", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.104.tgz", - "integrity": "sha512-xPuI3Yeyc3u5SY7aFu6ILTJHFXo820DSfqNqYi1gxPmbpul+vLSfo3vhrY80d0+SdOYR9KdXHg6ozx4i/02LCg==" - }, - "adm-zip": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", - "integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E=" - }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.16.3" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + } + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -8987,3636 +7189,3605 @@ "supports-color": "2.0.0" } }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.10.1" + } }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "requires": { - "glob": "7.1.2" + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", "requires": { - "source-map": "0.5.7" + "chalk": "1.1.3", + "commander": "2.15.1", + "is-my-json-valid": "2.17.2", + "pinkie-promise": "2.0.1" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } }, - "webdriver-manager": { - "version": "12.0.6", - "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", - "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "requires": { - "adm-zip": "0.4.7", - "chalk": "1.1.3", - "del": "2.2.2", - "glob": "7.1.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "q": "1.4.1", - "request": "2.83.0", - "rimraf": "2.6.2", - "semver": "5.4.1", - "xml2js": "0.4.19" + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" } - } - } - }, - "proxy-addr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", - "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", - "requires": { - "forwarded": "0.1.2", - "ipaddr.js": "1.6.0" - } - }, - "proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz", - "integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=", - "optional": true, - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.6.5", - "pac-proxy-agent": "1.1.0", - "socks-proxy-agent": "2.1.1" - }, - "dependencies": { - "lru-cache": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", - "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", - "optional": true - } - } - }, - "prr": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", - "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.5" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" - } - }, - "pumpify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", - "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", - "requires": { - "duplexify": "3.5.4", - "inherits": "2.0.3", - "pump": "2.0.1" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" - }, - "qjobs": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.5.tgz", - "integrity": "sha1-ZZ3p8s+NzCehSBJ28gU3cnI4LnM=" - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "optional": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, - "querystringify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", - "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=" - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } + "repeating": "2.0.1" } }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "is-buffer": "1.1.6" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } - } - } - }, - "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "randomfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", - "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", - "requires": { - "randombytes": "2.0.5", - "safe-buffer": "5.1.1" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" - }, - "rc": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", - "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - } - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", - "requires": { - "pify": "2.3.0" - } - }, - "read-installed": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", - "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", - "dev": true, - "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.12", - "readdir-scoped-modules": "1.0.2", - "semver": "5.4.1", - "slide": "1.1.6", - "util-extend": "1.0.3" + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=" + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.7.0", + "caseless": "0.11.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "qs": "6.3.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.4.3", + "uuid": "3.2.1" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.16.3" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "requires": { + "get-stdin": "4.0.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" + } } }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "node-sass-tilde-importer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", + "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", "requires": { - "readable-stream": "2.3.3" + "find-parent-dir": "0.3.0" } }, - "read-package-json": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", - "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", - "dev": true, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-better-errors": "1.0.1", - "normalize-package-data": "2.4.0", - "slash": "1.0.0" + "abbrev": "1.0.9" } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "remove-trailing-separator": "1.1.0" } }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" }, - "readdir-scoped-modules": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", - "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", - "dev": true, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.4.0" + "hosted-git-info": "2.6.0", + "osenv": "0.1.5", + "semver": "5.5.0", + "validate-npm-package-name": "3.0.0" } }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "npm-registry-client": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", + "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", "requires": { + "concat-stream": "1.6.2", "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "normalize-package-data": "2.4.0", + "npm-package-arg": "6.1.0", + "npmlog": "4.1.2", + "once": "1.4.0", + "request": "2.85.0", + "retry": "0.10.1", + "safe-buffer": "5.1.2", + "semver": "5.5.0", + "slide": "1.1.6", + "ssri": "5.3.0" } }, - "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", - "optional": true, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { - "double-ended-queue": "2.1.0-0", - "redis-commands": "1.3.1", - "redis-parser": "2.6.0" + "path-key": "2.0.1" } }, - "redis-commands": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz", - "integrity": "sha1-gdgm9F+pyLIBH0zXoP5ZfSQdRCs=", - "optional": true - }, - "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", - "optional": true - }, - "reflect-metadata": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", - "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==" - }, - "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" - }, - "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { - "is-equal-shallow": "0.1.3" + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "boolbase": "1.0.0" } }, - "regexpu-core": { + "null-check": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "requires": { - "regenerate": "1.3.3", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "requires": { - "rc": "1.2.6", - "safe-buffer": "5.1.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "requires": { - "rc": "1.2.6" - } + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=" }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "requires": { - "jsesc": "0.5.0" - } + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "renderkid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", - "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "css-select": "1.2.0", - "dom-converter": "0.1.4", - "htmlparser2": "3.3.0", - "strip-ansi": "3.0.1", - "utila": "0.3.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } } } }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "1.0.2" - } + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "isobject": "3.0.1" }, "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.0" - } - }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" - } - }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.1.0" - } - }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.0" - } + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, - "requestretry": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.12.2.tgz", - "integrity": "sha512-wDYnH4imurLs5upu31WoPaOFfEu31qhFlF7KgpYbBsmBagFmreZZo8E/XpoQ3erCP5za+72t8k8QI4wlrtwVXw==", - "optional": true, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "requires": { - "extend": "3.0.1", - "lodash": "4.17.4", - "request": "2.83.0", - "when": "3.7.8" + "define-properties": "1.1.2", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "object-keys": "1.0.11" } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "require-relative": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", - "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=" - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "requires": { - "path-parse": "1.0.5" + "define-properties": "1.1.2", + "es-abstract": "1.11.0" } }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "requires": { - "resolve-from": "3.0.0" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "optional": true, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "align-text": "0.1.4" + "wrappy": "1.0.2" } }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" - }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "opn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", + "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.3" + "is-wsl": "1.1.0" } }, - "rollup": { - "version": "0.57.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.57.1.tgz", - "integrity": "sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA==", + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "requires": { - "@types/acorn": "4.0.3", - "acorn": "5.5.3", - "acorn-dynamic-import": "3.0.0", - "date-time": "2.1.0", - "is-reference": "1.1.0", - "locate-character": "2.0.5", - "pretty-ms": "3.1.0", - "require-relative": "0.8.7", - "rollup-pluginutils": "2.0.1", - "signal-exit": "3.0.2", - "sourcemap-codec": "1.4.1" + "minimist": "0.0.10", + "wordwrap": "0.0.3" }, "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" } } }, - "rollup-plugin-commonjs": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.0.tgz", - "integrity": "sha512-NrfE0g30QljNCnlJr7I2Xguz+44mh0dCxvfxwLnCwtaCK2LwFUp1zzAs8MQuOfhH4mRskqsjfOwGUap/L+WtEw==", + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "requires": { - "estree-walker": "0.5.1", - "magic-string": "0.22.5", - "resolve": "1.5.0", - "rollup-pluginutils": "2.0.1" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" }, "dependencies": { - "estree-walker": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", - "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" } } }, - "rollup-plugin-node-resolve": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", - "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" + }, + "original": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", + "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", "requires": { - "builtin-modules": "2.0.0", - "is-module": "1.0.0", - "resolve": "1.5.0" + "url-parse": "1.0.5" }, "dependencies": { - "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==" + "url-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", + "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", + "requires": { + "querystringify": "0.0.4", + "requires-port": "1.0.0" + } } } }, - "rollup-pluginutils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", - "integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=", - "requires": { - "estree-walker": "0.3.1", - "micromatch": "2.3.11" - } + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "aproba": "1.2.0" + "lcid": "1.0.0" } }, - "rxjs": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", - "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "requires": { - "tslib": "1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" - } + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "requires": { - "ret": "0.1.15" + "p-try": "1.0.0" } }, - "sander": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", - "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { - "es6-promise": "3.3.1", - "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - }, - "dependencies": { - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - } + "p-limit": "1.2.0" } }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "scss-tokenizer": "0.2.3", - "yargs": "7.1.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "5.0.0" - } - } + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" } }, - "sass-loader": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.0.1.tgz", - "integrity": "sha512-MeVVJFejJELlAbA7jrRchi88PGP6U9yIfqyiG+bBC4a9s2PX+ulJB9h8bbEohtPBfZmlLhNZ0opQM9hovRXvlw==", + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "requires": { - "clone-deep": "2.0.2", - "loader-utils": "1.1.0", - "lodash.tail": "4.1.1", - "neo-async": "2.5.0", - "pify": "3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, - "saucelabs": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", - "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", "requires": { - "https-proxy-agent": "1.0.0" + "no-case": "2.3.2" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "requires": { + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" + } }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=" + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "requires": { - "ajv": "5.5.2" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - } + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "requires": { - "js-base64": "2.4.3", - "source-map": "0.4.4" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - } + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.2" } }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + "parse-ms": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=" }, - "selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" + }, + "parsejson": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", + "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", "requires": { - "jszip": "3.1.5", - "rimraf": "2.6.2", - "tmp": "0.0.30", - "xml2js": "0.4.19" - }, - "dependencies": { - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", - "requires": { - "os-tmpdir": "1.0.2" - } - } + "better-assert": "1.0.2" } }, - "selfsigned": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.2.tgz", - "integrity": "sha1-tESVgNmZKbZbEKSDiTAaZZIIh1g=", + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "requires": { - "node-forge": "0.7.1" + "better-assert": "1.0.2" } }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", "requires": { - "semver": "5.4.1" + "better-assert": "1.0.2" } }, - "semver-dsl": { + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "semver": "5.4.1" + "pify": "3.0.0" } }, - "semver-intersect": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.2.0.tgz", - "integrity": "sha512-XwQtuo56XVJd4JDV90L9RWjBluxWcnKDlQivIlF+Jvdhqgvk7KAroAqs8aJ/hjQW0wNPSSWDxhJLzYX+dwb13A==", + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "requires": { - "semver": "5.4.1" + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" } }, - "send": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", - "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "requires": { - "debug": "2.6.9", - "depd": "1.1.1", - "destroy": "1.0.4", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.1", - "fresh": "0.5.2", - "http-errors": "1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.3.1" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" - } + "pinkie": "2.0.4" } }, - "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==" - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "requires": { - "accepts": "1.3.5", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "1.0.3", - "http-errors": "1.6.2", - "mime-types": "2.1.17", - "parseurl": "1.3.2" - }, - "dependencies": { - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "requires": { - "mime-types": "2.1.18", - "negotiator": "0.6.1" - }, - "dependencies": { - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - } - } - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - } + "find-up": "2.1.0" + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "requires": { + "irregular-plurals": "1.4.0" } }, - "serve-static": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", - "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "popper.js": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz", + "integrity": "sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU=" + }, + "portfinder": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", + "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", "requires": { - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "parseurl": "1.3.2", - "send": "0.16.1" + "async": "1.5.2", + "debug": "2.6.9", + "mkdirp": "0.5.1" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "is-extendable": "0.1.1" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "sha.js": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", - "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", + "postcss-clean": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-clean/-/postcss-clean-1.1.0.tgz", + "integrity": "sha512-83g3GqMbCM5NL6MlbbPLJ/m2NrUepBF44MoDk4Gt04QGXeXKh9+ilQa0DzLnYnvqYHQCw83nckuEzBFr2muwbg==", "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "clean-css": "4.1.11", + "postcss": "6.0.21" } }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "postcss-import": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", + "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", "requires": { - "is-extendable": "0.1.1", - "kind-of": "5.1.0", - "mixin-object": "2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } + "postcss": "6.0.21", + "postcss-value-parser": "3.3.0", + "read-cache": "1.0.0", + "resolve": "1.7.1" } }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", "requires": { - "json-stable-stringify": "0.0.1", - "sha.js": "2.4.9" - }, - "dependencies": { - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "requires": { - "jsonify": "0.0.0" - } - } + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1", + "postcss-load-options": "1.2.0", + "postcss-load-plugins": "2.3.0" } }, - "shebang-command": { + "postcss-load-options": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", "requires": { - "shebang-regex": "1.0.0" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" } }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "silent-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", - "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", + "postcss-loader": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.4.tgz", + "integrity": "sha512-L2p654oK945B/gDFUGgOhh7uzj19RWoY1SVMeJVoKno1H2MdbQ0RppR/28JGju4pMb22iRC7BJ9aDzbxXSLf4A==", "requires": { - "debug": "2.6.9" + "loader-utils": "1.1.0", + "postcss": "6.0.21", + "postcss-load-config": "1.2.0", + "schema-utils": "0.4.5" } }, - "slack-node": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", - "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", - "optional": true, + "postcss-url": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", + "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", "requires": { - "requestretry": "1.12.2" + "mime": "1.4.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "postcss": "6.0.21", + "xxhashjs": "0.2.2" } }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" }, - "smtp-connection": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", - "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", "requires": { - "httpntlm": "1.6.1", - "nodemailer-shared": "1.1.0" + "renderkid": "2.0.1", + "utila": "0.4.0" } }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "pretty-ms": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", + "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.1", - "use": "3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } + "parse-ms": "1.0.1", + "plur": "2.1.2" } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "optional": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "asap": "2.0.6" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "protractor": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.1.tgz", + "integrity": "sha512-AW9qJ0prx2QEMy1gnhJ1Sl1WBQL2R3fx/VnG09FEmWprPIQPK14t0B83OB/pAGddpxiDCAAV0KiNNLf2c2Y/lQ==", + "requires": { + "@types/node": "6.0.106", + "@types/q": "0.0.32", + "@types/selenium-webdriver": "2.53.43", + "blocking-proxy": "1.0.1", + "chalk": "1.1.3", + "glob": "7.1.2", + "jasmine": "2.8.0", + "jasminewd2": "2.2.0", + "optimist": "0.6.1", + "q": "1.4.1", + "saucelabs": "1.3.0", + "selenium-webdriver": "3.6.0", + "source-map-support": "0.4.18", + "webdriver-js-extender": "1.0.0", + "webdriver-manager": "12.0.6" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } + "@types/node": { + "version": "6.0.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.106.tgz", + "integrity": "sha512-U4Zv5fx7letrisRv6HgSSPSY00FZM4NMIkilt+IAExvQLuNa6jYVwCKcnSs2NqTN4+KDl9PskvcCiMce9iePCA==" }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "adm-zip": { + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.9.tgz", + "integrity": "sha512-eknaJ3Io/JasGGinVeqY5TsPlQgHbiNlHnK5zdFPRNs9XRggDykKz8zPesneOMEZJxWji7G3CfsUW0Ds9Dw0Bw==" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "kind-of": "6.0.2" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", "requires": { - "kind-of": "6.0.2" + "exit": "0.1.2", + "glob": "7.1.2", + "jasmine-core": "2.8.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=" + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "source-map": "0.5.7" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "webdriver-manager": { + "version": "12.0.6", + "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", + "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", + "requires": { + "adm-zip": "0.4.9", + "chalk": "1.1.3", + "del": "2.2.2", + "glob": "7.1.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "q": "1.4.1", + "request": "2.85.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "xml2js": "0.4.19" + } } } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "proxy-addr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", "requires": { - "kind-of": "3.2.2" + "forwarded": "0.1.2", + "ipaddr.js": "1.6.0" } }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "requires": { - "hoek": "2.16.3" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" } }, - "socket.io": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", - "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "debug": "2.6.9", - "engine.io": "3.1.4", - "socket.io-adapter": "1.1.1", - "socket.io-client": "2.0.4", - "socket.io-parser": "3.1.2" + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" - }, - "socket.io-client": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", - "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", + "pumpify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", + "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "2.6.9", - "engine.io-client": "3.1.4", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "3.1.2", - "to-array": "0.1.4" + "duplexify": "3.5.4", + "inherits": "2.0.3", + "pump": "2.0.1" } }, - "socket.io-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.2.tgz", - "integrity": "sha1-28IoIVH8T6675Aru3Ady66YZ9/I=", + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "querystringify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", + "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=" + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "requires": { - "component-emitter": "1.2.1", - "debug": "2.6.9", - "has-binary2": "1.0.2", - "isarray": "2.0.1" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } } } }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "requires": { - "faye-websocket": "0.10.0", - "uuid": "3.1.0" + "safe-buffer": "5.1.2" } }, - "sockjs-client": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", - "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "requires": { - "debug": "2.6.9", - "eventsource": "0.1.6", - "faye-websocket": "0.11.1", - "inherits": "2.0.3", - "json3": "3.3.2", - "url-parse": "1.3.0" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "randombytes": "2.0.6", + "safe-buffer": "5.1.2" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", "requires": { - "websocket-driver": "0.7.0" + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.4.0" } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" } } }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "raw-loader": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", + "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" + }, + "rc": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", + "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" + "pify": "2.3.0" }, "dependencies": { - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, - "socks-proxy-agent": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", - "integrity": "sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw==", + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, "requires": { - "agent-base": "2.1.1", - "extend": "3.0.1", - "socks": "1.1.10" + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.13", + "readdir-scoped-modules": "1.0.2", + "semver": "5.5.0", + "slide": "1.1.6", + "util-extend": "1.0.3" } }, - "sorcery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", - "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", + "read-package-json": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.13.tgz", + "integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==", + "dev": true, "requires": { - "buffer-crc32": "0.2.13", - "minimist": "1.2.0", - "sander": "0.5.1", - "sourcemap-codec": "1.4.1" + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "json-parse-better-errors": "1.0.2", + "normalize-package-data": "2.4.0", + "slash": "1.0.0" } }, - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "requires": { - "atob": "2.1.0", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + }, + "dependencies": { + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + } } }, - "source-map-support": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", - "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "requires": { - "source-map": "0.6.1" + "find-up": "1.1.2", + "read-pkg": "1.1.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "2.0.1" + } } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "sourcemap-codec": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", - "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==" - }, - "spdx": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", - "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", - "dev": true, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "spdx-exceptions": "1.0.5", - "spdx-license-ids": "1.2.2" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, - "spdx-compare": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", - "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", "dev": true, "requires": { - "spdx-expression-parse": "1.0.4", - "spdx-ranges": "1.0.1" + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" } }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "requires": { - "spdx-license-ids": "1.2.2" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" } }, - "spdx-exceptions": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", - "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", - "dev": true + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "requires": { + "indent-string": "3.2.0", + "strip-indent": "2.0.0" + } }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + "reflect-metadata": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.12.tgz", + "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==" }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" }, - "spdx-ranges": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", - "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", - "dev": true + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, - "spdx-satisfies": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", - "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", - "dev": true, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "requires": { - "spdx-compare": "0.1.2", - "spdx-expression-parse": "1.0.4" + "is-equal-shallow": "0.1.3" } }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "debug": "2.6.9", - "handle-thing": "1.2.5", - "http-deceiver": "1.2.7", - "safe-buffer": "5.1.1", - "select-hose": "2.0.0", - "spdy-transport": "2.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, - "spdy-transport": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", - "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", - "requires": { - "debug": "2.6.9", - "detect-node": "2.0.3", - "hpack.js": "2.1.6", - "obuf": "1.1.2", - "readable-stream": "2.3.3", - "safe-buffer": "5.1.1", - "wbuf": "1.7.3" + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "requires": { + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "requires": { - "through": "2.3.8" + "rc": "1.2.6", + "safe-buffer": "5.1.2" } }, - "split-string": { + "registry-url": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "requires": { - "extend-shallow": "3.0.2" + "rc": "1.2.6" } }, - "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { - "through2": "2.0.3" + "jsesc": "0.5.0" } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "css-select": "1.2.0", + "dom-converter": "0.1.4", + "htmlparser2": "3.3.0", + "strip-ansi": "3.0.1", + "utila": "0.3.3" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=" } } }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "requires": { - "safe-buffer": "5.1.1" - } + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - } + "is-finite": "1.0.2" } }, - "stats-webpack-plugin": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", - "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", + "request": { + "version": "2.85.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", + "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "requires": { - "lodash": "4.17.4" + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" } }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "requires": { - "readable-stream": "2.3.3" + "path-parse": "1.0.5" } }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "resolve-from": "3.0.0" } }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "optional": true, "requires": { - "duplexer2": "0.1.4", - "readable-stream": "2.3.3" + "align-text": "0.1.4" } }, - "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "end-of-stream": "1.4.1", - "stream-shift": "1.0.0" + "glob": "7.1.2" } }, - "stream-http": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "rollup": { + "version": "0.57.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.57.1.tgz", + "integrity": "sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA==", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "@types/acorn": "4.0.3", + "acorn": "5.5.3", + "acorn-dynamic-import": "3.0.0", + "date-time": "2.1.0", + "is-reference": "1.1.0", + "locate-character": "2.0.5", + "pretty-ms": "3.1.0", + "require-relative": "0.8.7", + "rollup-pluginutils": "2.0.1", + "signal-exit": "3.0.2", + "sourcemap-codec": "1.4.1" } }, - "streamroller": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.6.0.tgz", - "integrity": "sha1-CV17BsfMUlg1ytLlmPdrseDuaTo=", + "rollup-plugin-commonjs": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.0.tgz", + "integrity": "sha512-NrfE0g30QljNCnlJr7I2Xguz+44mh0dCxvfxwLnCwtaCK2LwFUp1zzAs8MQuOfhH4mRskqsjfOwGUap/L+WtEw==", "requires": { - "date-format": "1.2.0", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "readable-stream": "2.3.3" + "estree-walker": "0.5.1", + "magic-string": "0.22.5", + "resolve": "1.7.1", + "rollup-pluginutils": "2.0.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", + "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==" + } } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "rollup-plugin-node-resolve": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", + "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "builtin-modules": "2.0.0", + "is-module": "1.0.0", + "resolve": "1.7.1" + }, + "dependencies": { + "builtin-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", + "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==" + } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "rollup-pluginutils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", + "integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=", "requires": { - "safe-buffer": "5.1.1" + "estree-walker": "0.3.1", + "micromatch": "2.3.11" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "requires": { - "ansi-regex": "2.1.1" + "aproba": "1.2.0" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "rxjs": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", + "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", "requires": { - "is-utf8": "0.2.1" + "tslib": "1.9.0" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "get-stdin": "4.0.1" + "ret": "0.1.15" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "style-loader": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", - "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", + "sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", "requires": { - "loader-utils": "1.1.0", - "schema-utils": "0.4.5" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.4.0", - "ajv-keywords": "3.1.0" - } - } + "es6-promise": "3.3.1", + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" } }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "sass-graph": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", + "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "requires": { - "css-parse": "1.7.0", - "debug": "2.6.9", - "glob": "7.0.6", - "mkdirp": "0.5.1", - "sax": "0.5.8", - "source-map": "0.1.43" + "glob": "7.1.2", + "lodash": "4.17.10", + "scss-tokenizer": "0.2.3", + "yargs": "7.1.0" }, "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" } }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "requires": { - "amdefine": "1.0.1" + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "5.0.0" } } } }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", + "sass-loader": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.0.1.tgz", + "integrity": "sha512-MeVVJFejJELlAbA7jrRchi88PGP6U9yIfqyiG+bBC4a9s2PX+ulJB9h8bbEohtPBfZmlLhNZ0opQM9hovRXvlw==", "requires": { + "clone-deep": "2.0.2", "loader-utils": "1.1.0", - "lodash.clonedeep": "4.5.0", - "when": "3.6.4" - }, - "dependencies": { - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=" - } + "lodash.tail": "4.1.1", + "neo-async": "2.5.1", + "pify": "3.0.0" } }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "saucelabs": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", + "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", "requires": { - "minimist": "1.2.0" + "https-proxy-agent": "1.0.0" } }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "has-flag": "1.0.0" + "ajv": "6.4.0", + "ajv-keywords": "3.1.0" } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, - "syntax-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", - "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "requires": { - "acorn": "4.0.13" + "js-base64": "2.4.3", + "source-map": "0.4.4" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } } }, - "tapable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", - "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==" + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" }, - "tar": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", - "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", + "selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", "requires": { - "chownr": "1.0.1", - "minipass": "2.2.1", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "yallist": "3.0.2" + "jszip": "3.1.5", + "rimraf": "2.6.2", + "tmp": "0.0.30", + "xml2js": "0.4.19" }, "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + "tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", + "requires": { + "os-tmpdir": "1.0.2" + } } } }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "selfsigned": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.2.tgz", + "integrity": "sha1-tESVgNmZKbZbEKSDiTAaZZIIh1g=", + "requires": { + "node-forge": "0.7.1" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "requires": { + "semver": "5.5.0" + } + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", "requires": { - "os-tmpdir": "1.0.2", - "rimraf": "2.2.8" + "semver": "5.5.0" } }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "semver-intersect": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz", + "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=", "requires": { - "execa": "0.7.0" + "semver": "5.5.0" } }, - "text-extensions": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", - "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" + "debug": "2.6.9", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.3", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" } }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", - "optional": true - }, - "thunky": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", - "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" - }, - "time-zone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", - "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=" - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==" }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "requires": { - "process": "0.11.10" + "accepts": "1.3.5", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "1.0.3", + "http-errors": "1.6.3", + "mime-types": "2.1.18", + "parseurl": "1.3.2" } }, - "timespan": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", - "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", - "optional": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "requires": { - "os-tmpdir": "1.0.2" + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.2" } }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "to-arraybuffer": { + "set-immediate-shim": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "kind-of": "3.2.2" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } } }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-extendable": "0.1.1", + "kind-of": "5.1.0", + "mixin-object": "2.0.1" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - } + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, - "toposort": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", - "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=" + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", "requires": { - "punycode": "1.4.1" + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" } }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==" + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, - "treeify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.0.1.tgz", - "integrity": "sha1-abPNAiAioWhCTnz6HO1EyTnT6y8=", - "dev": true + "silent-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", + "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", + "requires": { + "debug": "2.6.9" + } }, - "trim-newlines": { + "slash": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" }, - "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "glob": "6.0.4" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" }, "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" } } } }, - "ts-node": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.0.tgz", - "integrity": "sha512-mlSim/sQS1s5iT3KZEKXRaqsGC7xM2QoxkrhfznZJyou18dl47PTnY7/KMmbGqiVoQrO9Hk53CYpcychF5TNrQ==", + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "arrify": "1.0.1", - "chalk": "2.3.1", - "diff": "3.4.0", - "make-error": "1.3.2", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map-support": "0.5.3", - "yn": "2.0.0" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { - "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" + "is-descriptor": "1.0.2" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "6.0.2" + } }, - "source-map-support": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", - "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==", + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "source-map": "0.6.1" + "kind-of": "6.0.2" } }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "has-flag": "3.0.0" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, - "tsickle": { - "version": "0.27.5", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", - "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map": "0.6.1", - "source-map-support": "0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } + "kind-of": "3.2.2" } }, - "tslib": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", - "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.1" + } }, - "tslint": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", - "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "socket.io": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.7.3.tgz", + "integrity": "sha1-uK+cq6AJSeVo42nxMn6pvp6iRhs=", "requires": { - "babel-code-frame": "6.26.0", - "builtin-modules": "1.1.1", - "chalk": "2.3.0", - "commander": "2.12.2", - "diff": "3.4.0", - "glob": "7.1.2", - "js-yaml": "3.10.0", - "minimatch": "3.0.4", - "resolve": "1.5.0", - "semver": "5.4.1", - "tslib": "1.8.1", - "tsutils": "2.22.2" + "debug": "2.3.3", + "engine.io": "1.8.3", + "has-binary": "0.1.7", + "object-assign": "4.1.0", + "socket.io-adapter": "0.5.0", + "socket.io-client": "1.7.3", + "socket.io-parser": "2.3.1" }, "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ms": "0.7.2" } }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "object-assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=" + } + } + }, + "socket.io-adapter": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz", + "integrity": "sha1-y21LuL7IHhB4uZZ3+c7QBGBmu4s=", + "requires": { + "debug": "2.3.3", + "socket.io-parser": "2.3.1" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", "requires": { - "path-parse": "1.0.5" + "ms": "0.7.2" } }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" + } + } + }, + "socket.io-client": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.3.tgz", + "integrity": "sha1-sw6GqhDV7zVGYBwJzeR2Xjgdo3c=", + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "2.3.3", + "engine.io-client": "1.8.3", + "has-binary": "0.1.7", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseuri": "0.0.5", + "socket.io-parser": "2.3.1", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", "requires": { - "has-flag": "2.0.0" + "ms": "0.7.2" } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" } } }, - "tsscmp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", - "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", - "optional": true - }, - "tsutils": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.22.2.tgz", - "integrity": "sha512-u06FUSulCJ+Y8a2ftuqZN6kIGqdP2yJjUPEngXqmdPND4UQfb04igcotH+dw+IFr417yP6muCLE8/5/Qlfnx0w==", + "socket.io-parser": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz", + "integrity": "sha1-3VMgJRA85Clpcya+/WQAX8/ltKA=", "requires": { - "tslib": "1.8.1" + "component-emitter": "1.1.2", + "debug": "2.2.0", + "isarray": "0.0.1", + "json3": "3.3.2" + }, + "dependencies": { + "component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=" + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "requires": { + "ms": "0.7.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" + } } }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", "requires": { - "safe-buffer": "5.1.1" + "faye-websocket": "0.10.0", + "uuid": "3.2.1" } }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "sockjs-client": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", + "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", "requires": { - "prelude-ls": "1.1.2" + "debug": "2.6.9", + "eventsource": "0.1.6", + "faye-websocket": "0.11.1", + "inherits": "2.0.3", + "json3": "3.3.2", + "url-parse": "1.4.0" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "requires": { + "websocket-driver": "0.7.0" + } + } } }, - "type-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "sorcery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", + "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", "requires": { - "media-typer": "0.3.0", - "mime-types": "2.1.17" + "buffer-crc32": "0.2.13", + "minimist": "1.2.0", + "sander": "0.5.1", + "sourcemap-codec": "1.4.1" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" }, - "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==" + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "optional": true, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", - "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", + "source-map-support": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", + "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "requires": { - "cacache": "10.0.4", - "find-cache-dir": "1.0.0", - "schema-utils": "0.4.5", - "serialize-javascript": "1.5.0", - "source-map": "0.6.1", - "uglify-es": "3.3.9", - "webpack-sources": "1.1.0", - "worker-farm": "1.6.0" + "buffer-from": "1.0.0", + "source-map": "0.6.1" }, "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.4.0", - "ajv-keywords": "3.1.0" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "requires": { - "commander": "2.13.0", - "source-map": "0.6.1" - } } } }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" - }, - "umd": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", - "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=" + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" + "sourcemap-codec": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", + "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==" }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "spdx": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/spdx/-/spdx-0.5.1.tgz", + "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", + "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "spdx-exceptions": "1.0.5", + "spdx-license-ids": "1.2.2" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } + "spdx-exceptions": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.5.tgz", + "integrity": "sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y=", + "dev": true }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" - } + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true } } }, - "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "spdx-compare": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-0.1.2.tgz", + "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", + "dev": true, "requires": { - "unique-slug": "2.0.0" + "spdx-expression-parse": "1.0.4", + "spdx-ranges": "1.0.1" + }, + "dependencies": { + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + } } }, - "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "requires": { - "imurmurhash": "0.1.4" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "requires": { - "crypto-random-string": "1.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, - "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "spdx-ranges": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-1.0.1.tgz", + "integrity": "sha1-D07se46kjtIC43S7iULo0Y3AET4=", + "dev": true }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "spdx-satisfies": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-0.1.3.tgz", + "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", + "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "spdx-compare": "0.1.2", + "spdx-expression-parse": "1.0.4" }, "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true } } }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "requires": { + "debug": "2.6.9", + "handle-thing": "1.2.5", + "http-deceiver": "1.2.7", + "safe-buffer": "5.1.2", + "select-hose": "2.0.0", + "spdy-transport": "2.1.0" + } }, - "upath": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", - "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" + "spdy-transport": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "requires": { + "debug": "2.6.9", + "detect-node": "2.0.3", + "hpack.js": "2.1.6", + "obuf": "1.1.2", + "readable-stream": "2.3.6", + "safe-buffer": "5.1.2", + "wbuf": "1.7.3" + } }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "requires": { - "boxen": "1.3.0", - "chalk": "2.2.2", - "configstore": "3.1.2", - "import-lazy": "2.1.0", - "is-ci": "1.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "through": "2.3.8" } }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "3.0.2" + } }, - "uri-js": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", - "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" - } + "through2": "2.0.3" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=" }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "sshpk": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" } }, - "url-join": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", - "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "requires": { + "safe-buffer": "5.1.2" + } }, - "url-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz", - "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==", + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "loader-utils": "1.1.0", - "mime": "2.2.0", - "schema-utils": "0.4.5" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { - "ajv": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", - "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", - "requires": { - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "ajv": "6.2.1", - "ajv-keywords": "3.1.0" + "is-descriptor": "0.1.6" } } } }, - "url-parse": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.3.0.tgz", - "integrity": "sha512-zPvPA3T7P6M+0iNsgX+iAcAz4GshKrowtQBHHc/28tVsBc8jK7VRCNX+2GEcoE6zDB6XqXhcyiUWPVZY6C70Cg==", + "stats-webpack-plugin": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", + "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", "requires": { - "querystringify": "1.0.0", - "requires-port": "1.0.0" - }, - "dependencies": { - "querystringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", - "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=" - } + "lodash": "4.17.10" } }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "stdout-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", + "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", "requires": { - "prepend-http": "1.0.4" + "readable-stream": "2.3.6" } }, - "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", + "stream-each": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "requires": { - "lru-cache": "2.2.4", - "tmp": "0.0.33" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=" - } + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" } }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "stream-http": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", + "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - } + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", - "dev": true - }, - "util.promisify": { + "stream-shift": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "define-properties": "1.1.2", - "object.getownpropertydescriptors": "2.0.3" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.2" + } }, - "uws": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz", - "integrity": "sha1-Z6rzPEaypYel9mZtAPdpEyjxSdw=", - "optional": true + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" }, - "validate-npm-package-license": { + "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "ansi-regex": "2.1.1" } }, - "validate-npm-package-name": { + "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "requires": { - "builtins": "1.0.3" - } + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "style-loader": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", + "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", "requires": { - "indexof": "0.0.1" + "loader-utils": "1.1.0", + "schema-utils": "0.4.5" } }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" - }, - "watchpack": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", - "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", "requires": { - "chokidar": "2.0.3", - "graceful-fs": "4.1.11", - "neo-async": "2.5.0" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "requires": { - "micromatch": "3.1.10", - "normalize-path": "2.1.1" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "chokidar": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", - "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", - "requires": { - "anymatch": "2.0.0", - "async-each": "1.0.1", - "braces": "2.3.2", - "fsevents": "1.1.3", - "glob-parent": "3.1.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "4.0.0", - "normalize-path": "2.1.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0", - "upath": "1.0.4" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "2.1.1" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "6.0.2" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "6.0.2" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "css-parse": "1.7.0", + "debug": "2.6.9", + "glob": "7.0.6", + "mkdirp": "0.5.1", + "sax": "0.5.8", + "source-map": "0.1.43" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "requires": { - "is-extglob": "2.1.1" + "amdefine": "1.0.1" } - }, + } + } + }, + "stylus-loader": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", + "requires": { + "loader-utils": "1.1.0", + "lodash.clonedeep": "4.5.0", + "when": "3.6.4" + } + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "requires": { + "minimist": "1.2.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "requires": { + "has-flag": "3.0.0" + } + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==" + }, + "tar": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", + "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", + "requires": { + "chownr": "1.0.1", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "yallist": "3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + } + } + }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "requires": { + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" + } + } + }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "requires": { + "execa": "0.7.0" + } + }, + "text-extensions": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", + "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.6", + "xtend": "4.0.1" + } + }, + "thunky": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" + }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=" + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "requires": { + "setimmediate": "1.0.5" + } + }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + } + } + }, + "toposort": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", + "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=" + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "requires": { + "punycode": "1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "tree-kill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==" + }, + "treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "true-case-path": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", + "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "requires": { + "glob": "6.0.4" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } } } }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "requires": { - "minimalistic-assert": "1.0.0" - } - }, - "webdriver-js-extender": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", - "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", + "ts-node": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz", + "integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==", "requires": { - "@types/selenium-webdriver": "2.53.43", - "selenium-webdriver": "2.53.3" + "arrify": "1.0.1", + "chalk": "2.4.1", + "diff": "3.5.0", + "make-error": "1.3.4", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map-support": "0.5.5", + "yn": "2.0.0" }, "dependencies": { - "sax": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz", - "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=" - }, - "selenium-webdriver": { - "version": "2.53.3", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", - "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", - "requires": { - "adm-zip": "0.4.4", - "rimraf": "2.2.8", - "tmp": "0.0.24", - "ws": "1.1.5", - "xml2js": "0.4.4" - } - }, - "tmp": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", - "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=" - }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" - }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "requires": { - "options": "0.0.6", - "ultron": "1.0.2" - } - }, - "xml2js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", - "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "sax": "0.6.1", - "xmlbuilder": "9.0.7" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } } } }, - "webpack": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.6.0.tgz", - "integrity": "sha512-Fu/k/3fZeGtIhuFkiYpIy1UDHhMiGKjG4FFPVuvG+5Os2lWA1ttWpmi9Qnn6AgfZqj9MvhZW/rmj/ip+nHr06g==", + "tsickle": { + "version": "0.27.5", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", + "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", "requires": { - "acorn": "5.5.3", - "acorn-dynamic-import": "3.0.0", - "ajv": "6.4.0", - "ajv-keywords": "3.1.0", - "chrome-trace-event": "0.1.3", - "enhanced-resolve": "4.0.0", - "eslint-scope": "3.7.1", - "loader-runner": "2.3.0", - "loader-utils": "1.1.0", - "memory-fs": "0.4.1", - "micromatch": "3.1.10", + "minimist": "1.2.0", "mkdirp": "0.5.1", - "neo-async": "2.5.0", - "node-libs-browser": "2.1.0", - "schema-utils": "0.4.5", - "tapable": "1.0.0", - "uglifyjs-webpack-plugin": "1.2.5", - "watchpack": "1.5.0", - "webpack-sources": "1.1.0" + "source-map": "0.6.1", + "source-map-support": "0.5.5" }, "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + }, + "tslint": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "requires": { + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.4.1", + "commander": "2.15.1", + "diff": "3.5.0", + "glob": "7.1.2", + "js-yaml": "3.11.0", + "minimatch": "3.0.4", + "resolve": "1.7.1", + "semver": "5.5.0", + "tslib": "1.9.0", + "tsutils": "2.22.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } + } + } + }, + "tsutils": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.22.2.tgz", + "integrity": "sha512-u06FUSulCJ+Y8a2ftuqZN6kIGqdP2yJjUPEngXqmdPND4UQfb04igcotH+dw+IFr417yP6muCLE8/5/Qlfnx0w==", + "requires": { + "tslib": "1.9.0" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.18" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==" + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", + "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", + "requires": { + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.5.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.6.0" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "requires": { - "kind-of": "6.0.2" + "commander": "2.13.0", + "source-map": "0.6.1" } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + } + } + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "kind-of": "6.0.2" + "is-extendable": "0.1.1" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "requires": { + "unique-slug": "2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "requires": { + "imurmurhash": "0.1.4" + } + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "requires": { + "crypto-random-string": "1.0.0" + } + }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "kind-of": "3.2.2" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { - "is-buffer": "1.1.6" + "isarray": "1.0.0" } } } }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" + }, + "upath": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.5.tgz", + "integrity": "sha512-qbKn90aDQ0YEwvXoLqj0oiuUYroLX2lVHZ+b+xwjozFasAOC4GneDq5+OaIG5Zj+jFmbz/uO+f7a9qxjktJQww==" + }, + "update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "requires": { + "boxen": "1.3.0", + "chalk": "2.2.2", + "configstore": "3.1.2", + "import-lazy": "2.1.0", + "is-ci": "1.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "requires": { + "punycode": "2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-join": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" + }, + "url-loader": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz", + "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==", + "requires": { + "loader-utils": "1.1.0", + "mime": "2.3.1", + "schema-utils": "0.4.5" + }, + "dependencies": { + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" + } + } + }, + "url-parse": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz", + "integrity": "sha512-ERuGxDiQ6Xw/agN4tuoCRbmwRuZP0cJ1lJxJubXr5Q/5cDa78+Dc4wfvtxzhzhkm5VvmW6Mf8EVj9SPGN4l8Lg==", + "requires": { + "querystringify": "2.0.0", + "requires-port": "1.0.0" + }, + "dependencies": { + "querystringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", + "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==" + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "1.0.4" + } + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" - } - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.4.0", - "ajv-keywords": "3.1.0" - } } } }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "useragent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", + "requires": { + "lru-cache": "4.1.2", + "tmp": "0.0.31" + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "1.1.2", + "object.getownpropertydescriptors": "2.0.3" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "requires": { + "builtins": "1.0.3" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "requires": { + "chokidar": "2.0.3", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "requires": { - "source-list-map": "0.1.8", - "source-map": "0.4.4" + "minimalistic-assert": "1.0.1" + } + }, + "webdriver-js-extender": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", + "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", + "requires": { + "@types/selenium-webdriver": "2.53.43", + "selenium-webdriver": "2.53.3" }, "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=" + "sax": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz", + "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=" }, - "source-map": { + "selenium-webdriver": { + "version": "2.53.3", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", + "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", + "requires": { + "adm-zip": "0.4.4", + "rimraf": "2.6.2", + "tmp": "0.0.24", + "ws": "1.1.2", + "xml2js": "0.4.4" + } + }, + "tmp": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", + "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=" + }, + "xml2js": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", + "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", "requires": { - "amdefine": "1.0.1" + "sax": "0.6.1", + "xmlbuilder": "9.0.7" } } } }, - "webpack-dev-middleware": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.2.tgz", - "integrity": "sha512-Z11Zp3GTvCe6mGbbtma+lMB9xRfJcNtupXfmvFBujyXqLNms6onDnSi9f/Cb2rw6KkD5kgibOfxhN7npZwTiGA==", + "webpack": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.6.0.tgz", + "integrity": "sha512-Fu/k/3fZeGtIhuFkiYpIy1UDHhMiGKjG4FFPVuvG+5Os2lWA1ttWpmi9Qnn6AgfZqj9MvhZW/rmj/ip+nHr06g==", "requires": { - "loud-rejection": "1.6.0", + "acorn": "5.5.3", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.4.0", + "ajv-keywords": "3.1.0", + "chrome-trace-event": "0.1.3", + "enhanced-resolve": "4.0.0", + "eslint-scope": "3.7.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", "memory-fs": "0.4.1", - "mime": "2.3.1", - "path-is-absolute": "1.0.1", - "range-parser": "1.2.0", - "url-join": "4.0.0", - "webpack-log": "1.2.0" - }, - "dependencies": { - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" - } - } - }, - "webpack-dev-server": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.3.tgz", - "integrity": "sha512-UXfgQIPpdw2rByoUnCrMAIXCS7IJJMp5N0MDQNk9CuQvirCkuWlu7gQpCS8Kaiz4kogC4TdAQHG3jzh/DdqEWg==", - "requires": { - "ansi-html": "0.0.7", - "array-includes": "3.0.3", - "bonjour": "3.5.0", - "chokidar": "2.0.3", - "compression": "1.7.2", - "connect-history-api-fallback": "1.5.0", - "debug": "3.1.0", - "del": "3.0.0", - "express": "4.16.2", - "html-entities": "1.2.1", - "http-proxy-middleware": "0.18.0", - "import-local": "1.0.0", - "internal-ip": "1.2.0", - "ip": "1.1.5", - "killable": "1.0.0", - "loglevel": "1.6.1", - "opn": "5.1.0", - "portfinder": "1.0.13", - "selfsigned": "1.10.2", - "serve-index": "1.9.1", - "sockjs": "0.3.19", - "sockjs-client": "1.1.4", - "spdy": "3.4.7", - "strip-ansi": "3.0.1", - "supports-color": "5.4.0", - "webpack-dev-middleware": "3.1.2", - "webpack-log": "1.2.0", - "yargs": "11.0.0" + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "neo-async": "2.5.1", + "node-libs-browser": "2.1.0", + "schema-utils": "0.4.5", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.2.5", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "requires": { - "micromatch": "3.1.10", - "normalize-path": "2.1.1" - } - }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -12654,71 +10825,6 @@ } } }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "chokidar": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", - "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", - "requires": { - "anymatch": "2.0.0", - "async-each": "1.0.1", - "braces": "2.3.2", - "fsevents": "1.1.3", - "glob-parent": "3.1.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "4.0.0", - "normalize-path": "2.1.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0", - "upath": "1.0.4" - } - }, - "cliui": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", - "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", - "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "requires": { - "globby": "6.1.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "p-map": "1.2.0", - "pify": "3.0.0", - "rimraf": "2.2.8" - } - }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -12733,14 +10839,6 @@ "to-regex": "3.0.2" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -12826,100 +10924,44 @@ }, "dependencies": { "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "1.0.2" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - } - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-extglob": "2.1.1" + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" } } } }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } } } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", @@ -12946,24 +10988,6 @@ "kind-of": "6.0.2" } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "2.1.1" - } - }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -13011,6 +11035,168 @@ "snapdragon": "0.8.2", "to-regex": "3.0.2" } + } + } + }, + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "requires": { + "source-list-map": "0.1.8", + "source-map": "0.4.4" + }, + "dependencies": { + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=" + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "webpack-dev-middleware": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", + "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", + "requires": { + "loud-rejection": "1.6.0", + "memory-fs": "0.4.1", + "mime": "2.3.1", + "path-is-absolute": "1.0.1", + "range-parser": "1.2.0", + "url-join": "4.0.0", + "webpack-log": "1.2.0" + }, + "dependencies": { + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" + } + } + }, + "webpack-dev-server": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.3.tgz", + "integrity": "sha512-UXfgQIPpdw2rByoUnCrMAIXCS7IJJMp5N0MDQNk9CuQvirCkuWlu7gQpCS8Kaiz4kogC4TdAQHG3jzh/DdqEWg==", + "requires": { + "ansi-html": "0.0.7", + "array-includes": "3.0.3", + "bonjour": "3.5.0", + "chokidar": "2.0.3", + "compression": "1.7.2", + "connect-history-api-fallback": "1.5.0", + "debug": "3.1.0", + "del": "3.0.0", + "express": "4.16.3", + "html-entities": "1.2.1", + "http-proxy-middleware": "0.18.0", + "import-local": "1.0.0", + "internal-ip": "1.2.0", + "ip": "1.1.5", + "killable": "1.0.0", + "loglevel": "1.6.1", + "opn": "5.3.0", + "portfinder": "1.0.13", + "selfsigned": "1.10.2", + "serve-index": "1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.1.4", + "spdy": "3.4.7", + "strip-ansi": "3.0.1", + "supports-color": "5.4.0", + "webpack-dev-middleware": "3.1.2", + "webpack-log": "1.2.0", + "yargs": "11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "requires": { + "globby": "6.1.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "p-map": "1.2.0", + "pify": "3.0.0", + "rimraf": "2.6.2" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" }, "os-locale": { "version": "2.1.0", @@ -13022,11 +11208,6 @@ "mem": "1.1.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -13046,12 +11227,18 @@ } } }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "webpack-dev-middleware": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.2.tgz", + "integrity": "sha512-Z11Zp3GTvCe6mGbbtma+lMB9xRfJcNtupXfmvFBujyXqLNms6onDnSi9f/Cb2rw6KkD5kgibOfxhN7npZwTiGA==", "requires": { - "has-flag": "3.0.0" + "loud-rejection": "1.6.0", + "memory-fs": "0.4.1", + "mime": "2.3.1", + "path-is-absolute": "1.0.1", + "range-parser": "1.2.0", + "url-join": "4.0.0", + "webpack-log": "1.2.0" } }, "which-module": { @@ -13069,7 +11256,7 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "requires": { - "cliui": "4.0.0", + "cliui": "4.1.0", "decamelize": "1.2.0", "find-up": "2.1.0", "get-caller-file": "1.0.2", @@ -13100,8 +11287,8 @@ "requires": { "chalk": "2.2.2", "log-symbols": "2.2.0", - "loglevelnext": "1.0.4", - "uuid": "3.1.0" + "loglevelnext": "1.0.5", + "uuid": "3.2.1" } }, "webpack-merge": { @@ -13109,14 +11296,7 @@ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.2.tgz", "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==", "requires": { - "lodash": "4.17.5" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - } + "lodash": "4.17.10" } }, "webpack-sources": { @@ -13148,7 +11328,7 @@ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", "requires": { - "http-parser-js": "0.4.11", + "http-parser-js": "0.4.12", "websocket-extensions": "0.1.3" } }, @@ -13158,10 +11338,9 @@ "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" }, "when": { - "version": "3.7.8", - "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", - "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", - "optional": true + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", + "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=" }, "which": { "version": "1.3.0", @@ -13238,21 +11417,6 @@ "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "requires": { "errno": "0.1.7" - }, - "dependencies": { - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "requires": { - "prr": "1.0.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - } } }, "wrap-ansi": { @@ -13280,15 +11444,19 @@ } }, "ws": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz", - "integrity": "sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", + "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", "requires": { - "async-limiter": "1.0.0", - "safe-buffer": "5.1.1", - "ultron": "1.1.1" + "options": "0.0.6", + "ultron": "1.0.2" } }, + "wtf-8": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz", + "integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=" + }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", @@ -13299,11 +11467,6 @@ "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" }, - "xml-char-classes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", - "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=" - }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", @@ -13311,6 +11474,13 @@ "requires": { "sax": "1.2.4", "xmlbuilder": "9.0.7" + }, + "dependencies": { + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + } } }, "xmlbuilder": { @@ -13319,15 +11489,9 @@ "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" }, "xmlhttprequest-ssl": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.4.tgz", - "integrity": "sha1-BPVgkVcks4kIhxXMDteBPpZ3v1c=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", - "optional": true + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz", + "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=" }, "xtend": { "version": "4.0.1", @@ -13335,9 +11499,9 @@ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "xxhashjs": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.1.tgz", - "integrity": "sha1-m76b6JYUKXbfo0wGGy0GjEPTDeA=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", + "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", "requires": { "cuint": "0.2.2" } @@ -13362,14 +11526,6 @@ "cliui": "2.1.0", "decamelize": "1.2.0", "window-size": "0.1.0" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "optional": true - } } }, "yargs-parser": { @@ -13398,9 +11554,9 @@ "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" }, "zone.js": { - "version": "0.8.20", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.20.tgz", - "integrity": "sha512-FXlA37ErSXCMy5RNBcGFgCI/Zivqzr0D19GuvDxhcYIJc7xkFp6c29DKyODJu0Zo+EMyur/WPPgcBh1EHjB9jA==" + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz", + "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" } } } diff --git a/package.json b/package.json index 99020beccc..e4c81c8264 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "bootstrap": "^4.0.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", - "chokidar": "^1.7.0", + "chokidar": "^2.0.3", "circular-dependency-plugin": "^5.0.2", "clean-css": "^4.1.11", "codelyzer": "^4.2.1", @@ -101,14 +101,14 @@ "jasmine": "^2.6.0", "jasmine-spec-reporter": "^3.2.0", "jquery": "^3.3.1", - "karma": "~2.0.0", + "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-source-map-support": "^1.2.0", - "less": "^3.0.1", + "less": "^3.0.2", "less-loader": "^4.1.0", "license-webpack-plugin": "^1.3.1", "loader-utils": "^1.1.0", @@ -131,7 +131,6 @@ "postcss-url": "^7.3.1", "protractor": "^5.3.1", "raw-loader": "^0.5.1", - "request": "^2.83.0", "resolve": "^1.5.0", "rxjs": "^6.0.0", "sass-loader": "^7.0.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index f386fc8dbd..45dbed6647 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -26,7 +26,7 @@ "istanbul": "^0.4.5", "istanbul-instrumenter-loader": "^3.0.1", "karma-source-map-support": "^1.2.0", - "less": "^3.0.1", + "less": "^3.0.2", "less-loader": "^4.1.0", "license-webpack-plugin": "^1.3.1", "lodash": "^4.17.4", @@ -42,7 +42,6 @@ "postcss-loader": "^2.1.4", "postcss-url": "^7.3.1", "raw-loader": "^0.5.1", - "request": "^2.83.0", "resolve": "^1.5.0", "rxjs": "^6.0.0", "sass-loader": "^7.0.1", diff --git a/packages/angular_devkit/build_angular/test/utils/request.ts b/packages/angular_devkit/build_angular/test/utils/request.ts index 9d0d0be91c..6e3450a63b 100644 --- a/packages/angular_devkit/build_angular/test/utils/request.ts +++ b/packages/angular_devkit/build_angular/test/utils/request.ts @@ -5,25 +5,50 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { IncomingMessage } from 'http'; -import * as _request from 'request'; +import * as http from 'http'; +import * as https from 'https'; +import * as Url from 'url'; export function request(url: string, headers = {}): Promise { return new Promise((resolve, reject) => { - const options = { - url: url, + const u = Url.parse(url); + const options: http.RequestOptions = { + hostname: u.hostname, + protocol: u.protocol, + host: u.host, + port: u.port, + path: u.path, headers: { 'Accept': 'text/html', ...headers }, - agentOptions: { rejectUnauthorized: false }, }; - // tslint:disable-next-line:no-any - _request(options, (error: any, response: IncomingMessage, body: string) => { - if (error) { - reject(error); - } else if (response.statusCode && response.statusCode >= 400) { - reject(new Error(`Requesting "${url}" returned status code ${response.statusCode}.`)); + + function _callback(res: http.IncomingMessage) { + if (!res.statusCode || res.statusCode >= 400) { + // Consume the rest of the data to free memory. + res.resume(); + reject(new Error(`Requesting "${url}" returned status code ${res.statusCode}.`)); } else { - resolve(body); + res.setEncoding('utf8'); + let data = ''; + res.on('data', chunk => { + data += chunk; + }); + res.on('end', () => { + try { + resolve(data); + } catch (err) { + reject(err); + } + }); } - }); + } + + if (u.protocol == 'https:') { + options.agent = new https.Agent({ rejectUnauthorized: false }); + https.get(options, _callback); + } else if (u.protocol == 'http:') { + http.get(options, _callback); + } else { + throw new Error(`Unknown protocol: ${JSON.stringify(u.protocol)}.`); + } }); } diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 6675b847e1..18e4697deb 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -12,7 +12,7 @@ ], "dependencies": { "ajv": "~6.4.0", - "chokidar": "^1.7.0", + "chokidar": "^2.0.3", "source-map": "^0.5.6", "rxjs": "^6.0.0" } From b4f1a64bfa1055a4b9c5702c67ff620c4fe5b601 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 30 Apr 2018 15:18:54 -0700 Subject: [PATCH 531/724] fix(@angular-devkit/build-angular): build with empty assets array Fix https://github.com/angular/angular-cli/issues/10438#issuecomment-385385175 --- .../src/utils/normalize-asset-patterns.ts | 7 +++++++ .../build_angular/test/browser/assets_spec_large.ts | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts b/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts index 27d2d9d995..faf66dac43 100644 --- a/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts +++ b/packages/angular_devkit/build_angular/src/utils/normalize-asset-patterns.ts @@ -38,6 +38,13 @@ export function normalizeAssetPatterns( const sourceRoot = maybeSourceRoot || join(projectRoot, 'src'); const resolvedSourceRoot = resolve(root, sourceRoot); + if (assetPatterns.length === 0) { + // If there are no asset patterns, return an empty array. + // It's important to do this because forkJoin with an empty array will immediately complete + // the observable. + return of([]); + } + const assetPatternObjectObservables: Observable[] = assetPatterns .map(assetPattern => { // Normalize string asset patterns to objects. diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index 183973b822..fbc5c3255e 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -7,7 +7,7 @@ */ import { normalize, virtualFs } from '@angular-devkit/core'; -import { tap } from 'rxjs/operators'; +import { tap, toArray } from 'rxjs/operators'; import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; @@ -91,4 +91,15 @@ describe('Browser Builder assets', () => { // node_modules folder will hit this one and can fail. host.scopedSync().delete(normalize('./node_modules')); }, Timeout.Basic); + + it('still builds with empty asset array', (done) => { + const overrides = { + assets: [], + }; + + runTargetSpec(host, browserTargetSpec, overrides).pipe( + toArray(), + tap((buildEvents) => expect(buildEvents.length).toBe(1)), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); }); From 822f1e5f22a1e2152590232abce7e7e876c7705f Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 30 Apr 2018 15:18:28 -0700 Subject: [PATCH 532/724] fix(@schematics/update): fix major of angular compat with major + 1 When there are complex ranges, ltr(x) is not equal to !gtr(x). Fix angular/angular-cli#10540 --- packages/schematics/update/update/index.ts | 7 +-- .../schematics/update/update/index_spec.ts | 45 +++++++++++++++++++ .../package.json | 10 +++++ 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 tests/schematics/update/packages/update-peer-dependencies-angular-5-2/package.json diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 7bd06c71fd..4d5d46d4f3 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -35,15 +35,16 @@ const peerCompatibleWhitelist: { [name: string]: PeerVersionTransform } = { '@angular/core': (range: string) => { range = semver.validRange(range); let major = 1; - while (semver.ltr(major + '.0.0', range)) { + while (!semver.gtr(major + '.0.0', range)) { major++; if (major >= 99) { throw new SchematicsException(`Invalid range: ${JSON.stringify(range)}`); } } - // Add the major - 1 version as compatible with the angular compatible. - return semver.validRange(`^${major + 1}.0.0-rc.0 || ${range}`) || range; + // Add the major version as compatible with the angular compatible. This is already one + // major above the greatest supported, because we increment `major` before checking. + return semver.validRange(`^${major}.0.0-rc.0 || ${range}`) || range; }, }; diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 6bc1292e1d..475b2ff237 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -129,6 +129,51 @@ describe('@schematics/update', () => { ).subscribe(undefined, done.fail, done); }, 45000); + it('updates Angular as compatible with Angular N-1 (2)', done => { + // Add the basic migration package. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + const dependencies = packageJson['dependencies']; + dependencies['@angular-devkit-tests/update-peer-dependencies-angular-5-2'] = '1.0.0'; + dependencies['@angular/core'] = '5.1.0'; + dependencies['@angular/animations'] = '5.1.0'; + dependencies['@angular/common'] = '5.1.0'; + dependencies['@angular/compiler'] = '5.1.0'; + dependencies['@angular/platform-browser'] = '5.1.0'; + dependencies['rxjs'] = '5.5.0'; + dependencies['zone.js'] = '0.8.26'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { + packages: ['@angular/core'], + next: true, + }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + expect(packageJson['dependencies']['@angular/core'][0]).toBe('6'); + + // Check install task. + expect(schematicRunner.tasks).toEqual([ + { + name: 'node-package', + options: jasmine.objectContaining({ + command: 'install', + }), + }, + { + name: 'run-schematic', + options: jasmine.objectContaining({ + name: 'migrate', + }), + }, + ]); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); + it('can migrate only', done => { // Add the basic migration package. const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); diff --git a/tests/schematics/update/packages/update-peer-dependencies-angular-5-2/package.json b/tests/schematics/update/packages/update-peer-dependencies-angular-5-2/package.json new file mode 100644 index 0000000000..dc79c9b83e --- /dev/null +++ b/tests/schematics/update/packages/update-peer-dependencies-angular-5-2/package.json @@ -0,0 +1,10 @@ +{ + "name": "@angular-devkit-tests/update-peer-dependencies-angular-5-2", + "version": "1.0.0", + "description": "Tests", + "peerDependencies": { + "@angular/animations": ">= 1 < 5.0.0 || >= 5.0.0-rc.0 < 6.0.0", + "@angular/compiler": ">= 1 < 5.0.0 || >= 5.0.0-rc.0 < 6.0.0", + "@angular/platform-browser": ">= 1 < 5.0.0 || >= 5.0.0-rc.0 < 6.0.0" + } +} From 8db7b646017a8221df35f64ce12620c65a4f8691 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 30 Apr 2018 10:16:31 -0700 Subject: [PATCH 533/724] fix(@schematics/angular): if no property set on cli config dont migrate it --- packages/schematics/angular/migrations/update-6/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 3ea4ec2b6b..a2c1c473c7 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -106,7 +106,7 @@ function extractCliConfig(config: CliConfig): JsonObject | null { newConfig['packageManager'] = config.packageManager; } - return newConfig; + return Object.getOwnPropertyNames(newConfig).length == 0 ? null : newConfig; } function extractSchematicsConfig(config: CliConfig): JsonObject | null { From f12f82bb39af47e21ff86b5e9ef9a2e71c273c52 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 30 Apr 2018 10:48:18 -0700 Subject: [PATCH 534/724] fix(@schematics/angular): update script now migrate warnings settings --- .../angular/migrations/update-6/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index a2c1c473c7..db4e9d767c 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -105,6 +105,20 @@ function extractCliConfig(config: CliConfig): JsonObject | null { if (config.packageManager && config.packageManager !== 'default') { newConfig['packageManager'] = config.packageManager; } + if (config.warnings) { + if (config.warnings.versionMismatch !== undefined) { + newConfig.warnings = { + ...((newConfig.warnings as JsonObject | null) || {}), + ...{ versionMismatch: config.warnings.versionMismatch }, + }; + } + if (config.warnings.typescriptMismatch !== undefined) { + newConfig.warnings = { + ...((newConfig.warnings as JsonObject | null) || {}), + ...{ typescriptMismatch: config.warnings.typescriptMismatch }, + }; + } + } return Object.getOwnPropertyNames(newConfig).length == 0 ? null : newConfig; } From 01591cf719f28cf31f4a9eb6b64722a6b216fbca Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 30 Apr 2018 12:57:09 -0700 Subject: [PATCH 535/724] fix(@schematics/angular): use the JSON AST for changing JSON files in migration Fix angular/angular-cli#10396 --- .../angular/migrations/update-6/index.ts | 155 ++++++++++++++---- .../angular/migrations/update-6/index_spec.ts | 60 ++++++- .../angular/migrations/update-6/json-utils.ts | 70 ++++++++ 3 files changed, 248 insertions(+), 37 deletions(-) create mode 100644 packages/schematics/angular/migrations/update-6/json-utils.ts diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index db4e9d767c..09758d5a7e 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -5,7 +5,16 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonObject, Path, join, normalize, tags } from '@angular-devkit/core'; +import { + JsonObject, + JsonParseMode, + Path, + join, + normalize, + parseJson, + parseJsonAst, + tags, +} from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -16,6 +25,11 @@ import { import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { AppConfig, CliConfig } from '../../utility/config'; import { latestVersions } from '../../utility/latest-versions'; +import { + appendPropertyInAstObject, + appendValueInAstArray, + findPropertyInAstObject, +} from './json-utils'; const defaults = { appRoot: 'src', @@ -492,8 +506,6 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { root: project.root, sourceRoot: project.root, projectType: 'application', - cli: {}, - schematics: {}, }; const e2eArchitect: JsonObject = {}; @@ -542,51 +554,91 @@ function updateSpecTsConfig(config: CliConfig): Rule { return (host: Tree, context: SchematicContext) => { const apps = config.apps || []; apps.forEach((app: AppConfig, idx: number) => { - const tsSpecConfigPath = - join(app.root as Path, app.testTsconfig || defaults.testTsConfig); + const testTsConfig = app.testTsconfig || defaults.testTsConfig; + const tsSpecConfigPath = join(normalize(app.root || ''), testTsConfig); const buffer = host.read(tsSpecConfigPath); + if (!buffer) { return; } - const tsCfg = JSON.parse(buffer.toString()); - if (!tsCfg.files) { - tsCfg.files = []; + + + const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + if (tsCfgAst.kind != 'object') { + throw new SchematicsException('Invalid tsconfig. Was expecting an object'); } - // Ensure the spec tsconfig contains the polyfills file - if (tsCfg.files.indexOf(app.polyfills || defaults.polyfills) === -1) { - tsCfg.files.push(app.polyfills || defaults.polyfills); - host.overwrite(tsSpecConfigPath, JSON.stringify(tsCfg, null, 2)); + const filesAstNode = findPropertyInAstObject(tsCfgAst, 'files'); + if (filesAstNode && filesAstNode.kind != 'array') { + throw new SchematicsException('Invalid tsconfig "files" property; expected an array.'); } + + const recorder = host.beginUpdate(tsSpecConfigPath); + + const polyfills = app.polyfills || defaults.polyfills; + if (!filesAstNode) { + // Do nothing if the files array does not exist. This means exclude or include are + // set and we shouldn't mess with that. + } else { + if (filesAstNode.value.indexOf(polyfills) == -1) { + appendValueInAstArray(recorder, filesAstNode, polyfills); + } + } + + host.commitUpdate(recorder); }); }; } -function updatePackageJson(packageManager?: string) { +function updatePackageJson(config: CliConfig) { return (host: Tree, context: SchematicContext) => { const pkgPath = '/package.json'; const buffer = host.read(pkgPath); if (buffer == null) { throw new SchematicsException('Could not read package.json'); } - const content = buffer.toString(); - const pkg = JSON.parse(content); + const pkgAst = parseJsonAst(buffer.toString(), JsonParseMode.Strict); - if (pkg === null || typeof pkg !== 'object' || Array.isArray(pkg)) { + if (pkgAst.kind != 'object') { throw new SchematicsException('Error reading package.json'); } - if (!pkg.devDependencies) { - pkg.devDependencies = {}; + + const devDependenciesNode = findPropertyInAstObject(pkgAst, 'devDependencies'); + if (devDependenciesNode && devDependenciesNode.kind != 'object') { + throw new SchematicsException('Error reading package.json; devDependency is not an object.'); } - pkg.devDependencies['@angular-devkit/build-angular'] = latestVersions.DevkitBuildAngular; + const recorder = host.beginUpdate(pkgPath); + const depName = '@angular-devkit/build-angular'; + if (!devDependenciesNode) { + // Haven't found the devDependencies key, add it to the root of the package.json. + appendPropertyInAstObject(recorder, pkgAst, 'devDependencies', { + [depName]: latestVersions.DevkitBuildAngular, + }); + } else { + // Check if there's a build-angular key. + const buildAngularNode = findPropertyInAstObject(devDependenciesNode, depName); + + if (!buildAngularNode) { + // No build-angular package, add it. + appendPropertyInAstObject( + recorder, + devDependenciesNode, + depName, + latestVersions.DevkitBuildAngular, + ); + } else { + const { end, start } = buildAngularNode; + recorder.remove(start.offset, end.offset - start.offset); + recorder.insertRight(start.offset, JSON.stringify(latestVersions.DevkitBuildAngular)); + } + } - host.overwrite(pkgPath, JSON.stringify(pkg, null, 2)); + host.commitUpdate(recorder); - if (packageManager && !['npm', 'yarn', 'cnpm'].includes(packageManager)) { - packageManager = undefined; - } - context.addTask(new NodePackageInstallTask({ packageManager })); + context.addTask(new NodePackageInstallTask({ + packageManager: config.packageManager === 'default' ? undefined : config.packageManager, + })); return host; }; @@ -597,19 +649,52 @@ function updateTsLintConfig(): Rule { const tsLintPath = '/tslint.json'; const buffer = host.read(tsLintPath); if (!buffer) { - return; + return host; } - const tsCfg = JSON.parse(buffer.toString()); + const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); - if (tsCfg.rules && tsCfg.rules['import-blacklist'] && - tsCfg.rules['import-blacklist'].indexOf('rxjs') !== -1) { + if (tsCfgAst.kind != 'object') { + return host; + } - tsCfg.rules['import-blacklist'] = tsCfg.rules['import-blacklist'] - .filter((rule: string | boolean) => rule !== 'rxjs'); + const rulesNode = findPropertyInAstObject(tsCfgAst, 'rules'); + if (!rulesNode || rulesNode.kind != 'object') { + return host; + } - host.overwrite(tsLintPath, JSON.stringify(tsCfg, null, 2)); + const importBlacklistNode = findPropertyInAstObject(rulesNode, 'import-blacklist'); + if (!importBlacklistNode || importBlacklistNode.kind != 'array') { + return host; } + const recorder = host.beginUpdate(tsLintPath); + for (let i = 0; i < importBlacklistNode.elements.length; i++) { + const element = importBlacklistNode.elements[i]; + if (element.kind == 'string' && element.value == 'rxjs') { + const { start, end } = element; + // Remove this element. + if (i == importBlacklistNode.elements.length - 1) { + // Last element. + if (i > 0) { + // Not first, there's a comma to remove before. + const previous = importBlacklistNode.elements[i - 1]; + recorder.remove(previous.end.offset, end.offset - previous.end.offset); + } else { + // Only element, just remove the whole rule. + const { start, end } = importBlacklistNode; + recorder.remove(start.offset, end.offset - start.offset); + recorder.insertLeft(start.offset, '[]'); + } + } else { + // Middle, just remove the whole node (up to next node start). + const next = importBlacklistNode.elements[i + 1]; + recorder.remove(start.offset, next.start.offset - start.offset); + } + } + } + + host.commitUpdate(recorder); + return host; }; } @@ -627,13 +712,17 @@ export default function (): Rule { if (configBuffer == null) { throw new SchematicsException(`Could not find configuration file (${configPath})`); } - const config = JSON.parse(configBuffer.toString()); + const config = parseJson(configBuffer.toString(), JsonParseMode.Loose); + + if (typeof config != 'object' || Array.isArray(config) || config === null) { + throw new SchematicsException('Invalid angular-cli.json configuration; expected an object.'); + } return chain([ migrateKarmaConfiguration(config), migrateConfiguration(config), updateSpecTsConfig(config), - updatePackageJson(config.packageManager), + updatePackageJson(config), updateTsLintConfig(), (host: Tree, context: SchematicContext) => { context.logger.warn(tags.oneLine`Some configuration options have been changed, diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 573e7fd776..f2c982e43a 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -9,6 +9,7 @@ import { JsonObject } from '@angular-devkit/core'; import { EmptyTree } from '@angular-devkit/schematics'; import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import * as path from 'path'; +import { latestVersions } from '../../utility/latest-versions'; describe('Migration to v6', () => { @@ -691,7 +692,32 @@ describe('Migration to v6', () => { tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const content = tree.readContent('/package.json'); const pkg = JSON.parse(content); - expect(pkg.devDependencies['@angular-devkit/build-angular']).toBeDefined(); + expect(pkg.devDependencies['@angular-devkit/build-angular']) + .toBe(latestVersions.DevkitBuildAngular); + }); + + it('should add a dev dependency to @angular-devkit/build-angular (present)', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree.overwrite('/package.json', JSON.stringify({ + devDependencies: { + '@angular-devkit/build-angular': '0.0.0', + }, + }, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent('/package.json'); + const pkg = JSON.parse(content); + expect(pkg.devDependencies['@angular-devkit/build-angular']) + .toBe(latestVersions.DevkitBuildAngular); + }); + + it('should add a dev dependency to @angular-devkit/build-angular (no dev)', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree.overwrite('/package.json', JSON.stringify({}, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent('/package.json'); + const pkg = JSON.parse(content); + expect(pkg.devDependencies['@angular-devkit/build-angular']) + .toBe(latestVersions.DevkitBuildAngular); }); }); @@ -702,7 +728,7 @@ describe('Migration to v6', () => { beforeEach(() => { tslintConfig = { rules: { - 'import-blacklist': ['rxjs'], + 'import-blacklist': ['some', 'rxjs', 'else'], }, }; }); @@ -712,8 +738,34 @@ describe('Migration to v6', () => { tree.create(tslintPath, JSON.stringify(tslintConfig, null, 2)); tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); const tslint = JSON.parse(tree.readContent(tslintPath)); - const blacklist = tslint.rules['import-blacklist']; - expect(blacklist).toEqual([]); + expect(tslint.rules['import-blacklist']).toEqual(['some', 'else']); + }); + + it('should remove "rxjs" from the "import-blacklist" rule (only)', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tslintConfig.rules['import-blacklist'] = ['rxjs']; + tree.create(tslintPath, JSON.stringify(tslintConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = JSON.parse(tree.readContent(tslintPath)); + expect(tslint.rules['import-blacklist']).toEqual([]); + }); + + it('should remove "rxjs" from the "import-blacklist" rule (first)', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tslintConfig.rules['import-blacklist'] = ['rxjs', 'else']; + tree.create(tslintPath, JSON.stringify(tslintConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = JSON.parse(tree.readContent(tslintPath)); + expect(tslint.rules['import-blacklist']).toEqual(['else']); + }); + + it('should remove "rxjs" from the "import-blacklist" rule (last)', () => { + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tslintConfig.rules['import-blacklist'] = ['some', 'rxjs']; + tree.create(tslintPath, JSON.stringify(tslintConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const tslint = JSON.parse(tree.readContent(tslintPath)); + expect(tslint.rules['import-blacklist']).toEqual(['some']); }); it('should work if "rxjs" is not in the "import-blacklist" rule', () => { diff --git a/packages/schematics/angular/migrations/update-6/json-utils.ts b/packages/schematics/angular/migrations/update-6/json-utils.ts new file mode 100644 index 0000000000..6397fa4b61 --- /dev/null +++ b/packages/schematics/angular/migrations/update-6/json-utils.ts @@ -0,0 +1,70 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonAstArray, JsonAstNode, JsonAstObject, JsonValue } from '@angular-devkit/core'; +import { UpdateRecorder } from '@angular-devkit/schematics'; + +export function appendPropertyInAstObject( + recorder: UpdateRecorder, + node: JsonAstObject, + propertyName: string, + value: JsonValue, + indent = 4, +) { + const indentStr = '\n' + new Array(indent + 1).join(' '); + + if (node.properties.length > 0) { + // Insert comma. + const last = node.properties[node.properties.length - 1]; + recorder.insertRight(last.start.offset + last.text.replace(/\s+$/, '').length, ','); + } + + recorder.insertLeft( + node.end.offset - 1, + ' ' + + `"${propertyName}": ${JSON.stringify(value, null, 2).replace(/\n/g, indentStr)}` + + indentStr.slice(0, -2), + ); +} + + +export function appendValueInAstArray( + recorder: UpdateRecorder, + node: JsonAstArray, + value: JsonValue, + indent = 4, +) { + const indentStr = '\n' + new Array(indent + 1).join(' '); + + if (node.elements.length > 0) { + // Insert comma. + const last = node.elements[node.elements.length - 1]; + recorder.insertRight(last.start.offset + last.text.replace(/\s+$/, '').length, ','); + } + + recorder.insertLeft( + node.end.offset - 1, + ' ' + + JSON.stringify(value, null, 2).replace(/\n/g, indentStr) + + indentStr.slice(0, -2), + ); +} + + +export function findPropertyInAstObject( + node: JsonAstObject, + propertyName: string, +): JsonAstNode | null { + let maybeNode: JsonAstNode | null = null; + for (const property of node.properties) { + if (property.key.value == propertyName) { + maybeNode = property.value; + } + } + + return maybeNode; +} From ebeecf430ce4806480461502062a2f455a52c37f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 30 Apr 2018 14:21:29 -0700 Subject: [PATCH 536/724] fix(@schematics/angular): update animations polyfill instructions Fixes: angular/angular-cli#10522 --- .../schematics/angular/application/files/src/polyfills.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/files/src/polyfills.ts b/packages/schematics/angular/application/files/src/polyfills.ts index af84770782..d310405a68 100644 --- a/packages/schematics/angular/application/files/src/polyfills.ts +++ b/packages/schematics/angular/application/files/src/polyfills.ts @@ -47,8 +47,9 @@ import 'core-js/es7/reflect'; /** - * Required to support Web Animations `@angular/platform-browser/animations`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). **/ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. From 9a29995ce46246d76d8ee283146ae38a498b5266 Mon Sep 17 00:00:00 2001 From: Cyrille Tuzi Date: Sat, 28 Apr 2018 12:03:52 +0200 Subject: [PATCH 537/724] fix(@angular/pwa): move manifest and commands where they belong --- .../pwa/files/{assets => root}/manifest.json | 16 +-- packages/angular/pwa/pwa/index.ts | 114 +++++++++++++++++- packages/angular/pwa/pwa/index_spec.ts | 24 +++- .../angular/service-worker/index.ts | 67 +--------- .../angular/service-worker/index_spec.ts | 8 -- 5 files changed, 141 insertions(+), 88 deletions(-) rename packages/angular/pwa/pwa/files/{assets => root}/manifest.json (65%) diff --git a/packages/angular/pwa/pwa/files/assets/manifest.json b/packages/angular/pwa/pwa/files/root/manifest.json similarity index 65% rename from packages/angular/pwa/pwa/files/assets/manifest.json rename to packages/angular/pwa/pwa/files/root/manifest.json index 00feeb763d..37cf5fae50 100644 --- a/packages/angular/pwa/pwa/files/assets/manifest.json +++ b/packages/angular/pwa/pwa/files/root/manifest.json @@ -8,42 +8,42 @@ "start_url": "/", "icons": [ { - "src": "/assets/icons/icon-72x72.png", + "src": "assets/icons/icon-72x72.png", "sizes": "72x72", "type": "image/png" }, { - "src": "/assets/icons/icon-96x96.png", + "src": "assets/icons/icon-96x96.png", "sizes": "96x96", "type": "image/png" }, { - "src": "/assets/icons/icon-128x128.png", + "src": "assets/icons/icon-128x128.png", "sizes": "128x128", "type": "image/png" }, { - "src": "/assets/icons/icon-144x144.png", + "src": "assets/icons/icon-144x144.png", "sizes": "144x144", "type": "image/png" }, { - "src": "/assets/icons/icon-152x152.png", + "src": "assets/icons/icon-152x152.png", "sizes": "152x152", "type": "image/png" }, { - "src": "/assets/icons/icon-192x192.png", + "src": "assets/icons/icon-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "/assets/icons/icon-384x384.png", + "src": "assets/icons/icon-384x384.png", "sizes": "384x384", "type": "image/png" }, { - "src": "/assets/icons/icon-512x512.png", + "src": "assets/icons/icon-512x512.png", "sizes": "512x512", "type": "image/png" } diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index 0d7c963742..9c421bf860 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Path, join } from '@angular-devkit/core'; +import { Path, join, normalize } from '@angular-devkit/core'; import { Rule, SchematicContext, @@ -20,8 +20,7 @@ import { template, url, } from '@angular-devkit/schematics'; -import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; -import { getWorkspace } from '../utility/config'; +import { getWorkspace, getWorkspacePath } from '../utility/config'; import { Schema as PwaOptions } from './schema'; @@ -33,6 +32,106 @@ function addServiceWorker(options: PwaOptions): Rule { }; } +function getIndent(text: string): string { + let indent = ''; + let hitNonSpace = false; + text.split('') + .forEach(char => { + if (char === ' ' && !hitNonSpace) { + indent += ' '; + } else { + hitNonSpace = true; + } + }, 0); + + return indent; +} + +function updateIndexFile(options: PwaOptions): Rule { + return (host: Tree, context: SchematicContext) => { + const workspace = getWorkspace(host); + const project = workspace.projects[options.project as string]; + let path: string; + if (project && project.architect && project.architect.build && + project.architect.build.options.index) { + path = project.architect.build.options.index; + } else { + throw new SchematicsException('Could not find index file for the project'); + } + const buffer = host.read(path); + if (buffer === null) { + throw new SchematicsException(`Could not read index file: ${path}`); + } + const content = buffer.toString(); + const lines = content.split('\n'); + let closingHeadTagLineIndex = -1; + let closingHeadTagLine = ''; + lines.forEach((line, index) => { + if (/<\/head>/.test(line) && closingHeadTagLineIndex === -1) { + closingHeadTagLine = line; + closingHeadTagLineIndex = index; + } + }); + + const indent = getIndent(closingHeadTagLine) + ' '; + const itemsToAdd = [ + '', + '', + ]; + + const textToInsert = itemsToAdd + .map(text => indent + text) + .join('\n'); + + const updatedIndex = [ + ...lines.slice(0, closingHeadTagLineIndex), + textToInsert, + ...lines.slice(closingHeadTagLineIndex), + ].join('\n'); + + host.overwrite(path, updatedIndex); + + return host; + }; +} + +function addManifestToAssetsConfig(options: PwaOptions) { + return (host: Tree, context: SchematicContext) => { + + const workspacePath = getWorkspacePath(host); + const workspace = getWorkspace(host); + const project = workspace.projects[options.project as string]; + + if (!project) { + throw new Error(`Project is not defined in this workspace.`); + } + + const assetEntry = join(normalize(project.root), 'src', 'manifest.json'); + + if (!project.architect) { + throw new Error(`Architect is not defined for this project.`); + } + + const architect = project.architect; + + ['build', 'test'].forEach((target) => { + + const applyTo = architect[target].options; + + if (!applyTo.assets) { + applyTo.assets = [assetEntry]; + } else { + applyTo.assets.push(assetEntry); + } + + }); + + host.overwrite(workspacePath, JSON.stringify(workspace, null, 2)); + + return host; + }; +} + export default function (options: PwaOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); @@ -45,6 +144,7 @@ export default function (options: PwaOptions): Rule { } const assetPath = join(project.root as Path, 'src', 'assets'); + const sourcePath = join(project.root as Path, 'src'); options.title = options.title || options.project; @@ -55,13 +155,17 @@ export default function (options: PwaOptions): Rule { move(assetPath), ]); - context.addTask(new NodePackageInstallTask()); - return chain([ addServiceWorker(options), branchAndMerge(chain([ mergeWith(templateSource), ])), + mergeWith(apply(url('./files/root'), [ + template({...options}), + move(sourcePath), + ])), + updateIndexFile(options), + addManifestToAssetsConfig(options), ])(host, context); }; } diff --git a/packages/angular/pwa/pwa/index_spec.ts b/packages/angular/pwa/pwa/index_spec.ts index 97d5fb6ac1..a294872a04 100644 --- a/packages/angular/pwa/pwa/index_spec.ts +++ b/packages/angular/pwa/pwa/index_spec.ts @@ -67,12 +67,12 @@ describe('PWA Schematic', () => { it('should create a manifest file', () => { const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); - expect(tree.exists('/projects/bar/src/assets/manifest.json')).toEqual(true); + expect(tree.exists('/projects/bar/src/manifest.json')).toEqual(true); }); it('should set the name & short_name in the manifest file', () => { const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); - const manifestText = tree.readContent('/projects/bar/src/assets/manifest.json'); + const manifestText = tree.readContent('/projects/bar/src/manifest.json'); const manifest = JSON.parse(manifestText); expect(manifest.name).toEqual(defaultOptions.title); expect(manifest.short_name).toEqual(defaultOptions.title); @@ -81,9 +81,27 @@ describe('PWA Schematic', () => { it('should set the name & short_name in the manifest file when no title provided', () => { const options = {...defaultOptions, title: undefined}; const tree = schematicRunner.runSchematic('ng-add', options, appTree); - const manifestText = tree.readContent('/projects/bar/src/assets/manifest.json'); + const manifestText = tree.readContent('/projects/bar/src/manifest.json'); const manifest = JSON.parse(manifestText); expect(manifest.name).toEqual(defaultOptions.project); expect(manifest.short_name).toEqual(defaultOptions.project); }); + + it('should update the index file', () => { + const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); + const content = tree.readContent('projects/bar/src/index.html'); + + expect(content).toMatch(//); + expect(content).toMatch(//); + }); + + it('should update the build and test assets configuration', () => { + const tree = schematicRunner.runSchematic('ng-add', defaultOptions, appTree); + const configText = tree.readContent('/angular.json'); + const config = JSON.parse(configText); + const architect = config.projects.bar.architect; + ['build', 'test'].forEach((target) => { + expect(architect[target].options.assets).toContain('projects/bar/src/manifest.json'); + }); + }); }); diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 55e8af392d..4fd3e46f8d 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -18,6 +18,7 @@ import { template, url, } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import * as ts from 'typescript'; import { addSymbolToNgModuleMetadata, isImported } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; @@ -161,69 +162,6 @@ function getTsSourceFile(host: Tree, path: string): ts.SourceFile { return source; } -function updateIndexFile(options: ServiceWorkerOptions): Rule { - return (host: Tree, context: SchematicContext) => { - const workspace = getWorkspace(host); - const project = workspace.projects[options.project as string]; - let path: string; - if (project && project.architect && project.architect.build && - project.architect.build.options.index) { - path = project.architect.build.options.index; - } else { - throw new SchematicsException('Could not find index file for the project'); - } - const buffer = host.read(path); - if (buffer === null) { - throw new SchematicsException(`Could not read index file: ${path}`); - } - const content = buffer.toString(); - const lines = content.split('\n'); - let closingHeadTagLineIndex = -1; - let closingHeadTagLine = ''; - lines.forEach((line, index) => { - if (/<\/head>/.test(line) && closingHeadTagLineIndex === -1) { - closingHeadTagLine = line; - closingHeadTagLineIndex = index; - } - }); - - const indent = getIndent(closingHeadTagLine) + ' '; - const itemsToAdd = [ - '', - '', - ]; - - const textToInsert = itemsToAdd - .map(text => indent + text) - .join('\n'); - - const updatedIndex = [ - ...lines.slice(0, closingHeadTagLineIndex), - textToInsert, - ...lines.slice(closingHeadTagLineIndex), - ].join('\n'); - - host.overwrite(path, updatedIndex); - - return host; - }; -} - -function getIndent(text: string): string { - let indent = ''; - let hitNonSpace = false; - text.split('') - .forEach(char => { - if (char === ' ' && !hitNonSpace) { - indent += ' '; - } else { - hitNonSpace = true; - } - }, 0); - - return indent; -} - export default function (options: ServiceWorkerOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); @@ -243,12 +181,13 @@ export default function (options: ServiceWorkerOptions): Rule { move(project.root), ]); + context.addTask(new NodePackageInstallTask()); + return chain([ mergeWith(templateSource), updateConfigFile(options), addDependencies(), updateAppModule(options), - updateIndexFile(options), ])(host, context); }; } diff --git a/packages/schematics/angular/service-worker/index_spec.ts b/packages/schematics/angular/service-worker/index_spec.ts index 747167c6e6..9a724e4dcf 100644 --- a/packages/schematics/angular/service-worker/index_spec.ts +++ b/packages/schematics/angular/service-worker/index_spec.ts @@ -96,12 +96,4 @@ describe('Service Worker Schematic', () => { const path = '/projects/bar/ngsw-config.json'; expect(tree.exists(path)).toEqual(true); }); - - it('should update the index file', () => { - const tree = schematicRunner.runSchematic('service-worker', defaultOptions, appTree); - const content = tree.readContent('projects/bar/src/index.html'); - - expect(content).toMatch(//); - expect(content).toMatch(//); - }); }); From 76a158fa503a30c63998266b77f9421f38ae7c21 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 30 Apr 2018 17:42:48 -0700 Subject: [PATCH 538/724] fix(@angular-devkit/schematics): support yarn package installs --- .../schematics/tasks/node-package/executor.ts | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index ff6f5b986e..3eedd3a14f 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -14,21 +14,30 @@ import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options type PackageManagerProfile = { quietArgument?: string; - commands: { [name: string]: string }, + commands: { + installAll?: string; + installPackage: string; + }, }; const packageManagers: { [name: string]: PackageManagerProfile } = { 'npm': { quietArgument: '--quiet', - commands: { }, + commands: { + installAll: 'install', + installPackage: 'install', + }, }, 'cnpm': { - commands: { }, + commands: { + installAll: 'install', + installPackage: 'install', + }, }, 'yarn': { quietArgument: '--silent', commands: { - 'install': 'add', + installPackage: 'add', }, }, }; @@ -68,12 +77,15 @@ export default function( shell: true, cwd: path.join(rootDirectory, options.workingDirectory || ''), }; - const args = [ - taskPackageManagerProfile.commands[options.command] || options.command, - ]; + const args: string[] = []; if (options.packageName) { + if (options.command === 'install') { + args.push(packageManagerProfile.commands.installPackage); + } args.push(options.packageName); + } else if (options.command === 'install' && packageManagerProfile.commands.installAll) { + args.push(packageManagerProfile.commands.installAll); } if (options.quiet && taskPackageManagerProfile.quietArgument) { From a32ae047519ec535e61107201ec3f6006bed5cdf Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 30 Apr 2018 20:21:27 -0700 Subject: [PATCH 539/724] feat(@angular-devkit/build-angular): allow poll override in dev-server Fix https://github.com/angular/angular-cli/issues/10559 --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 3 +++ .../angular_devkit/build_angular/src/dev-server/schema.json | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index d3fc730398..ca4944d42f 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -52,6 +52,7 @@ export interface DevServerBuilderOptions { hmrWarning: boolean; servePathDefaultWarning: boolean; + // These options come from the browser builder and are provided here for convenience. optimization?: boolean; aot?: boolean; sourceMap?: boolean; @@ -60,6 +61,7 @@ export interface DevServerBuilderOptions { commonChunk?: boolean; baseHref?: string; progress?: boolean; + poll?: number; } interface WebpackDevServerConfigurationOptions { @@ -450,6 +452,7 @@ export class DevServerBuilder implements Builder { ...(options.commonChunk !== undefined ? { commonChunk: options.commonChunk } : {}), ...(options.baseHref !== undefined ? { baseHref: options.baseHref } : {}), ...(options.progress !== undefined ? { progress: options.progress } : {}), + ...(options.poll !== undefined ? { poll: options.poll } : {}), ...builderConfig.options, }; diff --git a/packages/angular_devkit/build_angular/src/dev-server/schema.json b/packages/angular_devkit/build_angular/src/dev-server/schema.json index d803bacd08..e58cb4cfb3 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/schema.json +++ b/packages/angular_devkit/build_angular/src/dev-server/schema.json @@ -117,6 +117,10 @@ "progress": { "type": "boolean", "description": "Log progress to the console while building." + }, + "poll": { + "type": "number", + "description": "Enable and define the file watching poll time period in milliseconds." } }, "additionalProperties": false, From 2cefa2bdc0b31cf043bdba79620e621dd4b9f3c7 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 30 Apr 2018 21:25:47 -0700 Subject: [PATCH 540/724] release: 0.5.11 --- .monorepo.json | 60 +++++++++---------- .../angular/utility/latest-versions.ts | 6 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index e033751019..d927765afa 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.9", + "version": "0.5.11", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.9", - "hash": "68ede5da854a21d3077ee337e9e7948b" + "version": "0.5.11", + "hash": "1d066d7c828bdd4072757c9ec255f0ad" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.9", - "hash": "c203b0bc5127d90dea4d4a972c207cee", + "version": "0.5.11", + "hash": "7dd0c330cbb4ccd70899918e4e7674fa", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.9", - "hash": "1d0af0d9a49365956b9cfa0434d38111", + "version": "0.5.11", + "hash": "40cbf0679984a11d6af42ad278da23ba", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.9", - "hash": "0cc3e657940eaf82c7f3625ec6b53145", + "version": "0.5.11", + "hash": "ad865d8d5f8434501e3bd5c06519c53d", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.9", + "version": "0.5.11", "hash": "40c26d3c33be648c3811639baeb487a9", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.9", - "hash": "aaaa270a8ff940c84c2a6db4b5cf8852", + "version": "0.5.11", + "hash": "05d55c3e0e8736386405527b5680c09d", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.9", - "hash": "ddf40c50f4382e53b88aa5adec296486", + "version": "0.5.11", + "hash": "2adf90599eb51edb29f2ba583a6e98b2", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.9", - "hash": "10634650ce62549315edcbb909a5d5c9", + "version": "0.5.11", + "hash": "547fbef5a37b03dae8fc447d0d329aa8", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.9", - "hash": "240bd443a87aeb367d3b94505ab1b23c", + "version": "0.5.11", + "hash": "4065f6ce02d4da74507805436faaee22", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.9", - "hash": "bc959765b7f8d01da28b1b90684c1772", + "version": "0.5.11", + "hash": "37f668cbbb9a19190c34e6707a804dc6", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.7", + "version": "6.0.0-rc.9", "section": "Misc", - "hash": "a0c2ff190d167097de741e94dd80e234", + "hash": "7fdcb82bd642c7da3e99f8ffe5c9d454", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.9", - "hash": "d6d7d3949185648b98aa0ba712763be7", + "version": "0.5.11", + "hash": "1e411cf2113f7abd7c67ba51db8397aa", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.9", + "version": "0.5.11", "section": "Schematics", - "hash": "bbf0bca054ea720671cb9234e9f593c5", + "hash": "bad76fc2322d429a7d7758c61b7c4281", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.9", + "version": "0.5.11", "section": "Schematics", - "hash": "e6a4bb78af3a07ace42a3501c3992c2b", + "hash": "394b0cfe9820a4b859566b868af1af2f", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.9", + "version": "0.5.11", "section": "Schematics", - "hash": "028163a4b5962e505f4841a5a4b45de6", + "hash": "86ec9793b43898bc06bda7c9a784e3d3", "snapshotRepo": "angular/schematics-update-builds" } } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index df36b226d5..107a481ef9 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,11 +8,11 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '^6.0.0-rc.5', + Angular: '^6.0.0-rc.6', RxJs: '^6.0.0', ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.5.8', - DevkitBuildNgPackagr: '~0.5.8', + DevkitBuildAngular: '~0.5.11', + DevkitBuildNgPackagr: '~0.5.11', }; From 821e3c7c2fb97abb14896a0395cffa99ed0cf449 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 1 May 2018 11:01:58 -0700 Subject: [PATCH 541/724] fix(@schematics/angular): do not assume initial license --- packages/schematics/angular/workspace/files/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index 4bda57221d..129d0ea638 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -1,7 +1,6 @@ { "name": "<%= utils.dasherize(name) %>", "version": "0.0.0", - "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", From a710001231dc9b03a2632c5b1f4394981cc6f041 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 1 May 2018 11:28:53 -0700 Subject: [PATCH 542/724] fix(@schematics/angular): fix code coverage path --- .../files/lint/__tsLintRoot__/tslint.json | 2 +- .../application/files/root/karma.conf.js | 2 +- .../application/files/root/tsconfig.app.json | 4 ++-- .../application/files/root/tsconfig.spec.json | 4 ++-- .../schematics/angular/application/index.ts | 19 +++++++------------ .../files/__projectRoot__/karma.conf.js | 2 +- .../files/__projectRoot__/tsconfig.lib.json | 4 ++-- .../files/__projectRoot__/tsconfig.spec.json | 4 ++-- .../library/files/__projectRoot__/tslint.json | 2 +- packages/schematics/angular/library/index.ts | 4 ++-- 10 files changed, 21 insertions(+), 26 deletions(-) diff --git a/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json b/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json index 2eec2dd9cc..20341240ee 100644 --- a/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json +++ b/packages/schematics/angular/application/files/lint/__tsLintRoot__/tslint.json @@ -1,5 +1,5 @@ { - "extends": "<%= relativeTsLintPath %>/tslint.json", + "extends": "<%= relativePathToWorkspaceRoot %>/tslint.json", "rules": { "directive-selector": [ true, diff --git a/packages/schematics/angular/application/files/root/karma.conf.js b/packages/schematics/angular/application/files/root/karma.conf.js index c84a572acf..8fef64c0f8 100644 --- a/packages/schematics/angular/application/files/root/karma.conf.js +++ b/packages/schematics/angular/application/files/root/karma.conf.js @@ -16,7 +16,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, 'coverage'), + dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage'), reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, diff --git a/packages/schematics/angular/application/files/root/tsconfig.app.json b/packages/schematics/angular/application/files/root/tsconfig.app.json index d4e6e46ada..715c452d70 100644 --- a/packages/schematics/angular/application/files/root/tsconfig.app.json +++ b/packages/schematics/angular/application/files/root/tsconfig.app.json @@ -1,7 +1,7 @@ { - "extends": "<%= relativeTsConfigPath %>/tsconfig.json", + "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", "compilerOptions": { - "outDir": "<%= relativeTsConfigPath %>/out-tsc/app", + "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/app", "module": "es2015", "types": [] }, diff --git a/packages/schematics/angular/application/files/root/tsconfig.spec.json b/packages/schematics/angular/application/files/root/tsconfig.spec.json index 975342957b..9a71aebcfc 100644 --- a/packages/schematics/angular/application/files/root/tsconfig.spec.json +++ b/packages/schematics/angular/application/files/root/tsconfig.spec.json @@ -1,7 +1,7 @@ { - "extends": "<%= relativeTsConfigPath %>/tsconfig.json", + "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", "compilerOptions": { - "outDir": "<%= relativeTsConfigPath %>/out-tsc/spec", + "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec", "module": "commonjs", "types": [ "jasmine", diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 4dbcd14549..4b33c12068 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -257,21 +257,16 @@ export default function (options: ApplicationOptions): Rule { let appDir = `${newProjectRoot}/${options.name}`; let sourceRoot = `${appDir}/src`; let sourceDir = `${sourceRoot}/app`; - let relativeTsConfigPath = appDir.split('/').map(x => '..').join('/'); - let relativeTsLintPath = appDir.split('/').map(x => '..').join('/'); + let relativePathToWorkspaceRoot = appDir.split('/').map(x => '..').join('/'); const rootInSrc = options.projectRoot !== undefined; if (options.projectRoot !== undefined) { newProjectRoot = options.projectRoot; appDir = `${newProjectRoot}/src`; sourceRoot = appDir; sourceDir = `${sourceRoot}/app`; - relativeTsConfigPath = relative(normalize('/' + sourceRoot), normalize('/')); - if (relativeTsConfigPath === '') { - relativeTsConfigPath = '.'; - } - relativeTsLintPath = relative(normalize('/' + sourceRoot), normalize('/')); - if (relativeTsLintPath === '') { - relativeTsLintPath = '.'; + relativePathToWorkspaceRoot = relative(normalize('/' + sourceRoot), normalize('/')); + if (relativePathToWorkspaceRoot === '') { + relativePathToWorkspaceRoot = '.'; } } const tsLintRoot = appDir; @@ -294,7 +289,7 @@ export default function (options: ApplicationOptions): Rule { utils: strings, ...options, 'dot': '.', - relativeTsConfigPath, + relativePathToWorkspaceRoot, }), move(sourceRoot), ])), @@ -304,7 +299,7 @@ export default function (options: ApplicationOptions): Rule { utils: strings, ...options, 'dot': '.', - relativeTsConfigPath, + relativePathToWorkspaceRoot, rootInSrc, }), move(appDir), @@ -315,7 +310,7 @@ export default function (options: ApplicationOptions): Rule { utils: strings, ...options, tsLintRoot, - relativeTsLintPath, + relativePathToWorkspaceRoot, prefix, }), // TODO: Moving should work but is bugged right now. diff --git a/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js index 937ad4a65b..1f4b7215d0 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js +++ b/packages/schematics/angular/library/files/__projectRoot__/karma.conf.js @@ -16,7 +16,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, 'coverage'), + dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage'), reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json index 8103443b0b..7f69a39eb0 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.lib.json @@ -1,7 +1,7 @@ { - "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", + "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", "compilerOptions": { - "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/lib", + "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/lib", "target": "es2015", "module": "es2015", "moduleResolution": "node", diff --git a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json index 0ebff0e1ac..24373a8fc3 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json +++ b/packages/schematics/angular/library/files/__projectRoot__/tsconfig.spec.json @@ -1,7 +1,7 @@ { - "extends": "<%= projectRoot.split('/').map(x => '..').join('/') %>/tsconfig.json", + "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", "compilerOptions": { - "outDir": "<%= projectRoot.split('/').map(x => '..').join('/') %>/out-tsc/spec", + "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec", "types": [ "jasmine", "node" diff --git a/packages/schematics/angular/library/files/__projectRoot__/tslint.json b/packages/schematics/angular/library/files/__projectRoot__/tslint.json index 2eec2dd9cc..20341240ee 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/tslint.json +++ b/packages/schematics/angular/library/files/__projectRoot__/tslint.json @@ -1,5 +1,5 @@ { - "extends": "<%= relativeTsLintPath %>/tslint.json", + "extends": "<%= relativePathToWorkspaceRoot %>/tslint.json", "rules": { "directive-selector": [ true, diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index da7bc93c0b..10fb3736e1 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -199,7 +199,7 @@ export default function (options: LibraryOptions): Rule { } const sourceDir = `${projectRoot}/src/lib`; - const relativeTsLintPath = projectRoot.split('/').map(x => '..').join('/'); + const relativePathToWorkspaceRoot = projectRoot.split('/').map(x => '..').join('/'); const templateSource = apply(url('./files'), [ template({ @@ -207,7 +207,7 @@ export default function (options: LibraryOptions): Rule { ...options, packageName, projectRoot, - relativeTsLintPath, + relativePathToWorkspaceRoot, prefix, }), // TODO: Moving inside `branchAndMerge` should work but is bugged right now. From 9ff1f35b13736335baaf6565d9e1c8da5c89cb7f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 1 May 2018 11:20:55 -0700 Subject: [PATCH 543/724] fix(@angular-devkit/build-angular): error out using karma plugin outside of Angular CLI Fix https://github.com/angular/angular-cli/issues/10478 --- .../build_angular/src/angular-cli-files/plugins/karma.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index 8c33c36fa1..502fecdbc1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -49,6 +49,11 @@ function addKarmaFiles(files: any[], newFiles: any[], prepend = false) { } const init: any = (config: any, emitter: any, customFileHandlers: any) => { + if (!config.buildWebpack) { + throw new Error(`The '@angular-devkit/build-angular/plugins/karma' karma plugin is meant to` + + ` be used from within Angular CLI and will not work correctly outside of it.` + ) + } const options = config.buildWebpack.options; const projectRoot = config.buildWebpack.projectRoot as string; successCb = config.buildWebpack.successCb; From 8603338d65baf858e788feff40e4ce0c73e258ab Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 1 May 2018 14:31:08 -0700 Subject: [PATCH 544/724] fix(@schematics/angular): set defaultProject on update Fix https://github.com/angular/angular-cli/issues/10581 --- .../angular/migrations/update-6/index.ts | 30 ++++++++++++++++--- .../angular/migrations/update-6/index_spec.ts | 1 + 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 09758d5a7e..bff3f81b33 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -92,6 +92,10 @@ function migrateConfiguration(oldConfig: CliConfig): Rule { newProjectRoot: 'projects', projects: extractProjectsConfig(oldConfig, host), }; + const defaultProject = extractDefaultProject(oldConfig); + if (defaultProject !== null) { + config.defaultProject = defaultProject; + } const cliConfig = extractCliConfig(oldConfig); if (cliConfig !== null) { config.cli = cliConfig; @@ -200,10 +204,7 @@ function extractArchitectConfig(_config: CliConfig): JsonObject | null { function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { const builderPackage = '@angular-devkit/build-angular'; - let defaultAppNamePrefix = 'app'; - if (config.project && config.project.name) { - defaultAppNamePrefix = config.project.name; - } + const defaultAppNamePrefix = getDefaultAppNamePrefix(config); const buildDefaults: JsonObject = config.defaults && config.defaults.build ? { @@ -550,6 +551,27 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { return projectMap; } +function getDefaultAppNamePrefix(config: CliConfig) { + let defaultAppNamePrefix = 'app'; + if (config.project && config.project.name) { + defaultAppNamePrefix = config.project.name; + } + + return defaultAppNamePrefix; +} + +function extractDefaultProject(config: CliConfig): string | null { + if (config.apps && config.apps[0]) { + const app = config.apps[0]; + const defaultAppName = getDefaultAppNamePrefix(config); + const name = app.name || defaultAppName; + + return name; + } + + return null; +} + function updateSpecTsConfig(config: CliConfig): Rule { return (host: Tree, context: SchematicContext) => { const apps = config.apps || []; diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index f2c982e43a..fb16f0c0eb 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -140,6 +140,7 @@ describe('Migration to v6', () => { const config = getConfig(tree); expect(config.version).toEqual(1); expect(config.newProjectRoot).toEqual('projects'); + expect(config.defaultProject).toEqual('foo'); }); describe('schematics', () => { From 4558bdad57f88b7bbff6a1d44306b43d404b3c4d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 1 May 2018 15:12:51 -0700 Subject: [PATCH 545/724] fix(@ngtools/webpack): allow TS 2.4 as peerDep This allows the plugin to be used in Angular 5 projects without peerDep warnings. --- packages/ngtools/webpack/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index da193a9e50..4994d170a9 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -30,7 +30,7 @@ "webpack-sources": "^1.1.0" }, "peerDependencies": { - "typescript": "~2.5.0 || ~2.6.0 || ~2.7.0", + "typescript": "~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0", "webpack": "^4.0.0" } } From fc5a5dc720f4d3a092ebbb4a6d5de3ccd71a8eab Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 1 May 2018 15:15:05 -0700 Subject: [PATCH 546/724] ci: fix ngtools/webpack codeowners --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bf74e13acf..3e79d39591 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,7 +8,7 @@ /packages/angular_devkit/core/ @hansl @clydin /packages/angular_devkit/schematics/ @hansl @Brocco /packages/angular_devkit/schematics_cli/ @hansl @Brocco -/packages/ngtools/webpack/ @hansl @Brocco +/packages/ngtools/webpack/ @hansl @filipesilva @clydin /packages/schematics/angular/ @hansl @Brocco /packages/schematics/package_update/ @hansl @Brocco /packages/schematics/schematics/ @hansl @Brocco From c332f9cd597f3e9041c095f132a9ba3d03c37b20 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Tue, 1 May 2018 14:12:03 -0700 Subject: [PATCH 547/724] fix(@schematics/angular): Remove module option from guard schematic --- packages/schematics/angular/guard/index.ts | 44 ------------------- .../schematics/angular/guard/index_spec.ts | 41 ----------------- packages/schematics/angular/guard/schema.d.ts | 4 -- packages/schematics/angular/guard/schema.json | 5 --- 4 files changed, 94 deletions(-) diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index 1749ad66fe..d29d277533 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -21,50 +21,11 @@ import { template, url, } from '@angular-devkit/schematics'; -import * as ts from 'typescript'; -import { addProviderToModule } from '../utility/ast-utils'; -import { InsertChange } from '../utility/change'; import { getWorkspace } from '../utility/config'; -import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { parseName } from '../utility/parse-name'; import { Schema as GuardOptions } from './schema'; -function addDeclarationToNgModule(options: GuardOptions): Rule { - return (host: Tree) => { - if (!options.module) { - return host; - } - - const modulePath = options.module; - const text = host.read(modulePath); - if (text === null) { - throw new SchematicsException(`File ${modulePath} does not exist.`); - } - const sourceText = text.toString('utf-8'); - - const source = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true); - - const guardPath = `/${options.path}/` - + (options.flat ? '' : strings.dasherize(options.name) + '/') - + strings.dasherize(options.name) - + '.guard'; - const relativePath = buildRelativePath(modulePath, guardPath); - const changes = addProviderToModule(source, modulePath, - strings.classify(`${options.name}Guard`), - relativePath); - const recorder = host.beginUpdate(modulePath); - for (const change of changes) { - if (change instanceof InsertChange) { - recorder.insertLeft(change.pos, change.toAdd); - } - } - host.commitUpdate(recorder); - - return host; - }; -} - export default function (options: GuardOptions): Rule { return (host: Tree, context: SchematicContext) => { const workspace = getWorkspace(host); @@ -78,10 +39,6 @@ export default function (options: GuardOptions): Rule { options.path = `/${project.root}/src/${projectDirName}`; } - if (options.module) { - options.module = findModuleFromOptions(host, options); - } - const parsedPath = parseName(options.path, options.name); options.name = parsedPath.name; options.path = parsedPath.path; @@ -97,7 +54,6 @@ export default function (options: GuardOptions): Rule { return chain([ branchAndMerge(chain([ - addDeclarationToNgModule(options), mergeWith(templateSource), ])), ])(host, context); diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index f405a5c4be..faadfaa35a 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -20,7 +20,6 @@ describe('Guard Schematic', () => { const defaultOptions: GuardOptions = { name: 'foo', spec: true, - module: undefined, flat: true, project: 'bar', }; @@ -52,26 +51,6 @@ describe('Guard Schematic', () => { expect(files.indexOf('/projects/bar/src/app/foo.guard.ts')).toBeGreaterThanOrEqual(0); }); - it('should import into a specified module', () => { - const options = { ...defaultOptions, module: 'app.module.ts' }; - - const tree = schematicRunner.runSchematic('guard', options, appTree); - const appModule = tree.readContent('/projects/bar/src/app/app.module.ts'); - - expect(appModule).toMatch(/import { FooGuard } from '.\/foo.guard'/); - }); - - it('should fail if specified module does not exist', () => { - const options = { ...defaultOptions, module: '/projects/bar/src/app/app.moduleXXX.ts' }; - let thrownError: Error | null = null; - try { - schematicRunner.runSchematic('guard', options, appTree); - } catch (err) { - thrownError = err; - } - expect(thrownError).toBeDefined(); - }); - it('should respect the spec flag', () => { const options = { ...defaultOptions, spec: false }; @@ -80,24 +59,4 @@ describe('Guard Schematic', () => { expect(files.indexOf('/projects/bar/src/app/foo.guard.spec.ts')).toEqual(-1); expect(files.indexOf('/projects/bar/src/app/foo.guard.ts')).toBeGreaterThanOrEqual(0); }); - - it('should provide with the module flag', () => { - const options = { ...defaultOptions, module: 'app.module.ts' }; - - const tree = schematicRunner.runSchematic('guard', options, appTree); - const content = tree.readContent('/projects/bar/src/app/app.module.ts'); - expect(content).toMatch(/import.*FooGuard.*from '.\/foo.guard';/); - expect(content).toMatch(/providers:\s*\[FooGuard\]/m); - }); - - it('should not provide without the module flag', () => { - const options = { ...defaultOptions }; - - const tree = schematicRunner.runSchematic('guard', options, appTree); - const content = tree.readContent('/projects/bar/src/app/app.module.ts'); - expect(content).not.toMatch(/import.*FooGuard.*from '.\/foo.guard';/); - expect(content).not.toMatch(/providers:\s*\[FooGuard\]/m); - }); - - }); diff --git a/packages/schematics/angular/guard/schema.d.ts b/packages/schematics/angular/guard/schema.d.ts index 70ac1d232b..a8095a5b49 100644 --- a/packages/schematics/angular/guard/schema.d.ts +++ b/packages/schematics/angular/guard/schema.d.ts @@ -19,10 +19,6 @@ export interface Schema { * Flag to indicate if a dir is created. */ flat?: boolean; - /** - * Allows specification of the declaring module. - */ - module?: string; /** * The path to create the interface. */ diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index db636a336f..0257e28f37 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -22,11 +22,6 @@ "description": "Flag to indicate if a dir is created.", "default": true }, - "module": { - "type": "string", - "description": "Allows specification of the declaring module.", - "alias": "m" - }, "path": { "type": "string", "format": "path", From 9bbc4e62005c150ee1f24ee15ae8abcbba8e875d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 1 May 2018 16:25:29 -0700 Subject: [PATCH 548/724] fix(@schematics/angular): migrate 1.0 karma configs Fix https://github.com/angular/angular-cli/issues/10489 --- .../angular/migrations/update-6/index.ts | 10 +++++++++- .../angular/migrations/update-6/index_spec.ts | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index bff3f81b33..83a8235950 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -70,7 +70,15 @@ function migrateKarmaConfiguration(config: CliConfig): Rule { const buffer = host.read(karmaPath); if (buffer !== null) { let content = buffer.toString(); - content = content.replace( /@angular\/cli/g, '@angular-devkit/build-angular'); + // Replace the 1.0 files and preprocessor entries, with and without comma at the end. + // If these remain, they will cause the `ng test` to fail. + content = content.replace(`{ pattern: './src/test.ts', watched: false },`, ''); + content = content.replace(`{ pattern: './src/test.ts', watched: false }`, ''); + content = content.replace(`'./src/test.ts': ['@angular/cli'],`, ''); + content = content.replace(`'./src/test.ts': ['@angular/cli']`, ''); + // Replace 1.x plugin names. + content = content.replace(/@angular\/cli/g, '@angular-devkit/build-angular'); + // Replace code coverage output path. content = content.replace('reports', `dir: require('path').join(__dirname, 'coverage'), reports`); host.overwrite(karmaPath, content); diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index fb16f0c0eb..efa4eb2083 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -650,6 +650,23 @@ describe('Migration to v6', () => { const content = tree.readContent(karmaPath); expect(content).toContain(`dir: require('path').join(__dirname, 'coverage'), reports`); }); + + it('should remove unused properties in 1.0 configs', () => { + tree.overwrite(karmaPath, ` + files: [ + { pattern: './src/test.ts', watched: false } + ], + preprocessors: { + './src/test.ts': ['@angular/cli'] + }, + `); + + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const content = tree.readContent(karmaPath); + expect(content).not.toContain(`{ pattern: './src/test.ts', watched: false }`); + expect(content).not.toContain(`'./src/test.ts': ['@angular/cli']`); + }); }); describe('spec ts config', () => { From e5130ea46e518a24eb6609cc9ba812e866d5843c Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Tue, 1 May 2018 16:56:16 -0700 Subject: [PATCH 549/724] release: 6.0.0-rc.9 --- .monorepo.json | 40 +++++++++---------- .../angular/utility/latest-versions.ts | 4 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index d927765afa..96e3f9a1f7 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.11", + "version": "0.5.12", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.11", + "version": "0.5.12", "hash": "1d066d7c828bdd4072757c9ec255f0ad" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.11", - "hash": "7dd0c330cbb4ccd70899918e4e7674fa", + "version": "0.5.12", + "hash": "da19aa7869e3c9d6db82277f95593688", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.11", + "version": "0.5.12", "hash": "40cbf0679984a11d6af42ad278da23ba", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.11", + "version": "0.5.12", "hash": "ad865d8d5f8434501e3bd5c06519c53d", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.11", + "version": "0.5.12", "hash": "40c26d3c33be648c3811639baeb487a9", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.11", + "version": "0.5.12", "hash": "05d55c3e0e8736386405527b5680c09d", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.11", - "hash": "2adf90599eb51edb29f2ba583a6e98b2", + "version": "0.5.12", + "hash": "2e8d854c3ec36dde8400340a66ff760e", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.11", + "version": "0.5.12", "hash": "547fbef5a37b03dae8fc447d0d329aa8", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,47 +130,47 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.11", + "version": "0.5.12", "hash": "4065f6ce02d4da74507805436faaee22", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.11", + "version": "0.5.12", "hash": "37f668cbbb9a19190c34e6707a804dc6", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.9", + "version": "6.0.0-rc.10", "section": "Misc", - "hash": "7fdcb82bd642c7da3e99f8ffe5c9d454", + "hash": "34ce2a7d8e7b31856be497eb59ff7e3d", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.11", - "hash": "1e411cf2113f7abd7c67ba51db8397aa", + "version": "0.5.12", + "hash": "0f4b98019b184edf27c3a761567f068a", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.11", + "version": "0.5.12", "section": "Schematics", "hash": "bad76fc2322d429a7d7758c61b7c4281", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.11", + "version": "0.5.12", "section": "Schematics", "hash": "394b0cfe9820a4b859566b868af1af2f", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.11", + "version": "0.5.12", "section": "Schematics", "hash": "86ec9793b43898bc06bda7c9a784e3d3", "snapshotRepo": "angular/schematics-update-builds" diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 107a481ef9..1e24e2ebc7 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -13,6 +13,6 @@ export const latestVersions = { ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.5.11', - DevkitBuildNgPackagr: '~0.5.11', + DevkitBuildAngular: '~0.5.12', + DevkitBuildNgPackagr: '~0.5.12', }; From daaabe72897899fe9339e946bdda48bc6e709577 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 2 May 2018 11:50:03 -0700 Subject: [PATCH 550/724] fix(@angular-devkit/build-optimizer): match comments in enums Big thanks to @clydin for investigation reproduction and test. Fix https://github.com/angular/devkit/issues/831 --- .../src/transforms/wrap-enums.ts | 28 ++++++++--- .../src/transforms/wrap-enums_spec.ts | 50 +++++++++++++++++++ 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index e17cfb8f1f..8dc851e3a5 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -10,13 +10,29 @@ import { drilldownNodes } from '../helpers/ast-utils'; export function testWrapEnums(content: string) { + const ts22EnumVarDecl = /var (\S+) = \{\};/; + // tslint:disable-next-line:max-line-length + const ts22EnumIife = /(\1\.(\S+) = \d+;\r?\n)+\1\[\1\.(\S+)\] = "\4";\r?\n(\1\[\1\.(\S+)\] = "\S+";\r?\n*)+/; + const ts23To26VarDecl = /var (\S+);(\/\*@__PURE__\*\/)*/; + // tslint:disable-next-line:max-line-length + const ts23To26Iife = /\(function \(\1\) \{\s+(\1\[\1\["(\S+)"\] = (\S+)\] = "\4";(\s+\1\[\1\["\S+"\] = (\S+)\] = "\S+";)*\r?\n)\}\)\(\1 \|\| \(\1 = \{\}\)\);/; + const enumComment = /\/\*\* @enum \{\w+\} \*\//; + const multiLineComment = /\s*(?:\/\*[\s\S]*?\*\/)?\s*/; + const newLine = /\s*\r?\n\s*/; + const regexes = [ - // tslint:disable:max-line-length - /var (\S+) = \{\};\r?\n(\1\.(\S+) = \d+;\r?\n)+\1\[\1\.(\S+)\] = "\4";\r?\n(\1\[\1\.(\S+)\] = "\S+";\r?\n*)+/, - /var (\S+);(\/\*@__PURE__\*\/)*\r?\n\(function \(\1\) \{\s+(\1\[\1\["(\S+)"\] = (\S+)\] = "\4";(\s+\1\[\1\["\S+"\] = (\S+)\] = "\S+";)*\r?\n)\}\)\(\1 \|\| \(\1 = \{\}\)\);/, - /\/\*\* @enum \{\w+\} \*\//, - // tslint:enable:max-line-length - ]; + [ + ts22EnumVarDecl, + newLine, multiLineComment, + ts22EnumIife, + ], + [ + ts23To26VarDecl, + newLine, multiLineComment, + ts23To26Iife, + ], + [enumComment], + ].map(arr => new RegExp(arr.map(x => x.source).join(''), 'm')); return regexes.some((regex) => regex.test(content)); } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index e9a0e69743..f2ef8621fd 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -115,4 +115,54 @@ describe('wrap-enums', () => { expect(testWrapEnums(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); + + it('wraps enums with multi-line comments in IIFE', () => { + const input = tags.stripIndent` + /** + * Supported http methods. + * @deprecated use @angular/common/http instead + */ + var RequestMethod; + /** + * Supported http methods. + * @deprecated use @angular/common/http instead + */ + (function (RequestMethod) { + RequestMethod[RequestMethod["Get"] = 0] = "Get"; + RequestMethod[RequestMethod["Post"] = 1] = "Post"; + RequestMethod[RequestMethod["Put"] = 2] = "Put"; + RequestMethod[RequestMethod["Delete"] = 3] = "Delete"; + RequestMethod[RequestMethod["Options"] = 4] = "Options"; + RequestMethod[RequestMethod["Head"] = 5] = "Head"; + RequestMethod[RequestMethod["Patch"] = 6] = "Patch"; + })(RequestMethod || (RequestMethod = {})); + `; + // We need to interpolate this space because our editorconfig automatically strips + // trailing whitespace. + const space = ' '; + const output = tags.stripIndent` + /** + * Supported http methods. + * @deprecated use @angular/common/http instead + */ + var RequestMethod =${space} + /** + * Supported http methods. + * @deprecated use @angular/common/http instead + */ + /*@__PURE__*/ (function (RequestMethod) { + RequestMethod[RequestMethod["Get"] = 0] = "Get"; + RequestMethod[RequestMethod["Post"] = 1] = "Post"; + RequestMethod[RequestMethod["Put"] = 2] = "Put"; + RequestMethod[RequestMethod["Delete"] = 3] = "Delete"; + RequestMethod[RequestMethod["Options"] = 4] = "Options"; + RequestMethod[RequestMethod["Head"] = 5] = "Head"; + RequestMethod[RequestMethod["Patch"] = 6] = "Patch"; + return RequestMethod; + })({}); + `; + + expect(testWrapEnums(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); }); From d770559ee0fe1d27b92aaa354817e4b331fabf4a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Wed, 2 May 2018 14:41:29 -0700 Subject: [PATCH 551/724] release: 6.0.0-rc.10 --- .monorepo.json | 40 +++++++++---------- .../angular/utility/latest-versions.ts | 4 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 96e3f9a1f7..d50ab4581f 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.12", + "version": "0.5.13", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.12", + "version": "0.5.13", "hash": "1d066d7c828bdd4072757c9ec255f0ad" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.12", - "hash": "da19aa7869e3c9d6db82277f95593688", + "version": "0.5.13", + "hash": "4b8086635b779fe0f62cdb360157762b", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.12", + "version": "0.5.13", "hash": "40cbf0679984a11d6af42ad278da23ba", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.12", + "version": "0.5.13", "hash": "ad865d8d5f8434501e3bd5c06519c53d", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,8 +82,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.12", - "hash": "40c26d3c33be648c3811639baeb487a9", + "version": "0.5.13", + "hash": "a9918eb3d16d97afc0d64762beeb6c45", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-ng-packagr": { @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.12", + "version": "0.5.13", "hash": "05d55c3e0e8736386405527b5680c09d", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.12", - "hash": "2e8d854c3ec36dde8400340a66ff760e", + "version": "0.5.13", + "hash": "6abc84978142858b66ab311ef28defc3", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.12", + "version": "0.5.13", "hash": "547fbef5a37b03dae8fc447d0d329aa8", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.12", + "version": "0.5.13", "hash": "4065f6ce02d4da74507805436faaee22", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.12", + "version": "0.5.13", "hash": "37f668cbbb9a19190c34e6707a804dc6", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.10", + "version": "6.0.0-rc.11", "section": "Misc", "hash": "34ce2a7d8e7b31856be497eb59ff7e3d", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,27 +150,27 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.12", - "hash": "0f4b98019b184edf27c3a761567f068a", + "version": "0.5.13", + "hash": "7ab986645640198e48a6e1dbe9a31e70", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.12", + "version": "0.5.13", "section": "Schematics", "hash": "bad76fc2322d429a7d7758c61b7c4281", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.12", + "version": "0.5.13", "section": "Schematics", "hash": "394b0cfe9820a4b859566b868af1af2f", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.12", + "version": "0.5.13", "section": "Schematics", "hash": "86ec9793b43898bc06bda7c9a784e3d3", "snapshotRepo": "angular/schematics-update-builds" diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 1e24e2ebc7..a2324be2b5 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -13,6 +13,6 @@ export const latestVersions = { ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.5.12', - DevkitBuildNgPackagr: '~0.5.12', + DevkitBuildAngular: '~0.5.13', + DevkitBuildNgPackagr: '~0.5.13', }; From a0f528bc9f816b2dcb6a04595f7ef7cfd92a87f2 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 2 May 2018 17:33:17 -0700 Subject: [PATCH 552/724] fix(@angular-devkit/build-angular): update minimum dev server version --- package-lock.json | 27 +++---------------- package.json | 4 +-- .../angular_devkit/build_angular/package.json | 4 +-- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2473d5824..0bfbf5a35e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11084,9 +11084,9 @@ } }, "webpack-dev-server": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.3.tgz", - "integrity": "sha512-UXfgQIPpdw2rByoUnCrMAIXCS7IJJMp5N0MDQNk9CuQvirCkuWlu7gQpCS8Kaiz4kogC4TdAQHG3jzh/DdqEWg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.4.tgz", + "integrity": "sha512-itcIUDFkHuj1/QQxzUFOEXXmxOj5bku2ScLEsOFPapnq2JRTm58gPdtnBphBJOKL2+M3p6+xygL64bI+3eyzzw==", "requires": { "ansi-html": "0.0.7", "array-includes": "3.0.3", @@ -11113,7 +11113,7 @@ "spdy": "3.4.7", "strip-ansi": "3.0.1", "supports-color": "5.4.0", - "webpack-dev-middleware": "3.1.2", + "webpack-dev-middleware": "3.1.3", "webpack-log": "1.2.0", "yargs": "11.0.0" }, @@ -11193,11 +11193,6 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" - }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -11227,20 +11222,6 @@ } } }, - "webpack-dev-middleware": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.2.tgz", - "integrity": "sha512-Z11Zp3GTvCe6mGbbtma+lMB9xRfJcNtupXfmvFBujyXqLNms6onDnSi9f/Cb2rw6KkD5kgibOfxhN7npZwTiGA==", - "requires": { - "loud-rejection": "1.6.0", - "memory-fs": "0.4.1", - "mime": "2.3.1", - "path-is-absolute": "1.0.1", - "range-parser": "1.2.0", - "url-join": "4.0.0", - "webpack-log": "1.2.0" - } - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", diff --git a/package.json b/package.json index e4c81c8264..f52d814d6c 100644 --- a/package.json +++ b/package.json @@ -154,8 +154,8 @@ "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", "webpack": "~4.6.0", - "webpack-dev-middleware": "^3.1.2", - "webpack-dev-server": "^3.1.3", + "webpack-dev-middleware": "^3.1.3", + "webpack-dev-server": "^3.1.4", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 45dbed6647..37335de120 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -55,8 +55,8 @@ "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", "webpack": "~4.6.0", - "webpack-dev-middleware": "^3.1.2", - "webpack-dev-server": "^3.1.3", + "webpack-dev-middleware": "^3.1.3", + "webpack-dev-server": "^3.1.4", "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4" From 798fdddb58fdcb81314a6e08a116a14b4015eace Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 2 May 2018 16:56:16 -0700 Subject: [PATCH 553/724] fix(@angular-devkit/build-optimizer): make enum discovery stricter --- .../src/transforms/wrap-enums.ts | 84 ++++++++++--------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index 8dc851e3a5..823db512df 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -152,7 +152,7 @@ function visitBlockStatements( } else if (ts.isObjectLiteralExpression(variableDeclaration.initializer) && variableDeclaration.initializer.properties.length !== 0) { const literalPropertyCount = variableDeclaration.initializer.properties.length; - const enumStatements = findTsickleEnumStatements(name, statements, oIndex + 1); + const enumStatements = findEnumNameStatements(name, statements, oIndex + 1); if (enumStatements.length === literalPropertyCount) { // found an enum if (!updatedStatements) { @@ -264,67 +264,69 @@ function findTs2_2EnumStatements( name: string, statements: ts.NodeArray, statementOffset: number, -): ts.ExpressionStatement[] { - const enumStatements: ts.ExpressionStatement[] = []; - let beforeValueStatements = true; +): ts.Statement[] { + const enumValueStatements: ts.Statement[] = []; + const memberNames: string[] = []; - for (let index = statementOffset; index < statements.length; index++) { + let index = statementOffset; + for (; index < statements.length; ++index) { // Ensure all statements are of the expected format and using the right identifer. // When we find a statement that isn't part of the enum, return what we collected so far. - const binExpr = drilldownNodes(statements[index], - [ - { prop: null, kind: ts.SyntaxKind.ExpressionStatement }, - { prop: 'expression', kind: ts.SyntaxKind.BinaryExpression }, - ]); - - if (binExpr === null - || (binExpr.left.kind !== ts.SyntaxKind.PropertyAccessExpression - && binExpr.left.kind !== ts.SyntaxKind.ElementAccessExpression) - ) { - return beforeValueStatements ? [] : enumStatements; + const current = statements[index]; + if (!ts.isExpressionStatement(current) || !ts.isBinaryExpression(current.expression)) { + break; } - const exprStmt = statements[index] as ts.ExpressionStatement; - const leftExpr = binExpr.left as ts.PropertyAccessExpression | ts.ElementAccessExpression; - - if (!(leftExpr.expression.kind === ts.SyntaxKind.Identifier - && (leftExpr.expression as ts.Identifier).text === name)) { - return beforeValueStatements ? [] : enumStatements; + const property = current.expression.left; + if (!property || !ts.isPropertyAccessExpression(property)) { + break; } - if (!beforeValueStatements && leftExpr.kind === ts.SyntaxKind.PropertyAccessExpression) { - // We shouldn't find index statements after value statements. - return []; - } else if (beforeValueStatements && leftExpr.kind === ts.SyntaxKind.ElementAccessExpression) { - beforeValueStatements = false; + if (!ts.isIdentifier(property.expression) || property.expression.text !== name) { + break; } - enumStatements.push(exprStmt); + memberNames.push(property.name.text); + enumValueStatements.push(current); } - return enumStatements; + if (enumValueStatements.length === 0) { + return []; + } + + const enumNameStatements = findEnumNameStatements(name, statements, index, memberNames); + if (enumNameStatements.length !== enumValueStatements.length) { + return []; + } + + return enumValueStatements.concat(enumNameStatements); } // Tsickle enums have a variable statement with indexes, followed by value statements. // See https://github.com/angular/devkit/issues/229#issuecomment-338512056 fore more information. -function findTsickleEnumStatements( +function findEnumNameStatements( name: string, statements: ts.NodeArray, statementOffset: number, + memberNames?: string[], ): ts.Statement[] { const enumStatements: ts.Statement[] = []; - for (let index = statementOffset; index < statements.length; index++) { + for (let index = statementOffset; index < statements.length; ++index) { // Ensure all statements are of the expected format and using the right identifer. // When we find a statement that isn't part of the enum, return what we collected so far. - const access = drilldownNodes(statements[index], - [ - { prop: null, kind: ts.SyntaxKind.ExpressionStatement }, - { prop: 'expression', kind: ts.SyntaxKind.BinaryExpression }, - { prop: 'left', kind: ts.SyntaxKind.ElementAccessExpression }, - ]); + const current = statements[index]; + if (!ts.isExpressionStatement(current) || !ts.isBinaryExpression(current.expression)) { + break; + } - if (!access) { + const access = current.expression.left; + const value = current.expression.right; + if (!access || !ts.isElementAccessExpression(access) || !value || !ts.isStringLiteral(value)) { + break; + } + + if (memberNames && !memberNames.includes(value.text)) { break; } @@ -341,7 +343,11 @@ function findTsickleEnumStatements( break; } - enumStatements.push(statements[index]); + if (value.text !== access.argumentExpression.name.text) { + break; + } + + enumStatements.push(current); } return enumStatements; From 1e659f73c74a4affbf52a84474fcafe8e3dc793f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 3 May 2018 10:24:19 -0700 Subject: [PATCH 554/724] fix(@angular-devkit/build-optimizer): remove enum regexes They were computationally expensive and returning false negatives. Fix https://github.com/angular/angular-cli/issues/10605 --- .../src/transforms/wrap-enums.ts | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index 823db512df..77d3062b15 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -10,31 +10,8 @@ import { drilldownNodes } from '../helpers/ast-utils'; export function testWrapEnums(content: string) { - const ts22EnumVarDecl = /var (\S+) = \{\};/; - // tslint:disable-next-line:max-line-length - const ts22EnumIife = /(\1\.(\S+) = \d+;\r?\n)+\1\[\1\.(\S+)\] = "\4";\r?\n(\1\[\1\.(\S+)\] = "\S+";\r?\n*)+/; - const ts23To26VarDecl = /var (\S+);(\/\*@__PURE__\*\/)*/; - // tslint:disable-next-line:max-line-length - const ts23To26Iife = /\(function \(\1\) \{\s+(\1\[\1\["(\S+)"\] = (\S+)\] = "\4";(\s+\1\[\1\["\S+"\] = (\S+)\] = "\S+";)*\r?\n)\}\)\(\1 \|\| \(\1 = \{\}\)\);/; - const enumComment = /\/\*\* @enum \{\w+\} \*\//; - const multiLineComment = /\s*(?:\/\*[\s\S]*?\*\/)?\s*/; - const newLine = /\s*\r?\n\s*/; - - const regexes = [ - [ - ts22EnumVarDecl, - newLine, multiLineComment, - ts22EnumIife, - ], - [ - ts23To26VarDecl, - newLine, multiLineComment, - ts23To26Iife, - ], - [enumComment], - ].map(arr => new RegExp(arr.map(x => x.source).join(''), 'm')); - - return regexes.some((regex) => regex.test(content)); + // TODO: remove this method, it's not doing anything anymore. + return true; } function isBlockLike(node: ts.Node): node is ts.BlockLike { From 62d1b0eb0ba05585f9fdf85e2e7b54ec663e6a0f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 3 May 2018 10:32:47 -0700 Subject: [PATCH 555/724] test: temporarily disable a build-optimizer sourcemap test --- .../src/build-optimizer/build-optimizer_spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts index 4a54aa1120..0b031cd041 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts @@ -189,7 +189,9 @@ describe('build-optimizer', () => { ).sourceMap).toBeTruthy(); }); - it('doesn\'t produce sourcemaps when emitting was skipped', () => { + // TODO: re-enable this test, it was temporarily disabled as part of + // https://github.com/angular/devkit/pull/842 + xit('doesn\'t produce sourcemaps when emitting was skipped', () => { const ignoredInput = tags.oneLine` var Clazz = (function () { function Clazz() { } return Clazz; }()); ${staticProperty} From 3e3d3f5f5d80121adb7ac98b4e18bf46028c7871 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 3 May 2018 12:42:18 -0700 Subject: [PATCH 556/724] release: 6.0.0 --- .monorepo.json | 40 +++++++++---------- .../angular/utility/latest-versions.ts | 6 +-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index d50ab4581f..691e98ef70 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.5.13", + "version": "0.6.0", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.5.13", + "version": "0.6.0", "hash": "1d066d7c828bdd4072757c9ec255f0ad" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.5.13", - "hash": "4b8086635b779fe0f62cdb360157762b", + "version": "0.6.0", + "hash": "dd3b51801d0b878437eebf8425bc1f30", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.5.13", + "version": "0.6.0", "hash": "40cbf0679984a11d6af42ad278da23ba", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.5.13", + "version": "0.6.0", "hash": "ad865d8d5f8434501e3bd5c06519c53d", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,8 +82,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.5.13", - "hash": "a9918eb3d16d97afc0d64762beeb6c45", + "version": "0.6.0", + "hash": "8014e2e5414d6c241da04516ac4ed187", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-ng-packagr": { @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.5.13", + "version": "0.6.0", "hash": "05d55c3e0e8736386405527b5680c09d", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.5.13", - "hash": "6abc84978142858b66ab311ef28defc3", + "version": "0.6.0", + "hash": "14d9d1c481e4c26dcd0f3e4b0a93f69a", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.5.13", + "version": "0.6.0", "hash": "547fbef5a37b03dae8fc447d0d329aa8", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.5.13", + "version": "0.6.0", "hash": "4065f6ce02d4da74507805436faaee22", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.5.13", + "version": "0.6.0", "hash": "37f668cbbb9a19190c34e6707a804dc6", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0-rc.11", + "version": "6.0.0", "section": "Misc", "hash": "34ce2a7d8e7b31856be497eb59ff7e3d", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,27 +150,27 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.5.13", - "hash": "7ab986645640198e48a6e1dbe9a31e70", + "version": "0.6.0", + "hash": "f0607b30add34425044e448536ac6fb0", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.5.13", + "version": "0.6.0", "section": "Schematics", "hash": "bad76fc2322d429a7d7758c61b7c4281", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.5.13", + "version": "0.6.0", "section": "Schematics", "hash": "394b0cfe9820a4b859566b868af1af2f", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.5.13", + "version": "0.6.0", "section": "Schematics", "hash": "86ec9793b43898bc06bda7c9a784e3d3", "snapshotRepo": "angular/schematics-update-builds" diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index a2324be2b5..27bbc68879 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,11 +8,11 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '^6.0.0-rc.6', + Angular: '^6.0.0', RxJs: '^6.0.0', ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.5.13', - DevkitBuildNgPackagr: '~0.5.13', + DevkitBuildAngular: '~0.6.0', + DevkitBuildNgPackagr: '~0.6.0', }; From 51c61296804156beca389fd3642251dcf94ac819 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 3 May 2018 15:44:12 -0700 Subject: [PATCH 557/724] ci: add special thanks script and mailmap --- .mailmap | 51 +++++++++++++++++++++++++++++++++++++++ scripts/special-thanks.ts | 28 +++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 .mailmap create mode 100644 scripts/special-thanks.ts diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000..e93c84244f --- /dev/null +++ b/.mailmap @@ -0,0 +1,51 @@ +# Please keep this file in alphabetical order, per section. + + +################################################################################ +# Angular Team +################################################################################ +Hans Larsen +Igor Minar + Igor Minar + + +################################################################################ +# Angular CLI Team +################################################################################ +Filipe Silva +Mike Brocchi + + +################################################################################ +# OpenSource Contributors +################################################################################ +Ashok Tamang + Ashok Tamang +Bram Borggreve +Carlo Dapor + +Cédric Exbrayat + Cédric Exbrayat +Charles Lyding + Charles Lyding + Charles Lyding <19598772+clydin@users.noreply.github.com> +Chris Pearce + Chris Pearce +Dominic Watson + Dominic Watson +Jeremy Wells +Jan Kuri +Jim Cummins + Jim Cummins +John Papa + John Papa +Meligy +MichaÅ‚ Gołębiowski-Owczarek +Preston Van Loon + Preston Van Loon +Rodric Haddad +Shai Reznik + Shai Reznik + Shai Reznik +Stephen Cavaliere + Stephen Cavaliere diff --git a/scripts/special-thanks.ts b/scripts/special-thanks.ts new file mode 100644 index 0000000000..ed00d3274c --- /dev/null +++ b/scripts/special-thanks.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +import { logging } from '@angular-devkit/core'; +import { execSync } from 'child_process'; + +export default function (opts: { sha: string }, logger: logging.Logger) { + const authors = execSync(`git log ${opts.sha}.. --format="%aN"`).toString(); + + const counter = new Map(); + for (const name of authors.split(/\r?\n/g)) { + if (name) { + const maybeCounter = counter.get(name); + counter.set(name, (maybeCounter || 0) + 1); + } + } + + const sortedCount = [...counter.entries()].sort((a, b) => b[1] - a[1]); + + for (const count of sortedCount) { + logger.info(count[0] + ' ' + count[1]); + } +} From 49e8eeeef1dccf908d7edb0105fc8f7bfd4172c6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 4 May 2018 10:49:06 -0700 Subject: [PATCH 558/724] feat(@angular-devkit/build-angular): allow optional karma watch Fixes #847 --- .../build_angular/src/angular-cli-files/plugins/karma.ts | 4 ++-- packages/angular_devkit/build_angular/src/karma/index.ts | 8 +++++--- .../angular_devkit/build_angular/src/karma/schema.json | 3 +-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index 502fecdbc1..57edc189e8 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -113,8 +113,8 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => { delete webpackConfig.entry.styles; // The webpack tier owns the watch behavior so we want to force it in the config. - webpackConfig.watch = options.watch; - if (!options.watch) { + webpackConfig.watch = !config.singleRun; + if (config.singleRun) { // There's no option to turn off file watching in webpack-dev-server, but // we can override the file watcher instead. webpackConfig.plugins.unshift({ diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index 4248dd325a..e880dfde8c 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -59,9 +59,11 @@ export class KarmaBuilder implements Builder { // TODO: adjust options to account for not passing them blindly to karma. // const karmaOptions: any = Object.assign({}, options); // tslint:disable-next-line:no-any - const karmaOptions: any = { - singleRun: !options.watch, - }; + const karmaOptions: any = {}; + + if (options.watch !== undefined) { + karmaOptions.singleRun = !options.watch; + } // Convert browsers from a string to an array if (options.browsers) { diff --git a/packages/angular_devkit/build_angular/src/karma/schema.json b/packages/angular_devkit/build_angular/src/karma/schema.json index 111c00ddae..922545b437 100644 --- a/packages/angular_devkit/build_angular/src/karma/schema.json +++ b/packages/angular_devkit/build_angular/src/karma/schema.json @@ -74,8 +74,7 @@ }, "watch": { "type": "boolean", - "description": "Run build when files change.", - "default": false + "description": "Run build when files change." }, "poll": { "type": "number", From bc5a19a836e37725572fe7bcc58717454249cd01 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 3 May 2018 12:59:31 -0700 Subject: [PATCH 559/724] fix(@angular-devkit/build-optimizer): further improvements to enum validation --- package-lock.json | 2 +- .../src/build-optimizer/build-optimizer.ts | 6 +- .../build_optimizer/src/index.ts | 9 +- .../src/transforms/wrap-enums.ts | 110 ++++++++++-------- .../src/transforms/wrap-enums_spec.ts | 7 +- 5 files changed, 75 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0bfbf5a35e..bcb0139b1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1940,7 +1940,7 @@ }, "compression": { "version": "1.7.2", - "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { "accepts": "1.3.5", diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts index 8cf66d88c8..89cba15b23 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts @@ -16,7 +16,7 @@ import { getImportTslibTransformer, testImportTslib } from '../transforms/import import { getPrefixClassesTransformer, testPrefixClasses } from '../transforms/prefix-classes'; import { getPrefixFunctionsTransformer } from '../transforms/prefix-functions'; import { getScrubFileTransformer, testScrubFile } from '../transforms/scrub-file'; -import { getWrapEnumsTransformer, testWrapEnums } from '../transforms/wrap-enums'; +import { getWrapEnumsTransformer } from '../transforms/wrap-enums'; // Angular packages are known to have no side effects. @@ -140,9 +140,7 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr getTransforms.unshift(getImportTslibTransformer); } - if (testWrapEnums(content)) { - getTransforms.unshift(getWrapEnumsTransformer); - } + getTransforms.unshift(getWrapEnumsTransformer); const transformJavascriptOpts: TransformJavascriptOptions = { content: content, diff --git a/packages/angular_devkit/build_optimizer/src/index.ts b/packages/angular_devkit/build_optimizer/src/index.ts index 9fe871d066..191247f747 100644 --- a/packages/angular_devkit/build_optimizer/src/index.ts +++ b/packages/angular_devkit/build_optimizer/src/index.ts @@ -18,4 +18,11 @@ export { getImportTslibTransformer, testImportTslib } from './transforms/import- export { getPrefixClassesTransformer, testPrefixClasses } from './transforms/prefix-classes'; export { getPrefixFunctionsTransformer } from './transforms/prefix-functions'; export { getScrubFileTransformer, testScrubFile } from './transforms/scrub-file'; -export { getWrapEnumsTransformer, testWrapEnums } from './transforms/wrap-enums'; +export { getWrapEnumsTransformer } from './transforms/wrap-enums'; + +/** + * @deprecated since version 6.0 + */ +export function testWrapEnums(_content: string) { + return true; +} diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index 77d3062b15..2d815a6238 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -6,13 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ import * as ts from 'typescript'; -import { drilldownNodes } from '../helpers/ast-utils'; - - -export function testWrapEnums(content: string) { - // TODO: remove this method, it's not doing anything anymore. - return true; -} function isBlockLike(node: ts.Node): node is ts.BlockLike { return node.kind === ts.SyntaxKind.Block @@ -166,73 +159,96 @@ function visitBlockStatements( // TS 2.3 enums have statements that are inside a IIFE. function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpression | null { - if (!ts.isExpressionStatement(statement) || !ts.isCallExpression(statement.expression)) { + if (!ts.isExpressionStatement(statement)) { + return null; + } + + let expression = statement.expression; + while (ts.isParenthesizedExpression(expression)) { + expression = expression.expression; + } + + if (!expression || !ts.isCallExpression(expression) || expression.arguments.length !== 1) { + return null; + } + + const callExpression = expression; + + const argument = expression.arguments[0]; + if (!ts.isBinaryExpression(argument) + || argument.operatorToken.kind !== ts.SyntaxKind.BarBarToken) { + return null; + } + + if (!ts.isIdentifier(argument.left) || argument.left.text !== name) { + return null; + } + + expression = expression.expression; + while (ts.isParenthesizedExpression(expression)) { + expression = expression.expression; + } + + if (!expression || !ts.isFunctionExpression(expression) || expression.parameters.length !== 1) { return null; } - const funcExpr = drilldownNodes(statement, - [ - { prop: null, kind: ts.SyntaxKind.ExpressionStatement }, - { prop: 'expression', kind: ts.SyntaxKind.CallExpression }, - { prop: 'expression', kind: ts.SyntaxKind.ParenthesizedExpression }, - { prop: 'expression', kind: ts.SyntaxKind.FunctionExpression }, - ]); - - if (funcExpr === null) { return null; } - - if (!( - funcExpr.parameters.length === 1 - && funcExpr.parameters[0].name.kind === ts.SyntaxKind.Identifier - && (funcExpr.parameters[0].name as ts.Identifier).text === name - )) { + const parameter = expression.parameters[0]; + if (!ts.isIdentifier(parameter.name) || parameter.name.text !== name) { return null; } // In TS 2.3 enums, the IIFE contains only expressions with a certain format. // If we find any that is different, we ignore the whole thing. - for (const innerStmt of funcExpr.body.statements) { + for (let bodyIndex = 0; bodyIndex < expression.body.statements.length; ++bodyIndex) { + const bodyStatement = expression.body.statements[bodyIndex]; - const innerBinExpr = drilldownNodes(innerStmt, - [ - { prop: null, kind: ts.SyntaxKind.ExpressionStatement }, - { prop: 'expression', kind: ts.SyntaxKind.BinaryExpression }, - ]); + if (!ts.isExpressionStatement(bodyStatement) || !bodyStatement.expression) { + return null; + } - if (innerBinExpr === null) { return null; } + if (!ts.isBinaryExpression(bodyStatement.expression) + || bodyStatement.expression.operatorToken.kind !== ts.SyntaxKind.FirstAssignment) { + return null; + } - if (!(innerBinExpr.operatorToken.kind === ts.SyntaxKind.FirstAssignment - && innerBinExpr.left.kind === ts.SyntaxKind.ElementAccessExpression)) { + const assignment = bodyStatement.expression.left; + const value = bodyStatement.expression.right; + if (!ts.isElementAccessExpression(assignment) || !ts.isStringLiteral(value)) { return null; } - const innerElemAcc = innerBinExpr.left as ts.ElementAccessExpression; + if (!ts.isIdentifier(assignment.expression) || assignment.expression.text !== name) { + return null; + } - if (!( - innerElemAcc.expression.kind === ts.SyntaxKind.Identifier - && (innerElemAcc.expression as ts.Identifier).text === name - && innerElemAcc.argumentExpression - && innerElemAcc.argumentExpression.kind === ts.SyntaxKind.BinaryExpression - )) { + const memberArgument = assignment.argumentExpression; + if (!memberArgument || !ts.isBinaryExpression(memberArgument) + || memberArgument.operatorToken.kind !== ts.SyntaxKind.FirstAssignment) { return null; } - const innerArgBinExpr = innerElemAcc.argumentExpression as ts.BinaryExpression; - if (innerArgBinExpr.left.kind !== ts.SyntaxKind.ElementAccessExpression) { + if (!ts.isElementAccessExpression(memberArgument.left)) { + return null; + } + + if (!ts.isIdentifier(memberArgument.left.expression) + || memberArgument.left.expression.text !== name) { return null; } - const innerArgElemAcc = innerArgBinExpr.left as ts.ElementAccessExpression; + if (!memberArgument.left.argumentExpression + || !ts.isStringLiteral(memberArgument.left.argumentExpression)) { + return null; + } - if (!( - innerArgElemAcc.expression.kind === ts.SyntaxKind.Identifier - && (innerArgElemAcc.expression as ts.Identifier).text === name - )) { + if (memberArgument.left.argumentExpression.text !== value.text) { return null; } } - return statement.expression; + return callExpression; } // TS 2.2 enums have statements after the variable declaration, with index statements followed diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index f2ef8621fd..8f4ed377b0 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -8,7 +8,7 @@ // tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; -import { getWrapEnumsTransformer, testWrapEnums } from './wrap-enums'; +import { getWrapEnumsTransformer } from './wrap-enums'; const transform = (content: string) => transformJavascript( @@ -34,7 +34,6 @@ describe('wrap-enums', () => { }()); `; - expect(testWrapEnums(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -54,7 +53,6 @@ describe('wrap-enums', () => { })({}); `; - expect(testWrapEnums(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -78,7 +76,6 @@ describe('wrap-enums', () => { })({}); `; - expect(testWrapEnums(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -112,7 +109,6 @@ describe('wrap-enums', () => { }()); `; - expect(testWrapEnums(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -162,7 +158,6 @@ describe('wrap-enums', () => { })({}); `; - expect(testWrapEnums(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); }); From a97be8aa4c441b76c57094faa2a9e134b3bcad04 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 17 Apr 2018 16:55:39 -0400 Subject: [PATCH 560/724] refactor(@angular-devkit/schematics): adjust node-workflow rxjs usage --- .../tools/workflow/node-workflow.ts | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index f94e345e29..33ee58dfd5 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -16,9 +16,8 @@ import { formats, workflow, } from '@angular-devkit/schematics'; // tslint:disable-line:no-implicit-dependencies -import { EMPTY, Observable, Subject, concat, of, throwError } from 'rxjs'; -import { reduce, tap } from 'rxjs/internal/operators'; -import { concatMap, ignoreElements, map } from 'rxjs/operators'; +import { Observable, Subject, concat, of, throwError } from 'rxjs'; +import { concatMap, defaultIfEmpty, ignoreElements, last, map, tap } from 'rxjs/operators'; import { NodeModulesEngineHost, validateOptionsWithSchema } from '..'; import { DryRunEvent } from '../../src/sink/dryrun'; import { BuiltinTaskExecutor } from '../../tasks/node'; @@ -129,54 +128,52 @@ export class NodeWorkflow implements workflow.Workflow { }; this._context.push(context); - return concat( - schematic.call(options.options, of(new HostTree(this._host)), { - logger: context.logger, - }).pipe( - map(tree => Tree.optimize(tree)), - concatMap((tree: Tree) => { - return concat( - dryRunSink.commit(tree).pipe( - ignoreElements(), - ), - of(tree), - ); - }), - concatMap((tree: Tree) => { - dryRunSubscriber.unsubscribe(); - if (error) { - return throwError(new UnsuccessfulWorkflowExecution()); - } - if (this._options.dryRun) { - return EMPTY; - } - - return fsSink.commit(tree); - }), - ), - concat(new Observable(obs => { - if (!this._options.dryRun) { - this._lifeCycle.next({ kind: 'post-tasks-start' }); - this._engine.executePostTasks() - .pipe( - reduce(() => {}), - tap(() => this._lifeCycle.next({ kind: 'post-tasks-end' })), - ) - .subscribe(obs); - } else { - obs.complete(); + return schematic.call( + options.options, + of(new HostTree(this._host)), + { logger: context.logger }, + ).pipe( + map(tree => Tree.optimize(tree)), + concatMap((tree: Tree) => { + return concat( + dryRunSink.commit(tree).pipe(ignoreElements()), + of(tree), + ); + }), + concatMap((tree: Tree) => { + dryRunSubscriber.unsubscribe(); + if (error) { + return throwError(new UnsuccessfulWorkflowExecution()); + } + + if (this._options.dryRun) { + return of(); + } + + return fsSink.commit(tree).pipe(last(), defaultIfEmpty()); + }), + concatMap(() => { + if (this._options.dryRun) { + return of(); } - })), - concat(new Observable(obs => { + + this._lifeCycle.next({ kind: 'post-tasks-start' }); + + return this._engine.executePostTasks() + .pipe( + tap({ complete: () => this._lifeCycle.next({ kind: 'post-tasks-end' }) }), + last(), + defaultIfEmpty(), + ); + }), + tap({ complete: () => { this._lifeCycle.next({ kind: 'workflow-end' }); this._context.pop(); if (this._context.length == 0) { this._lifeCycle.next({ kind: 'end' }); } - - obs.complete(); - })), - ).pipe(reduce(() => { })); + }}), + ); } } From fe122511feada8d8c554799171e8e43bac950416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Cevey?= Date: Tue, 17 Apr 2018 23:57:24 +0100 Subject: [PATCH 561/724] style: prepend Google @license to all files --- .../lib/base-href-webpack/base-href-webpack-plugin.ts | 7 +++++++ .../lib/base-href-webpack/base-href-webpack-plugin_spec.ts | 7 +++++++ .../src/angular-cli-files/lib/base-href-webpack/index.ts | 7 +++++++ .../angular-cli-files/models/webpack-configs/browser.ts | 7 +++++++ .../src/angular-cli-files/models/webpack-configs/common.ts | 7 +++++++ .../src/angular-cli-files/models/webpack-configs/index.ts | 7 +++++++ .../src/angular-cli-files/models/webpack-configs/server.ts | 7 +++++++ .../src/angular-cli-files/models/webpack-configs/styles.ts | 7 +++++++ .../src/angular-cli-files/models/webpack-configs/test.ts | 7 +++++++ .../angular-cli-files/models/webpack-configs/typescript.ts | 7 +++++++ .../src/angular-cli-files/models/webpack-configs/utils.ts | 7 +++++++ .../angular-cli-files/plugins/karma-webpack-failure-cb.ts | 7 +++++++ .../build_angular/src/angular-cli-files/plugins/karma.ts | 7 +++++++ .../plugins/suppress-entry-chunks-webpack-plugin.ts | 7 +++++++ .../build_angular/src/angular-cli-files/plugins/webpack.ts | 7 +++++++ .../src/angular-cli-files/utilities/find-up.ts | 7 +++++++ .../src/angular-cli-files/utilities/is-directory.ts | 7 +++++++ .../src/angular-cli-files/utilities/package-chunk-sort.ts | 7 +++++++ .../src/angular-cli-files/utilities/read-tsconfig.ts | 7 +++++++ .../angular-cli-files/utilities/require-project-module.ts | 7 +++++++ .../angular-cli-files/utilities/service-worker/index.ts | 7 +++++++ .../build_angular/src/angular-cli-files/utilities/stats.ts | 7 +++++++ .../src/angular-cli-files/utilities/strip-bom.ts | 7 +++++++ packages/ngtools/webpack/src/type_checker_bootstrap.js | 7 +++++++ .../build_angular/hello-world-app/e2e/app.e2e-spec.ts | 7 +++++++ .../build_angular/hello-world-app/e2e/app.po.ts | 7 +++++++ .../build_angular/hello-world-app/karma.conf.js | 7 +++++++ .../build_angular/hello-world-app/protractor.conf.js | 7 +++++++ .../hello-world-app/src/app/app.component.spec.ts | 7 +++++++ .../build_angular/hello-world-app/src/app/app.component.ts | 7 +++++++ .../build_angular/hello-world-app/src/app/app.module.ts | 7 +++++++ .../hello-world-app/src/app/app.server.module.ts | 7 +++++++ .../hello-world-app/src/environments/environment.prod.ts | 7 +++++++ .../hello-world-app/src/environments/environment.ts | 7 +++++++ .../build_angular/hello-world-app/src/main.server.ts | 7 +++++++ .../build_angular/hello-world-app/src/main.ts | 7 +++++++ .../build_angular/hello-world-app/src/polyfills.ts | 7 +++++++ .../build_angular/hello-world-app/src/test.ts | 7 +++++++ .../build_angular/hello-world-app/src/typings.d.ts | 7 +++++++ .../ng-packaged/projects/lib/karma.conf.js | 7 +++++++ .../ng-packaged/projects/lib/src/lib/lib.component.spec.ts | 7 +++++++ .../ng-packaged/projects/lib/src/lib/lib.component.ts | 7 +++++++ .../ng-packaged/projects/lib/src/lib/lib.module.ts | 7 +++++++ .../ng-packaged/projects/lib/src/lib/lib.service.spec.ts | 7 +++++++ .../ng-packaged/projects/lib/src/lib/lib.service.ts | 7 +++++++ .../ng-packaged/projects/lib/src/public_api.ts | 7 +++++++ .../build_ng_packagr/ng-packaged/projects/lib/src/test.ts | 7 +++++++ .../build_optimizer/webpack/aio-app/benchmark.js | 7 +++++++ .../build_optimizer/webpack/aio-app/e2e/app.e2e-spec.ts | 7 +++++++ .../build_optimizer/webpack/aio-app/protractor.config.js | 7 +++++++ .../webpack/aio-app/src/app/app.component.ts | 7 +++++++ .../build_optimizer/webpack/aio-app/src/app/app.module.ts | 7 +++++++ .../webpack/aio-app/src/app/documents/document-contents.ts | 7 +++++++ .../webpack/aio-app/src/app/documents/document.service.ts | 7 +++++++ .../aio-app/src/app/embedded/api/api-list.component.ts | 7 +++++++ .../webpack/aio-app/src/app/embedded/api/api.service.ts | 7 +++++++ .../src/app/embedded/code/code-example.component.ts | 7 +++++++ .../aio-app/src/app/embedded/code/code-tabs.component.ts | 7 +++++++ .../aio-app/src/app/embedded/code/code.component.ts | 7 +++++++ .../src/app/embedded/code/pretty-printer.service.ts | 7 +++++++ .../app/embedded/contributor/contributor-list.component.ts | 7 +++++++ .../src/app/embedded/contributor/contributor.component.ts | 7 +++++++ .../src/app/embedded/contributor/contributor.service.ts | 7 +++++++ .../src/app/embedded/contributor/contributors.model.ts | 7 +++++++ .../aio-app/src/app/embedded/current-location.component.ts | 7 +++++++ .../webpack/aio-app/src/app/embedded/embedded.module.ts | 7 +++++++ .../app/embedded/live-example/live-example.component.ts | 7 +++++++ .../src/app/embedded/resource/resource-list.component.ts | 7 +++++++ .../aio-app/src/app/embedded/resource/resource.model.ts | 7 +++++++ .../aio-app/src/app/embedded/resource/resource.service.ts | 7 +++++++ .../webpack/aio-app/src/app/embedded/toc/toc.component.ts | 7 +++++++ .../src/app/layout/doc-viewer/doc-viewer.component.ts | 7 +++++++ .../aio-app/src/app/layout/doc-viewer/dt.component.ts | 7 +++++++ .../aio-app/src/app/layout/footer/footer.component.ts | 7 +++++++ .../aio-app/src/app/layout/nav-item/nav-item.component.ts | 7 +++++++ .../aio-app/src/app/layout/nav-menu/nav-menu.component.ts | 7 +++++++ .../aio-app/src/app/layout/top-menu/top-menu.component.ts | 7 +++++++ .../webpack/aio-app/src/app/navigation/navigation.model.ts | 7 +++++++ .../aio-app/src/app/navigation/navigation.service.ts | 7 +++++++ .../src/app/search/search-box/search-box.component.ts | 7 +++++++ .../app/search/search-results/search-results.component.ts | 7 +++++++ .../webpack/aio-app/src/app/search/search-worker.js | 7 +++++++ .../webpack/aio-app/src/app/search/search.service.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/attribute-utils.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/copier.service.ts | 7 +++++++ .../aio-app/src/app/shared/custom-md-icon-registry.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/ga.service.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/location.service.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/logger.service.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/scroll-spy.service.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/scroll.service.ts | 7 +++++++ .../aio-app/src/app/shared/select/select.component.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/shared.module.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/toc.service.ts | 7 +++++++ .../webpack/aio-app/src/app/shared/web-worker.ts | 7 +++++++ .../webpack/aio-app/src/app/sw-updates/global.value.ts | 7 +++++++ .../src/app/sw-updates/sw-update-notifications.service.ts | 7 +++++++ .../aio-app/src/app/sw-updates/sw-updates.module.ts | 7 +++++++ .../aio-app/src/app/sw-updates/sw-updates.service.ts | 7 +++++++ .../webpack/aio-app/src/assets/js/prettify.js | 7 +++++++ .../webpack/aio-app/src/environments/environment.ts | 7 +++++++ .../build_optimizer/webpack/aio-app/src/main.ts | 7 +++++++ .../build_optimizer/webpack/aio-app/src/polyfills.ts | 7 +++++++ .../webpack/aio-app/webpack.config.common.js | 7 +++++++ .../build_optimizer/webpack/aio-app/webpack.config.js | 7 +++++++ .../webpack/aio-app/webpack.config.no-ngo.js | 7 +++++++ .../webpack/aio-app/webpack.config.old-ngo.js | 7 +++++++ .../build_optimizer/webpack/simple-app/benchmark.js | 7 +++++++ .../build_optimizer/webpack/simple-app/e2e/app.e2e-spec.ts | 7 +++++++ .../webpack/simple-app/protractor.config.js | 7 +++++++ .../webpack/simple-app/src/app/app.component.ts | 7 +++++++ .../webpack/simple-app/src/app/app.module.ts | 7 +++++++ .../webpack/simple-app/src/app/feature.module.ts | 7 +++++++ .../webpack/simple-app/src/app/injectable.ts | 7 +++++++ .../webpack/simple-app/src/app/lazy.module.ts | 7 +++++++ .../build_optimizer/webpack/simple-app/src/main.ts | 7 +++++++ .../build_optimizer/webpack/simple-app/src/polyfills.ts | 7 +++++++ .../webpack/simple-app/webpack.config.common.js | 7 +++++++ .../build_optimizer/webpack/simple-app/webpack.config.js | 7 +++++++ .../webpack/simple-app/webpack.config.no-ngo.js | 7 +++++++ .../webpack/simple-app/webpack.config.old-ngo.js | 7 +++++++ .../build_webpack/hello-world-app/karma.conf.js | 7 +++++++ 122 files changed, 854 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts index 024aa9110e..e91ad5c18a 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts index 8501239e3e..a8747096f0 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/base-href-webpack-plugin_spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/index.ts index 625047983c..f38b36f68f 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/lib/base-href-webpack/index.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index f2254a6770..c4d7460d40 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index bb5837280e..c7466b549d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts index ec39638e21..54ed2cb9ab 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts index 6e735b209b..51e8ee9b14 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index df8ff6969b..8345b0accc 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts index a61c4f93d4..116611fcf1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index 22ca2f0185..e3a8ed28e3 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. import { tags, virtualFs } from '@angular-devkit/core'; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts index ab1f4f34e9..3bd7e39779 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts index 61050f7e90..392eebd14b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-webpack-failure-cb.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts index 57edc189e8..fcf6dcb516 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts index 378443b2a2..c02bf346b9 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/suppress-entry-chunks-webpack-plugin.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts index a32209e0dd..0480230ad4 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/find-up.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/find-up.ts index 6e01d70d6e..a57d2b64fc 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/find-up.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/find-up.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts index d9f072c864..f4636a2725 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts index 35cf0db898..ce9f1b3e5d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts index 6ff083a719..52aff15e89 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/read-tsconfig.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. import * as ts from 'typescript'; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/require-project-module.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/require-project-module.ts index 79b17d1c49..eb18644886 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/require-project-module.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/require-project-module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts index a45a957f0c..97e2d1a542 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/service-worker/index.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. import { Path, join, normalize, virtualFs, dirname, getSystemPath, tags, fragment } from '@angular-devkit/core'; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts index 6c135c3722..3f5541603b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts index a878f64b4d..f4aba38228 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. diff --git a/packages/ngtools/webpack/src/type_checker_bootstrap.js b/packages/ngtools/webpack/src/type_checker_bootstrap.js index 9326a42d9b..da95c57aac 100644 --- a/packages/ngtools/webpack/src/type_checker_bootstrap.js +++ b/packages/ngtools/webpack/src/type_checker_bootstrap.js @@ -1,2 +1,9 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ require('../../../../lib/bootstrap-local'); require('./type_checker_worker.ts'); diff --git a/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.e2e-spec.ts index 9a9926c44f..69dd6a1b7f 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.e2e-spec.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.e2e-spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { AppPage } from './app.po'; describe('hello-world-app App', () => { diff --git a/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.po.ts b/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.po.ts index 82ea75ba50..1b38c7c7fa 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.po.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/e2e/app.po.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { browser, by, element } from 'protractor'; export class AppPage { diff --git a/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js index 5a6979e5f6..deec58129c 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js +++ b/tests/@angular_devkit/build_angular/hello-world-app/karma.conf.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html diff --git a/tests/@angular_devkit/build_angular/hello-world-app/protractor.conf.js b/tests/@angular_devkit/build_angular/hello-world-app/protractor.conf.js index 22088b6492..445801606d 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/protractor.conf.js +++ b/tests/@angular_devkit/build_angular/hello-world-app/protractor.conf.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.spec.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.spec.ts index bcbdf36b3e..209e3256a9 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.spec.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { TestBed, async } from '@angular/core/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.ts index 7b0f672831..8366380cf6 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component } from '@angular/core'; @Component({ diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.module.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.module.ts index 926975afe8..c61881ebb3 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.module.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts index 795380cd22..bb56e2795c 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts index 3612073bc3..fac764c6d2 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ export const environment = { production: true }; diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.ts index b7f639aeca..a3fe55067a 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/environments/environment.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/main.server.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/main.server.ts index b9ca5050c2..00f62942d0 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/main.server.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/main.server.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/main.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/main.ts index 91ec6da5f0..3d8f375e6f 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/main.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/main.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/polyfills.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/polyfills.ts index d68672ffe4..1e5ba9f031 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/polyfills.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/polyfills.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/test.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/test.ts index 16317897b1..f1efa9824a 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/test.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/test.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/dist/zone-testing'; diff --git a/tests/@angular_devkit/build_angular/hello-world-app/src/typings.d.ts b/tests/@angular_devkit/build_angular/hello-world-app/src/typings.d.ts index ef5c7bd620..fe59b01a3b 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/src/typings.d.ts +++ b/tests/@angular_devkit/build_angular/hello-world-app/src/typings.d.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* SystemJS module definition */ declare var module: NodeModule; interface NodeModule { diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js index 937ad4a65b..0a81bfc617 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/karma.conf.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.spec.ts index c02003e11d..6ef4e5debc 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.spec.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { LibComponent } from './lib.component'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.ts index 4c25073a25..3fcbd0a37c 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, OnInit } from '@angular/core'; @Component({ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts index 511e052093..4db2feed5a 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule } from '@angular/core'; import { LibComponent } from './lib.component'; import { LibService } from './lib.service'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.spec.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.spec.ts index a62c02c2fb..a808deee36 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.spec.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { TestBed, inject } from '@angular/core/testing'; import { LibService } from './lib.service'; diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts index e2527a2b6e..e8be2fbdc2 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; @Injectable() diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts index a09e1deb35..d3a2dc0db0 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public_api.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* * Public API Surface of lib */ diff --git a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts index e11ff1c97b..7f7cc44356 100644 --- a/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts +++ b/tests/@angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/test.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'core-js/es7/reflect'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/benchmark.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/benchmark.js index fdb35a8421..caaa005d49 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/benchmark.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/benchmark.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const fs = require('fs'); const path = require('path'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/e2e/app.e2e-spec.ts index 21ae0d7241..ad0ab2760e 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/e2e/app.e2e-spec.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/e2e/app.e2e-spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { browser, element, by } from 'protractor'; describe('Webpack AIO app', function () { diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/protractor.config.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/protractor.config.js index 8153f7ba1a..0b037e92d3 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/protractor.config.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/protractor.config.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ exports.config = { allScriptsTimeout: 11000, specs: [ diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.component.ts index 6252452f44..3458618d25 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, ElementRef, HostBinding, HostListener, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core'; import { MdSidenav } from '@angular/material'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.module.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.module.ts index 73e0154342..f39d3efe2b 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/app.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpModule } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document-contents.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document-contents.ts index a625759f0f..8a6b03ac69 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document-contents.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document-contents.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ export interface DocumentContents { /** The unique identifier for this document */ id: string; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document.service.ts index c7617465f2..dfea30b765 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/documents/document.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api-list.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api-list.component.ts index 1f4a2f7512..ead66f4e0c 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api-list.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api-list.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* * API List & Filter Component * diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api.service.ts index 7c708d3265..6fd9980ee8 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/api/api.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable, OnDestroy } from '@angular/core'; import { Http } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-example.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-example.component.ts index b35c824e85..3024e27444 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-example.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-example.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* tslint:disable component-selector */ import { Component, ElementRef, HostBinding, OnInit } from '@angular/core'; import { getBoolFromAttribute } from 'app/shared/attribute-utils'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-tabs.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-tabs.component.ts index 0d98f912b9..509cd15bb0 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-tabs.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code-tabs.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* tslint:disable component-selector */ import { Component, ElementRef, OnInit } from '@angular/core'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code.component.ts index 98e3315799..83bc5f6a31 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/code.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, ElementRef, ViewChild, OnChanges, OnDestroy, Input } from '@angular/core'; import { Logger } from 'app/shared/logger.service'; import { PrettyPrinter } from './pretty-printer.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/pretty-printer.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/pretty-printer.service.ts index 6fdd982908..c1fbc11b45 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/pretty-printer.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/code/pretty-printer.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor-list.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor-list.component.ts index c8fbacde24..bdec5f0b62 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor-list.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor-list.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, OnInit } from '@angular/core'; import { ContributorGroup } from './contributors.model'; import { ContributorService } from './contributor.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.component.ts index b2aba27c03..2a75ea5cb4 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, Input } from '@angular/core'; import { Contributor } from './contributors.model'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.service.ts index 08cbb010ab..36ea89aa5c 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributor.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributors.model.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributors.model.ts index e40983f8d7..ed31b23ff2 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributors.model.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/contributor/contributors.model.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ export class ContributorGroup { name: string; order: number; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/current-location.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/current-location.component.ts index 57f4280faa..87e4966365 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/current-location.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/current-location.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* tslint:disable component-selector */ import { Component } from '@angular/core'; import { LocationService } from 'app/shared/location.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/embedded.module.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/embedded.module.ts index 5ec0f7d3e7..dc4e077f9e 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/embedded.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/embedded.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/live-example/live-example.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/live-example/live-example.component.ts index b484665697..fe1bfea479 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/live-example/live-example.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/live-example/live-example.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* tslint:disable component-selector */ import { Component, ElementRef, HostListener, Input, OnInit, AfterViewInit, ViewChild } from '@angular/core'; import { Location } from '@angular/common'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource-list.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource-list.component.ts index 2b424db538..ad8e5f35e3 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource-list.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource-list.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, HostListener, OnInit } from '@angular/core'; import { PlatformLocation } from '@angular/common'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.model.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.model.ts index 87c299a01e..236dad9f46 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.model.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.model.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ export class Category { id: string; // "education" title: string; // "Education" diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.service.ts index 3ce85a1b55..2f75584b31 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/resource/resource.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/toc/toc.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/toc/toc.component.ts index 95f4edd14d..e37df62b7a 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/toc/toc.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/embedded/toc/toc.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/doc-viewer.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/doc-viewer.component.ts index 39678cbd0f..52162392bd 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/doc-viewer.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/doc-viewer.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, DoCheck, ElementRef, EventEmitter, Injector, Input, OnDestroy, diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/dt.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/dt.component.ts index 41dc9397f5..4330da3d2a 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/dt.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/doc-viewer/dt.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { DocumentContents } from 'app/documents/document.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/footer/footer.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/footer/footer.component.ts index ad89c7480f..c1e3f2c979 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/footer/footer.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/footer/footer.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, Input } from '@angular/core'; import { NavigationNode, VersionInfo } from 'app/navigation/navigation.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-item/nav-item.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-item/nav-item.component.ts index fdd5501e58..7aa3048292 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-item/nav-item.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-item/nav-item.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; import { NavigationNode } from 'app/navigation/navigation.model'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-menu/nav-menu.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-menu/nav-menu.component.ts index 53194f6c96..01f1249fb8 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-menu/nav-menu.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/nav-menu/nav-menu.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, Input } from '@angular/core'; import { CurrentNode, NavigationNode } from 'app/navigation/navigation.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/top-menu/top-menu.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/top-menu/top-menu.component.ts index 7cf09713e2..0f7adba0d7 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/top-menu/top-menu.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/layout/top-menu/top-menu.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, Input } from '@angular/core'; import { NavigationNode } from 'app/navigation/navigation.service'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.model.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.model.ts index 15f1c879d7..82f32343cb 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.model.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.model.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Pulled all interfaces out of `navigation.service.ts` because of this: // https://github.com/angular/angular-cli/issues/2034 // Then re-export them from `navigation.service.ts` diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.service.ts index 048b6cc411..4b60d737d6 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/navigation/navigation.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-box/search-box.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-box/search-box.component.ts index 6c79f75002..0c4e23199c 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-box/search-box.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-box/search-box.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, OnInit, ViewChild, ElementRef, EventEmitter, Output } from '@angular/core'; import { LocationService } from 'app/shared/location.service'; import { Subject } from 'rxjs/Subject'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-results/search-results.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-results/search-results.component.ts index adf9291985..5a73e85202 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-results/search-results.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-results/search-results.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, EventEmitter, HostListener, OnDestroy, OnInit, Output } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Subscription } from 'rxjs/Subscription'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-worker.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-worker.js index 1fbaf438da..3481634ac9 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-worker.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search-worker.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ 'use strict'; /* eslint-env worker */ diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search.service.ts index 7e37b38521..dcb24de03a 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/search/search.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* Copyright 2016 Google Inc. All Rights Reserved. Use of this source code is governed by an MIT-style license that diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/attribute-utils.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/attribute-utils.ts index fa16c2547f..a2b0b7ef5f 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/attribute-utils.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/attribute-utils.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Utilities for processing HTML element attributes import { ElementRef } from '@angular/core'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/copier.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/copier.service.ts index 301cffe465..0f2cfd39a5 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/copier.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/copier.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /** * This class is based on the code in the following projects: * diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/custom-md-icon-registry.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/custom-md-icon-registry.ts index 77b05d9169..f150261c3f 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/custom-md-icon-registry.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/custom-md-icon-registry.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { InjectionToken, Inject, Injectable } from '@angular/core'; import { of } from 'rxjs/observable/of'; import { MdIconRegistry } from '@angular/material'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/ga.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/ga.service.ts index 07040a06e4..a97c13338e 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/ga.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/ga.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { environment } from '../../environments/environment'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/location.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/location.service.ts index 2d41a03684..dfee01bdfa 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/location.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/location.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { Location, PlatformLocation } from '@angular/common'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/logger.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/logger.service.ts index 99f1a55812..b23c757831 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/logger.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/logger.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; import { environment } from '../../environments/environment'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll-spy.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll-spy.service.ts index 4ef2c6d534..42cce0388a 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll-spy.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll-spy.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Inject, Injectable } from '@angular/core'; import { DOCUMENT } from '@angular/platform-browser'; import { Observable } from 'rxjs/Observable'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll.service.ts index b6dba4dbed..b965b11c50 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/scroll.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable, Inject } from '@angular/core'; import { PlatformLocation } from '@angular/common'; import { DOCUMENT } from '@angular/platform-browser'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/select/select.component.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/select/select.component.ts index 11bc9913df..599db5206d 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/select/select.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/select/select.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component, ElementRef, EventEmitter, HostListener, Input, Output, OnInit } from '@angular/core'; export interface Option { diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/shared.module.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/shared.module.ts index 2f7eafc0d3..2a9940419d 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/shared.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/shared.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SelectComponent } from './select/select.component'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/toc.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/toc.service.ts index 45dd96c2c3..56b92abadf 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/toc.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/toc.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Inject, Injectable } from '@angular/core'; import { DOCUMENT, DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { ReplaySubject } from 'rxjs/ReplaySubject'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/web-worker.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/web-worker.ts index 95bf6e05ab..6e2c5df5a5 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/web-worker.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/shared/web-worker.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /* Copyright 2016 Google Inc. All Rights Reserved. Use of this source code is governed by an MIT-style license that diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/global.value.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/global.value.ts index 91d1fe04a1..23618880c2 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/global.value.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/global.value.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { InjectionToken } from '@angular/core'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-update-notifications.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-update-notifications.service.ts index eb9ceaac8f..6721de4f56 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-update-notifications.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-update-notifications.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Inject, Injectable } from '@angular/core'; import { MdSnackBar, MdSnackBarConfig, MdSnackBarRef } from '@angular/material'; import { Subject } from 'rxjs/Subject'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.module.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.module.ts index e0aa61d9f2..35ca699a83 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule } from '@angular/core'; import { MdSnackBarModule } from '@angular/material'; import { ServiceWorkerModule } from '@angular/service-worker'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.service.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.service.ts index 60a9ef1fcb..4fb189962c 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.service.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/app/sw-updates/sw-updates.service.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable, OnDestroy } from '@angular/core'; import { NgServiceWorker } from '@angular/service-worker'; import { Observable } from 'rxjs/Observable'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/assets/js/prettify.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/assets/js/prettify.js index 3b74b5bdaa..683b717a07 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/assets/js/prettify.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/assets/js/prettify.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ !function(){/* Copyright (C) 2006 Google Inc. diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/environments/environment.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/environments/environment.ts index 0f5ad5b335..f284ed0c8f 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/environments/environment.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/environments/environment.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // This is for the production site, which is hosted at https://angular.io export const environment = { gaId: 'UA-8594346-15', diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/main.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/main.ts index 53b4371a0d..a287202a7d 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/main.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/main.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { ApplicationRef, enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/polyfills.ts b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/polyfills.ts index 741c886751..d7f22960f8 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/polyfills.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/src/polyfills.ts @@ -1 +1,8 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import 'zone.js/dist/zone'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.common.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.common.js index 70382a2ed2..62a82f0d90 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.common.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.common.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const path = require('path'); const webpack = require('webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.js index 58cb9a4803..f3d5f0e4f6 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const PurifyPlugin = require('@angular-devkit/build-optimizer').PurifyPlugin; const config = require('./webpack.config.common.js'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.no-ngo.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.no-ngo.js index 4ea671375c..f60f0d2ece 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.no-ngo.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.no-ngo.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const path = require('path'); const config = require('./webpack.config.common.js'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.old-ngo.js b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.old-ngo.js index 86bb5b6bda..3de73d0eea 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.old-ngo.js +++ b/tests/@angular_devkit/build_optimizer/webpack/aio-app/webpack.config.old-ngo.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const path = require('path'); const config = require('./webpack.config.common.js'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/benchmark.js b/tests/@angular_devkit/build_optimizer/webpack/simple-app/benchmark.js index 78cdfe1a74..1615c60434 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/benchmark.js +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/benchmark.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const fs = require('fs'); const path = require('path'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/e2e/app.e2e-spec.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/e2e/app.e2e-spec.ts index 3047a24e29..7cda83f4c8 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/e2e/app.e2e-spec.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/e2e/app.e2e-spec.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { browser, element, by } from 'protractor'; describe('Webpack simple app', function () { diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/protractor.config.js b/tests/@angular_devkit/build_optimizer/webpack/simple-app/protractor.config.js index 8153f7ba1a..0b037e92d3 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/protractor.config.js +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/protractor.config.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ exports.config = { allScriptsTimeout: 11000, specs: [ diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.component.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.component.ts index 9d5784f1a6..960ce083ca 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.component.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.component.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Component } from '@angular/core'; import { MyInjectable } from './injectable'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.module.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.module.ts index ef3f2e49c8..752c08db08 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/app.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule, Component } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/feature.module.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/feature.module.ts index d031c9062d..181bb5939f 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/feature.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/feature.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule, Component } from '@angular/core'; import { RouterModule } from '@angular/router'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/injectable.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/injectable.ts index c193c78775..89bea854f8 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/injectable.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/injectable.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { Injectable } from '@angular/core'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/lazy.module.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/lazy.module.ts index d8c473e4c1..1f143168f6 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/lazy.module.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/app/lazy.module.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { NgModule, Component } from '@angular/core'; import { RouterModule } from '@angular/router'; import { HttpModule, Http } from '@angular/http'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/main.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/main.ts index 63faf84658..61ca72fd7d 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/main.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/main.ts @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/polyfills.ts b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/polyfills.ts index 741c886751..d7f22960f8 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/polyfills.ts +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/src/polyfills.ts @@ -1 +1,8 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ import 'zone.js/dist/zone'; diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.common.js b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.common.js index 70382a2ed2..62a82f0d90 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.common.js +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.common.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const path = require('path'); const webpack = require('webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.js b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.js index 58cb9a4803..f3d5f0e4f6 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.js +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const PurifyPlugin = require('@angular-devkit/build-optimizer').PurifyPlugin; const config = require('./webpack.config.common.js'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.no-ngo.js b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.no-ngo.js index 4ea671375c..f60f0d2ece 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.no-ngo.js +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.no-ngo.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const path = require('path'); const config = require('./webpack.config.common.js'); diff --git a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.old-ngo.js b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.old-ngo.js index 86bb5b6bda..3de73d0eea 100644 --- a/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.old-ngo.js +++ b/tests/@angular_devkit/build_optimizer/webpack/simple-app/webpack.config.old-ngo.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ const path = require('path'); const config = require('./webpack.config.common.js'); diff --git a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js index 5a6979e5f6..deec58129c 100644 --- a/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js +++ b/tests/@angular_devkit/build_webpack/hello-world-app/karma.conf.js @@ -1,3 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html From 6bb0c7823e9183a2c589f50869a5739e69293752 Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Fri, 4 May 2018 23:13:02 -0400 Subject: [PATCH 562/724] fix(@schematics/angular): fix styles field of angular.json in application schematic --- packages/schematics/angular/application/index.ts | 2 +- packages/schematics/angular/application/index_spec.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 4b33c12068..80a71d0153 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -202,7 +202,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace tsConfig: `${rootFilesRoot}tsconfig.spec.json`, karmaConfig: `${rootFilesRoot}karma.conf.js`, styles: [ - `${projectRoot}styles.${options.style}`, + `${projectRoot}src/styles.${options.style}`, ], scripts: [], assets: [ diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 85d2b5fe62..fd988ace57 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -212,6 +212,14 @@ describe('Application Schematic', () => { expect(buildOpt.main).toEqual('src/main.ts'); expect(buildOpt.polyfills).toEqual('src/polyfills.ts'); expect(buildOpt.tsConfig).toEqual('src/tsconfig.app.json'); + + const testOpt = prj.architect.test.options; + expect(testOpt.main).toEqual('src/test.ts'); + expect(testOpt.tsConfig).toEqual('src/tsconfig.spec.json'); + expect(testOpt.karmaConfig).toEqual('src/karma.conf.js'); + expect(testOpt.styles).toEqual([ + 'src/styles.css', + ]); }); it('should set the relative tsconfig paths', () => { From 598c5389081932babc23a2ae9e568e60caa7fffc Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 4 May 2018 14:52:21 -0700 Subject: [PATCH 563/724] feat(@schematics/update): support scoped package registries --- packages/schematics/update/update/npm.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index b57375db60..5656b5ef54 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -8,7 +8,7 @@ import { logging } from '@angular-devkit/core'; import { exec } from 'child_process'; import { Observable, ReplaySubject, concat, of } from 'rxjs'; -import { concatMap, first, map, toArray } from 'rxjs/operators'; +import { concatMap, filter, first, map, toArray } from 'rxjs/operators'; import * as url from 'url'; import { NpmRepositoryPackageJson } from './npm-package-json'; @@ -54,8 +54,14 @@ export function getNpmPackageJson( registryUrl: string | undefined, logger: logging.LoggerApi, ): Observable> { - - return (registryUrl ? of(registryUrl) : getNpmConfigOption('registry')).pipe( + const scope = packageName.startsWith('@') ? packageName.split('/')[0] : null; + + return concat( + of(registryUrl), + scope ? getNpmConfigOption(scope + ':registry') : of(undefined), + getNpmConfigOption('registry'), + ).pipe( + filter(partialUrl => !!partialUrl), first(), map(partialUrl => { if (!partialUrl) { From 231f178e006dd77f7eb1fc0ccd3ce161cd965775 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 4 May 2018 11:14:55 -0700 Subject: [PATCH 564/724] ci: fix bazel build and re-add it to CI --- .circleci/config.yml | 23 ++++++++++---------- WORKSPACE | 5 +++++ packages/angular_devkit/core/BUILD | 9 +++++--- packages/angular_devkit/schematics/BUILD | 19 +++++++++++----- packages/angular_devkit/schematics_cli/BUILD | 3 ++- 5 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 235770cd46..07e41af77a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -82,13 +82,14 @@ jobs: - restore_cache: *_root_package_lock_key - run: npm run admin -- build - # build-bazel: - # <<: *defaults - # steps: - # - checkout: *post_checkout - # - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc - # - run: bazel run @nodejs//:npm install - # - run: bazel build //packages/... + build-bazel: + <<: *defaults + resource_class: large + steps: + - checkout: *post_checkout + - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc + - run: bazel run @nodejs//:npm install + - run: bazel build //packages/... snapshot_publish: <<: *defaults @@ -133,10 +134,10 @@ workflows: requires: - lint - validate - # - build-bazel: - # requires: - # - lint - # - validate + - build-bazel: + requires: + - lint + - validate - test: requires: - build diff --git a/WORKSPACE b/WORKSPACE index e39639b51a..794f4f95a0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -12,6 +12,11 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi check_bazel_version("0.9.0") node_repositories(package_json = ["//:package.json"]) +local_repository( + name = "rxjs", + path = "node_modules/rxjs/src", +) + # Pick up the fix for source-map typings RULES_TYPESCRIPT_VERSION = "00f8fd5467f2b12ac2fbb8d74ea81d2dd5636d31" http_archive( diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 4772e03b94..c3776d6a30 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -21,7 +21,8 @@ ts_library( module_name = "@angular-devkit/core", module_root = "src", deps = [ - # @deps: rxjs + "@rxjs", + "@rxjs//operators", # @typings: es2015.core # @typings: es2015.symbol.wellknown # @typings: ajv @@ -44,7 +45,8 @@ ts_library( module_root = "node", deps = [ "//packages/angular_devkit/core", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", ], ) @@ -59,7 +61,8 @@ ts_library( deps = [ ":core", ":node", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", # @typings: jasmine ], ) diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index ca9130b579..1e0712d9ab 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -22,7 +22,8 @@ ts_library( deps = [ "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", # TODO: get rid of this for 6.0 - # @deps: rxjs + "@rxjs", + "@rxjs//operators", ], ) @@ -42,7 +43,8 @@ ts_library( ":schematics", "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", ], ) @@ -62,7 +64,8 @@ ts_library( ":tasks", "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", ], ) @@ -79,7 +82,8 @@ ts_library( ":tasks", ":tools", "//packages/angular_devkit/core", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", ], ) @@ -91,7 +95,8 @@ ts_library( deps = [ ":schematics", "//packages/angular_devkit/core", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", # @typings: jasmine ], ) @@ -105,7 +110,9 @@ ts_library( ":schematics", ":tools", "//packages/angular_devkit/core", - # @deps: rxjs + "//packages/angular_devkit/core:node", + "@rxjs", + "@rxjs//operators", # @typings: jasmine ], ) diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index 31d6b8049b..d5aaafe3b8 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -27,6 +27,7 @@ ts_library( "//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics:tasks", "//packages/angular_devkit/schematics:tools", - # @deps: rxjs + "@rxjs", + "@rxjs//operators", ], ) From 9faa61d28ee6bd4e53f5017a64babebd96540066 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 4 May 2018 13:54:52 -0700 Subject: [PATCH 565/724] ci: validate that every package have a BUILD file --- packages/angular/pwa/BUILD | 0 scripts/validate-build-files.ts | 40 +++++++++++++++++++++++++++++++++ scripts/validate.ts | 5 +++++ 3 files changed, 45 insertions(+) create mode 100644 packages/angular/pwa/BUILD create mode 100644 scripts/validate-build-files.ts diff --git a/packages/angular/pwa/BUILD b/packages/angular/pwa/BUILD new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/validate-build-files.ts b/scripts/validate-build-files.ts new file mode 100644 index 0000000000..635869f99b --- /dev/null +++ b/scripts/validate-build-files.ts @@ -0,0 +1,40 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +import { logging, tags } from '@angular-devkit/core'; +import { existsSync } from 'fs'; +import { join } from 'path'; +import { packages } from '../lib/packages'; + +export default function (_options: {}, logger: logging.Logger) { + let error = false; + + for (const pkgName of Object.keys(packages)) { + const pkg = packages[pkgName]; + + if (pkg.packageJson.private) { + // Ignore private packages. + continue; + } + + // There should be at least one BUILD file next to each package.json. + if (!existsSync(join(pkg.root, 'BUILD'))) { + logger.error(tags.oneLine` + The package ${JSON.stringify(pkgName)} does not have a BUILD file associated to it. You + must either set an exception or make sure it can be built using Bazel. + `); + error = true; + } + } + + // TODO: enable this to break + if (error) { + // process.exit(1); + logger.warn('Found some BUILD files missing, which will be breaking your PR soon.'); + } +} diff --git a/scripts/validate.ts b/scripts/validate.ts index 879045f1e2..6d683874a8 100644 --- a/scripts/validate.ts +++ b/scripts/validate.ts @@ -9,6 +9,7 @@ import { logging, tags } from '@angular-devkit/core'; import { execSync } from 'child_process'; import templates from './templates'; +import validateBuildFiles from './validate-build-files'; import validateCommits from './validate-commits'; import validateLicenses from './validate-licenses'; @@ -45,6 +46,10 @@ export default function (options: { verbose: boolean }, logger: logging.Logger) logger.info('Running license validation...'); validateLicenses({}, logger.createChild('validate-commits')); + logger.info(''); + logger.info('Running BUILD files validation...'); + validateBuildFiles({}, logger.createChild('validate-build-files')); + if (error) { process.exit(101); } From 331e44dade7adcd1f81d2fa79d8021ab2a1a25ca Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 7 May 2018 10:33:10 -0700 Subject: [PATCH 566/724] ci: add BUILD files to all packages --- packages/angular/pwa/BUILD | 35 +++++++++++++++++++ packages/angular_devkit/architect/BUILD | 38 +++++++++++++++++++++ packages/angular_devkit/architect_cli/BUILD | 26 ++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 packages/angular_devkit/architect/BUILD create mode 100644 packages/angular_devkit/architect_cli/BUILD diff --git a/packages/angular/pwa/BUILD b/packages/angular/pwa/BUILD index e69de29bb2..06a976adb0 100644 --- a/packages/angular/pwa/BUILD +++ b/packages/angular/pwa/BUILD @@ -0,0 +1,35 @@ +# Copyright Google Inc. All Rights Reserved. +# +# Use of this source code is governed by an MIT-style license that can be +# found in the LICENSE file at https://angular.io/license + +licenses(["notice"]) # MIT + +load("//tools:defaults.bzl", "ts_library") + +package(default_visibility = ["//visibility:public"]) + +ts_library( + name = "pwa", + srcs = glob( + ["**/*.ts"], + # Currently, this library is used only with the rollup plugin. + # To make it simpler for downstream repositories to compile this, we + # neither provide compile-time deps as an `npm_install` rule, nor do we + # expect the downstream repository to install @types/webpack[-*] + # So we exclude files that depend on webpack typings. + exclude = [ + "pwa/files/**/*", + "**/*_spec.ts", + "**/*_spec_large.ts", + ], + ), + deps = [ + "//packages/angular_devkit/core", + "//packages/angular_devkit/schematics", + ], + tsconfig = "//:tsconfig.json", + # Borrow the compile-time deps of the typescript compiler + # Just to avoid an extra npm install action. + node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules", +) diff --git a/packages/angular_devkit/architect/BUILD b/packages/angular_devkit/architect/BUILD new file mode 100644 index 0000000000..c6e8f83c16 --- /dev/null +++ b/packages/angular_devkit/architect/BUILD @@ -0,0 +1,38 @@ +# Copyright Google Inc. All Rights Reserved. +# +# Use of this source code is governed by an MIT-style license that can be +# found in the LICENSE file at https://angular.io/license + +licenses(["notice"]) # MIT + +load("//tools:defaults.bzl", "ts_library") + +package(default_visibility = ["//visibility:public"]) + +ts_library( + name = "architect", + srcs = glob( + ["src/**/*.ts"], + # Currently, this library is used only with the rollup plugin. + # To make it simpler for downstream repositories to compile this, we + # neither provide compile-time deps as an `npm_install` rule, nor do we + # expect the downstream repository to install @types/webpack[-*] + # So we exclude files that depend on webpack typings. + exclude = [ + "**/*_spec.ts", + "**/*_spec_large.ts", + ], + ), + deps = [ + "//packages/angular_devkit/core", + "//packages/angular_devkit/core:node", + "@rxjs", + "@rxjs//operators", + ], + tsconfig = "//:tsconfig.json", + module_name = "@angular-devkit/architect", + module_root = "src", + # Borrow the compile-time deps of the typescript compiler + # Just to avoid an extra npm install action. + node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules", +) diff --git a/packages/angular_devkit/architect_cli/BUILD b/packages/angular_devkit/architect_cli/BUILD new file mode 100644 index 0000000000..439d34191d --- /dev/null +++ b/packages/angular_devkit/architect_cli/BUILD @@ -0,0 +1,26 @@ +# Copyright Google Inc. All Rights Reserved. +# +# Use of this source code is governed by an MIT-style license that can be +# found in the LICENSE file at https://angular.io/license +package(default_visibility = ["//visibility:public"]) + +load("//tools:defaults.bzl", "ts_library") + +licenses(["notice"]) # MIT + +ts_library( + name = "architect-cli", + srcs = [ + "bin/architect.ts", + ], + deps = [ + "//packages/angular_devkit/architect", + "//packages/angular_devkit/core", + "//packages/angular_devkit/core:node", + "@rxjs", + "@rxjs//operators", + ], + tsconfig = "//:tsconfig.json", + module_name = "@angular-devkit/architect-cli", + module_root = "bin", +) From 9ba12109d94d4fea288b22ba3db3e7bdd5752631 Mon Sep 17 00:00:00 2001 From: Cyrille Tuzi Date: Fri, 27 Apr 2018 11:15:56 +0200 Subject: [PATCH 567/724] fix(@schematics/angular): providedIn in guard --- .../angular/guard/files/__name@dasherize__.guard.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts index 3d7117391d..f74fe9af05 100644 --- a/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts +++ b/packages/schematics/angular/guard/files/__name@dasherize__.guard.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Observable } from 'rxjs'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class <%= classify(name) %>Guard implements CanActivate { canActivate( next: ActivatedRouteSnapshot, From 4307ea09b0bd24ff1a3d8f11ae599df18a206286 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 3 May 2018 16:48:38 -0700 Subject: [PATCH 568/724] fix(@schematics/angular): Add budget configuration to update logic fixes #10616 --- .../angular/migrations/update-6/index.ts | 2 + .../angular/migrations/update-6/index_spec.ts | 17 +++++++++ packages/schematics/angular/utility/config.ts | 38 +++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 83a8235950..16f6e43320 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { + JsonArray, JsonObject, JsonParseMode, Path, @@ -327,6 +328,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { : {} ), ...(isProduction && swConfig ? swConfig : {}), + ...(isProduction && app.budgets ? { budgets: app.budgets as JsonArray } : {}), fileReplacements: [ { replace: `${app.root}/${source}`, diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index efa4eb2083..7d53cee269 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -602,6 +602,23 @@ describe('Migration to v6', () => { .toEqual(['src/tsconfig.app.json', 'src/tsconfig.spec.json']); expect(tslint.options.exclude).toEqual([ '**/node_modules/**' ]); }); + + it('should set the budgets configuration', () => { + baseConfig.apps[0].budgets = [{ + type: 'bundle', + name: 'main', + error: '123kb', + }]; + + tree.create(oldConfigPath, JSON.stringify(baseConfig, null, 2)); + tree = schematicRunner.runSchematic('migration-01', defaultOptions, tree); + const config = getConfig(tree); + const budgets = config.projects.foo.architect.build.configurations.production.budgets; + expect(budgets.length).toEqual(1); + expect(budgets[0].type).toEqual('bundle'); + expect(budgets[0].name).toEqual('main'); + expect(budgets[0].error).toEqual('123kb'); + }); }); describe('e2e projects', () => { diff --git a/packages/schematics/angular/utility/config.ts b/packages/schematics/angular/utility/config.ts index 90d2a2de3f..730427963c 100644 --- a/packages/schematics/angular/utility/config.ts +++ b/packages/schematics/angular/utility/config.ts @@ -126,6 +126,44 @@ export interface AppConfig { app: string; route: string; }; + budgets?: { + /** + * The type of budget + */ + type?: ('bundle' | 'initial' | 'allScript' | 'all' | 'anyScript' | 'any'); + /** + * The name of the bundle + */ + name?: string; + /** + * The baseline size for comparison. + */ + baseline?: string; + /** + * The maximum threshold for warning relative to the baseline. + */ + maximumWarning?: string; + /** + * The maximum threshold for error relative to the baseline. + */ + maximumError?: string; + /** + * The minimum threshold for warning relative to the baseline. + */ + minimumWarning?: string; + /** + * The minimum threshold for error relative to the baseline. + */ + minimumError?: string; + /** + * The threshold for warning relative to the baseline (min & max). + */ + warning?: string; + /** + * The threshold for error relative to the baseline (min & max). + */ + error?: string; + }[]; } export interface CliConfig { From c535c8eac3841e2254bb8046e0f0ff8c3cb81c33 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 9 May 2018 10:55:40 -0400 Subject: [PATCH 569/724] fix(@angular-devkit/schematics): ensure non-empty with last op --- .../angular_devkit/schematics/tools/workflow/node-workflow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 33ee58dfd5..840cfcda52 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -150,7 +150,7 @@ export class NodeWorkflow implements workflow.Workflow { return of(); } - return fsSink.commit(tree).pipe(last(), defaultIfEmpty()); + return fsSink.commit(tree).pipe(defaultIfEmpty(), last()); }), concatMap(() => { if (this._options.dryRun) { From 577fa91c4a11a67e54ff0c71815f834ec6da9caa Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 4 May 2018 12:42:24 -0700 Subject: [PATCH 570/724] fix(@angular-devkit/build-angular): remove mangle and compress from server build Using those for server might break the runtime, and since it all runs on the server we dont need to compress, local name mangling works fine. Also remove the build optimizer pass on server optimized builds. Partial fix for angular/angular-cli#8616 (need to have a fix for 1.7.x) --- .../models/webpack-configs/common.ts | 46 +++++++++++-------- .../build_angular/src/server/index.ts | 16 ++----- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index c7466b549d..d34b783cf9 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -207,6 +207,32 @@ export function getCommonConfig(wco: WebpackConfigOptions) { alias = rxPaths(nodeModules); } catch (e) { } + const uglifyOptions = { + ecma: wco.supportES2015 ? 6 : 5, + warnings: !!buildOptions.verbose, + safari10: true, + output: { + ascii_only: true, + comments: false, + webkit: true, + }, + + // On server, we don't want to compress anything. + ...(buildOptions.platform == 'server' ? {} : { + compress: { + pure_getters: buildOptions.buildOptimizer, + // PURE comments work best with 3 passes. + // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. + passes: buildOptions.buildOptimizer ? 3 : 1, + // Workaround known uglify-es issue + // See https://github.com/mishoo/UglifyJS2/issues/2949#issuecomment-368070307 + inline: wco.supportES2015 ? 1 : 3, + } + }), + // We also want to avoid mangling on server. + ...(buildOptions.platform == 'server' ? { mangle: false } : {}) + }; + return { mode: buildOptions.optimization ? 'production' : 'development', devtool: false, @@ -278,25 +304,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { sourceMap: buildOptions.sourceMap, parallel: true, cache: true, - uglifyOptions: { - ecma: wco.supportES2015 ? 6 : 5, - warnings: buildOptions.verbose, - safari10: true, - compress: { - pure_getters: buildOptions.buildOptimizer, - // PURE comments work best with 3 passes. - // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. - passes: buildOptions.buildOptimizer ? 3 : 1, - // Workaround known uglify-es issue - // See https://github.com/mishoo/UglifyJS2/issues/2949#issuecomment-368070307 - inline: wco.supportES2015 ? 1 : 3, - }, - output: { - ascii_only: true, - comments: false, - webkit: true, - }, - } + uglifyOptions, }), ], }, diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index fa369b1899..5c56717e91 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -54,19 +54,10 @@ export class ServerBuilder implements Builder { concatMap(() => options.deleteOutputPath ? this._deleteOutputDir(root, normalize(options.outputPath), this.context.host) : of(null)), - concatMap(() => addFileReplacements(root, host, options.fileReplacements)), - concatMap(() => new Observable(obs => { + concatMap(() => addFileReplacements(root, host, options.fileReplacements)), + concatMap(() => new Observable(obs => { // Ensure Build Optimizer is only used with AOT. - let webpackConfig; - try { - webpackConfig = this.buildWebpackConfig(root, projectRoot, host, options); - } catch (e) { - // TODO: why do I have to catch this error? I thought throwing inside an observable - // always got converted into an error. - obs.error(e); - - return; - } + const webpackConfig = this.buildWebpackConfig(root, projectRoot, host, options); const webpackCompiler = webpack(webpackConfig); const statsConfig = getWebpackStatsConfig(options.verbose); @@ -132,6 +123,7 @@ export class ServerBuilder implements Builder { // TODO: use only this.options, it contains all flags and configs items already. buildOptions: { ...buildOptions, + buildOptimizer: false, aot: true, platform: 'server', scripts: [], From c57a5940249fb1c330524ba4649e1070d2024ac8 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 9 May 2018 19:23:08 +0100 Subject: [PATCH 571/724] fix(@angular-devkit/build-angular): remove unused serve in protractor builder Partially address https://github.com/angular/angular-cli/issues/10699 --- .../angular_devkit/build_angular/src/protractor/schema.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/protractor/schema.json b/packages/angular_devkit/build_angular/src/protractor/schema.json index a7c0740cad..f01e86bc81 100644 --- a/packages/angular_devkit/build_angular/src/protractor/schema.json +++ b/packages/angular_devkit/build_angular/src/protractor/schema.json @@ -34,11 +34,6 @@ "description": "Try to update webdriver.", "default": true }, - "serve": { - "type": "boolean", - "description": "Compile and Serve the app.", - "default": true - }, "port": { "type": "number", "description": "The port to use to serve the application." From 8ba7db7b89a8f57c56222a7eea00ede7ed419717 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 7 May 2018 17:00:50 -0700 Subject: [PATCH 572/724] fix(@angular-devkit/schematics): add support for BOM to UpdateRecorder Fixes https://github.com/angular/angular-cli/issues/10644 --- .../schematics/src/tree/recorder.ts | 36 ++++++++++ .../schematics/src/tree/recorder_spec.ts | 66 +++++++++++++++++++ .../schematics/src/tree/virtual.ts | 2 +- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 packages/angular_devkit/schematics/src/tree/recorder_spec.ts diff --git a/packages/angular_devkit/schematics/src/tree/recorder.ts b/packages/angular_devkit/schematics/src/tree/recorder.ts index 40829dd46e..da59b6dbea 100644 --- a/packages/angular_devkit/schematics/src/tree/recorder.ts +++ b/packages/angular_devkit/schematics/src/tree/recorder.ts @@ -21,6 +21,23 @@ export class UpdateRecorderBase implements UpdateRecorder { this._path = entry.path; } + static createFromFileEntry(entry: FileEntry): UpdateRecorderBase { + const c0 = entry.content.readUInt8(0, true); + const c1 = entry.content.readUInt8(1, true); + const c2 = entry.content.readUInt8(2, true); + + // Check if we're BOM. + if (c0 == 0xEF && c1 == 0xBB && c2 == 0xBF) { + return new UpdateRecorderBom(entry); + } else if (c0 === 0xFF && c1 == 0xFE) { + return new UpdateRecorderBom(entry, 2); + } else if (c0 === 0xFE && c1 == 0xFF) { + return new UpdateRecorderBom(entry, 2); + } + + return new UpdateRecorderBase(entry); + } + get path() { return this._path; } // These just record changes. @@ -50,3 +67,22 @@ export class UpdateRecorderBase implements UpdateRecorder { return this._content.generate(); } } + + +export class UpdateRecorderBom extends UpdateRecorderBase { + constructor(entry: FileEntry, private _delta = 3) { + super(entry); + } + + insertLeft(index: number, content: Buffer | string) { + return super.insertLeft(index + this._delta, content); + } + + insertRight(index: number, content: Buffer | string) { + return super.insertRight(index + this._delta, content); + } + + remove(index: number, length: number) { + return super.remove(index + this._delta, length); + } +} diff --git a/packages/angular_devkit/schematics/src/tree/recorder_spec.ts b/packages/angular_devkit/schematics/src/tree/recorder_spec.ts new file mode 100644 index 0000000000..d35f561fa9 --- /dev/null +++ b/packages/angular_devkit/schematics/src/tree/recorder_spec.ts @@ -0,0 +1,66 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { normalize } from '@angular-devkit/core'; +import { SimpleFileEntry } from './entry'; +import { UpdateRecorderBase, UpdateRecorderBom } from './recorder'; + +describe('UpdateRecorderBase', () => { + it('works for simple files', () => { + const buffer = new Buffer('Hello World'); + const entry = new SimpleFileEntry(normalize('/some/path'), buffer); + + const recorder = new UpdateRecorderBase(entry); + recorder.insertLeft(5, ' beautiful'); + const result = recorder.apply(buffer); + expect(result.toString()).toBe('Hello beautiful World'); + }); + + it('works for simple files (2)', () => { + const buffer = new Buffer('Hello World'); + const entry = new SimpleFileEntry(normalize('/some/path'), buffer); + + const recorder = new UpdateRecorderBase(entry); + recorder.insertRight(5, ' beautiful'); + const result = recorder.apply(buffer); + expect(result.toString()).toBe('Hello beautiful World'); + }); + + it('can create the proper recorder', () => { + const e = new SimpleFileEntry(normalize('/some/path'), new Buffer('hello')); + expect(UpdateRecorderBase.createFromFileEntry(e) instanceof UpdateRecorderBase).toBe(true); + expect(UpdateRecorderBase.createFromFileEntry(e) instanceof UpdateRecorderBom).toBe(false); + }); + + it('can create the proper recorder (bom)', () => { + const eBom = new SimpleFileEntry(normalize('/some/path'), new Buffer('\uFEFFhello')); + expect(UpdateRecorderBase.createFromFileEntry(eBom) instanceof UpdateRecorderBase).toBe(true); + expect(UpdateRecorderBase.createFromFileEntry(eBom) instanceof UpdateRecorderBom).toBe(true); + }); + + it('supports empty files', () => { + const e = new SimpleFileEntry(normalize('/some/path'), new Buffer('')); + expect(UpdateRecorderBase.createFromFileEntry(e) instanceof UpdateRecorderBase).toBe(true); + }); + + it('supports empty files (bom)', () => { + const eBom = new SimpleFileEntry(normalize('/some/path'), new Buffer('\uFEFF')); + expect(UpdateRecorderBase.createFromFileEntry(eBom) instanceof UpdateRecorderBase).toBe(true); + }); +}); + +describe('UpdateRecorderBom', () => { + it('works for simple files', () => { + const buffer = new Buffer('\uFEFFHello World'); + const entry = new SimpleFileEntry(normalize('/some/path'), buffer); + + const recorder = new UpdateRecorderBom(entry); + recorder.insertLeft(5, ' beautiful'); + const result = recorder.apply(buffer); + expect(result.toString()).toBe('\uFEFFHello beautiful World'); + }); +}); diff --git a/packages/angular_devkit/schematics/src/tree/virtual.ts b/packages/angular_devkit/schematics/src/tree/virtual.ts index 24d58f7916..7928958fe5 100644 --- a/packages/angular_devkit/schematics/src/tree/virtual.ts +++ b/packages/angular_devkit/schematics/src/tree/virtual.ts @@ -186,7 +186,7 @@ export class VirtualTree implements Tree { throw new FileDoesNotExistException(path); } - return new UpdateRecorderBase(entry); + return UpdateRecorderBase.createFromFileEntry(entry); } commitUpdate(record: UpdateRecorder) { From 6f41723e7e5bc377f76d81c09522a09af9b22675 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 9 May 2018 20:29:21 -0400 Subject: [PATCH 573/724] fix(@angular-devkit/schematics): fully ensure non-empty with last op --- .../angular_devkit/schematics/tools/workflow/node-workflow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 840cfcda52..04855426bb 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -162,8 +162,8 @@ export class NodeWorkflow implements workflow.Workflow { return this._engine.executePostTasks() .pipe( tap({ complete: () => this._lifeCycle.next({ kind: 'post-tasks-end' }) }), - last(), defaultIfEmpty(), + last(), ); }), tap({ complete: () => { From 8b5b9a17325a8292f6d3e2e4197c94e9eb6d96b9 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 9 May 2018 19:59:31 -0400 Subject: [PATCH 574/724] fix(@angular-devkit/build-optimizer): support 2.7+ exported enums --- .../build-optimizer/build-optimizer_spec.ts | 2 +- .../src/transforms/wrap-enums.ts | 24 +++++++++++++--- .../src/transforms/wrap-enums_spec.ts | 28 +++++++++++++++++-- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts index 0b031cd041..79d5b38084 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts @@ -63,7 +63,7 @@ describe('build-optimizer', () => { ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; return ChangeDetectionStrategy; - })({}); + })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); var Clazz = /*@__PURE__*/ (function () { function Clazz() { } ${staticProperty} return Clazz; }()); var ComponentClazz = /*@__PURE__*/ (function () { function ComponentClazz() { } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index 2d815a6238..76231cd27e 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -174,9 +174,8 @@ function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpres const callExpression = expression; - const argument = expression.arguments[0]; - if (!ts.isBinaryExpression(argument) - || argument.operatorToken.kind !== ts.SyntaxKind.BarBarToken) { + let argument = expression.arguments[0]; + if (!ts.isBinaryExpression(argument)) { return null; } @@ -184,6 +183,23 @@ function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpres return null; } + if (argument.operatorToken.kind === ts.SyntaxKind.FirstAssignment) { + if (!ts.isBinaryExpression(argument.right) + || argument.right.operatorToken.kind !== ts.SyntaxKind.BarBarToken) { + return null; + } + + argument = argument.right; + } + + if (!ts.isBinaryExpression(argument)) { + return null; + } + + if (argument.operatorToken.kind !== ts.SyntaxKind.BarBarToken) { + return null; + } + expression = expression.expression; while (ts.isParenthesizedExpression(expression)) { expression = expression.expression; @@ -406,7 +422,7 @@ function updateEnumIife(hostNode: ts.VariableStatement, iife: ts.CallExpression) updatedFunction, ), iife.typeArguments, - [ts.createObjectLiteral()], + iife.arguments, ); return updateHostNode(hostNode, updatedIife); diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index 8f4ed377b0..14ce356949 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -50,7 +50,7 @@ describe('wrap-enums', () => { ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; return ChangeDetectionStrategy; - })({}); + })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); @@ -73,7 +73,7 @@ describe('wrap-enums', () => { AnimatorControlState[AnimatorControlState["FINISHED"] = 3] = "FINISHED"; AnimatorControlState[AnimatorControlState["DESTROYED"] = 4] = "DESTROYED"; return AnimatorControlState; - })({}); + })(AnimatorControlState || (AnimatorControlState = {})); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); @@ -155,9 +155,31 @@ describe('wrap-enums', () => { RequestMethod[RequestMethod["Head"] = 5] = "Head"; RequestMethod[RequestMethod["Patch"] = 6] = "Patch"; return RequestMethod; - })({}); + })(RequestMethod || (RequestMethod = {})); + `; + + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + + it('wraps exported enums in IIFE', () => { + const input = tags.stripIndent` + var ExportEnum; + (function (ExportEnum) { + ExportEnum[ExportEnum["A"] = 0] = "A"; + ExportEnum[ExportEnum["B"] = 1] = "B"; + ExportEnum[ExportEnum["C"] = 2] = "C"; + })(ExportEnum = exports.ExportEnum || (exports.ExportEnum = {})); + `; + const output = tags.stripIndent` + var ExportEnum = /*@__PURE__*/ (function (ExportEnum) { + ExportEnum[ExportEnum["A"] = 0] = "A"; + ExportEnum[ExportEnum["B"] = 1] = "B"; + ExportEnum[ExportEnum["C"] = 2] = "C"; + return ExportEnum; + })(ExportEnum = exports.ExportEnum || (exports.ExportEnum = {})); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); + }); From e335e5daadc66f2814f17f1f15efd9f7984d0e7d Mon Sep 17 00:00:00 2001 From: sumbad Date: Thu, 10 May 2018 11:58:07 +0800 Subject: [PATCH 575/724] fix(@ngtools/webpack): add check for request parameter --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index d39cfebd57..3b42bd1605 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -679,8 +679,9 @@ export class AngularCompilerPlugin { // Wait for the plugin to be done when requesting `.ts` files directly (entry points), or // when the issuer is a `.ts` or `.ngfactory.js` file. nmf.hooks.beforeResolve.tapAsync('angular-compiler', (request: any, callback: any) => { - if (this.done && (request.request.endsWith('.ts') - || (request.context.issuer && /\.ts|ngfactory\.js$/.test(request.context.issuer)))) { + if (this.done && (request && request.request.endsWith('.ts') + || (request && request.context.issuer + && /\.ts|ngfactory\.js$/.test(request.context.issuer)))) { this.done.then(() => callback(null, request), () => callback(null, request)); } else { callback(null, request); From f61b2be4e58b43d52741996adee5d5655ae38ea6 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 10 May 2018 11:23:25 +0100 Subject: [PATCH 576/724] fix(@schematics/update): respect caret and tilde ranges Fix https://github.com/angular/angular-cli/issues/10356 --- packages/schematics/update/update/index.ts | 15 +++++++++---- .../schematics/update/update/index_spec.ts | 22 +++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 4d5d46d4f3..b4ffdefdd3 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -19,7 +19,7 @@ import { map, mergeMap, reduce, switchMap } from 'rxjs/operators'; import * as semver from 'semver'; import { getNpmPackageJson } from './npm'; import { NpmRepositoryPackageJson } from './npm-package-json'; -import { JsonSchemaForNpmPackageJsonFiles } from './package-json'; +import { Dependency, JsonSchemaForNpmPackageJsonFiles } from './package-json'; import { UpdateSchema } from './schema'; type VersionRange = string & { __VERSION_RANGE: void; }; @@ -220,6 +220,13 @@ function _performUpdate( throw new SchematicsException('package.json could not be parsed: ' + e.message); } + const updateDependency = (deps: Dependency, name: string, newVersion: string) => { + const oldVersion = deps[name]; + // We only respect caret and tilde ranges on update. + const execResult = /^[\^~]/.exec(oldVersion); + deps[name] = `${execResult ? execResult[0] : ''}${newVersion}`; + }; + const toInstall = [...infoMap.values()] .map(x => [x.name, x.target, x.installed]) // tslint:disable-next-line:non-null-operator @@ -234,7 +241,7 @@ function _performUpdate( ); if (packageJson.dependencies && packageJson.dependencies[name]) { - packageJson.dependencies[name] = target.version; + updateDependency(packageJson.dependencies, name, target.version); if (packageJson.devDependencies && packageJson.devDependencies[name]) { delete packageJson.devDependencies[name]; @@ -243,13 +250,13 @@ function _performUpdate( delete packageJson.peerDependencies[name]; } } else if (packageJson.devDependencies && packageJson.devDependencies[name]) { - packageJson.devDependencies[name] = target.version; + updateDependency(packageJson.devDependencies, name, target.version); if (packageJson.peerDependencies && packageJson.peerDependencies[name]) { delete packageJson.peerDependencies[name]; } } else if (packageJson.peerDependencies && packageJson.peerDependencies[name]) { - packageJson.peerDependencies[name] = target.version; + updateDependency(packageJson.peerDependencies, name, target.version); } else { logger.warn(`Package ${name} was not found in dependencies.`); } diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index 475b2ff237..99a2c9964b 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -52,6 +52,28 @@ describe('@schematics/update', () => { ).subscribe(undefined, done.fail, done); }, 45000); + it('respects existing tilde and caret ranges', done => { + // Add ranges. + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + packageJson['dependencies']['@angular-devkit-tests/update-base'] = '^1.0.0'; + packageJson['dependencies']['@angular-devkit-tests/update-migrations'] = '~1.0.0'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + schematicRunner.runSchematicAsync('update', { all: true }, appTree).pipe( + map(tree => { + const packageJson = JSON.parse(tree.readContent('/package.json')); + // This one should not change because 1.1.0 was already satisfied by ^1.0.0. + expect(packageJson['dependencies']['@angular-devkit-tests/update-base']).toBe('^1.0.0'); + expect(packageJson['dependencies']['@angular-devkit-tests/update-migrations']) + .toBe('~1.6.0'); + }), + ).subscribe(undefined, done.fail, done); + }, 45000); + it('calls migration tasks', done => { // Add the basic migration package. const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); From b2cecd083afb4b8335dd8b8440ec3b0beccf8731 Mon Sep 17 00:00:00 2001 From: Noel Mace Date: Wed, 9 May 2018 12:41:45 +0200 Subject: [PATCH 577/724] test(@angular-devkit/core): add missing parameter in angular-workspace.json In a6767dcc, a defaultProject was added to workspaceJson in workspace_spec, which hasn't been synced with tests/@angular_devkit/workspace/angular-workspace.json as expected. This was breaking the related tests with more than one project, like in #739. --- tests/@angular_devkit/core/workspace/angular-workspace.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/@angular_devkit/core/workspace/angular-workspace.json b/tests/@angular_devkit/core/workspace/angular-workspace.json index 46c20948ac..bf01c8c02d 100644 --- a/tests/@angular_devkit/core/workspace/angular-workspace.json +++ b/tests/@angular_devkit/core/workspace/angular-workspace.json @@ -1,6 +1,7 @@ { "version": 1, "newProjectRoot": "./projects", + "defaultProject": "app", "cli": { "$globalOverride": "${HOME}/.angular-cli.json", "schematics": { From e6379b12802e7942c6528716ebc8d2a03c5c9d0a Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 10 May 2018 16:20:23 +0300 Subject: [PATCH 578/724] docs: use angular.json instead of old .angular-cli.json --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0cc4327a61..f135e87c70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,7 +55,7 @@ Before you submit an issue, please search the issue tracker, maybe an issue for We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. Having a reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like: - version of Angular DevKit used -- `.angular-cli.json` configuration +- `angular.json` configuration - 3rd-party libraries and their versions - and most importantly - a use-case that fails From 4a14174ff2d5a3b34a7d72fddeb07db947871248 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 10 May 2018 11:17:01 -0400 Subject: [PATCH 579/724] fix(@schematics/angular): Allow prefix to be an empty string fixes angular/angular-cli#10659 --- packages/schematics/angular/component/index.ts | 2 +- packages/schematics/angular/component/index_spec.ts | 8 ++++++++ packages/schematics/angular/component/schema.json | 12 ++++++++++-- packages/schematics/angular/directive/index.ts | 2 +- packages/schematics/angular/directive/index_spec.ts | 8 ++++++++ packages/schematics/angular/directive/schema.json | 13 ++++++++++--- 6 files changed, 38 insertions(+), 7 deletions(-) diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 925eb28e42..00b9e75cc6 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -96,7 +96,7 @@ function buildSelector(options: ComponentOptions, projectPrefix: string) { let selector = strings.dasherize(options.name); if (options.prefix) { selector = `${options.prefix}-${selector}`; - } else if (projectPrefix) { + } else if (options.prefix === undefined && projectPrefix) { selector = `${projectPrefix}-${selector}`; } diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 3f7bb78e99..eb7ce900a7 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -205,6 +205,14 @@ describe('Component Schematic', () => { expect(content).toMatch(/selector: 'app-foo'/); }); + it('should use the supplied prefix if it is ""', () => { + const options = { ...defaultOptions, prefix: '' }; + + const tree = schematicRunner.runSchematic('component', options, appTree); + const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts'); + expect(content).toMatch(/selector: 'foo'/); + }); + it('should respect the inlineTemplate option', () => { const options = { ...defaultOptions, inlineTemplate: true }; const tree = schematicRunner.runSchematic('component', options, appTree); diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 83fe73570a..72c180782f 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -52,9 +52,17 @@ }, "prefix": { "type": "string", - "format": "html-selector", "description": "The prefix to apply to generated selectors.", - "alias": "p" + "alias": "p", + "oneOf": [ + { + "maxLength": 0 + }, + { + "minLength": 1, + "format": "html-selector" + } + ] }, "styleext": { "description": "The file extension to be used for style files.", diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 81ac7ffdce..3591c1e4bf 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -94,7 +94,7 @@ function buildSelector(options: DirectiveOptions, projectPrefix: string) { let selector = options.name; if (options.prefix) { selector = `${options.prefix}-${selector}`; - } else if (projectPrefix) { + } else if (options.prefix === undefined && projectPrefix) { selector = `${projectPrefix}-${selector}`; } diff --git a/packages/schematics/angular/directive/index_spec.ts b/packages/schematics/angular/directive/index_spec.ts index 5684aa575a..e5f91c3e2b 100644 --- a/packages/schematics/angular/directive/index_spec.ts +++ b/packages/schematics/angular/directive/index_spec.ts @@ -146,4 +146,12 @@ describe('Directive Schematic', () => { const content = tree.readContent('/projects/bar/src/app/foo.directive.ts'); expect(content).toMatch(/selector: '\[appFoo\]'/); }); + + it('should use the supplied prefix if it is ""', () => { + const options = { ...defaultOptions, prefix: '' }; + const tree = schematicRunner.runSchematic('directive', options, appTree); + + const content = tree.readContent('/projects/bar/src/app/foo.directive.ts'); + expect(content).toMatch(/selector: '\[foo\]'/); + }); }); diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index ec4fcb3533..3019d77e83 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -27,10 +27,17 @@ }, "prefix": { "type": "string", - "format": "html-selector", "description": "The prefix to apply to generated selectors.", - "default": "app", - "alias": "p" + "alias": "p", + "oneOf": [ + { + "maxLength": 0 + }, + { + "minLength": 1, + "format": "html-selector" + } + ] }, "spec": { "type": "boolean", From 50cacd1b07d97a1c85258abe586063690357543f Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 9 May 2018 14:50:51 -0700 Subject: [PATCH 580/724] release: v6.0.1 --- .monorepo.json | 62 +++++++++---------- .../angular/utility/latest-versions.ts | 4 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 691e98ef70..f499fc401e 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.6.0", + "version": "0.6.1", "hash": "37ed7e417435c92dbf301e7b26ea37ca" }, "devkit": { - "version": "0.6.0", - "hash": "1d066d7c828bdd4072757c9ec255f0ad" + "version": "0.6.1", + "hash": "18d55af567c3461aee6c0b94ecf81878" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.6.0", - "hash": "dd3b51801d0b878437eebf8425bc1f30", + "version": "0.6.1", + "hash": "439e05ee179b0f0e63baefcba68dff55", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.6.0", - "hash": "40cbf0679984a11d6af42ad278da23ba", + "version": "0.6.1", + "hash": "a2fe73fb9e09cf60e998a7f8892fb465", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.6.0", - "hash": "ad865d8d5f8434501e3bd5c06519c53d", + "version": "0.6.1", + "hash": "29dff2bc7c6fa40d3b015577da4093c3", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,8 +82,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.6.0", - "hash": "8014e2e5414d6c241da04516ac4ed187", + "version": "0.6.1", + "hash": "fd4d836b3fb974620df922459b2328fa", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-ng-packagr": { @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.6.0", - "hash": "05d55c3e0e8736386405527b5680c09d", + "version": "0.6.1", + "hash": "b0768e12ade77f034265570808ef95e8", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.6.0", - "hash": "14d9d1c481e4c26dcd0f3e4b0a93f69a", + "version": "0.6.1", + "hash": "eb9424df0ac555c4a66061dda1f72a10", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.6.0", - "hash": "547fbef5a37b03dae8fc447d0d329aa8", + "version": "0.6.1", + "hash": "b78aa2710b2e9408e535490068ee9b7a", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.6.0", - "hash": "4065f6ce02d4da74507805436faaee22", + "version": "0.6.1", + "hash": "c7229eed530647c85df80c4c650f9f02", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.6.0", - "hash": "37f668cbbb9a19190c34e6707a804dc6", + "version": "0.6.1", + "hash": "fb9e6312c7f535096e6dbad3cb22d3f1", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.0", + "version": "6.0.1", "section": "Misc", - "hash": "34ce2a7d8e7b31856be497eb59ff7e3d", + "hash": "983166b58b674611530c804f01e42f69", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.6.0", - "hash": "f0607b30add34425044e448536ac6fb0", + "version": "0.6.1", + "hash": "29ffdd1cbdd7761b7566b6e829b3a6b2", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.6.0", + "version": "0.6.1", "section": "Schematics", - "hash": "bad76fc2322d429a7d7758c61b7c4281", + "hash": "cdbcf1590bc06fb0b7d2a78256553fc7", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.6.0", + "version": "0.6.1", "section": "Schematics", - "hash": "394b0cfe9820a4b859566b868af1af2f", + "hash": "6d733ede048305b97646deaeda3ffc28", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.6.0", + "version": "0.6.1", "section": "Schematics", - "hash": "86ec9793b43898bc06bda7c9a784e3d3", + "hash": "c8828f05bd165b63b9d074b45dcafc23", "snapshotRepo": "angular/schematics-update-builds" } } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 27bbc68879..bfaaeac6c4 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -13,6 +13,6 @@ export const latestVersions = { ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.6.0', - DevkitBuildNgPackagr: '~0.6.0', + DevkitBuildAngular: '~0.6.1', + DevkitBuildNgPackagr: '~0.6.1', }; From bec18a7f100bcf9dc20f86e94995c7b02f8a5872 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 10 May 2018 15:44:32 -0400 Subject: [PATCH 581/724] refactor(@angular-devkit/build-angular): update webpack related deps --- package-lock.json | 4701 +++++++++-------- package.json | 14 +- .../angular_devkit/build_angular/package.json | 14 +- 3 files changed, 2458 insertions(+), 2271 deletions(-) diff --git a/package-lock.json b/package-lock.json index bcb0139b1f..a5cb5de894 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.5.tgz", "integrity": "sha512-dJAqLU8kTkW6W84q0VH5oX06CwMX4VXKokn2sMqboOZ5iHkZWfA+lO6wTjS+1pQ2jJ4EOc2HSyBovdGo7jPbLQ==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/cdk": { @@ -17,7 +17,7 @@ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.0.0-rc.1.tgz", "integrity": "sha512-V4nJwF9uchgqi1noRSd/Jm0mZ9yzFFeYzZ5mHZ7scXo0c2sXpEclsEjsnzb6YQo4NENEig8qrjOdYI+M7bd5zQ==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.7.1" } }, "@angular/common": { @@ -25,7 +25,7 @@ "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.5.tgz", "integrity": "sha512-1NKIKHz7Zqt+OOOp6lF4w/O2/iKjhhYEYpjYG7MRzwQOJmSzxK2KEpw2m80I+rF/SqGakZ46MPthAwa9XC2IBw==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/compiler": { @@ -33,7 +33,7 @@ "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.5.tgz", "integrity": "sha512-Re2oVZd2HRwkbuu5OR1pkgf3vIUZwzezLuOv/NzRgEY/v67cCeYit16Eg/0iGnwLybD3ptqrBtMls1X/ydssZA==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/compiler-cli": { @@ -41,10 +41,10 @@ "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.5.tgz", "integrity": "sha512-5awnVkoNEqVfjGGzU/K1pTbFdZ2pmbrFqlgcN0lvLpuF7MmNTFDRs/Z/aSNe1BNDZqMbJvpzSH5+GcWuY0BrjA==", "requires": { - "chokidar": "1.7.0", - "minimist": "1.2.0", - "reflect-metadata": "0.1.12", - "tsickle": "0.27.5" + "chokidar": "^1.4.2", + "minimist": "^1.2.0", + "reflect-metadata": "^0.1.2", + "tsickle": "^0.27.2" }, "dependencies": { "chokidar": { @@ -52,15 +52,15 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.2.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" } } } @@ -70,7 +70,7 @@ "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.5.tgz", "integrity": "sha512-2pZ0HgLBU5BcR8+S1Ju0FLMG15W0TgVS1I7AWE+CO/4TYDsC8/WYfQFuPNZvqwEU6M9yedWKjaNQB/Xzb32Sqg==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/http": { @@ -78,7 +78,7 @@ "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.5.tgz", "integrity": "sha512-PNGL4MJ71KD3nWyRsr6SQTRhmAuuwpPFB9O29ibbwGcRvJ9d2RHlvL34GEeduNhD8RzuVV0R4DbpZv8D1F+IIA==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/material": { @@ -86,7 +86,7 @@ "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-rc.1.tgz", "integrity": "sha512-53ak9Oi3BJN0ZaYoqWHtgm0dXkmjkZrCWeOuJFy2nM0NtWObv2SUYMd7bss7bSX0GlU/gQD+aBrHF40RwfQjQw==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.7.1" } }, "@angular/platform-browser": { @@ -94,7 +94,7 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.5.tgz", "integrity": "sha512-65B6mC3qkMCl7iDI8q8t7N9yj6i4gTStupi5j4VeB0TRTnlAnXBFM3fiy43svVyuQE42qVO0MrJQ3wleJmUN5g==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/platform-browser-dynamic": { @@ -102,7 +102,7 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.5.tgz", "integrity": "sha512-FvOyyhSLbFPtR1YsWX3UI7QoHutUjHE68ilcm0DVL2IOKiop7ofGHyBlUcHuy4JEWzqzHQYtXVDDk2jfI+gTMA==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/platform-server": { @@ -110,9 +110,9 @@ "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.5.tgz", "integrity": "sha512-dDOP1xHs0brp5uxt6yy04Hf2oM0W3XJfvKRY44MejYlwpyCfotbUw2t2H+Mt8suhr0vt27K/+lceZ8HevlbM1Q==", "requires": { - "domino": "2.0.2", - "tslib": "1.9.0", - "xhr2": "0.1.4" + "domino": "^2.0.1", + "tslib": "^1.9.0", + "xhr2": "^0.1.4" } }, "@angular/router": { @@ -120,7 +120,7 @@ "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.5.tgz", "integrity": "sha512-8IREGDhMVMai8l8AxlIujR2dtkEW4QKQ6Ifv5zd2R2fLEIIsGBSe+jahPpZNKAOc3Nt74HJ1gA96exFPLp0DnQ==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@angular/service-worker": { @@ -128,7 +128,7 @@ "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.5.tgz", "integrity": "sha512-8d+mhADeUt/H0Um9AwqTmBfM3ZS1EA3Bk+qf1JfGAubPrREEWx97P2Lwa7OgY+w/D5JjWbWiNDWE1SsKcSPQiQ==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "@ngtools/json-schema": { @@ -141,7 +141,7 @@ "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.3.tgz", "integrity": "sha512-gou/kWQkGPMZjdCKNZGDpqxLm9+ErG/pFZKPX4tvCjr0Xf4FCYYX3nAsu7aDVKJV3KUe27+mvqqyWT/9VZoM/A==", "requires": { - "@types/estree": "0.0.39" + "@types/estree": "*" } }, "@types/body-parser": { @@ -149,8 +149,8 @@ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", "requires": { - "@types/connect": "3.4.32", - "@types/node": "8.10.10" + "@types/connect": "*", + "@types/node": "*" } }, "@types/caseless": { @@ -163,7 +163,7 @@ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", "requires": { - "@types/node": "8.10.10" + "@types/node": "*" } }, "@types/copy-webpack-plugin": { @@ -171,8 +171,8 @@ "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", "integrity": "sha512-fX0dYslF2/WowV3vbsOYdn7GGYKLnX3bq7exG7qWVSmA/EsDYcMAvktTJY+xLbGfE/CouwWPns+ljMGCe4FCRA==", "requires": { - "@types/minimatch": "3.0.3", - "@types/webpack": "4.1.4" + "@types/minimatch": "*", + "@types/webpack": "*" } }, "@types/estree": { @@ -190,9 +190,9 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz", "integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==", "requires": { - "@types/body-parser": "1.17.0", - "@types/express-serve-static-core": "4.11.1", - "@types/serve-static": "1.13.1" + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" } }, "@types/express-serve-static-core": { @@ -200,8 +200,8 @@ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz", "integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==", "requires": { - "@types/events": "1.2.0", - "@types/node": "8.10.10" + "@types/events": "*", + "@types/node": "*" } }, "@types/form-data": { @@ -209,7 +209,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "8.10.10" + "@types/node": "*" } }, "@types/glob": { @@ -217,9 +217,9 @@ "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", "requires": { - "@types/events": "1.2.0", - "@types/minimatch": "3.0.3", - "@types/node": "8.10.10" + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" } }, "@types/istanbul": { @@ -237,8 +237,8 @@ "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.3.tgz", "integrity": "sha512-euKGFr2oCB3ASBwG39CYJMR3N9T0nanVqXdiH7Zu/Nqddt6SmFRxytq/i2w9LQYNQekEtGBz+pE3qG6fQTNvRg==", "requires": { - "@types/node": "8.10.10", - "@types/webpack": "4.1.4" + "@types/node": "*", + "@types/webpack": "*" } }, "@types/mime": { @@ -271,10 +271,10 @@ "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.0.tgz", "integrity": "sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q==", "requires": { - "@types/caseless": "0.12.1", - "@types/form-data": "2.2.1", - "@types/node": "8.10.10", - "@types/tough-cookie": "2.3.2" + "@types/caseless": "*", + "@types/form-data": "*", + "@types/node": "*", + "@types/tough-cookie": "*" } }, "@types/selenium-webdriver": { @@ -292,8 +292,8 @@ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.1.tgz", "integrity": "sha512-jDMH+3BQPtvqZVIcsH700Dfi8Q3MIcEx16g/VdxjoqiGR/NntekB10xdBpirMKnPe9z2C5cBmL0vte0YttOr3Q==", "requires": { - "@types/express-serve-static-core": "4.11.1", - "@types/mime": "2.0.0" + "@types/express-serve-static-core": "*", + "@types/mime": "*" } }, "@types/source-list-map": { @@ -321,7 +321,7 @@ "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.2.tgz", "integrity": "sha512-o8hU2+4xsyGC27Vujoklvxl88Ew5zmJuTBYMX1Uro2rYUt4HEFJKL6fuq8aGykvS+ssIsIzerWWP2DRxonownQ==", "requires": { - "source-map": "0.6.1" + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -336,10 +336,10 @@ "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.1.4.tgz", "integrity": "sha512-/4sQPb5QVB3kYWaNRoFmVrCkWI+PEuHPACXE79RUx/igiVd72x7hHlA7SCql9QbnjBEUEjYtpSjFDu65gybcWQ==", "requires": { - "@types/node": "8.10.10", - "@types/tapable": "1.0.2", - "@types/uglify-js": "3.0.2", - "source-map": "0.6.1" + "@types/node": "*", + "@types/tapable": "*", + "@types/uglify-js": "*", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -354,9 +354,9 @@ "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.4.tgz", "integrity": "sha512-IMdz6ipvym7Vag2a1pkfGqONZDE84+RRqeAZxGEFvBq2el82ymla4qvUVQt6+Kj+3OLRDeHnc2jCiSYAlPnHCw==", "requires": { - "@types/node": "8.10.10", - "@types/source-list-map": "0.1.2", - "source-map": "0.6.1" + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -366,13 +366,160 @@ } } }, + "@webassemblyjs/ast": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.3.1.tgz", + "integrity": "sha512-WJKy500MK6cM5LNcOjKlLHnYtTU5PcmL06iXErYriA90GLn7W/EzIyknZRx0Bj3W6FjYKTPkHADdE3GM0ZJk1Q==", + "requires": { + "@webassemblyjs/helper-wasm-bytecode": "1.3.1", + "@webassemblyjs/wast-parser": "1.3.1", + "webassemblyjs": "1.3.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.3.1.tgz", + "integrity": "sha512-8kCRyt0bQSnZD67UQfDTONO0jD7HCxmNUUJfT9OnVok0RWYs/AnpS83kfHtQjHucRMyx2d+YlsJWkdhXdLobqA==" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.3.1.tgz", + "integrity": "sha512-xIcxcfkBrrivLauyXJ57i/ArPy+kFgZjMDrxm4pSUBG2VtwwYKjOZAyjf4qsM4JbP5vRuRzMD2gp+a9WMyC3PA==" + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.3.1.tgz", + "integrity": "sha512-X305tLl7qeTixYz0/Y0Xu+bcNizJLfHUZ1iTiVtorDkh5mLrIZ8hLkkM2oYNSq/oaoW6gpHDrHRfYZItExTeeQ==", + "requires": { + "@webassemblyjs/wast-printer": "1.3.1" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.3.1.tgz", + "integrity": "sha512-Be1G8ZDTP1T+vXaVMraXY8+SoJnOVNarRkByrM83PHjW+vqUwubwYPpA4U2NBTz4WG19vYpfsUccCZwOPiyK+Q==" + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.3.1.tgz", + "integrity": "sha512-rOIjy/Cmd+hspim9B/c7dUqhW8AyKsRceVcQtWljIvFSitx9rsL5m73NGaGFUVAEaMDvvEzYczehjwbrHPz4KA==" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.3.1.tgz", + "integrity": "sha512-mDBlDsrsl1Y7LGEdmlTzdDwr/SCe2l9ZsQZ1GYXird71jlU/0djs5ZXfxyufd1G3wO+yuxW997m50Patk4s1fA==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/helper-buffer": "1.3.1", + "@webassemblyjs/helper-wasm-bytecode": "1.3.1", + "@webassemblyjs/wasm-gen": "1.3.1" + } + }, + "@webassemblyjs/leb128": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.3.1.tgz", + "integrity": "sha512-CgkWUXRINTGs/+Swp8COvwOk5Ci4spv1MKDdGfRecyFiLGs7wYm/p4fgRQWzBEFaotEP/ftPa9O6BFykrwghzw==", + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/validation": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/validation/-/validation-1.3.1.tgz", + "integrity": "sha512-afp32tgDVwW53lQc58PtIBifyZf3qGzRpl9r+8SNHzPOe6lBamjK1RWEA83YHwvu7qk6uBV7IAeUC7BgdxPtsA==", + "requires": { + "@webassemblyjs/ast": "1.3.1" + } + }, + "@webassemblyjs/wasm-edit": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.3.1.tgz", + "integrity": "sha512-0T75tHKR0dIDiO3oqBZmo+2McJy5FkgSL2AIP3rJvqrDFaJ19jCrC5KLqGbqo3ZicdY9x9Xdc9zaY2A1TCkAiw==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/helper-buffer": "1.3.1", + "@webassemblyjs/helper-wasm-bytecode": "1.3.1", + "@webassemblyjs/helper-wasm-section": "1.3.1", + "@webassemblyjs/wasm-gen": "1.3.1", + "@webassemblyjs/wasm-opt": "1.3.1", + "@webassemblyjs/wasm-parser": "1.3.1", + "@webassemblyjs/wast-printer": "1.3.1", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.3.1.tgz", + "integrity": "sha512-iYgQ3UJpsKiJnXerHulT//JpJAHuLavqMPEtUiRnSh0r/WvZh8pNtYBaN2v64+d9yTtu9aMlJmlKi6uz1j5FFg==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/helper-wasm-bytecode": "1.3.1", + "@webassemblyjs/leb128": "1.3.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.3.1.tgz", + "integrity": "sha512-Eqi1he5VuGxMYKGhrBU+UxUhIwTDlnuvJmwrad3k4dD2UQpqu3HedRndGdJTQ68xj2GqDCdE6QiLzjytSN4KVQ==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/helper-buffer": "1.3.1", + "@webassemblyjs/wasm-gen": "1.3.1", + "@webassemblyjs/wasm-parser": "1.3.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.3.1.tgz", + "integrity": "sha512-euRnqP/bky9DGbXf5Nqvtmc5soOM7xkvwI2H+LSP88NAFkcGMPEnrAP4UbsFAH+ESnS4kAW6wL5UyzjWBiiTbA==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/helper-wasm-bytecode": "1.3.1", + "@webassemblyjs/leb128": "1.3.1", + "@webassemblyjs/wasm-parser": "1.3.1", + "webassemblyjs": "1.3.1" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.3.1.tgz", + "integrity": "sha512-lM7Kwsp1mqqL3jq1kXKeoT8Z/cXvPQ2kWBNg19nZXbL1eLgr+4qRi83WvQU45+5+uIovigtBw/WU0nLLev7LGA==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/floating-point-hex-parser": "1.3.1", + "@webassemblyjs/helper-code-frame": "1.3.1", + "@webassemblyjs/helper-fsm": "1.3.1", + "long": "^3.2.0", + "webassemblyjs": "1.3.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.3.1.tgz", + "integrity": "sha512-V2SMByzsrTT2wGQOjm/3ctCiy8mdYOSLDk+EkOpNHVZWB9ISJc+gZWzniTgihih03UWqqNa1S/0XpyVz7ZEYSQ==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/wast-parser": "1.3.1", + "long": "^3.2.0" + } + }, "JSONStream": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" } }, "abbrev": { @@ -385,7 +532,7 @@ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { - "mime-types": "2.1.18", + "mime-types": "~2.1.18", "negotiator": "0.6.1" } }, @@ -399,7 +546,7 @@ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "requires": { - "acorn": "5.5.3" + "acorn": "^5.0.0" } }, "adm-zip": { @@ -417,8 +564,8 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "requires": { - "extend": "3.0.1", - "semver": "5.0.3" + "extend": "~3.0.0", + "semver": "~5.0.1" }, "dependencies": { "semver": { @@ -433,10 +580,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", "requires": { - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1", - "uri-js": "3.0.2" + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^3.0.2" } }, "ajv-keywords": { @@ -449,9 +596,9 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -464,7 +611,7 @@ "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -482,8 +629,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -491,7 +638,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -511,7 +658,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -519,8 +666,8 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" } }, "app-root-path": { @@ -533,7 +680,7 @@ "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "aproba": { @@ -546,8 +693,8 @@ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "argparse": { @@ -555,7 +702,7 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" }, "dependencies": { "sprintf-js": { @@ -570,7 +717,7 @@ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -608,8 +755,8 @@ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.11.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, "array-map": { @@ -632,7 +779,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -670,9 +817,9 @@ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -719,16 +866,23 @@ "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "autoprefixer": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.3.0.tgz", - "integrity": "sha512-HY2K4efAvC97v6j83pgV97Lieal51xhIV8EitvS4SrWcI+IGVZgjpihvXImsmIUzA6kb/tglPKzERG1oRFOvRA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.4.1.tgz", + "integrity": "sha512-YqUclCBDXUT9Y7aQ8Xv+ja8yhTZYJoMsOD7WS++gZIJLCpCu+gPcKGDlhk6S3WxhLkTcNVdaMZAWys2nzZCH7g==", "requires": { - "browserslist": "3.2.6", - "caniuse-lite": "1.0.30000830", - "normalize-range": "0.1.2", - "num2fraction": "1.2.2", - "postcss": "6.0.21", - "postcss-value-parser": "3.3.0" + "browserslist": "^3.2.6", + "caniuse-lite": "^1.0.30000832", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^6.0.22", + "postcss-value-parser": "^3.2.3" + }, + "dependencies": { + "caniuse-lite": { + "version": "1.0.30000839", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000839.tgz", + "integrity": "sha512-gJZIfmkuy84agOeAZc7WJOexZhisZaBSFk96gkGM6TkH7+1mBfr/MSPnXC8lO0g7guh/ucbswYjruvDbzc6i0g==" + } } }, "aws-sign2": { @@ -746,9 +900,9 @@ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -761,11 +915,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -780,14 +934,14 @@ "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.10", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -802,7 +956,7 @@ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -810,8 +964,8 @@ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { - "core-js": "2.5.5", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -819,11 +973,11 @@ "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.10" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -831,15 +985,15 @@ "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.4", - "lodash": "4.17.10" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -847,10 +1001,10 @@ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.10", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -873,13 +1027,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -887,7 +1041,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -895,7 +1049,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -903,7 +1057,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -911,9 +1065,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "isobject": { @@ -954,7 +1108,7 @@ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "better-assert": { @@ -985,7 +1139,7 @@ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "requires": { - "inherits": "2.0.3" + "inherits": "~2.0.0" } }, "blocking-proxy": { @@ -993,7 +1147,7 @@ "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", "requires": { - "minimist": "1.2.0" + "minimist": "^1.2.0" } }, "bluebird": { @@ -1012,15 +1166,15 @@ "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", "requires": { "bytes": "3.0.0", - "content-type": "1.0.4", + "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "1.1.2", - "http-errors": "1.6.3", + "depd": "~1.1.1", + "http-errors": "~1.6.2", "iconv-lite": "0.4.19", - "on-finished": "2.3.0", + "on-finished": "~2.3.0", "qs": "6.5.1", "raw-body": "2.3.2", - "type-is": "1.6.16" + "type-is": "~1.6.15" } }, "bonjour": { @@ -1028,12 +1182,12 @@ "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", "requires": { - "array-flatten": "2.1.1", - "deep-equal": "1.0.1", - "dns-equal": "1.0.0", - "dns-txt": "2.0.2", - "multicast-dns": "6.2.3", - "multicast-dns-service-types": "1.1.0" + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" }, "dependencies": { "array-flatten": { @@ -1053,7 +1207,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "hoek": "4.2.1" + "hoek": "4.x.x" } }, "bootstrap": { @@ -1066,13 +1220,13 @@ "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.2.2", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -1095,8 +1249,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -1104,7 +1258,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1114,7 +1268,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -1123,9 +1277,9 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "brorand": { @@ -1138,12 +1292,12 @@ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "browserify-cipher": { @@ -1151,9 +1305,9 @@ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "requires": { - "browserify-aes": "1.2.0", - "browserify-des": "1.0.1", - "evp_bytestokey": "1.0.3" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { @@ -1161,9 +1315,9 @@ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.3" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" } }, "browserify-rsa": { @@ -1171,8 +1325,8 @@ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sign": { @@ -1180,13 +1334,13 @@ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "elliptic": "6.4.0", - "inherits": "2.0.3", - "parse-asn1": "5.1.1" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, "browserify-zlib": { @@ -1194,7 +1348,7 @@ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "requires": { - "pako": "1.0.6" + "pako": "~1.0.5" } }, "browserslist": { @@ -1202,8 +1356,8 @@ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.6.tgz", "integrity": "sha512-XCsMSg9V4S1VRdcp265dJ+8kBRjfuFXcavbisY7G6T9QI0H1Z24PP53vvs0WDYWqm38Mco1ILDtafcS8ZR4xiw==", "requires": { - "caniuse-lite": "1.0.30000830", - "electron-to-chromium": "1.3.44" + "caniuse-lite": "^1.0.30000830", + "electron-to-chromium": "^1.3.42" } }, "buffer": { @@ -1211,9 +1365,9 @@ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "requires": { - "base64-js": "1.3.0", - "ieee754": "1.1.11", - "isarray": "1.0.0" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "buffer-crc32": { @@ -1261,19 +1415,19 @@ "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", "requires": { - "bluebird": "3.5.1", - "chownr": "1.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "lru-cache": "4.1.2", - "mississippi": "2.0.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "promise-inflight": "1.0.1", - "rimraf": "2.6.2", - "ssri": "5.3.0", - "unique-filename": "1.1.0", - "y18n": "4.0.0" + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" } }, "cache-base": { @@ -1281,15 +1435,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" }, "dependencies": { "isobject": { @@ -1304,10 +1458,10 @@ "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", "requires": { - "loader-utils": "1.1.0", - "mkdirp": "0.5.1", - "neo-async": "2.5.1", - "schema-utils": "0.4.5" + "loader-utils": "^1.1.0", + "mkdirp": "^0.5.1", + "neo-async": "^2.5.0", + "schema-utils": "^0.4.2" } }, "callsite": { @@ -1320,8 +1474,8 @@ "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", "requires": { - "no-case": "2.3.2", - "upper-case": "1.1.3" + "no-case": "^2.2.0", + "upper-case": "^1.1.1" } }, "camelcase": { @@ -1335,9 +1489,9 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "requires": { - "camelcase": "4.1.0", - "map-obj": "2.0.0", - "quick-lru": "1.1.0" + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" }, "dependencies": { "camelcase": { @@ -1368,8 +1522,8 @@ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -1377,9 +1531,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" }, "dependencies": { "has-flag": { @@ -1392,7 +1546,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } } } @@ -1402,18 +1556,18 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", "requires": { - "anymatch": "2.0.0", - "async-each": "1.0.1", - "braces": "2.3.2", - "fsevents": "1.2.3", - "glob-parent": "3.1.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "4.0.0", - "normalize-path": "2.1.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0", - "upath": "1.0.5" + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.1.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.0" }, "dependencies": { "anymatch": { @@ -1421,8 +1575,8 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "micromatch": "3.1.10", - "normalize-path": "2.1.1" + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" } }, "arr-diff": { @@ -1440,16 +1594,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -1457,7 +1611,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -1467,13 +1621,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -1481,7 +1635,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -1489,7 +1643,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -1497,7 +1651,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1505,7 +1659,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1515,7 +1669,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1523,7 +1677,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1533,9 +1687,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" } }, "kind-of": { @@ -1550,14 +1704,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -1565,7 +1719,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -1573,7 +1727,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -1583,10 +1737,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -1594,7 +1748,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -1604,8 +1758,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -1613,7 +1767,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } @@ -1623,7 +1777,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -1631,7 +1785,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -1639,9 +1793,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "is-extglob": { @@ -1654,7 +1808,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-number": { @@ -1662,7 +1816,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1670,7 +1824,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1690,19 +1844,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } } } @@ -1727,8 +1881,8 @@ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "circular-dependency-plugin": { @@ -1741,10 +1895,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -1752,7 +1906,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "isobject": { @@ -1767,7 +1921,7 @@ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "requires": { - "source-map": "0.5.7" + "source-map": "0.5.x" } }, "cli-boxes": { @@ -1781,8 +1935,8 @@ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -1804,10 +1958,10 @@ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "requires": { - "for-own": "1.0.0", - "is-plain-object": "2.0.4", - "kind-of": "6.0.2", - "shallow-clone": "1.0.0" + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" }, "dependencies": { "for-own": { @@ -1815,7 +1969,7 @@ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "kind-of": { @@ -1840,12 +1994,12 @@ "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.3.0.tgz", "integrity": "sha512-RLMrtLwrBS0dfo2/KTP+2NHofCpzcuh0bEp/A/naqvQonbUL4AW/qWQdbpn8dMNudtpmzEx9eS8KEpGdVPg1BA==", "requires": { - "app-root-path": "2.0.1", - "css-selector-tokenizer": "0.7.0", - "cssauron": "1.4.0", - "semver-dsl": "1.0.1", - "source-map": "0.5.7", - "sprintf-js": "1.1.1" + "app-root-path": "^2.0.1", + "css-selector-tokenizer": "^0.7.0", + "cssauron": "^1.4.0", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.7", + "sprintf-js": "^1.0.3" } }, "collection-visit": { @@ -1853,8 +2007,8 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { @@ -1862,7 +2016,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "requires": { - "color-name": "1.1.3" + "color-name": "^1.1.1" } }, "color-name": { @@ -1880,7 +2034,7 @@ "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", "requires": { - "lodash": "4.17.10" + "lodash": "^4.5.0" } }, "combined-stream": { @@ -1888,7 +2042,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -1906,8 +2060,8 @@ "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", "requires": { - "array-ify": "1.0.0", - "dot-prop": "3.0.0" + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" } }, "compare-versions": { @@ -1935,7 +2089,7 @@ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", "requires": { - "mime-db": "1.33.0" + "mime-db": ">= 1.33.0 < 2" } }, "compression": { @@ -1943,13 +2097,13 @@ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { - "accepts": "1.3.5", + "accepts": "~1.3.4", "bytes": "3.0.0", - "compressible": "2.0.13", + "compressible": "~2.0.13", "debug": "2.6.9", - "on-headers": "1.0.1", + "on-headers": "~1.0.1", "safe-buffer": "5.1.1", - "vary": "1.1.2" + "vary": "~1.1.2" }, "dependencies": { "safe-buffer": { @@ -1969,10 +2123,10 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "buffer-from": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "configstore": { @@ -1980,12 +2134,12 @@ "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.2.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" }, "dependencies": { "dot-prop": { @@ -1993,7 +2147,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } } } @@ -2005,7 +2159,7 @@ "requires": { "debug": "2.6.9", "finalhandler": "1.1.0", - "parseurl": "1.3.2", + "parseurl": "~1.3.2", "utils-merge": "1.0.1" }, "dependencies": { @@ -2015,12 +2169,12 @@ "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", "requires": { "debug": "2.6.9", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" } }, "statuses": { @@ -2040,7 +2194,7 @@ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "console-control-strings": { @@ -2068,17 +2222,17 @@ "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.24.tgz", "integrity": "sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q==", "requires": { - "conventional-changelog-angular": "1.6.6", - "conventional-changelog-atom": "0.2.8", - "conventional-changelog-codemirror": "0.3.8", - "conventional-changelog-core": "2.0.11", - "conventional-changelog-ember": "0.3.12", - "conventional-changelog-eslint": "1.0.9", - "conventional-changelog-express": "0.3.6", - "conventional-changelog-jquery": "0.1.0", - "conventional-changelog-jscs": "0.1.0", - "conventional-changelog-jshint": "0.3.8", - "conventional-changelog-preset-loader": "1.1.8" + "conventional-changelog-angular": "^1.6.6", + "conventional-changelog-atom": "^0.2.8", + "conventional-changelog-codemirror": "^0.3.8", + "conventional-changelog-core": "^2.0.11", + "conventional-changelog-ember": "^0.3.12", + "conventional-changelog-eslint": "^1.0.9", + "conventional-changelog-express": "^0.3.6", + "conventional-changelog-jquery": "^0.1.0", + "conventional-changelog-jscs": "^0.1.0", + "conventional-changelog-jshint": "^0.3.8", + "conventional-changelog-preset-loader": "^1.1.8" } }, "conventional-changelog-angular": { @@ -2086,8 +2240,8 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", "requires": { - "compare-func": "1.3.2", - "q": "1.5.1" + "compare-func": "^1.3.1", + "q": "^1.5.1" } }, "conventional-changelog-atom": { @@ -2095,7 +2249,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz", "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==", "requires": { - "q": "1.5.1" + "q": "^1.5.1" } }, "conventional-changelog-codemirror": { @@ -2103,7 +2257,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz", "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==", "requires": { - "q": "1.5.1" + "q": "^1.5.1" } }, "conventional-changelog-core": { @@ -2111,19 +2265,19 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz", "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==", "requires": { - "conventional-changelog-writer": "3.0.9", - "conventional-commits-parser": "2.1.7", - "dateformat": "3.0.3", - "get-pkg-repo": "1.4.0", - "git-raw-commits": "1.3.6", - "git-remote-origin-url": "2.0.0", - "git-semver-tags": "1.3.6", - "lodash": "4.17.10", - "normalize-package-data": "2.4.0", - "q": "1.5.1", - "read-pkg": "1.1.0", - "read-pkg-up": "1.0.1", - "through2": "2.0.3" + "conventional-changelog-writer": "^3.0.9", + "conventional-commits-parser": "^2.1.7", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "^1.3.6", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^1.3.6", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^1.1.0", + "read-pkg-up": "^1.0.1", + "through2": "^2.0.0" } }, "conventional-changelog-ember": { @@ -2131,7 +2285,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz", "integrity": "sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ==", "requires": { - "q": "1.5.1" + "q": "^1.5.1" } }, "conventional-changelog-eslint": { @@ -2139,7 +2293,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz", "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==", "requires": { - "q": "1.5.1" + "q": "^1.5.1" } }, "conventional-changelog-express": { @@ -2147,7 +2301,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz", "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==", "requires": { - "q": "1.5.1" + "q": "^1.5.1" } }, "conventional-changelog-jquery": { @@ -2155,7 +2309,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", "requires": { - "q": "1.5.1" + "q": "^1.4.1" } }, "conventional-changelog-jscs": { @@ -2163,7 +2317,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", "requires": { - "q": "1.5.1" + "q": "^1.4.1" } }, "conventional-changelog-jshint": { @@ -2171,8 +2325,8 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz", "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==", "requires": { - "compare-func": "1.3.2", - "q": "1.5.1" + "compare-func": "^1.3.1", + "q": "^1.5.1" } }, "conventional-changelog-preset-loader": { @@ -2185,16 +2339,16 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==", "requires": { - "compare-func": "1.3.2", - "conventional-commits-filter": "1.1.6", - "dateformat": "3.0.3", - "handlebars": "4.0.11", - "json-stringify-safe": "5.0.1", - "lodash": "4.17.10", - "meow": "4.0.1", - "semver": "5.5.0", - "split": "1.0.1", - "through2": "2.0.3" + "compare-func": "^1.3.1", + "conventional-commits-filter": "^1.1.6", + "dateformat": "^3.0.0", + "handlebars": "^4.0.2", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "semver": "^5.5.0", + "split": "^1.0.0", + "through2": "^2.0.0" } }, "conventional-commits-filter": { @@ -2202,8 +2356,8 @@ "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==", "requires": { - "is-subset": "0.1.1", - "modify-values": "1.0.1" + "is-subset": "^0.1.1", + "modify-values": "^1.0.0" } }, "conventional-commits-parser": { @@ -2211,13 +2365,13 @@ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", "requires": { - "JSONStream": "1.3.2", - "is-text-path": "1.0.1", - "lodash": "4.17.10", - "meow": "4.0.1", - "split2": "2.2.0", - "through2": "2.0.3", - "trim-off-newlines": "1.0.1" + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.0", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0", + "trim-off-newlines": "^1.0.0" } }, "convert-source-map": { @@ -2240,12 +2394,12 @@ "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "requires": { - "aproba": "1.2.0", - "fs-write-stream-atomic": "1.0.10", - "iferr": "0.1.5", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" } }, "copy-descriptor": { @@ -2258,14 +2412,14 @@ "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", "requires": { - "cacache": "10.0.4", - "find-cache-dir": "1.0.0", - "globby": "7.1.1", - "is-glob": "4.0.0", - "loader-utils": "1.1.0", - "minimatch": "3.0.4", - "p-limit": "1.2.0", - "serialize-javascript": "1.5.0" + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "globby": "^7.1.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "minimatch": "^3.0.4", + "p-limit": "^1.0.0", + "serialize-javascript": "^1.4.0" }, "dependencies": { "is-extglob": { @@ -2278,7 +2432,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } } } @@ -2298,13 +2452,13 @@ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", "requires": { - "is-directory": "0.3.1", - "js-yaml": "3.11.0", - "minimist": "1.2.0", - "object-assign": "4.1.1", - "os-homedir": "1.0.2", - "parse-json": "2.2.0", - "require-from-string": "1.2.1" + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" }, "dependencies": { "parse-json": { @@ -2312,7 +2466,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } } } @@ -2322,17 +2476,17 @@ "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", "requires": { - "babel-runtime": "6.26.0", - "chokidar": "1.7.0", - "duplexer": "0.1.1", - "glob": "7.1.2", - "glob2base": "0.0.12", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "resolve": "1.7.1", - "safe-buffer": "5.1.2", - "shell-quote": "1.6.1", - "subarg": "1.0.0" + "babel-runtime": "^6.9.2", + "chokidar": "^1.6.0", + "duplexer": "^0.1.1", + "glob": "^7.0.5", + "glob2base": "^0.0.12", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "resolve": "^1.1.7", + "safe-buffer": "^5.0.1", + "shell-quote": "^1.6.1", + "subarg": "^1.0.0" }, "dependencies": { "chokidar": { @@ -2340,26 +2494,26 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.2.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" } } } }, "create-ecdh": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.1.tgz", - "integrity": "sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-error-class": { @@ -2367,7 +2521,7 @@ "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "create-hash": { @@ -2375,11 +2529,11 @@ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "md5.js": "1.3.4", - "ripemd160": "2.0.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, "create-hmac": { @@ -2387,12 +2541,12 @@ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "inherits": "2.0.3", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "cross-spawn": { @@ -2400,8 +2554,8 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", "requires": { - "lru-cache": "4.1.2", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, "cryptiles": { @@ -2409,7 +2563,7 @@ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "requires": { - "boom": "5.2.0" + "boom": "5.x.x" }, "dependencies": { "boom": { @@ -2417,7 +2571,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "requires": { - "hoek": "4.2.1" + "hoek": "4.x.x" } } } @@ -2427,17 +2581,17 @@ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "requires": { - "browserify-cipher": "1.0.1", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.1", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "diffie-hellman": "5.0.3", - "inherits": "2.0.3", - "pbkdf2": "3.0.16", - "public-encrypt": "4.0.2", - "randombytes": "2.0.6", - "randomfill": "1.0.4" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" } }, "crypto-random-string": { @@ -2455,10 +2609,10 @@ "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", "requires": { - "boolbase": "1.0.0", - "css-what": "2.1.0", + "boolbase": "~1.0.0", + "css-what": "2.1", "domutils": "1.5.1", - "nth-check": "1.0.1" + "nth-check": "~1.0.1" } }, "css-selector-tokenizer": { @@ -2466,9 +2620,9 @@ "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", "requires": { - "cssesc": "0.1.0", - "fastparse": "1.1.1", - "regexpu-core": "1.0.0" + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" } }, "css-what": { @@ -2481,7 +2635,7 @@ "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", "requires": { - "through": "2.3.8" + "through": "X.X.X" } }, "cssesc": { @@ -2499,7 +2653,7 @@ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "custom-event": { @@ -2517,7 +2671,7 @@ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "requires": { - "es5-ext": "0.10.42" + "es5-ext": "^0.10.9" } }, "dargs": { @@ -2525,7 +2679,7 @@ "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "dashdash": { @@ -2533,7 +2687,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-now": { @@ -2546,7 +2700,7 @@ "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "requires": { - "time-zone": "1.0.0" + "time-zone": "^1.0.0" } }, "dateformat": { @@ -2578,8 +2732,8 @@ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", "requires": { - "decamelize": "1.2.0", - "map-obj": "1.0.1" + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" }, "dependencies": { "map-obj": { @@ -2614,7 +2768,7 @@ "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" }, "dependencies": { "strip-bom": { @@ -2622,7 +2776,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -2632,8 +2786,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "define-property": { @@ -2641,8 +2795,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -2650,7 +2804,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -2658,7 +2812,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -2666,9 +2820,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "isobject": { @@ -2688,13 +2842,13 @@ "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" }, "dependencies": { "globby": { @@ -2702,12 +2856,12 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -2737,8 +2891,8 @@ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "destroy": { @@ -2751,7 +2905,7 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "detect-node": { @@ -2765,8 +2919,8 @@ "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", "dev": true, "requires": { - "asap": "2.0.6", - "wrappy": "1.0.2" + "asap": "^2.0.0", + "wrappy": "1" } }, "di": { @@ -2784,9 +2938,9 @@ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, "dir-glob": { @@ -2794,8 +2948,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "1.0.1", - "path-type": "3.0.0" + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, "dns-equal": { @@ -2808,8 +2962,8 @@ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", "requires": { - "ip": "1.1.5", - "safe-buffer": "5.1.2" + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" } }, "dns-txt": { @@ -2817,7 +2971,7 @@ "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", "requires": { - "buffer-indexof": "1.1.1" + "buffer-indexof": "^1.0.0" } }, "dom-converter": { @@ -2825,7 +2979,7 @@ "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", "requires": { - "utila": "0.3.3" + "utila": "~0.3" }, "dependencies": { "utila": { @@ -2840,10 +2994,10 @@ "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", "requires": { - "custom-event": "1.0.1", - "ent": "2.2.0", - "extend": "3.0.1", - "void-elements": "2.0.1" + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" } }, "dom-serializer": { @@ -2851,8 +3005,8 @@ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -2877,7 +3031,7 @@ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domino": { @@ -2890,8 +3044,8 @@ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" } }, "dot-prop": { @@ -2899,7 +3053,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer": { @@ -2917,10 +3071,10 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "ecc-jsbn": { @@ -2929,7 +3083,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ee-first": { @@ -2952,13 +3106,13 @@ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } }, "emojis-list": { @@ -2976,7 +3130,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "engine.io": { @@ -2997,7 +3151,7 @@ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", "requires": { - "mime-types": "2.1.18", + "mime-types": "~2.1.11", "negotiator": "0.6.1" } }, @@ -3068,9 +3222,9 @@ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "tapable": "1.0.0" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" } }, "ent": { @@ -3088,7 +3242,7 @@ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "requires": { - "prr": "1.0.1" + "prr": "~1.0.1" } }, "error-ex": { @@ -3096,7 +3250,7 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -3104,11 +3258,11 @@ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -3116,9 +3270,9 @@ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es5-ext": { @@ -3126,9 +3280,9 @@ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "next-tick": "1.0.0" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-iterator": { @@ -3136,9 +3290,9 @@ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-promise": { @@ -3151,8 +3305,8 @@ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "requires": { - "d": "1.0.0", - "es5-ext": "0.10.42" + "d": "1", + "es5-ext": "~0.10.14" } }, "escape-html": { @@ -3170,11 +3324,11 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "requires": { - "esprima": "2.7.3", - "estraverse": "1.9.3", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.2.0" + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" }, "dependencies": { "source-map": { @@ -3183,7 +3337,7 @@ "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", "optional": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -3193,8 +3347,8 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" }, "dependencies": { "estraverse": { @@ -3214,7 +3368,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" }, "dependencies": { "estraverse": { @@ -3259,7 +3413,7 @@ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", "requires": { - "original": "1.0.0" + "original": ">=0.0.5" } }, "evp_bytestokey": { @@ -3267,8 +3421,8 @@ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.2" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, "execa": { @@ -3276,13 +3430,13 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { @@ -3290,9 +3444,9 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "requires": { - "lru-cache": "4.1.2", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -3307,9 +3461,9 @@ "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", "requires": { - "array-slice": "0.2.3", - "array-unique": "0.2.1", - "braces": "0.1.5" + "array-slice": "^0.2.3", + "array-unique": "^0.2.1", + "braces": "^0.1.2" }, "dependencies": { "braces": { @@ -3317,7 +3471,7 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", "requires": { - "expand-range": "0.1.1" + "expand-range": "^0.1.0" } }, "expand-range": { @@ -3325,8 +3479,8 @@ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", "requires": { - "is-number": "0.1.1", - "repeat-string": "0.2.2" + "is-number": "^0.1.1", + "repeat-string": "^0.2.2" } }, "is-number": { @@ -3346,7 +3500,7 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -3354,7 +3508,7 @@ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "express": { @@ -3362,36 +3516,36 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", "requires": { - "accepts": "1.3.5", + "accepts": "~1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.2", "content-disposition": "0.5.2", - "content-type": "1.0.4", + "content-type": "~1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "1.1.2", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "etag": "1.8.1", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", "finalhandler": "1.1.1", "fresh": "0.5.2", "merge-descriptors": "1.0.1", - "methods": "1.1.2", - "on-finished": "2.3.0", - "parseurl": "1.3.2", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.3", + "proxy-addr": "~2.0.3", "qs": "6.5.1", - "range-parser": "1.2.0", + "range-parser": "~1.2.0", "safe-buffer": "5.1.1", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", - "statuses": "1.4.0", - "type-is": "1.6.16", + "statuses": "~1.4.0", + "type-is": "~1.6.16", "utils-merge": "1.0.1", - "vary": "1.1.2" + "vary": "~1.1.2" }, "dependencies": { "safe-buffer": { @@ -3411,8 +3565,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -3420,7 +3574,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -3430,7 +3584,7 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "extsprintf": { @@ -3463,7 +3617,7 @@ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", "requires": { - "websocket-driver": "0.7.0" + "websocket-driver": ">=0.5.1" } }, "file-loader": { @@ -3471,8 +3625,8 @@ "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "requires": { - "loader-utils": "1.1.0", - "schema-utils": "0.4.5" + "loader-utils": "^1.0.2", + "schema-utils": "^0.4.5" } }, "filename-regex": { @@ -3485,8 +3639,8 @@ "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", "requires": { - "glob": "7.1.2", - "minimatch": "3.0.4" + "glob": "^7.0.3", + "minimatch": "^3.0.3" } }, "fill-range": { @@ -3494,11 +3648,11 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "finalhandler": { @@ -3507,12 +3661,12 @@ "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.4.0", - "unpipe": "1.0.0" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" } }, "find-cache-dir": { @@ -3520,9 +3674,9 @@ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "requires": { - "commondir": "1.0.1", - "make-dir": "1.2.0", - "pkg-dir": "2.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" } }, "find-index": { @@ -3540,7 +3694,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flush-write-stream": { @@ -3548,8 +3702,8 @@ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" } }, "follow-redirects": { @@ -3557,7 +3711,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", "requires": { - "debug": "3.1.0" + "debug": "^3.1.0" }, "dependencies": { "debug": { @@ -3585,7 +3739,7 @@ "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -3603,9 +3757,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "0.4.0", + "asynckit": "^0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "^2.1.12" } }, "forwarded": { @@ -3618,7 +3772,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "fresh": { @@ -3631,8 +3785,8 @@ "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-access": { @@ -3640,7 +3794,7 @@ "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "requires": { - "null-check": "1.0.0" + "null-check": "^1.0.0" } }, "fs-extra": { @@ -3648,9 +3802,9 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs-write-stream-atomic": { @@ -3658,10 +3812,10 @@ "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "requires": { - "graceful-fs": "4.1.11", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "readable-stream": "2.3.6" + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" } }, "fs.realpath": { @@ -3675,8 +3829,8 @@ "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", "optional": true, "requires": { - "nan": "2.10.0", - "node-pre-gyp": "0.9.1" + "nan": "^2.9.2", + "node-pre-gyp": "^0.9.0" }, "dependencies": { "abbrev": { @@ -3698,8 +3852,8 @@ "bundled": true, "optional": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -3710,7 +3864,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -3764,7 +3918,7 @@ "bundled": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -3777,14 +3931,14 @@ "bundled": true, "optional": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { @@ -3792,12 +3946,12 @@ "bundled": true, "optional": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -3810,7 +3964,7 @@ "bundled": true, "optional": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "^2.1.0" } }, "ignore-walk": { @@ -3818,7 +3972,7 @@ "bundled": true, "optional": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { @@ -3826,8 +3980,8 @@ "bundled": true, "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -3843,7 +3997,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -3855,7 +4009,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -3866,8 +4020,8 @@ "version": "2.2.4", "bundled": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, "minizlib": { @@ -3875,7 +4029,7 @@ "bundled": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -3895,9 +4049,9 @@ "bundled": true, "optional": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.21", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { @@ -3905,16 +4059,16 @@ "bundled": true, "optional": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.0", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.6", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.1" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { @@ -3922,8 +4076,8 @@ "bundled": true, "optional": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -3936,8 +4090,8 @@ "bundled": true, "optional": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { @@ -3945,10 +4099,10 @@ "bundled": true, "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -3964,7 +4118,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -3982,8 +4136,8 @@ "bundled": true, "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -4001,10 +4155,10 @@ "bundled": true, "optional": true, "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -4019,13 +4173,13 @@ "bundled": true, "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { @@ -4033,7 +4187,7 @@ "bundled": true, "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -4069,9 +4223,9 @@ "version": "1.0.2", "bundled": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -4079,14 +4233,14 @@ "bundled": true, "optional": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -4099,13 +4253,13 @@ "bundled": true, "optional": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -4118,7 +4272,7 @@ "bundled": true, "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { @@ -4136,10 +4290,10 @@ "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" } }, "function-bind": { @@ -4152,14 +4306,14 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "gaze": { @@ -4167,7 +4321,7 @@ "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", "requires": { - "globule": "1.2.0" + "globule": "^1.0.0" } }, "generate-function": { @@ -4180,7 +4334,7 @@ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "requires": { - "is-property": "1.0.2" + "is-property": "^1.0.0" } }, "get-caller-file": { @@ -4193,11 +4347,11 @@ "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", "requires": { - "hosted-git-info": "2.6.0", - "meow": "3.7.0", - "normalize-package-data": "2.4.0", - "parse-github-repo-url": "1.4.1", - "through2": "2.0.3" + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.0", + "through2": "^2.0.0" }, "dependencies": { "camelcase": { @@ -4210,8 +4364,8 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" } }, "indent-string": { @@ -4219,7 +4373,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "map-obj": { @@ -4232,16 +4386,16 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" } }, "redent": { @@ -4249,8 +4403,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" } }, "strip-indent": { @@ -4258,7 +4412,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "trim-newlines": { @@ -4288,7 +4442,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "git-raw-commits": { @@ -4296,11 +4450,11 @@ "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", "requires": { - "dargs": "4.1.0", - "lodash.template": "4.4.0", - "meow": "4.0.1", - "split2": "2.2.0", - "through2": "2.0.3" + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" } }, "git-remote-origin-url": { @@ -4308,8 +4462,8 @@ "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", "requires": { - "gitconfiglocal": "1.0.0", - "pify": "2.3.0" + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" }, "dependencies": { "pify": { @@ -4324,8 +4478,8 @@ "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==", "requires": { - "meow": "4.0.1", - "semver": "5.5.0" + "meow": "^4.0.0", + "semver": "^5.5.0" } }, "gitconfiglocal": { @@ -4333,7 +4487,7 @@ "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", "requires": { - "ini": "1.3.5" + "ini": "^1.3.2" } }, "glob": { @@ -4341,12 +4495,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -4354,8 +4508,8 @@ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -4363,7 +4517,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "glob2base": { @@ -4371,7 +4525,7 @@ "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", "requires": { - "find-index": "0.1.1" + "find-index": "^0.1.1" } }, "global-dirs": { @@ -4379,7 +4533,7 @@ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "requires": { - "ini": "1.3.5" + "ini": "^1.3.4" } }, "globals": { @@ -4392,12 +4546,12 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.8", - "pify": "3.0.0", - "slash": "1.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, "globule": { @@ -4405,9 +4559,9 @@ "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", "requires": { - "glob": "7.1.2", - "lodash": "4.17.10", - "minimatch": "3.0.4" + "glob": "~7.1.1", + "lodash": "~4.17.4", + "minimatch": "~3.0.2" } }, "got": { @@ -4415,17 +4569,17 @@ "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.2", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } }, "graceful-fs": { @@ -4443,10 +4597,10 @@ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -4454,7 +4608,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -4469,8 +4623,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" }, "dependencies": { "ajv": { @@ -4478,10 +4632,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } } } @@ -4491,7 +4645,7 @@ "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -4499,7 +4653,7 @@ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-binary": { @@ -4542,9 +4696,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" }, "dependencies": { "isobject": { @@ -4559,8 +4713,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -4568,7 +4722,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -4576,7 +4730,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4586,7 +4740,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4596,8 +4750,8 @@ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "hash.js": { @@ -4605,8 +4759,8 @@ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, "hawk": { @@ -4614,10 +4768,10 @@ "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.1", - "sntp": "2.1.0" + "boom": "4.x.x", + "cryptiles": "3.x.x", + "hoek": "4.x.x", + "sntp": "2.x.x" } }, "he": { @@ -4630,9 +4784,9 @@ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "hoek": { @@ -4650,10 +4804,10 @@ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "requires": { - "inherits": "2.0.3", - "obuf": "1.1.2", - "readable-stream": "2.3.6", - "wbuf": "1.7.3" + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" } }, "html-entities": { @@ -4666,13 +4820,13 @@ "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.15.tgz", "integrity": "sha512-OZa4rfb6tZOZ3Z8Xf0jKxXkiDcFWldQePGYFDcgKqES2sXeWaEv9y6QQvWUtX3ySI3feApQi5uCsHLINQ6NoAw==", "requires": { - "camel-case": "3.0.0", - "clean-css": "4.1.11", - "commander": "2.15.1", - "he": "1.1.1", - "param-case": "2.1.1", - "relateurl": "0.2.7", - "uglify-js": "3.3.22" + "camel-case": "3.0.x", + "clean-css": "4.1.x", + "commander": "2.15.x", + "he": "1.1.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.3.x" }, "dependencies": { "source-map": { @@ -4685,8 +4839,8 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { - "commander": "2.15.1", - "source-map": "0.6.1" + "commander": "~2.15.0", + "source-map": "~0.6.1" } } } @@ -4696,12 +4850,12 @@ "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", "requires": { - "html-minifier": "3.5.15", - "loader-utils": "0.2.17", - "lodash": "4.17.10", - "pretty-error": "2.1.1", - "tapable": "1.0.0", - "toposort": "1.0.6", + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", "util.promisify": "1.0.0" }, "dependencies": { @@ -4710,10 +4864,10 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" } } } @@ -4723,10 +4877,10 @@ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.1.0", - "domutils": "1.1.6", - "readable-stream": "1.0.34" + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" }, "dependencies": { "domutils": { @@ -4734,7 +4888,7 @@ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "isarray": { @@ -4747,10 +4901,10 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "string_decoder": { @@ -4770,10 +4924,10 @@ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { - "depd": "1.1.2", + "depd": "~1.1.2", "inherits": "2.0.3", "setprototypeof": "1.1.0", - "statuses": "1.4.0" + "statuses": ">= 1.4.0 < 2" } }, "http-parser-js": { @@ -4786,9 +4940,9 @@ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", "requires": { - "eventemitter3": "3.1.0", - "follow-redirects": "1.4.1", - "requires-port": "1.0.0" + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" } }, "http-proxy-middleware": { @@ -4796,10 +4950,10 @@ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", "requires": { - "http-proxy": "1.17.0", - "is-glob": "4.0.0", - "lodash": "4.17.10", - "micromatch": "3.1.10" + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" }, "dependencies": { "arr-diff": { @@ -4817,16 +4971,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -4834,7 +4988,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -4844,13 +4998,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -4858,7 +5012,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -4866,7 +5020,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -4874,7 +5028,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -4882,7 +5036,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4892,7 +5046,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -4900,7 +5054,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4910,9 +5064,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" } }, "kind-of": { @@ -4927,14 +5081,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -4942,7 +5096,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -4950,7 +5104,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -4960,10 +5114,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -4971,7 +5125,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -4981,7 +5135,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -4989,7 +5143,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -4997,9 +5151,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "is-extglob": { @@ -5012,7 +5166,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-number": { @@ -5020,7 +5174,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -5028,7 +5182,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -5048,19 +5202,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } } } @@ -5070,9 +5224,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "https-browserify": { @@ -5085,9 +5239,9 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" + "agent-base": "2", + "debug": "2", + "extend": "3" } }, "husky": { @@ -5095,9 +5249,9 @@ "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", "requires": { - "is-ci": "1.1.0", - "normalize-path": "1.0.0", - "strip-indent": "2.0.0" + "is-ci": "^1.0.10", + "normalize-path": "^1.0.0", + "strip-indent": "^2.0.0" }, "dependencies": { "normalize-path": { @@ -5148,8 +5302,8 @@ "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -5177,8 +5331,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -5201,7 +5355,7 @@ "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", "requires": { - "meow": "3.7.0" + "meow": "^3.3.0" }, "dependencies": { "camelcase": { @@ -5214,8 +5368,8 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" } }, "indent-string": { @@ -5223,7 +5377,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "map-obj": { @@ -5236,16 +5390,16 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" } }, "redent": { @@ -5253,8 +5407,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" } }, "strip-indent": { @@ -5262,7 +5416,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "trim-newlines": { @@ -5277,7 +5431,7 @@ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -5305,7 +5459,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-arrayish": { @@ -5318,7 +5472,7 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -5331,7 +5485,7 @@ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -5344,7 +5498,7 @@ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "requires": { - "ci-info": "1.1.3" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -5352,7 +5506,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-date-object": { @@ -5365,9 +5519,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -5392,7 +5546,7 @@ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -5410,7 +5564,7 @@ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -5418,7 +5572,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -5426,7 +5580,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-installed-globally": { @@ -5434,8 +5588,8 @@ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" } }, "is-module": { @@ -5453,11 +5607,11 @@ "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "is-my-ip-valid": "1.0.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" } }, "is-npm": { @@ -5470,7 +5624,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-obj": { @@ -5483,7 +5637,7 @@ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -5503,7 +5657,7 @@ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -5511,7 +5665,7 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-plain-obj": { @@ -5524,7 +5678,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" }, "dependencies": { "isobject": { @@ -5574,7 +5728,7 @@ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "requires": { - "has": "1.0.1" + "has": "^1.0.1" } }, "is-retry-allowed": { @@ -5602,7 +5756,7 @@ "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", "requires": { - "text-extensions": "1.7.0" + "text-extensions": "^1.0.0" } }, "is-typedarray": { @@ -5658,20 +5812,20 @@ "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", "requires": { - "abbrev": "1.0.9", - "async": "1.5.2", - "escodegen": "1.8.1", - "esprima": "2.7.3", - "glob": "5.0.15", - "handlebars": "4.0.11", - "js-yaml": "3.11.0", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "once": "1.4.0", - "resolve": "1.1.7", - "supports-color": "3.2.3", - "which": "1.3.0", - "wordwrap": "1.0.0" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" }, "dependencies": { "glob": { @@ -5679,11 +5833,11 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-flag": { @@ -5701,7 +5855,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } }, "wordwrap": { @@ -5716,18 +5870,18 @@ "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", "requires": { - "async": "2.6.0", - "compare-versions": "3.1.0", - "fileset": "2.0.3", - "istanbul-lib-coverage": "1.2.0", - "istanbul-lib-hook": "1.2.0", - "istanbul-lib-instrument": "1.10.1", - "istanbul-lib-report": "1.1.4", - "istanbul-lib-source-maps": "1.2.4", - "istanbul-reports": "1.3.0", - "js-yaml": "3.11.0", - "mkdirp": "0.5.1", - "once": "1.4.0" + "async": "^2.1.4", + "compare-versions": "^3.1.0", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-report": "^1.1.4", + "istanbul-lib-source-maps": "^1.2.4", + "istanbul-reports": "^1.3.0", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" }, "dependencies": { "async": { @@ -5735,7 +5889,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "lodash": "4.17.10" + "lodash": "^4.14.0" } } } @@ -5745,10 +5899,10 @@ "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", "requires": { - "convert-source-map": "1.5.1", - "istanbul-lib-instrument": "1.10.1", - "loader-utils": "1.1.0", - "schema-utils": "0.3.0" + "convert-source-map": "^1.5.0", + "istanbul-lib-instrument": "^1.7.3", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0" }, "dependencies": { "ajv": { @@ -5756,10 +5910,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "schema-utils": { @@ -5767,7 +5921,7 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "requires": { - "ajv": "5.5.2" + "ajv": "^5.0.0" } } } @@ -5782,7 +5936,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz", "integrity": "sha512-p3En6/oGkFQV55Up8ZPC2oLxvgSxD8CzA0yBrhRZSh3pfv3OFj9aSGVC0yoerAi/O4u7jUVnOGVX1eVFM+0tmQ==", "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -5790,13 +5944,13 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", "requires": { - "babel-generator": "6.26.1", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.2.0", - "semver": "5.5.0" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.0", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -5804,10 +5958,10 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", "requires": { - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "has-flag": { @@ -5820,7 +5974,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -5830,11 +5984,11 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz", "integrity": "sha512-UzuK0g1wyQijiaYQxj/CdNycFhAd2TLtO2obKQMTZrZ1jzEMRY3rvpASEKkaxbRR6brvdovfA03znPa/pXcejg==", "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -5852,7 +6006,7 @@ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "jasmine": { @@ -5860,9 +6014,9 @@ "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=", "requires": { - "exit": "0.1.2", - "glob": "7.1.2", - "jasmine-core": "2.99.1" + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.99.0" } }, "jasmine-core": { @@ -5903,8 +6057,8 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, "dependencies": { "esprima": { @@ -5960,7 +6114,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsonify": { @@ -5994,11 +6148,11 @@ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", "requires": { - "core-js": "2.3.0", - "es6-promise": "3.0.2", - "lie": "3.1.1", - "pako": "1.0.6", - "readable-stream": "2.0.6" + "core-js": "~2.3.0", + "es6-promise": "~3.0.2", + "lie": "~3.1.0", + "pako": "~1.0.2", + "readable-stream": "~2.0.6" }, "dependencies": { "core-js": { @@ -6021,12 +6175,12 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" } }, "string_decoder": { @@ -6041,33 +6195,33 @@ "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", "integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", "requires": { - "bluebird": "3.5.1", - "body-parser": "1.18.2", - "chokidar": "1.7.0", - "colors": "1.1.2", - "combine-lists": "1.0.1", - "connect": "3.6.6", - "core-js": "2.5.5", - "di": "0.0.1", - "dom-serialize": "2.2.1", - "expand-braces": "0.1.2", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "http-proxy": "1.17.0", - "isbinaryfile": "3.0.2", - "lodash": "3.10.1", - "log4js": "0.6.38", - "mime": "1.4.1", - "minimatch": "3.0.4", - "optimist": "0.6.1", - "qjobs": "1.2.0", - "range-parser": "1.2.0", - "rimraf": "2.6.2", - "safe-buffer": "5.1.2", + "bluebird": "^3.3.0", + "body-parser": "^1.16.1", + "chokidar": "^1.4.1", + "colors": "^1.1.0", + "combine-lists": "^1.0.0", + "connect": "^3.6.0", + "core-js": "^2.2.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.0", + "expand-braces": "^0.1.1", + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "http-proxy": "^1.13.0", + "isbinaryfile": "^3.0.0", + "lodash": "^3.8.0", + "log4js": "^0.6.31", + "mime": "^1.3.4", + "minimatch": "^3.0.2", + "optimist": "^0.6.1", + "qjobs": "^1.1.4", + "range-parser": "^1.2.0", + "rimraf": "^2.6.0", + "safe-buffer": "^5.0.1", "socket.io": "1.7.3", - "source-map": "0.5.7", + "source-map": "^0.5.3", "tmp": "0.0.31", - "useragent": "2.3.0" + "useragent": "^2.1.12" }, "dependencies": { "chokidar": { @@ -6075,15 +6229,15 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.2.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" } }, "lodash": { @@ -6098,8 +6252,8 @@ "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "requires": { - "fs-access": "1.0.1", - "which": "1.3.0" + "fs-access": "^1.0.0", + "which": "^1.2.1" } }, "karma-cli": { @@ -6107,7 +6261,7 @@ "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", "requires": { - "resolve": "1.7.1" + "resolve": "^1.1.6" } }, "karma-coverage-istanbul-reporter": { @@ -6115,8 +6269,8 @@ "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.2.tgz", "integrity": "sha512-sQHexslLF+QHzaKfK8+onTYMyvSwv+p5cDayVxhpEELGa3z0QuB+l0IMsicIkkBNMOJKQaqueiRoW7iuo7lsog==", "requires": { - "istanbul-api": "1.3.1", - "minimatch": "3.0.4" + "istanbul-api": "^1.1.14", + "minimatch": "^3.0.4" } }, "karma-jasmine": { @@ -6129,7 +6283,7 @@ "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", "requires": { - "karma-jasmine": "1.1.1" + "karma-jasmine": "^1.0.2" } }, "karma-source-map-support": { @@ -6137,7 +6291,7 @@ "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz", "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=", "requires": { - "source-map-support": "0.4.18" + "source-map-support": "^0.4.1" }, "dependencies": { "source-map-support": { @@ -6145,7 +6299,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -6160,7 +6314,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "latest-version": { @@ -6168,7 +6322,7 @@ "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -6182,22 +6336,35 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, + "leb": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=" + }, "less": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/less/-/less-3.0.2.tgz", - "integrity": "sha512-konnFwWXpUQwzuwyN3Zfw/2Ziah2BKzqTfGoHBZjJdQWCmR+yrjmIG3QLwnlXNFWz27QetOmhGNSbHgGRdqhYQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/less/-/less-3.0.4.tgz", + "integrity": "sha512-q3SyEnPKbk9zh4l36PGeW2fgynKu+FpbhiUNx/yaiBUQ3V0CbACCgb9FzYWcRgI2DJlP6eI4jc8XPrCTi55YcQ==", "requires": { - "errno": "0.1.7", - "graceful-fs": "4.1.11", - "image-size": "0.5.5", - "mime": "1.4.1", - "mkdirp": "0.5.1", - "promise": "7.3.1", - "request": "2.85.0", - "source-map": "0.5.7" + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.4.1", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", + "request": "^2.83.0", + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } } }, "less-loader": { @@ -6205,9 +6372,9 @@ "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", "requires": { - "clone": "2.1.1", - "loader-utils": "1.1.0", - "pify": "3.0.0" + "clone": "^2.1.1", + "loader-utils": "^1.1.0", + "pify": "^3.0.0" } }, "levn": { @@ -6215,8 +6382,8 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "license-checker": { @@ -6225,16 +6392,16 @@ "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", "dev": true, "requires": { - "chalk": "0.5.1", - "debug": "2.6.9", - "mkdirp": "0.3.5", - "nopt": "2.2.1", - "read-installed": "4.0.3", - "semver": "5.5.0", - "spdx": "0.5.1", - "spdx-correct": "2.0.4", - "spdx-satisfies": "0.1.3", - "treeify": "1.1.0" + "chalk": "~0.5.1", + "debug": "^2.2.0", + "mkdirp": "^0.3.5", + "nopt": "^2.2.0", + "read-installed": "~4.0.3", + "semver": "^5.3.0", + "spdx": "^0.5.1", + "spdx-correct": "^2.0.3", + "spdx-satisfies": "^0.1.3", + "treeify": "^1.0.1" }, "dependencies": { "ansi-regex": { @@ -6255,11 +6422,11 @@ "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", "dev": true, "requires": { - "ansi-styles": "1.1.0", - "escape-string-regexp": "1.0.5", - "has-ansi": "0.1.0", - "strip-ansi": "0.3.0", - "supports-color": "0.2.0" + "ansi-styles": "^1.1.0", + "escape-string-regexp": "^1.0.0", + "has-ansi": "^0.1.0", + "strip-ansi": "^0.3.0", + "supports-color": "^0.2.0" } }, "has-ansi": { @@ -6268,7 +6435,7 @@ "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", "dev": true, "requires": { - "ansi-regex": "0.2.1" + "ansi-regex": "^0.2.0" } }, "mkdirp": { @@ -6283,7 +6450,7 @@ "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", "dev": true, "requires": { - "abbrev": "1.0.9" + "abbrev": "1" } }, "spdx-correct": { @@ -6292,8 +6459,8 @@ "integrity": "sha512-c+4gPpt9YDhz7cHlz5UrsHzxxRi4ksclxnEEKsuGT9JdwSC+ZNmsGbYRzzgxyZaBYpcWnlu+4lPcdLKx4DOCmA==", "dev": true, "requires": { - "spdx-expression-parse": "2.0.2", - "spdx-license-ids": "2.0.1" + "spdx-expression-parse": "^2.0.1", + "spdx-license-ids": "^2.0.1" } }, "spdx-expression-parse": { @@ -6302,8 +6469,8 @@ "integrity": "sha512-oFxOkWCfFS0ltNp0H66gXlU4NF6bxg7RkoTYR0413t+yTY9zyj+AIWsjtN8dcVp6703ijDYBWBIARlJ7DkyP9Q==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "2.0.1" + "spdx-exceptions": "^2.0.0", + "spdx-license-ids": "^2.0.1" } }, "spdx-license-ids": { @@ -6318,7 +6485,7 @@ "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", "dev": true, "requires": { - "ansi-regex": "0.2.1" + "ansi-regex": "^0.2.1" } }, "supports-color": { @@ -6334,7 +6501,7 @@ "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", "requires": { - "ejs": "2.5.9" + "ejs": "^2.5.7" } }, "lie": { @@ -6342,7 +6509,7 @@ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", "requires": { - "immediate": "3.0.6" + "immediate": "~3.0.5" } }, "load-json-file": { @@ -6350,10 +6517,10 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "loader-runner": { @@ -6366,9 +6533,9 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1" + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" } }, "locate-character": { @@ -6381,8 +6548,8 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -6420,8 +6587,8 @@ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" } }, "lodash.templatesettings": { @@ -6429,7 +6596,7 @@ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", "requires": { - "lodash._reinterpolate": "3.0.0" + "lodash._reinterpolate": "~3.0.0" } }, "log-symbols": { @@ -6437,7 +6604,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "requires": { - "chalk": "2.2.2" + "chalk": "^2.0.1" } }, "log4js": { @@ -6445,8 +6612,8 @@ "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", "requires": { - "readable-stream": "1.0.34", - "semver": "4.3.6" + "readable-stream": "~1.0.2", + "semver": "~4.3.3" }, "dependencies": { "isarray": { @@ -6459,10 +6626,10 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "semver": { @@ -6487,10 +6654,15 @@ "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", "requires": { - "es6-symbol": "3.1.1", - "object.assign": "4.1.0" + "es6-symbol": "^3.1.1", + "object.assign": "^4.1.0" } }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -6501,7 +6673,7 @@ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -6509,8 +6681,8 @@ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" } }, "lower-case": { @@ -6528,8 +6700,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "magic-string": { @@ -6537,7 +6709,7 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "requires": { - "vlq": "0.2.3" + "vlq": "^0.2.2" } }, "make-dir": { @@ -6545,7 +6717,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "make-error": { @@ -6568,7 +6740,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "material-design-icons": { @@ -6581,8 +6753,8 @@ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, "media-typer": { @@ -6595,7 +6767,7 @@ "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "memory-fs": { @@ -6603,8 +6775,8 @@ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "requires": { - "errno": "0.1.7", - "readable-stream": "2.3.6" + "errno": "^0.1.3", + "readable-stream": "^2.0.1" } }, "meow": { @@ -6612,15 +6784,15 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", "requires": { - "camelcase-keys": "4.2.0", - "decamelize-keys": "1.1.0", - "loud-rejection": "1.6.0", - "minimist": "1.2.0", - "minimist-options": "3.0.2", - "normalize-package-data": "2.4.0", - "read-pkg-up": "3.0.0", - "redent": "2.0.0", - "trim-newlines": "2.0.0" + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" }, "dependencies": { "read-pkg": { @@ -6628,9 +6800,9 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "load-json-file": "4.0.0", - "normalize-package-data": "2.4.0", - "path-type": "3.0.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" } }, "read-pkg-up": { @@ -6638,8 +6810,8 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "requires": { - "find-up": "2.1.0", - "read-pkg": "3.0.0" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" } } } @@ -6659,19 +6831,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "miller-rabin": { @@ -6679,8 +6851,8 @@ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "mime": { @@ -6698,7 +6870,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "mimic-fn": { @@ -6711,8 +6883,8 @@ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", "requires": { - "loader-utils": "1.1.0", - "webpack-sources": "1.1.0" + "loader-utils": "^1.1.0", + "webpack-sources": "^1.1.0" } }, "minimalistic-assert": { @@ -6730,7 +6902,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -6743,8 +6915,8 @@ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", "requires": { - "arrify": "1.0.1", - "is-plain-obj": "1.1.0" + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" } }, "minipass": { @@ -6752,8 +6924,8 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "requires": { - "safe-buffer": "5.1.2", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" }, "dependencies": { "yallist": { @@ -6768,7 +6940,7 @@ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mississippi": { @@ -6776,16 +6948,16 @@ "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "requires": { - "concat-stream": "1.6.2", - "duplexify": "3.5.4", - "end-of-stream": "1.4.1", - "flush-write-stream": "1.0.3", - "from2": "2.3.0", - "parallel-transform": "1.1.0", - "pump": "2.0.1", - "pumpify": "1.4.0", - "stream-each": "1.2.2", - "through2": "2.0.3" + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" } }, "mixin-deep": { @@ -6793,8 +6965,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -6802,7 +6974,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -6812,8 +6984,8 @@ "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", "requires": { - "for-in": "0.1.8", - "is-extendable": "0.1.1" + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" }, "dependencies": { "for-in": { @@ -6848,12 +7020,12 @@ "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "requires": { - "aproba": "1.2.0", - "copy-concurrently": "1.0.5", - "fs-write-stream-atomic": "1.0.10", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" } }, "ms": { @@ -6866,8 +7038,8 @@ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", "requires": { - "dns-packet": "1.3.1", - "thunky": "1.0.2" + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" } }, "multicast-dns-service-types": { @@ -6885,18 +7057,18 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-odd": "2.0.0", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "arr-diff": { @@ -6936,32 +7108,32 @@ "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-3.0.0-rc.2.tgz", "integrity": "sha512-NhIQcIvHiOqHblSmtTgECSsfL59V6lfn6Ris9byXN7NaTaUxOF9EWZQqQC09mu8a+YW/H+6Pk2uAjQ99DH9NQw==", "requires": { - "@ngtools/json-schema": "1.1.0", - "autoprefixer": "8.3.0", - "browserslist": "3.2.6", - "chalk": "2.4.1", - "commander": "2.15.1", - "cpx": "1.5.0", - "fs-extra": "5.0.0", - "glob": "7.1.2", - "injection-js": "2.2.1", - "less": "3.0.2", - "node-sass": "4.9.0", - "node-sass-tilde-importer": "1.0.2", - "postcss": "6.0.21", - "postcss-clean": "1.1.0", - "postcss-url": "7.3.2", - "read-pkg-up": "3.0.0", - "rimraf": "2.6.2", - "rollup": "0.57.1", + "@ngtools/json-schema": "^1.1.0", + "autoprefixer": "^8.0.0", + "browserslist": "^3.0.0", + "chalk": "^2.3.1", + "commander": "^2.12.0", + "cpx": "^1.5.0", + "fs-extra": "^5.0.0", + "glob": "^7.1.2", + "injection-js": "^2.2.1", + "less": "^3.0.0", + "node-sass": "^4.5.3", + "node-sass-tilde-importer": "^1.0.0", + "postcss": "^6.0.2", + "postcss-clean": "^1.1.0", + "postcss-url": "^7.3.0", + "read-pkg-up": "^3.0.0", + "rimraf": "^2.6.1", + "rollup": "^0.57.1", "rollup-plugin-commonjs": "9.1.0", - "rollup-plugin-node-resolve": "3.3.0", - "rxjs": "5.5.10", - "sorcery": "0.10.0", - "strip-bom": "3.0.0", - "stylus": "0.54.5", - "uglify-js": "3.3.22", - "update-notifier": "2.5.0" + "rollup-plugin-node-resolve": "^3.0.0", + "rxjs": "^5.5.0", + "sorcery": "^0.10.0", + "strip-bom": "^3.0.0", + "stylus": "^0.54.5", + "uglify-js": "^3.0.7", + "update-notifier": "^2.3.0" }, "dependencies": { "chalk": { @@ -6969,9 +7141,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "read-pkg": { @@ -6979,9 +7151,9 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "load-json-file": "4.0.0", - "normalize-package-data": "2.4.0", - "path-type": "3.0.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" } }, "read-pkg-up": { @@ -6989,8 +7161,8 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "requires": { - "find-up": "2.1.0", - "read-pkg": "3.0.0" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" } }, "rxjs": { @@ -7016,8 +7188,8 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { - "commander": "2.15.1", - "source-map": "0.6.1" + "commander": "~2.15.0", + "source-map": "~0.6.1" } } } @@ -7027,7 +7199,7 @@ "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "requires": { - "lower-case": "1.1.4" + "lower-case": "^1.1.1" } }, "node-forge": { @@ -7040,19 +7212,19 @@ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", "requires": { - "fstream": "1.0.11", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "npmlog": "4.1.2", - "osenv": "0.1.5", - "request": "2.85.0", - "rimraf": "2.6.2", - "semver": "5.3.0", - "tar": "2.2.1", - "which": "1.3.0" + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "2", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" }, "dependencies": { "semver": { @@ -7065,9 +7237,9 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } } } @@ -7077,28 +7249,28 @@ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.2.0", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "domain-browser": "1.2.0", - "events": "1.1.1", - "https-browserify": "1.0.0", - "os-browserify": "0.3.0", + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.6", - "stream-browserify": "2.0.1", - "stream-http": "2.8.1", - "string_decoder": "1.1.1", - "timers-browserify": "2.0.10", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", + "url": "^0.11.0", + "util": "^0.10.3", "vm-browserify": "0.0.4" }, "dependencies": { @@ -7114,25 +7286,25 @@ "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", "requires": { - "async-foreach": "0.1.3", - "chalk": "1.1.3", - "cross-spawn": "3.0.1", - "gaze": "1.1.2", - "get-stdin": "4.0.1", - "glob": "7.1.2", - "in-publish": "2.0.0", - "lodash.assign": "4.2.0", - "lodash.clonedeep": "4.5.0", - "lodash.mergewith": "4.6.1", - "meow": "3.7.0", - "mkdirp": "0.5.1", - "nan": "2.10.0", - "node-gyp": "3.6.2", - "npmlog": "4.1.2", - "request": "2.79.0", - "sass-graph": "2.2.4", - "stdout-stream": "1.4.0", - "true-case-path": "1.0.2" + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash.assign": "^4.2.0", + "lodash.clonedeep": "^4.3.2", + "lodash.mergewith": "^4.6.0", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.10.0", + "node-gyp": "^3.3.1", + "npmlog": "^4.0.0", + "request": "~2.79.0", + "sass-graph": "^2.2.4", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" }, "dependencies": { "ansi-styles": { @@ -7155,7 +7327,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "camelcase": { @@ -7168,8 +7340,8 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" } }, "caseless": { @@ -7182,11 +7354,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "cryptiles": { @@ -7194,7 +7366,7 @@ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "requires": { - "boom": "2.10.1" + "boom": "2.x.x" } }, "form-data": { @@ -7202,9 +7374,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "har-validator": { @@ -7212,10 +7384,10 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", "requires": { - "chalk": "1.1.3", - "commander": "2.15.1", - "is-my-json-valid": "2.17.2", - "pinkie-promise": "2.0.1" + "chalk": "^1.1.1", + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.4", + "pinkie-promise": "^2.0.0" } }, "hawk": { @@ -7223,10 +7395,10 @@ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" } }, "hoek": { @@ -7239,9 +7411,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "indent-string": { @@ -7249,7 +7421,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "map-obj": { @@ -7262,16 +7434,16 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" } }, "qs": { @@ -7284,8 +7456,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" } }, "request": { @@ -7293,26 +7465,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.7.0", - "caseless": "0.11.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "2.0.6", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "qs": "6.3.2", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.4.3", - "uuid": "3.2.1" + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "qs": "~6.3.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "~0.4.1", + "uuid": "^3.0.0" } }, "sntp": { @@ -7320,7 +7492,7 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "strip-indent": { @@ -7328,7 +7500,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "supports-color": { @@ -7353,7 +7525,7 @@ "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", "requires": { - "find-parent-dir": "0.3.0" + "find-parent-dir": "^0.3.0" } }, "nopt": { @@ -7361,7 +7533,7 @@ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "requires": { - "abbrev": "1.0.9" + "abbrev": "1" } }, "normalize-package-data": { @@ -7369,10 +7541,10 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -7380,7 +7552,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-range": { @@ -7393,10 +7565,10 @@ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", "requires": { - "hosted-git-info": "2.6.0", - "osenv": "0.1.5", - "semver": "5.5.0", - "validate-npm-package-name": "3.0.0" + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" } }, "npm-registry-client": { @@ -7404,18 +7576,18 @@ "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", "requires": { - "concat-stream": "1.6.2", - "graceful-fs": "4.1.11", - "normalize-package-data": "2.4.0", - "npm-package-arg": "6.1.0", - "npmlog": "4.1.2", - "once": "1.4.0", - "request": "2.85.0", - "retry": "0.10.1", - "safe-buffer": "5.1.2", - "semver": "5.5.0", - "slide": "1.1.6", - "ssri": "5.3.0" + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "safe-buffer": "^5.1.1", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^5.2.4" } }, "npm-run-path": { @@ -7423,7 +7595,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "npmlog": { @@ -7431,10 +7603,10 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "nth-check": { @@ -7442,7 +7614,7 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", "requires": { - "boolbase": "1.0.0" + "boolbase": "~1.0.0" } }, "null-check": { @@ -7480,9 +7652,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -7490,7 +7662,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -7505,7 +7677,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" }, "dependencies": { "isobject": { @@ -7520,10 +7692,10 @@ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "requires": { - "define-properties": "1.1.2", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "object-keys": "1.0.11" + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, "object.getownpropertydescriptors": { @@ -7531,8 +7703,8 @@ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.11.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" } }, "object.omit": { @@ -7540,8 +7712,8 @@ "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "object.pick": { @@ -7549,7 +7721,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" }, "dependencies": { "isobject": { @@ -7582,7 +7754,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "opn": { @@ -7590,7 +7762,7 @@ "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", "requires": { - "is-wsl": "1.1.0" + "is-wsl": "^1.1.0" } }, "optimist": { @@ -7598,8 +7770,8 @@ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" }, "dependencies": { "minimist": { @@ -7614,12 +7786,12 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" }, "dependencies": { "wordwrap": { @@ -7639,7 +7811,7 @@ "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", "requires": { - "url-parse": "1.0.5" + "url-parse": "1.0.x" }, "dependencies": { "url-parse": { @@ -7647,8 +7819,8 @@ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", "requires": { - "querystringify": "0.0.4", - "requires-port": "1.0.0" + "querystringify": "0.0.x", + "requires-port": "1.0.x" } } } @@ -7668,7 +7840,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { @@ -7681,8 +7853,8 @@ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "p-finally": { @@ -7695,7 +7867,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -7703,7 +7875,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-map": { @@ -7721,10 +7893,10 @@ "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.5.0" + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" } }, "pako": { @@ -7737,9 +7909,9 @@ "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "requires": { - "cyclist": "0.2.2", - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" } }, "param-case": { @@ -7747,7 +7919,7 @@ "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", "requires": { - "no-case": "2.3.2" + "no-case": "^2.2.0" } }, "parse-asn1": { @@ -7755,11 +7927,11 @@ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "requires": { - "asn1.js": "4.10.1", - "browserify-aes": "1.2.0", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.16" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" } }, "parse-github-repo-url": { @@ -7772,10 +7944,10 @@ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -7783,8 +7955,8 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse-ms": { @@ -7802,7 +7974,7 @@ "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseqs": { @@ -7810,7 +7982,7 @@ "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseuri": { @@ -7818,7 +7990,7 @@ "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseurl": { @@ -7876,7 +8048,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "pbkdf2": { @@ -7884,11 +8056,11 @@ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "requires": { - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "performance-now": { @@ -7911,7 +8083,7 @@ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -7919,7 +8091,7 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "plur": { @@ -7927,7 +8099,7 @@ "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "requires": { - "irregular-plurals": "1.4.0" + "irregular-plurals": "^1.0.0" } }, "popper.js": { @@ -7940,9 +8112,9 @@ "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", "requires": { - "async": "1.5.2", - "debug": "2.6.9", - "mkdirp": "0.5.1" + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" } }, "posix-character-classes": { @@ -7951,13 +8123,13 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", - "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "version": "6.0.22", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", "requires": { - "chalk": "2.4.1", - "source-map": "0.6.1", - "supports-color": "5.4.0" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" }, "dependencies": { "chalk": { @@ -7965,9 +8137,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "source-map": { @@ -7982,8 +8154,8 @@ "resolved": "https://registry.npmjs.org/postcss-clean/-/postcss-clean-1.1.0.tgz", "integrity": "sha512-83g3GqMbCM5NL6MlbbPLJ/m2NrUepBF44MoDk4Gt04QGXeXKh9+ilQa0DzLnYnvqYHQCw83nckuEzBFr2muwbg==", "requires": { - "clean-css": "4.1.11", - "postcss": "6.0.21" + "clean-css": "^4.x", + "postcss": "^6.x" } }, "postcss-import": { @@ -7991,10 +8163,10 @@ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", "requires": { - "postcss": "6.0.21", - "postcss-value-parser": "3.3.0", - "read-cache": "1.0.0", - "resolve": "1.7.1" + "postcss": "^6.0.1", + "postcss-value-parser": "^3.2.3", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" } }, "postcss-load-config": { @@ -8002,10 +8174,10 @@ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1", - "postcss-load-options": "1.2.0", - "postcss-load-plugins": "2.3.0" + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0", + "postcss-load-options": "^1.2.0", + "postcss-load-plugins": "^2.3.0" } }, "postcss-load-options": { @@ -8013,8 +8185,8 @@ "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0" } }, "postcss-load-plugins": { @@ -8022,19 +8194,19 @@ "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" + "cosmiconfig": "^2.1.1", + "object-assign": "^4.1.0" } }, "postcss-loader": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.4.tgz", - "integrity": "sha512-L2p654oK945B/gDFUGgOhh7uzj19RWoY1SVMeJVoKno1H2MdbQ0RppR/28JGju4pMb22iRC7BJ9aDzbxXSLf4A==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz", + "integrity": "sha512-pV7kB5neJ0/1tZ8L1uGOBNTVBCSCXQoIsZMsrwvO8V2rKGa2tBl/f80GGVxow2jJnRJ2w1ocx693EKhZAb9Isg==", "requires": { - "loader-utils": "1.1.0", - "postcss": "6.0.21", - "postcss-load-config": "1.2.0", - "schema-utils": "0.4.5" + "loader-utils": "^1.1.0", + "postcss": "^6.0.0", + "postcss-load-config": "^1.2.0", + "schema-utils": "^0.4.0" } }, "postcss-url": { @@ -8042,11 +8214,11 @@ "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", "requires": { - "mime": "1.4.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "postcss": "6.0.21", - "xxhashjs": "0.2.2" + "mime": "^1.4.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.0", + "postcss": "^6.0.1", + "xxhashjs": "^0.2.1" } }, "postcss-value-parser": { @@ -8074,8 +8246,8 @@ "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", "requires": { - "renderkid": "2.0.1", - "utila": "0.4.0" + "renderkid": "^2.0.1", + "utila": "~0.4" } }, "pretty-ms": { @@ -8083,8 +8255,8 @@ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", "requires": { - "parse-ms": "1.0.1", - "plur": "2.1.2" + "parse-ms": "^1.0.0", + "plur": "^2.1.2" } }, "process": { @@ -8103,7 +8275,7 @@ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "optional": true, "requires": { - "asap": "2.0.6" + "asap": "~2.0.3" } }, "promise-inflight": { @@ -8116,21 +8288,21 @@ "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.1.tgz", "integrity": "sha512-AW9qJ0prx2QEMy1gnhJ1Sl1WBQL2R3fx/VnG09FEmWprPIQPK14t0B83OB/pAGddpxiDCAAV0KiNNLf2c2Y/lQ==", "requires": { - "@types/node": "6.0.106", - "@types/q": "0.0.32", - "@types/selenium-webdriver": "2.53.43", - "blocking-proxy": "1.0.1", - "chalk": "1.1.3", - "glob": "7.1.2", + "@types/node": "^6.0.46", + "@types/q": "^0.0.32", + "@types/selenium-webdriver": "~2.53.39", + "blocking-proxy": "^1.0.0", + "chalk": "^1.1.3", + "glob": "^7.0.3", "jasmine": "2.8.0", - "jasminewd2": "2.2.0", - "optimist": "0.6.1", + "jasminewd2": "^2.1.0", + "optimist": "~0.6.0", "q": "1.4.1", - "saucelabs": "1.3.0", + "saucelabs": "~1.3.0", "selenium-webdriver": "3.6.0", - "source-map-support": "0.4.18", - "webdriver-js-extender": "1.0.0", - "webdriver-manager": "12.0.6" + "source-map-support": "~0.4.0", + "webdriver-js-extender": "^1.0.0", + "webdriver-manager": "^12.0.6" }, "dependencies": { "@types/node": { @@ -8153,11 +8325,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "jasmine": { @@ -8165,9 +8337,9 @@ "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", "requires": { - "exit": "0.1.2", - "glob": "7.1.2", - "jasmine-core": "2.8.0" + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.8.0" } }, "jasmine-core": { @@ -8185,7 +8357,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "supports-color": { @@ -8198,17 +8370,17 @@ "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", "requires": { - "adm-zip": "0.4.9", - "chalk": "1.1.3", - "del": "2.2.2", - "glob": "7.1.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "q": "1.4.1", - "request": "2.85.0", - "rimraf": "2.6.2", - "semver": "5.5.0", - "xml2js": "0.4.19" + "adm-zip": "^0.4.7", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.78.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" } } } @@ -8218,7 +8390,7 @@ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", "requires": { - "forwarded": "0.1.2", + "forwarded": "~0.1.2", "ipaddr.js": "1.6.0" } }, @@ -8237,11 +8409,11 @@ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "parse-asn1": "5.1.1", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" } }, "pump": { @@ -8249,8 +8421,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "pumpify": { @@ -8258,9 +8430,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "requires": { - "duplexify": "3.5.4", - "inherits": "2.0.3", - "pump": "2.0.1" + "duplexify": "^3.5.3", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, "punycode": { @@ -8308,8 +8480,8 @@ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -8317,7 +8489,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -8325,7 +8497,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8335,7 +8507,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8345,7 +8517,7 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.1.0" } }, "randomfill": { @@ -8353,8 +8525,8 @@ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "requires": { - "randombytes": "2.0.6", - "safe-buffer": "5.1.2" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, "range-parser": { @@ -8386,7 +8558,7 @@ "depd": "1.1.1", "inherits": "2.0.3", "setprototypeof": "1.0.3", - "statuses": "1.4.0" + "statuses": ">= 1.3.1 < 2" } }, "setprototypeof": { @@ -8406,10 +8578,10 @@ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, "read-cache": { @@ -8417,7 +8589,7 @@ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", "requires": { - "pify": "2.3.0" + "pify": "^2.3.0" }, "dependencies": { "pify": { @@ -8433,13 +8605,13 @@ "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", "dev": true, "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.13", - "readdir-scoped-modules": "1.0.2", - "semver": "5.5.0", - "slide": "1.1.6", - "util-extend": "1.0.3" + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" } }, "read-package-json": { @@ -8448,11 +8620,11 @@ "integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==", "dev": true, "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-better-errors": "1.0.2", - "normalize-package-data": "2.4.0", - "slash": "1.0.0" + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-better-errors": "^1.0.1", + "normalize-package-data": "^2.0.0", + "slash": "^1.0.0" } }, "read-pkg": { @@ -8460,9 +8632,9 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" }, "dependencies": { "load-json-file": { @@ -8470,11 +8642,11 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "parse-json": { @@ -8482,7 +8654,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-type": { @@ -8490,9 +8662,9 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "pify": { @@ -8505,7 +8677,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -8515,8 +8687,8 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { @@ -8524,8 +8696,8 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "path-exists": { @@ -8533,7 +8705,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } } } @@ -8543,13 +8715,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readdir-scoped-modules": { @@ -8558,10 +8730,10 @@ "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", "dev": true, "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.4.0" + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" } }, "readdirp": { @@ -8569,10 +8741,10 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.6", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "redent": { @@ -8580,8 +8752,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", "requires": { - "indent-string": "3.2.0", - "strip-indent": "2.0.0" + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" } }, "reflect-metadata": { @@ -8604,7 +8776,7 @@ "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "regex-not": { @@ -8612,8 +8784,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "regexpu-core": { @@ -8621,9 +8793,9 @@ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "requires": { - "regenerate": "1.3.3", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, "registry-auth-token": { @@ -8631,8 +8803,8 @@ "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "requires": { - "rc": "1.2.6", - "safe-buffer": "5.1.2" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, "registry-url": { @@ -8640,7 +8812,7 @@ "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "requires": { - "rc": "1.2.6" + "rc": "^1.0.1" } }, "regjsgen": { @@ -8653,7 +8825,7 @@ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "relateurl": { @@ -8671,11 +8843,11 @@ "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", "requires": { - "css-select": "1.2.0", - "dom-converter": "0.1.4", - "htmlparser2": "3.3.0", - "strip-ansi": "3.0.1", - "utila": "0.3.3" + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" }, "dependencies": { "utila": { @@ -8700,7 +8872,7 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -8708,28 +8880,28 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.7.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.2", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "hawk": "~6.0.2", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "stringstream": "~0.0.5", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" } }, "require-directory": { @@ -8762,7 +8934,7 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-cwd": { @@ -8770,7 +8942,7 @@ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -8799,7 +8971,7 @@ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -8807,7 +8979,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "ripemd160": { @@ -8815,8 +8987,8 @@ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, "rollup": { @@ -8824,17 +8996,17 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.57.1.tgz", "integrity": "sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA==", "requires": { - "@types/acorn": "4.0.3", - "acorn": "5.5.3", - "acorn-dynamic-import": "3.0.0", - "date-time": "2.1.0", - "is-reference": "1.1.0", - "locate-character": "2.0.5", - "pretty-ms": "3.1.0", - "require-relative": "0.8.7", - "rollup-pluginutils": "2.0.1", - "signal-exit": "3.0.2", - "sourcemap-codec": "1.4.1" + "@types/acorn": "^4.0.3", + "acorn": "^5.5.3", + "acorn-dynamic-import": "^3.0.0", + "date-time": "^2.1.0", + "is-reference": "^1.1.0", + "locate-character": "^2.0.5", + "pretty-ms": "^3.1.0", + "require-relative": "^0.8.7", + "rollup-pluginutils": "^2.0.1", + "signal-exit": "^3.0.2", + "sourcemap-codec": "^1.4.1" } }, "rollup-plugin-commonjs": { @@ -8842,10 +9014,10 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.0.tgz", "integrity": "sha512-NrfE0g30QljNCnlJr7I2Xguz+44mh0dCxvfxwLnCwtaCK2LwFUp1zzAs8MQuOfhH4mRskqsjfOwGUap/L+WtEw==", "requires": { - "estree-walker": "0.5.1", - "magic-string": "0.22.5", - "resolve": "1.7.1", - "rollup-pluginutils": "2.0.1" + "estree-walker": "^0.5.1", + "magic-string": "^0.22.4", + "resolve": "^1.5.0", + "rollup-pluginutils": "^2.0.1" }, "dependencies": { "estree-walker": { @@ -8860,9 +9032,9 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", "requires": { - "builtin-modules": "2.0.0", - "is-module": "1.0.0", - "resolve": "1.7.1" + "builtin-modules": "^2.0.0", + "is-module": "^1.0.0", + "resolve": "^1.1.6" }, "dependencies": { "builtin-modules": { @@ -8877,8 +9049,8 @@ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", "integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=", "requires": { - "estree-walker": "0.3.1", - "micromatch": "2.3.11" + "estree-walker": "^0.3.0", + "micromatch": "^2.3.11" } }, "run-queue": { @@ -8886,7 +9058,7 @@ "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "requires": { - "aproba": "1.2.0" + "aproba": "^1.1.1" } }, "rxjs": { @@ -8894,7 +9066,7 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -8907,7 +9079,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "sander": { @@ -8915,10 +9087,10 @@ "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", "requires": { - "es6-promise": "3.3.1", - "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" + "es6-promise": "^3.1.2", + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" } }, "sass-graph": { @@ -8926,10 +9098,10 @@ "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "requires": { - "glob": "7.1.2", - "lodash": "4.17.10", - "scss-tokenizer": "0.2.3", - "yargs": "7.1.0" + "glob": "^7.0.0", + "lodash": "^4.0.0", + "scss-tokenizer": "^0.2.3", + "yargs": "^7.0.0" }, "dependencies": { "camelcase": { @@ -8942,9 +9114,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "y18n": { @@ -8957,19 +9129,19 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "5.0.0" + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" } } } @@ -8979,11 +9151,11 @@ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.0.1.tgz", "integrity": "sha512-MeVVJFejJELlAbA7jrRchi88PGP6U9yIfqyiG+bBC4a9s2PX+ulJB9h8bbEohtPBfZmlLhNZ0opQM9hovRXvlw==", "requires": { - "clone-deep": "2.0.2", - "loader-utils": "1.1.0", - "lodash.tail": "4.1.1", - "neo-async": "2.5.1", - "pify": "3.0.0" + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0" } }, "saucelabs": { @@ -8991,7 +9163,7 @@ "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", "requires": { - "https-proxy-agent": "1.0.0" + "https-proxy-agent": "^1.0.0" } }, "sax": { @@ -9004,8 +9176,8 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "6.4.0", - "ajv-keywords": "3.1.0" + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" } }, "scss-tokenizer": { @@ -9013,8 +9185,8 @@ "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "requires": { - "js-base64": "2.4.3", - "source-map": "0.4.4" + "js-base64": "^2.1.8", + "source-map": "^0.4.2" }, "dependencies": { "source-map": { @@ -9022,7 +9194,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -9037,10 +9209,10 @@ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", "requires": { - "jszip": "3.1.5", - "rimraf": "2.6.2", + "jszip": "^3.1.3", + "rimraf": "^2.5.4", "tmp": "0.0.30", - "xml2js": "0.4.19" + "xml2js": "^0.4.17" }, "dependencies": { "tmp": { @@ -9048,7 +9220,7 @@ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.1" } } } @@ -9071,7 +9243,7 @@ "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "requires": { - "semver": "5.5.0" + "semver": "^5.0.3" } }, "semver-dsl": { @@ -9079,7 +9251,7 @@ "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", "requires": { - "semver": "5.5.0" + "semver": "^5.3.0" } }, "semver-intersect": { @@ -9087,7 +9259,7 @@ "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz", "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=", "requires": { - "semver": "5.5.0" + "semver": "^5.0.0" } }, "send": { @@ -9096,18 +9268,18 @@ "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "requires": { "debug": "2.6.9", - "depd": "1.1.2", - "destroy": "1.0.4", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "etag": "1.8.1", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.6.3", + "http-errors": "~1.6.2", "mime": "1.4.1", "ms": "2.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.4.0" + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" } }, "serialize-javascript": { @@ -9120,13 +9292,13 @@ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "requires": { - "accepts": "1.3.5", + "accepts": "~1.3.4", "batch": "0.6.1", "debug": "2.6.9", - "escape-html": "1.0.3", - "http-errors": "1.6.3", - "mime-types": "2.1.18", - "parseurl": "1.3.2" + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" } }, "serve-static": { @@ -9134,9 +9306,9 @@ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "requires": { - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "parseurl": "1.3.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", "send": "0.16.2" } }, @@ -9155,10 +9327,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -9166,7 +9338,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9186,8 +9358,8 @@ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "shallow-clone": { @@ -9195,9 +9367,9 @@ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", "requires": { - "is-extendable": "0.1.1", - "kind-of": "5.1.0", - "mixin-object": "2.0.1" + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" }, "dependencies": { "kind-of": { @@ -9212,7 +9384,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -9225,10 +9397,10 @@ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" } }, "signal-exit": { @@ -9241,7 +9413,7 @@ "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", "requires": { - "debug": "2.6.9" + "debug": "^2.2.0" } }, "slash": { @@ -9259,14 +9431,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.1", - "use": "3.1.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "define-property": { @@ -9274,7 +9446,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -9282,7 +9454,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9292,9 +9464,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -9302,7 +9474,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -9310,7 +9482,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -9318,7 +9490,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -9326,9 +9498,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "isobject": { @@ -9348,7 +9520,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" } }, "sntp": { @@ -9356,7 +9528,7 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { - "hoek": "4.2.1" + "hoek": "4.x.x" } }, "socket.io": { @@ -9491,8 +9663,8 @@ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", "requires": { - "faye-websocket": "0.10.0", - "uuid": "3.2.1" + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" } }, "sockjs-client": { @@ -9500,12 +9672,12 @@ "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", "requires": { - "debug": "2.6.9", + "debug": "^2.6.6", "eventsource": "0.1.6", - "faye-websocket": "0.11.1", - "inherits": "2.0.3", - "json3": "3.3.2", - "url-parse": "1.4.0" + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" }, "dependencies": { "faye-websocket": { @@ -9513,7 +9685,7 @@ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", "requires": { - "websocket-driver": "0.7.0" + "websocket-driver": ">=0.5.1" } } } @@ -9523,10 +9695,10 @@ "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", "requires": { - "buffer-crc32": "0.2.13", - "minimist": "1.2.0", - "sander": "0.5.1", - "sourcemap-codec": "1.4.1" + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0", + "sourcemap-codec": "^1.3.0" } }, "source-list-map": { @@ -9544,11 +9716,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "atob": "2.1.1", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.0.0", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -9556,8 +9728,8 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "requires": { - "buffer-from": "1.0.0", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -9583,8 +9755,8 @@ "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", "dev": true, "requires": { - "spdx-exceptions": "1.0.5", - "spdx-license-ids": "1.2.2" + "spdx-exceptions": "^1.0.0", + "spdx-license-ids": "^1.0.0" }, "dependencies": { "spdx-exceptions": { @@ -9607,8 +9779,8 @@ "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", "dev": true, "requires": { - "spdx-expression-parse": "1.0.4", - "spdx-ranges": "1.0.1" + "spdx-expression-parse": "^1.0.0", + "spdx-ranges": "^1.0.0" }, "dependencies": { "spdx-expression-parse": { @@ -9624,8 +9796,8 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -9638,8 +9810,8 @@ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -9659,8 +9831,8 @@ "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", "dev": true, "requires": { - "spdx-compare": "0.1.2", - "spdx-expression-parse": "1.0.4" + "spdx-compare": "^0.1.2", + "spdx-expression-parse": "^1.0.0" }, "dependencies": { "spdx-expression-parse": { @@ -9676,12 +9848,12 @@ "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", "requires": { - "debug": "2.6.9", - "handle-thing": "1.2.5", - "http-deceiver": "1.2.7", - "safe-buffer": "5.1.2", - "select-hose": "2.0.0", - "spdy-transport": "2.1.0" + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" } }, "spdy-transport": { @@ -9689,13 +9861,13 @@ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", "requires": { - "debug": "2.6.9", - "detect-node": "2.0.3", - "hpack.js": "2.1.6", - "obuf": "1.1.2", - "readable-stream": "2.3.6", - "safe-buffer": "5.1.2", - "wbuf": "1.7.3" + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" } }, "split": { @@ -9703,7 +9875,7 @@ "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "requires": { - "through": "2.3.8" + "through": "2" } }, "split-string": { @@ -9711,7 +9883,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "split2": { @@ -9719,7 +9891,7 @@ "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "requires": { - "through2": "2.0.3" + "through2": "^2.0.2" } }, "sprintf-js": { @@ -9732,14 +9904,14 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" } }, "ssri": { @@ -9747,7 +9919,7 @@ "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.1.1" } }, "static-extend": { @@ -9755,8 +9927,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -9764,7 +9936,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9774,7 +9946,7 @@ "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.4" } }, "statuses": { @@ -9787,7 +9959,7 @@ "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", "requires": { - "readable-stream": "2.3.6" + "readable-stream": "^2.0.1" } }, "stream-browserify": { @@ -9795,8 +9967,8 @@ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" } }, "stream-each": { @@ -9804,20 +9976,20 @@ "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "requires": { - "end-of-stream": "1.4.1", - "stream-shift": "1.0.0" + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" } }, "stream-http": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", - "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.2.tgz", + "integrity": "sha512-QllfrBhqF1DPcz46WxKTs6Mz1Bpc+8Qm6vbqOpVav5odAXwbyzwnEczoWqtxrsmlO+cJqtPrp/8gWKWjaKLLlA==", "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" } }, "stream-shift": { @@ -9830,9 +10002,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -9840,7 +10012,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "stringstream": { @@ -9853,7 +10025,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -9881,8 +10053,8 @@ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", "requires": { - "loader-utils": "1.1.0", - "schema-utils": "0.4.5" + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.5" } }, "stylus": { @@ -9890,12 +10062,12 @@ "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", "requires": { - "css-parse": "1.7.0", - "debug": "2.6.9", - "glob": "7.0.6", - "mkdirp": "0.5.1", - "sax": "0.5.8", - "source-map": "0.1.43" + "css-parse": "1.7.x", + "debug": "*", + "glob": "7.0.x", + "mkdirp": "0.5.x", + "sax": "0.5.x", + "source-map": "0.1.x" }, "dependencies": { "glob": { @@ -9903,12 +10075,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "source-map": { @@ -9916,7 +10088,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -9926,9 +10098,9 @@ "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", "requires": { - "loader-utils": "1.1.0", - "lodash.clonedeep": "4.5.0", - "when": "3.6.4" + "loader-utils": "^1.0.2", + "lodash.clonedeep": "^4.5.0", + "when": "~3.6.x" } }, "subarg": { @@ -9936,7 +10108,7 @@ "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "requires": { - "minimist": "1.2.0" + "minimist": "^1.1.0" } }, "supports-color": { @@ -9944,7 +10116,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } }, "symbol-observable": { @@ -9962,11 +10134,11 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", "requires": { - "chownr": "1.0.1", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "minipass": "^2.0.2", + "minizlib": "^1.0.3", + "mkdirp": "^0.5.0", + "yallist": "^3.0.2" }, "dependencies": { "yallist": { @@ -9981,8 +10153,8 @@ "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", "requires": { - "os-tmpdir": "1.0.2", - "rimraf": "2.2.8" + "os-tmpdir": "^1.0.0", + "rimraf": "~2.2.6" }, "dependencies": { "rimraf": { @@ -9997,7 +10169,7 @@ "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "text-extensions": { @@ -10015,8 +10187,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "thunky": { @@ -10039,7 +10211,7 @@ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "requires": { - "setimmediate": "1.0.5" + "setimmediate": "^1.0.4" } }, "tmp": { @@ -10047,7 +10219,7 @@ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.1" } }, "to-array": { @@ -10070,7 +10242,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "to-regex": { @@ -10078,10 +10250,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -10089,8 +10261,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" }, "dependencies": { "is-number": { @@ -10098,7 +10270,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } } } @@ -10113,7 +10285,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" }, "dependencies": { "punycode": { @@ -10154,7 +10326,7 @@ "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", "requires": { - "glob": "6.0.4" + "glob": "^6.0.4" }, "dependencies": { "glob": { @@ -10162,11 +10334,11 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } } } @@ -10176,14 +10348,14 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz", "integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==", "requires": { - "arrify": "1.0.1", - "chalk": "2.4.1", - "diff": "3.5.0", - "make-error": "1.3.4", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map-support": "0.5.5", - "yn": "2.0.0" + "arrify": "^1.0.0", + "chalk": "^2.3.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.3", + "yn": "^2.0.0" }, "dependencies": { "chalk": { @@ -10191,9 +10363,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } } } @@ -10203,10 +10375,10 @@ "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", "requires": { - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map": "0.6.1", - "source-map-support": "0.5.5" + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map": "^0.6.0", + "source-map-support": "^0.5.0" }, "dependencies": { "source-map": { @@ -10226,18 +10398,18 @@ "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", "requires": { - "babel-code-frame": "6.26.0", - "builtin-modules": "1.1.1", - "chalk": "2.4.1", - "commander": "2.15.1", - "diff": "3.5.0", - "glob": "7.1.2", - "js-yaml": "3.11.0", - "minimatch": "3.0.4", - "resolve": "1.7.1", - "semver": "5.5.0", - "tslib": "1.9.0", - "tsutils": "2.22.2" + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.12.1" }, "dependencies": { "chalk": { @@ -10245,9 +10417,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } } } @@ -10257,7 +10429,7 @@ "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.22.2.tgz", "integrity": "sha512-u06FUSulCJ+Y8a2ftuqZN6kIGqdP2yJjUPEngXqmdPND4UQfb04igcotH+dw+IFr417yP6muCLE8/5/Qlfnx0w==", "requires": { - "tslib": "1.9.0" + "tslib": "^1.8.1" } }, "tty-browserify": { @@ -10270,7 +10442,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -10284,7 +10456,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-is": { @@ -10293,7 +10465,7 @@ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "requires": { "media-typer": "0.3.0", - "mime-types": "2.1.18" + "mime-types": "~2.1.18" } }, "typedarray": { @@ -10312,9 +10484,9 @@ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" } }, "uglify-to-browserify": { @@ -10328,14 +10500,14 @@ "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", "requires": { - "cacache": "10.0.4", - "find-cache-dir": "1.0.0", - "schema-utils": "0.4.5", - "serialize-javascript": "1.5.0", - "source-map": "0.6.1", - "uglify-es": "3.3.9", - "webpack-sources": "1.1.0", - "worker-farm": "1.6.0" + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" }, "dependencies": { "commander": { @@ -10353,8 +10525,8 @@ "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "requires": { - "commander": "2.13.0", - "source-map": "0.6.1" + "commander": "~2.13.0", + "source-map": "~0.6.1" } } } @@ -10369,10 +10541,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -10380,7 +10552,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -10388,10 +10560,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -10401,7 +10573,7 @@ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", "requires": { - "unique-slug": "2.0.0" + "unique-slug": "^2.0.0" } }, "unique-slug": { @@ -10409,7 +10581,7 @@ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "requires": { - "imurmurhash": "0.1.4" + "imurmurhash": "^0.1.4" } }, "unique-string": { @@ -10417,7 +10589,7 @@ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "universalify": { @@ -10435,8 +10607,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -10444,9 +10616,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -10486,16 +10658,16 @@ "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "requires": { - "boxen": "1.3.0", - "chalk": "2.2.2", - "configstore": "3.1.2", - "import-lazy": "2.1.0", - "is-ci": "1.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "upper-case": { @@ -10508,7 +10680,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", "requires": { - "punycode": "2.1.0" + "punycode": "^2.1.0" } }, "urix": { @@ -10542,9 +10714,9 @@ "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz", "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==", "requires": { - "loader-utils": "1.1.0", - "mime": "2.3.1", - "schema-utils": "0.4.5" + "loader-utils": "^1.1.0", + "mime": "^2.0.3", + "schema-utils": "^0.4.3" }, "dependencies": { "mime": { @@ -10559,8 +10731,8 @@ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz", "integrity": "sha512-ERuGxDiQ6Xw/agN4tuoCRbmwRuZP0cJ1lJxJubXr5Q/5cDa78+Dc4wfvtxzhzhkm5VvmW6Mf8EVj9SPGN4l8Lg==", "requires": { - "querystringify": "2.0.0", - "requires-port": "1.0.0" + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" }, "dependencies": { "querystringify": { @@ -10575,7 +10747,7 @@ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "use": { @@ -10583,7 +10755,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { @@ -10598,8 +10770,8 @@ "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "requires": { - "lru-cache": "4.1.2", - "tmp": "0.0.31" + "lru-cache": "4.1.x", + "tmp": "0.0.x" } }, "util": { @@ -10633,8 +10805,8 @@ "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", "requires": { - "define-properties": "1.1.2", - "object.getownpropertydescriptors": "2.0.3" + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" } }, "utila": { @@ -10657,8 +10829,8 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "validate-npm-package-name": { @@ -10666,7 +10838,7 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "requires": { - "builtins": "1.0.3" + "builtins": "^1.0.3" } }, "vary": { @@ -10679,9 +10851,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "vlq": { @@ -10707,9 +10879,9 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "requires": { - "chokidar": "2.0.3", - "graceful-fs": "4.1.11", - "neo-async": "2.5.1" + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" } }, "wbuf": { @@ -10717,7 +10889,19 @@ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "requires": { - "minimalistic-assert": "1.0.1" + "minimalistic-assert": "^1.0.0" + } + }, + "webassemblyjs": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/webassemblyjs/-/webassemblyjs-1.3.1.tgz", + "integrity": "sha512-jaqGpR+MLye6fzxKTiv0/TPEm6ma7ypef76JlQVk9E1z5M2N6EXNrsMOuh7P6aXUVFHJSioRp4N9QOFpcWfIVA==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/validation": "1.3.1", + "@webassemblyjs/wasm-parser": "1.3.1", + "@webassemblyjs/wast-parser": "1.3.1", + "long": "^3.2.0" } }, "webdriver-js-extender": { @@ -10725,8 +10909,8 @@ "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", "requires": { - "@types/selenium-webdriver": "2.53.43", - "selenium-webdriver": "2.53.3" + "@types/selenium-webdriver": "^2.53.35", + "selenium-webdriver": "^2.53.2" }, "dependencies": { "sax": { @@ -10740,9 +10924,9 @@ "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", "requires": { "adm-zip": "0.4.4", - "rimraf": "2.6.2", + "rimraf": "^2.2.8", "tmp": "0.0.24", - "ws": "1.1.2", + "ws": "^1.0.1", "xml2js": "0.4.4" } }, @@ -10756,36 +10940,39 @@ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", "requires": { - "sax": "0.6.1", - "xmlbuilder": "9.0.7" + "sax": "0.6.x", + "xmlbuilder": ">=1.0.0" } } } }, "webpack": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.6.0.tgz", - "integrity": "sha512-Fu/k/3fZeGtIhuFkiYpIy1UDHhMiGKjG4FFPVuvG+5Os2lWA1ttWpmi9Qnn6AgfZqj9MvhZW/rmj/ip+nHr06g==", - "requires": { - "acorn": "5.5.3", - "acorn-dynamic-import": "3.0.0", - "ajv": "6.4.0", - "ajv-keywords": "3.1.0", - "chrome-trace-event": "0.1.3", - "enhanced-resolve": "4.0.0", - "eslint-scope": "3.7.1", - "loader-runner": "2.3.0", - "loader-utils": "1.1.0", - "memory-fs": "0.4.1", - "micromatch": "3.1.10", - "mkdirp": "0.5.1", - "neo-async": "2.5.1", - "node-libs-browser": "2.1.0", - "schema-utils": "0.4.5", - "tapable": "1.0.0", - "uglifyjs-webpack-plugin": "1.2.5", - "watchpack": "1.6.0", - "webpack-sources": "1.1.0" + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.8.1.tgz", + "integrity": "sha512-xkxthzaVR298HmvmrjBCjiCmgzWnBnvBlgPzuvqmxWSh8QImrPvCCmr482YIx7ixWkTtQj1aMRz+cjoNPUsGEQ==", + "requires": { + "@webassemblyjs/ast": "1.3.1", + "@webassemblyjs/wasm-edit": "1.3.1", + "@webassemblyjs/wasm-parser": "1.3.1", + "acorn": "^5.0.0", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^0.1.1", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" }, "dependencies": { "arr-diff": { @@ -10803,16 +10990,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.2", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -10820,7 +11007,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -10830,13 +11017,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -10844,7 +11031,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -10852,7 +11039,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -10860,7 +11047,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -10868,7 +11055,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -10878,7 +11065,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -10886,7 +11073,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -10896,9 +11083,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" } }, "kind-of": { @@ -10913,14 +11100,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -10928,7 +11115,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -10936,7 +11123,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -10946,10 +11133,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -10957,7 +11144,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -10967,7 +11154,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -10975,7 +11162,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -10983,9 +11170,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, "is-number": { @@ -10993,7 +11180,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -11001,7 +11188,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -11021,19 +11208,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.9", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } } } @@ -11043,8 +11230,8 @@ "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", "requires": { - "source-list-map": "0.1.8", - "source-map": "0.4.4" + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" }, "dependencies": { "source-list-map": { @@ -11057,7 +11244,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -11067,13 +11254,13 @@ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", "requires": { - "loud-rejection": "1.6.0", - "memory-fs": "0.4.1", - "mime": "2.3.1", - "path-is-absolute": "1.0.1", - "range-parser": "1.2.0", - "url-join": "4.0.0", - "webpack-log": "1.2.0" + "loud-rejection": "^1.6.0", + "memory-fs": "~0.4.1", + "mime": "^2.1.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "url-join": "^4.0.0", + "webpack-log": "^1.0.1" }, "dependencies": { "mime": { @@ -11089,32 +11276,32 @@ "integrity": "sha512-itcIUDFkHuj1/QQxzUFOEXXmxOj5bku2ScLEsOFPapnq2JRTm58gPdtnBphBJOKL2+M3p6+xygL64bI+3eyzzw==", "requires": { "ansi-html": "0.0.7", - "array-includes": "3.0.3", - "bonjour": "3.5.0", - "chokidar": "2.0.3", - "compression": "1.7.2", - "connect-history-api-fallback": "1.5.0", - "debug": "3.1.0", - "del": "3.0.0", - "express": "4.16.3", - "html-entities": "1.2.1", - "http-proxy-middleware": "0.18.0", - "import-local": "1.0.0", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.18.0", + "import-local": "^1.0.0", "internal-ip": "1.2.0", - "ip": "1.1.5", - "killable": "1.0.0", - "loglevel": "1.6.1", - "opn": "5.3.0", - "portfinder": "1.0.13", - "selfsigned": "1.10.2", - "serve-index": "1.9.1", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", "sockjs": "0.3.19", "sockjs-client": "1.1.4", - "spdy": "3.4.7", - "strip-ansi": "3.0.1", - "supports-color": "5.4.0", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", "webpack-dev-middleware": "3.1.3", - "webpack-log": "1.2.0", + "webpack-log": "^1.1.2", "yargs": "11.0.0" }, "dependencies": { @@ -11133,9 +11320,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" }, "dependencies": { "strip-ansi": { @@ -11143,7 +11330,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11161,12 +11348,12 @@ "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", "requires": { - "globby": "6.1.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "p-map": "1.2.0", - "pify": "3.0.0", - "rimraf": "2.6.2" + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" } }, "globby": { @@ -11174,11 +11361,11 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "requires": { - "array-union": "1.0.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" }, "dependencies": { "pify": { @@ -11198,9 +11385,9 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "string-width": { @@ -11208,8 +11395,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "strip-ansi": { @@ -11217,7 +11404,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11237,18 +11424,18 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "9.0.2" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" } }, "yargs-parser": { @@ -11256,7 +11443,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -11266,10 +11453,10 @@ "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", "requires": { - "chalk": "2.2.2", - "log-symbols": "2.2.0", - "loglevelnext": "1.0.5", - "uuid": "3.2.1" + "chalk": "^2.1.0", + "log-symbols": "^2.1.0", + "loglevelnext": "^1.0.1", + "uuid": "^3.1.0" } }, "webpack-merge": { @@ -11277,7 +11464,7 @@ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.2.tgz", "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==", "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.5" } }, "webpack-sources": { @@ -11285,8 +11472,8 @@ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "requires": { - "source-list-map": "2.0.0", - "source-map": "0.6.1" + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" }, "dependencies": { "source-map": { @@ -11301,7 +11488,7 @@ "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.4.tgz", "integrity": "sha1-xcTj1pD50vZKlVDgeodn+Xlqpdg=", "requires": { - "webpack-core": "0.6.9" + "webpack-core": "^0.6.8" } }, "websocket-driver": { @@ -11309,8 +11496,8 @@ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", "requires": { - "http-parser-js": "0.4.12", - "websocket-extensions": "0.1.3" + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" } }, "websocket-extensions": { @@ -11328,7 +11515,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -11341,7 +11528,7 @@ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "widest-line": { @@ -11349,7 +11536,7 @@ "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "requires": { - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -11367,8 +11554,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -11376,7 +11563,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11397,7 +11584,7 @@ "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "requires": { - "errno": "0.1.7" + "errno": "~0.1.7" } }, "wrap-ansi": { @@ -11405,8 +11592,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -11419,9 +11606,9 @@ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" } }, "ws": { @@ -11429,8 +11616,8 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", "requires": { - "options": "0.0.6", - "ultron": "1.0.2" + "options": ">=0.0.5", + "ultron": "1.0.x" } }, "wtf-8": { @@ -11453,8 +11640,8 @@ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "requires": { - "sax": "1.2.4", - "xmlbuilder": "9.0.7" + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" }, "dependencies": { "sax": { @@ -11484,7 +11671,7 @@ "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", "requires": { - "cuint": "0.2.2" + "cuint": "^0.2.2" } }, "y18n": { @@ -11503,9 +11690,9 @@ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } }, @@ -11514,7 +11701,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", "requires": { - "camelcase": "3.0.0" + "camelcase": "^3.0.0" }, "dependencies": { "camelcase": { diff --git a/package.json b/package.json index f52d814d6c..67c6f5909f 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@types/webpack": "^4.1.3", "@types/webpack-sources": "^0.1.4", "ajv": "~6.4.0", - "autoprefixer": "^8.1.0", + "autoprefixer": "^8.4.1", "bootstrap": "^4.0.0", "cache-loader": "^1.2.2", "chalk": "~2.2.2", @@ -108,7 +108,7 @@ "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-source-map-support": "^1.2.0", - "less": "^3.0.2", + "less": "^3.0.4", "less-loader": "^4.1.0", "license-webpack-plugin": "^1.3.1", "loader-utils": "^1.1.0", @@ -119,16 +119,16 @@ "minimatch": "^3.0.4", "minimist": "^1.2.0", "ng-packagr": "^3.0.0-rc.2", - "node-sass": "^4.8.3", + "node-sass": "^4.9.0", "npm-registry-client": "^8.5.1", "opn": "^5.1.0", "parse5": "^4.0.0", "popper.js": "^1.14.1", "portfinder": "^1.0.13", - "postcss": "^6.0.19", + "postcss": "^6.0.22", "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.4", - "postcss-url": "^7.3.1", + "postcss-loader": "^2.1.5", + "postcss-url": "^7.3.2", "protractor": "^5.3.1", "raw-loader": "^0.5.1", "resolve": "^1.5.0", @@ -153,7 +153,7 @@ "typescript": "~2.7.2", "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", - "webpack": "~4.6.0", + "webpack": "~4.8.1", "webpack-dev-middleware": "^3.1.3", "webpack-dev-server": "^3.1.4", "webpack-merge": "^4.1.2", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 37335de120..4f8ebd86fb 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -14,7 +14,7 @@ "@angular-devkit/core": "0.0.0", "@ngtools/webpack": "0.0.0", "ajv": "~6.4.0", - "autoprefixer": "^8.1.0", + "autoprefixer": "^8.4.1", "cache-loader": "^1.2.2", "chalk": "~2.2.2", "circular-dependency-plugin": "^5.0.2", @@ -26,21 +26,21 @@ "istanbul": "^0.4.5", "istanbul-instrumenter-loader": "^3.0.1", "karma-source-map-support": "^1.2.0", - "less": "^3.0.2", + "less": "^3.0.4", "less-loader": "^4.1.0", "license-webpack-plugin": "^1.3.1", "lodash": "^4.17.4", "memory-fs": "^0.4.1", "mini-css-extract-plugin": "~0.4.0", "minimatch": "^3.0.4", - "node-sass": "^4.8.3", + "node-sass": "^4.9.0", "parse5": "^4.0.0", "opn": "^5.1.0", "portfinder": "^1.0.13", - "postcss": "^6.0.19", + "postcss": "^6.0.22", "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.4", - "postcss-url": "^7.3.1", + "postcss-loader": "^2.1.5", + "postcss-url": "^7.3.2", "raw-loader": "^0.5.1", "resolve": "^1.5.0", "rxjs": "^6.0.0", @@ -54,7 +54,7 @@ "tree-kill": "^1.2.0", "uglifyjs-webpack-plugin": "^1.2.5", "url-loader": "^1.0.1", - "webpack": "~4.6.0", + "webpack": "~4.8.1", "webpack-dev-middleware": "^3.1.3", "webpack-dev-server": "^3.1.4", "webpack-merge": "^4.1.2", From 06ea5d5c60fbdc5cba84d43c4b5d3f99f9a76e81 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 11 May 2018 12:18:20 +0100 Subject: [PATCH 582/724] test: disable progress reporting on server builder test --- .../build_angular/hello-world-app/.angular.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json index b5b4f4c05d..cd909705f8 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/.angular.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/.angular.json @@ -56,7 +56,8 @@ "options": { "outputPath": "dist-server", "main": "src/main.server.ts", - "tsConfig": "src/tsconfig.server.json" + "tsConfig": "src/tsconfig.server.json", + "progress": false } }, "app-shell": { From 238a6eabb21041338beccd1d2486f0e4caa224ce Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 11 May 2018 15:00:59 -0400 Subject: [PATCH 583/724] ci: update ngcontainer version and adjust resource usage --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07e41af77a..91a833a077 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,13 +3,13 @@ version: 2 _defaults: &defaults working_directory: ~/ng docker: - - image: angular/ngcontainer:0.1.0 + - image: angular/ngcontainer:0.3.0 _post_checkout: &post_checkout post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge" _root_package_lock_key: &_root_package_lock_key - key: angular_devkit-{{ checksum "package-lock.json" }} + key: angular_devkit-{{ checksum "package-lock.json" }}-0.3.0 jobs: install: @@ -46,6 +46,7 @@ jobs: test-large: <<: *defaults + resource_class: large steps: - checkout: *post_checkout - restore_cache: *_root_package_lock_key From 143e4cdebe5fbc7204e88a807c060ec7f73f2402 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 11 May 2018 07:48:43 -0700 Subject: [PATCH 584/724] build: remove circular dependency between workspace and core --- .../angular_devkit/core/src/workspace/workspace.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index 703dd263a4..c154b1075b 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -8,20 +8,22 @@ import { Observable, of, throwError } from 'rxjs'; import { concatMap, map, tap } from 'rxjs/operators'; +import { BaseException } from '../exception/exception'; import { JsonObject, JsonParseMode, + parseJson, + schema, +} from '../json'; +import { Path, isAbsolute, join, normalize, - parseJson, relative, resolve, - schema, virtualFs, -} from '..'; -import { BaseException } from '../exception/exception'; +} from '../virtual-fs'; import { WorkspaceProject, WorkspaceSchema, WorkspaceTool } from './workspace-schema'; From cfe47cd57f3d431b770aa65e164a737202728cae Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 11 May 2018 08:00:47 -0700 Subject: [PATCH 585/724] build: simplify exception import --- packages/angular_devkit/core/src/exception/index.ts | 9 +++++++++ packages/angular_devkit/core/src/json/parser.ts | 2 +- .../core/src/utils/partially-ordered-set.ts | 2 +- .../angular_devkit/core/src/virtual-fs/host/memory.ts | 2 +- packages/angular_devkit/core/src/virtual-fs/host/sync.ts | 2 +- packages/angular_devkit/core/src/virtual-fs/path.ts | 2 +- packages/angular_devkit/core/src/workspace/workspace.ts | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 packages/angular_devkit/core/src/exception/index.ts diff --git a/packages/angular_devkit/core/src/exception/index.ts b/packages/angular_devkit/core/src/exception/index.ts new file mode 100644 index 0000000000..b335f36dcb --- /dev/null +++ b/packages/angular_devkit/core/src/exception/index.ts @@ -0,0 +1,9 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +export * from './exception'; diff --git a/packages/angular_devkit/core/src/json/parser.ts b/packages/angular_devkit/core/src/json/parser.ts index 765b609425..1cdd008627 100644 --- a/packages/angular_devkit/core/src/json/parser.ts +++ b/packages/angular_devkit/core/src/json/parser.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '..'; +import { BaseException } from '../exception'; import { JsonArray, JsonAstArray, diff --git a/packages/angular_devkit/core/src/utils/partially-ordered-set.ts b/packages/angular_devkit/core/src/utils/partially-ordered-set.ts index 6790734374..2127f521ee 100644 --- a/packages/angular_devkit/core/src/utils/partially-ordered-set.ts +++ b/packages/angular_devkit/core/src/utils/partially-ordered-set.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '..'; +import { BaseException } from '../exception'; export class DependencyNotFoundException extends BaseException { constructor() { super('One of the dependencies is not part of the set.'); } diff --git a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts index 83e0bba3c1..161f718481 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/memory.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/memory.ts @@ -11,7 +11,7 @@ import { FileDoesNotExistException, PathIsDirectoryException, PathIsFileException, -} from '../../exception/exception'; +} from '../../exception'; import { NormalizedRoot, NormalizedSep, diff --git a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts index 22037c4973..8a0771bc2c 100644 --- a/packages/angular_devkit/core/src/virtual-fs/host/sync.ts +++ b/packages/angular_devkit/core/src/virtual-fs/host/sync.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { Observable } from 'rxjs'; -import { BaseException } from '../../exception/exception'; +import { BaseException } from '../../exception'; import { Path, PathFragment } from '../path'; import { FileBuffer, diff --git a/packages/angular_devkit/core/src/virtual-fs/path.ts b/packages/angular_devkit/core/src/virtual-fs/path.ts index efa33f2784..e7ca6b82aa 100644 --- a/packages/angular_devkit/core/src/virtual-fs/path.ts +++ b/packages/angular_devkit/core/src/virtual-fs/path.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException } from '..'; +import { BaseException } from '../exception'; export class InvalidPathException extends BaseException { diff --git a/packages/angular_devkit/core/src/workspace/workspace.ts b/packages/angular_devkit/core/src/workspace/workspace.ts index c154b1075b..ef05c5478c 100644 --- a/packages/angular_devkit/core/src/workspace/workspace.ts +++ b/packages/angular_devkit/core/src/workspace/workspace.ts @@ -8,7 +8,7 @@ import { Observable, of, throwError } from 'rxjs'; import { concatMap, map, tap } from 'rxjs/operators'; -import { BaseException } from '../exception/exception'; +import { BaseException } from '../exception'; import { JsonObject, JsonParseMode, From b530ced0e700b1571c3372bed8feacbdf4fc1363 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Fri, 11 May 2018 08:01:10 -0700 Subject: [PATCH 586/724] ci: add no circular dependency rule to tslint And fix the linting issues. --- package-lock.json | 4222 +++++++++-------- package.json | 3 +- .../angular_devkit/architect/src/architect.ts | 47 +- .../angular_devkit/architect/src/builder.ts | 50 - .../angular_devkit/architect/src/index.ts | 1 - .../schematics/src/engine/collection.ts | 29 - .../schematics/src/engine/engine.ts | 104 +- .../schematics/src/engine/index.ts | 10 + .../schematics/src/engine/interface.ts | 30 +- .../schematics/src/engine/task.ts | 108 - .../angular_devkit/schematics/src/index.ts | 11 +- .../tools/node-modules-test-engine-host.ts | 2 +- .../schematics/angular/app-shell/index.ts | 2 +- .../angular/service-worker/index.ts | 3 +- .../schematics/angular/utility/ast-utils.ts | 82 +- .../schematics/angular/utility/route-utils.ts | 90 - tslint.json | 1 + 17 files changed, 2374 insertions(+), 2421 deletions(-) delete mode 100644 packages/angular_devkit/architect/src/builder.ts delete mode 100644 packages/angular_devkit/schematics/src/engine/collection.ts create mode 100644 packages/angular_devkit/schematics/src/engine/index.ts delete mode 100644 packages/angular_devkit/schematics/src/engine/task.ts delete mode 100644 packages/schematics/angular/utility/route-utils.ts diff --git a/package-lock.json b/package-lock.json index a5cb5de894..6e2c677218 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.5.tgz", "integrity": "sha512-dJAqLU8kTkW6W84q0VH5oX06CwMX4VXKokn2sMqboOZ5iHkZWfA+lO6wTjS+1pQ2jJ4EOc2HSyBovdGo7jPbLQ==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/cdk": { @@ -17,7 +17,7 @@ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.0.0-rc.1.tgz", "integrity": "sha512-V4nJwF9uchgqi1noRSd/Jm0mZ9yzFFeYzZ5mHZ7scXo0c2sXpEclsEjsnzb6YQo4NENEig8qrjOdYI+M7bd5zQ==", "requires": { - "tslib": "^1.7.1" + "tslib": "1.9.0" } }, "@angular/common": { @@ -25,7 +25,7 @@ "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.5.tgz", "integrity": "sha512-1NKIKHz7Zqt+OOOp6lF4w/O2/iKjhhYEYpjYG7MRzwQOJmSzxK2KEpw2m80I+rF/SqGakZ46MPthAwa9XC2IBw==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/compiler": { @@ -33,7 +33,7 @@ "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.5.tgz", "integrity": "sha512-Re2oVZd2HRwkbuu5OR1pkgf3vIUZwzezLuOv/NzRgEY/v67cCeYit16Eg/0iGnwLybD3ptqrBtMls1X/ydssZA==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/compiler-cli": { @@ -41,10 +41,10 @@ "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.5.tgz", "integrity": "sha512-5awnVkoNEqVfjGGzU/K1pTbFdZ2pmbrFqlgcN0lvLpuF7MmNTFDRs/Z/aSNe1BNDZqMbJvpzSH5+GcWuY0BrjA==", "requires": { - "chokidar": "^1.4.2", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "tsickle": "^0.27.2" + "chokidar": "1.7.0", + "minimist": "1.2.0", + "reflect-metadata": "0.1.12", + "tsickle": "0.27.5" }, "dependencies": { "chokidar": { @@ -52,15 +52,15 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } } } @@ -70,7 +70,7 @@ "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.5.tgz", "integrity": "sha512-2pZ0HgLBU5BcR8+S1Ju0FLMG15W0TgVS1I7AWE+CO/4TYDsC8/WYfQFuPNZvqwEU6M9yedWKjaNQB/Xzb32Sqg==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/http": { @@ -78,7 +78,7 @@ "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.5.tgz", "integrity": "sha512-PNGL4MJ71KD3nWyRsr6SQTRhmAuuwpPFB9O29ibbwGcRvJ9d2RHlvL34GEeduNhD8RzuVV0R4DbpZv8D1F+IIA==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/material": { @@ -86,7 +86,7 @@ "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-rc.1.tgz", "integrity": "sha512-53ak9Oi3BJN0ZaYoqWHtgm0dXkmjkZrCWeOuJFy2nM0NtWObv2SUYMd7bss7bSX0GlU/gQD+aBrHF40RwfQjQw==", "requires": { - "tslib": "^1.7.1" + "tslib": "1.9.0" } }, "@angular/platform-browser": { @@ -94,7 +94,7 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.5.tgz", "integrity": "sha512-65B6mC3qkMCl7iDI8q8t7N9yj6i4gTStupi5j4VeB0TRTnlAnXBFM3fiy43svVyuQE42qVO0MrJQ3wleJmUN5g==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/platform-browser-dynamic": { @@ -102,7 +102,7 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.5.tgz", "integrity": "sha512-FvOyyhSLbFPtR1YsWX3UI7QoHutUjHE68ilcm0DVL2IOKiop7ofGHyBlUcHuy4JEWzqzHQYtXVDDk2jfI+gTMA==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/platform-server": { @@ -110,9 +110,9 @@ "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.5.tgz", "integrity": "sha512-dDOP1xHs0brp5uxt6yy04Hf2oM0W3XJfvKRY44MejYlwpyCfotbUw2t2H+Mt8suhr0vt27K/+lceZ8HevlbM1Q==", "requires": { - "domino": "^2.0.1", - "tslib": "^1.9.0", - "xhr2": "^0.1.4" + "domino": "2.0.2", + "tslib": "1.9.0", + "xhr2": "0.1.4" } }, "@angular/router": { @@ -120,7 +120,7 @@ "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.5.tgz", "integrity": "sha512-8IREGDhMVMai8l8AxlIujR2dtkEW4QKQ6Ifv5zd2R2fLEIIsGBSe+jahPpZNKAOc3Nt74HJ1gA96exFPLp0DnQ==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@angular/service-worker": { @@ -128,7 +128,7 @@ "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.5.tgz", "integrity": "sha512-8d+mhADeUt/H0Um9AwqTmBfM3ZS1EA3Bk+qf1JfGAubPrREEWx97P2Lwa7OgY+w/D5JjWbWiNDWE1SsKcSPQiQ==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "@ngtools/json-schema": { @@ -141,7 +141,7 @@ "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.3.tgz", "integrity": "sha512-gou/kWQkGPMZjdCKNZGDpqxLm9+ErG/pFZKPX4tvCjr0Xf4FCYYX3nAsu7aDVKJV3KUe27+mvqqyWT/9VZoM/A==", "requires": { - "@types/estree": "*" + "@types/estree": "0.0.39" } }, "@types/body-parser": { @@ -149,8 +149,8 @@ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", "requires": { - "@types/connect": "*", - "@types/node": "*" + "@types/connect": "3.4.32", + "@types/node": "8.10.10" } }, "@types/caseless": { @@ -163,7 +163,7 @@ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", "requires": { - "@types/node": "*" + "@types/node": "8.10.10" } }, "@types/copy-webpack-plugin": { @@ -171,8 +171,8 @@ "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", "integrity": "sha512-fX0dYslF2/WowV3vbsOYdn7GGYKLnX3bq7exG7qWVSmA/EsDYcMAvktTJY+xLbGfE/CouwWPns+ljMGCe4FCRA==", "requires": { - "@types/minimatch": "*", - "@types/webpack": "*" + "@types/minimatch": "3.0.3", + "@types/webpack": "4.1.4" } }, "@types/estree": { @@ -190,9 +190,9 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz", "integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==", "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/serve-static": "*" + "@types/body-parser": "1.17.0", + "@types/express-serve-static-core": "4.11.1", + "@types/serve-static": "1.13.1" } }, "@types/express-serve-static-core": { @@ -200,8 +200,8 @@ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz", "integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==", "requires": { - "@types/events": "*", - "@types/node": "*" + "@types/events": "1.2.0", + "@types/node": "8.10.10" } }, "@types/form-data": { @@ -209,7 +209,7 @@ "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz", "integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==", "requires": { - "@types/node": "*" + "@types/node": "8.10.10" } }, "@types/glob": { @@ -217,9 +217,9 @@ "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" + "@types/events": "1.2.0", + "@types/minimatch": "3.0.3", + "@types/node": "8.10.10" } }, "@types/istanbul": { @@ -237,8 +237,8 @@ "resolved": "https://registry.npmjs.org/@types/loader-utils/-/loader-utils-1.1.3.tgz", "integrity": "sha512-euKGFr2oCB3ASBwG39CYJMR3N9T0nanVqXdiH7Zu/Nqddt6SmFRxytq/i2w9LQYNQekEtGBz+pE3qG6fQTNvRg==", "requires": { - "@types/node": "*", - "@types/webpack": "*" + "@types/node": "8.10.10", + "@types/webpack": "4.1.4" } }, "@types/mime": { @@ -271,10 +271,10 @@ "resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.0.tgz", "integrity": "sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q==", "requires": { - "@types/caseless": "*", - "@types/form-data": "*", - "@types/node": "*", - "@types/tough-cookie": "*" + "@types/caseless": "0.12.1", + "@types/form-data": "2.2.1", + "@types/node": "8.10.10", + "@types/tough-cookie": "2.3.2" } }, "@types/selenium-webdriver": { @@ -292,8 +292,8 @@ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.1.tgz", "integrity": "sha512-jDMH+3BQPtvqZVIcsH700Dfi8Q3MIcEx16g/VdxjoqiGR/NntekB10xdBpirMKnPe9z2C5cBmL0vte0YttOr3Q==", "requires": { - "@types/express-serve-static-core": "*", - "@types/mime": "*" + "@types/express-serve-static-core": "4.11.1", + "@types/mime": "2.0.0" } }, "@types/source-list-map": { @@ -321,7 +321,7 @@ "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.2.tgz", "integrity": "sha512-o8hU2+4xsyGC27Vujoklvxl88Ew5zmJuTBYMX1Uro2rYUt4HEFJKL6fuq8aGykvS+ssIsIzerWWP2DRxonownQ==", "requires": { - "source-map": "^0.6.1" + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -336,10 +336,10 @@ "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.1.4.tgz", "integrity": "sha512-/4sQPb5QVB3kYWaNRoFmVrCkWI+PEuHPACXE79RUx/igiVd72x7hHlA7SCql9QbnjBEUEjYtpSjFDu65gybcWQ==", "requires": { - "@types/node": "*", - "@types/tapable": "*", - "@types/uglify-js": "*", - "source-map": "^0.6.0" + "@types/node": "8.10.10", + "@types/tapable": "1.0.2", + "@types/uglify-js": "3.0.2", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -354,9 +354,9 @@ "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.4.tgz", "integrity": "sha512-IMdz6ipvym7Vag2a1pkfGqONZDE84+RRqeAZxGEFvBq2el82ymla4qvUVQt6+Kj+3OLRDeHnc2jCiSYAlPnHCw==", "requires": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.6.1" + "@types/node": "8.10.10", + "@types/source-list-map": "0.1.2", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -420,7 +420,7 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.3.1.tgz", "integrity": "sha512-CgkWUXRINTGs/+Swp8COvwOk5Ci4spv1MKDdGfRecyFiLGs7wYm/p4fgRQWzBEFaotEP/ftPa9O6BFykrwghzw==", "requires": { - "leb": "^0.3.0" + "leb": "0.3.0" } }, "@webassemblyjs/validation": { @@ -444,7 +444,7 @@ "@webassemblyjs/wasm-opt": "1.3.1", "@webassemblyjs/wasm-parser": "1.3.1", "@webassemblyjs/wast-printer": "1.3.1", - "debug": "^3.1.0" + "debug": "3.1.0" }, "dependencies": { "debug": { @@ -499,7 +499,7 @@ "@webassemblyjs/floating-point-hex-parser": "1.3.1", "@webassemblyjs/helper-code-frame": "1.3.1", "@webassemblyjs/helper-fsm": "1.3.1", - "long": "^3.2.0", + "long": "3.2.0", "webassemblyjs": "1.3.1" } }, @@ -510,7 +510,7 @@ "requires": { "@webassemblyjs/ast": "1.3.1", "@webassemblyjs/wast-parser": "1.3.1", - "long": "^3.2.0" + "long": "3.2.0" } }, "JSONStream": { @@ -518,8 +518,8 @@ "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "jsonparse": "1.3.1", + "through": "2.3.8" } }, "abbrev": { @@ -532,7 +532,7 @@ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { - "mime-types": "~2.1.18", + "mime-types": "2.1.18", "negotiator": "0.6.1" } }, @@ -546,7 +546,7 @@ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "requires": { - "acorn": "^5.0.0" + "acorn": "5.5.3" } }, "adm-zip": { @@ -564,8 +564,8 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "requires": { - "extend": "~3.0.0", - "semver": "~5.0.1" + "extend": "3.0.1", + "semver": "5.0.3" }, "dependencies": { "semver": { @@ -580,10 +580,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", "requires": { - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0", - "uri-js": "^3.0.2" + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1", + "uri-js": "3.0.2" } }, "ajv-keywords": { @@ -596,9 +596,9 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -611,7 +611,7 @@ "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "requires": { - "string-width": "^2.0.0" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -629,8 +629,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -638,7 +638,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -658,7 +658,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "anymatch": { @@ -666,8 +666,8 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" } }, "app-root-path": { @@ -680,7 +680,7 @@ "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "1.0.0" } }, "aproba": { @@ -693,8 +693,8 @@ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "argparse": { @@ -702,7 +702,7 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" }, "dependencies": { "sprintf-js": { @@ -717,7 +717,7 @@ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "arr-flatten": { @@ -755,8 +755,8 @@ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "1.1.2", + "es-abstract": "1.11.0" } }, "array-map": { @@ -779,7 +779,7 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -817,9 +817,9 @@ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "assert": { @@ -870,12 +870,12 @@ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.4.1.tgz", "integrity": "sha512-YqUclCBDXUT9Y7aQ8Xv+ja8yhTZYJoMsOD7WS++gZIJLCpCu+gPcKGDlhk6S3WxhLkTcNVdaMZAWys2nzZCH7g==", "requires": { - "browserslist": "^3.2.6", - "caniuse-lite": "^1.0.30000832", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.22", - "postcss-value-parser": "^3.2.3" + "browserslist": "3.2.6", + "caniuse-lite": "1.0.30000839", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.22", + "postcss-value-parser": "3.3.0" }, "dependencies": { "caniuse-lite": { @@ -900,9 +900,9 @@ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" }, "dependencies": { "ansi-styles": { @@ -915,11 +915,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -934,14 +934,14 @@ "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -956,7 +956,7 @@ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-runtime": { @@ -964,8 +964,8 @@ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -973,11 +973,11 @@ "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.10" } }, "babel-traverse": { @@ -985,15 +985,15 @@ "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" } }, "babel-types": { @@ -1001,10 +1001,10 @@ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -1027,13 +1027,13 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -1041,7 +1041,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -1049,7 +1049,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -1057,7 +1057,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -1065,9 +1065,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "isobject": { @@ -1108,7 +1108,7 @@ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "tweetnacl": "0.14.5" } }, "better-assert": { @@ -1139,7 +1139,7 @@ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "requires": { - "inherits": "~2.0.0" + "inherits": "2.0.3" } }, "blocking-proxy": { @@ -1147,7 +1147,7 @@ "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", "requires": { - "minimist": "^1.2.0" + "minimist": "1.2.0" } }, "bluebird": { @@ -1166,15 +1166,15 @@ "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", "requires": { "bytes": "3.0.0", - "content-type": "~1.0.4", + "content-type": "1.0.4", "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", + "depd": "1.1.2", + "http-errors": "1.6.3", "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", + "on-finished": "2.3.0", "qs": "6.5.1", "raw-body": "2.3.2", - "type-is": "~1.6.15" + "type-is": "1.6.16" } }, "bonjour": { @@ -1182,12 +1182,12 @@ "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" + "array-flatten": "2.1.1", + "deep-equal": "1.0.1", + "dns-equal": "1.0.0", + "dns-txt": "2.0.2", + "multicast-dns": "6.2.3", + "multicast-dns-service-types": "1.1.0" }, "dependencies": { "array-flatten": { @@ -1207,7 +1207,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "hoek": "4.x.x" + "hoek": "4.2.1" } }, "bootstrap": { @@ -1220,13 +1220,13 @@ "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.2.2", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" }, "dependencies": { "ansi-regex": { @@ -1249,8 +1249,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -1258,7 +1258,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -1268,7 +1268,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -1277,9 +1277,9 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "brorand": { @@ -1292,12 +1292,12 @@ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "browserify-cipher": { @@ -1305,9 +1305,9 @@ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", + "evp_bytestokey": "1.0.3" } }, "browserify-des": { @@ -1315,9 +1315,9 @@ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" } }, "browserify-rsa": { @@ -1325,8 +1325,8 @@ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "bn.js": "4.11.8", + "randombytes": "2.0.6" } }, "browserify-sign": { @@ -1334,13 +1334,13 @@ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" } }, "browserify-zlib": { @@ -1348,7 +1348,7 @@ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "requires": { - "pako": "~1.0.5" + "pako": "1.0.6" } }, "browserslist": { @@ -1356,8 +1356,8 @@ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.6.tgz", "integrity": "sha512-XCsMSg9V4S1VRdcp265dJ+8kBRjfuFXcavbisY7G6T9QI0H1Z24PP53vvs0WDYWqm38Mco1ILDtafcS8ZR4xiw==", "requires": { - "caniuse-lite": "^1.0.30000830", - "electron-to-chromium": "^1.3.42" + "caniuse-lite": "1.0.30000830", + "electron-to-chromium": "1.3.44" } }, "buffer": { @@ -1365,9 +1365,9 @@ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" } }, "buffer-crc32": { @@ -1415,19 +1415,19 @@ "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.2", + "mississippi": "2.0.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.3.0", + "unique-filename": "1.1.0", + "y18n": "4.0.0" } }, "cache-base": { @@ -1435,15 +1435,15 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" }, "dependencies": { "isobject": { @@ -1458,10 +1458,10 @@ "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", "requires": { - "loader-utils": "^1.1.0", - "mkdirp": "^0.5.1", - "neo-async": "^2.5.0", - "schema-utils": "^0.4.2" + "loader-utils": "1.1.0", + "mkdirp": "0.5.1", + "neo-async": "2.5.1", + "schema-utils": "0.4.5" } }, "callsite": { @@ -1474,8 +1474,8 @@ "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" + "no-case": "2.3.2", + "upper-case": "1.1.3" } }, "camelcase": { @@ -1489,9 +1489,9 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" + "camelcase": "4.1.0", + "map-obj": "2.0.0", + "quick-lru": "1.1.0" }, "dependencies": { "camelcase": { @@ -1522,8 +1522,8 @@ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -1531,9 +1531,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.2.tgz", "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", "requires": { - "ansi-styles": "^3.1.0", - "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" }, "dependencies": { "has-flag": { @@ -1546,7 +1546,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "requires": { - "has-flag": "^2.0.0" + "has-flag": "2.0.0" } } } @@ -1556,18 +1556,18 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.1.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.0" + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.2.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.5" }, "dependencies": { "anymatch": { @@ -1575,8 +1575,8 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "micromatch": "3.1.10", + "normalize-path": "2.1.1" } }, "arr-diff": { @@ -1594,16 +1594,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -1611,7 +1611,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1621,13 +1621,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -1635,7 +1635,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -1643,7 +1643,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -1651,7 +1651,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1659,7 +1659,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1669,7 +1669,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1677,7 +1677,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1687,9 +1687,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" } }, "kind-of": { @@ -1704,14 +1704,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -1719,7 +1719,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -1727,7 +1727,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1737,10 +1737,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -1748,7 +1748,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1758,8 +1758,8 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" }, "dependencies": { "is-glob": { @@ -1767,7 +1767,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } } } @@ -1777,7 +1777,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -1785,7 +1785,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -1793,9 +1793,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-extglob": { @@ -1808,7 +1808,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-number": { @@ -1816,7 +1816,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1824,7 +1824,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1844,19 +1844,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } } } @@ -1881,8 +1881,8 @@ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "circular-dependency-plugin": { @@ -1895,10 +1895,10 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -1906,7 +1906,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "isobject": { @@ -1921,7 +1921,7 @@ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "requires": { - "source-map": "0.5.x" + "source-map": "0.5.7" } }, "cli-boxes": { @@ -1935,8 +1935,8 @@ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -1958,10 +1958,10 @@ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" + "for-own": "1.0.0", + "is-plain-object": "2.0.4", + "kind-of": "6.0.2", + "shallow-clone": "1.0.0" }, "dependencies": { "for-own": { @@ -1969,7 +1969,7 @@ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "kind-of": { @@ -1994,12 +1994,12 @@ "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.3.0.tgz", "integrity": "sha512-RLMrtLwrBS0dfo2/KTP+2NHofCpzcuh0bEp/A/naqvQonbUL4AW/qWQdbpn8dMNudtpmzEx9eS8KEpGdVPg1BA==", "requires": { - "app-root-path": "^2.0.1", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.0.3" + "app-root-path": "2.0.1", + "css-selector-tokenizer": "0.7.0", + "cssauron": "1.4.0", + "semver-dsl": "1.0.1", + "source-map": "0.5.7", + "sprintf-js": "1.1.1" } }, "collection-visit": { @@ -2007,8 +2007,8 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "color-convert": { @@ -2016,7 +2016,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "requires": { - "color-name": "^1.1.1" + "color-name": "1.1.3" } }, "color-name": { @@ -2034,7 +2034,7 @@ "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", "requires": { - "lodash": "^4.5.0" + "lodash": "4.17.10" } }, "combined-stream": { @@ -2042,7 +2042,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "~1.0.0" + "delayed-stream": "1.0.0" } }, "commander": { @@ -2060,8 +2060,8 @@ "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^3.0.0" + "array-ify": "1.0.0", + "dot-prop": "3.0.0" } }, "compare-versions": { @@ -2089,7 +2089,7 @@ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", "requires": { - "mime-db": ">= 1.33.0 < 2" + "mime-db": "1.33.0" } }, "compression": { @@ -2097,13 +2097,13 @@ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "requires": { - "accepts": "~1.3.4", + "accepts": "1.3.5", "bytes": "3.0.0", - "compressible": "~2.0.13", + "compressible": "2.0.13", "debug": "2.6.9", - "on-headers": "~1.0.1", + "on-headers": "1.0.1", "safe-buffer": "5.1.1", - "vary": "~1.1.2" + "vary": "1.1.2" }, "dependencies": { "safe-buffer": { @@ -2123,10 +2123,10 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, "configstore": { @@ -2134,12 +2134,12 @@ "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "dot-prop": "4.2.0", + "graceful-fs": "4.1.11", + "make-dir": "1.2.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" }, "dependencies": { "dot-prop": { @@ -2147,7 +2147,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { - "is-obj": "^1.0.0" + "is-obj": "1.0.1" } } } @@ -2159,7 +2159,7 @@ "requires": { "debug": "2.6.9", "finalhandler": "1.1.0", - "parseurl": "~1.3.2", + "parseurl": "1.3.2", "utils-merge": "1.0.1" }, "dependencies": { @@ -2169,12 +2169,12 @@ "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" } }, "statuses": { @@ -2194,7 +2194,7 @@ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "requires": { - "date-now": "^0.1.4" + "date-now": "0.1.4" } }, "console-control-strings": { @@ -2222,17 +2222,17 @@ "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.24.tgz", "integrity": "sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q==", "requires": { - "conventional-changelog-angular": "^1.6.6", - "conventional-changelog-atom": "^0.2.8", - "conventional-changelog-codemirror": "^0.3.8", - "conventional-changelog-core": "^2.0.11", - "conventional-changelog-ember": "^0.3.12", - "conventional-changelog-eslint": "^1.0.9", - "conventional-changelog-express": "^0.3.6", - "conventional-changelog-jquery": "^0.1.0", - "conventional-changelog-jscs": "^0.1.0", - "conventional-changelog-jshint": "^0.3.8", - "conventional-changelog-preset-loader": "^1.1.8" + "conventional-changelog-angular": "1.6.6", + "conventional-changelog-atom": "0.2.8", + "conventional-changelog-codemirror": "0.3.8", + "conventional-changelog-core": "2.0.11", + "conventional-changelog-ember": "0.3.12", + "conventional-changelog-eslint": "1.0.9", + "conventional-changelog-express": "0.3.6", + "conventional-changelog-jquery": "0.1.0", + "conventional-changelog-jscs": "0.1.0", + "conventional-changelog-jshint": "0.3.8", + "conventional-changelog-preset-loader": "1.1.8" } }, "conventional-changelog-angular": { @@ -2240,8 +2240,8 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", "requires": { - "compare-func": "^1.3.1", - "q": "^1.5.1" + "compare-func": "1.3.2", + "q": "1.5.1" } }, "conventional-changelog-atom": { @@ -2249,7 +2249,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz", "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==", "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-codemirror": { @@ -2257,7 +2257,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz", "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==", "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-core": { @@ -2265,19 +2265,19 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz", "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==", "requires": { - "conventional-changelog-writer": "^3.0.9", - "conventional-commits-parser": "^2.1.7", - "dateformat": "^3.0.0", - "get-pkg-repo": "^1.0.0", - "git-raw-commits": "^1.3.6", - "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^1.3.6", - "lodash": "^4.2.1", - "normalize-package-data": "^2.3.5", - "q": "^1.5.1", - "read-pkg": "^1.1.0", - "read-pkg-up": "^1.0.1", - "through2": "^2.0.0" + "conventional-changelog-writer": "3.0.9", + "conventional-commits-parser": "2.1.7", + "dateformat": "3.0.3", + "get-pkg-repo": "1.4.0", + "git-raw-commits": "1.3.6", + "git-remote-origin-url": "2.0.0", + "git-semver-tags": "1.3.6", + "lodash": "4.17.10", + "normalize-package-data": "2.4.0", + "q": "1.5.1", + "read-pkg": "1.1.0", + "read-pkg-up": "1.0.1", + "through2": "2.0.3" } }, "conventional-changelog-ember": { @@ -2285,7 +2285,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz", "integrity": "sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ==", "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-eslint": { @@ -2293,7 +2293,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz", "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==", "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-express": { @@ -2301,7 +2301,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz", "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==", "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-jquery": { @@ -2309,7 +2309,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", "requires": { - "q": "^1.4.1" + "q": "1.5.1" } }, "conventional-changelog-jscs": { @@ -2317,7 +2317,7 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", "requires": { - "q": "^1.4.1" + "q": "1.5.1" } }, "conventional-changelog-jshint": { @@ -2325,8 +2325,8 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz", "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==", "requires": { - "compare-func": "^1.3.1", - "q": "^1.5.1" + "compare-func": "1.3.2", + "q": "1.5.1" } }, "conventional-changelog-preset-loader": { @@ -2339,16 +2339,16 @@ "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==", "requires": { - "compare-func": "^1.3.1", - "conventional-commits-filter": "^1.1.6", - "dateformat": "^3.0.0", - "handlebars": "^4.0.2", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "semver": "^5.5.0", - "split": "^1.0.0", - "through2": "^2.0.0" + "compare-func": "1.3.2", + "conventional-commits-filter": "1.1.6", + "dateformat": "3.0.3", + "handlebars": "4.0.11", + "json-stringify-safe": "5.0.1", + "lodash": "4.17.10", + "meow": "4.0.1", + "semver": "5.5.0", + "split": "1.0.1", + "through2": "2.0.3" } }, "conventional-commits-filter": { @@ -2356,8 +2356,8 @@ "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==", "requires": { - "is-subset": "^0.1.1", - "modify-values": "^1.0.0" + "is-subset": "0.1.1", + "modify-values": "1.0.1" } }, "conventional-commits-parser": { @@ -2365,13 +2365,13 @@ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", "requires": { - "JSONStream": "^1.0.4", - "is-text-path": "^1.0.0", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "split2": "^2.0.0", - "through2": "^2.0.0", - "trim-off-newlines": "^1.0.0" + "JSONStream": "1.3.2", + "is-text-path": "1.0.1", + "lodash": "4.17.10", + "meow": "4.0.1", + "split2": "2.2.0", + "through2": "2.0.3", + "trim-off-newlines": "1.0.1" } }, "convert-source-map": { @@ -2394,12 +2394,12 @@ "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, "copy-descriptor": { @@ -2412,14 +2412,14 @@ "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "globby": "7.1.1", + "is-glob": "4.0.0", + "loader-utils": "1.1.0", + "minimatch": "3.0.4", + "p-limit": "1.2.0", + "serialize-javascript": "1.5.0" }, "dependencies": { "is-extglob": { @@ -2432,7 +2432,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } } } @@ -2452,13 +2452,13 @@ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.4.3", - "minimist": "^1.2.0", - "object-assign": "^4.1.0", - "os-homedir": "^1.0.1", - "parse-json": "^2.2.0", - "require-from-string": "^1.1.0" + "is-directory": "0.3.1", + "js-yaml": "3.11.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "require-from-string": "1.2.1" }, "dependencies": { "parse-json": { @@ -2466,7 +2466,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } } } @@ -2476,17 +2476,17 @@ "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", "requires": { - "babel-runtime": "^6.9.2", - "chokidar": "^1.6.0", - "duplexer": "^0.1.1", - "glob": "^7.0.5", - "glob2base": "^0.0.12", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "resolve": "^1.1.7", - "safe-buffer": "^5.0.1", - "shell-quote": "^1.6.1", - "subarg": "^1.0.0" + "babel-runtime": "6.26.0", + "chokidar": "1.7.0", + "duplexer": "0.1.1", + "glob": "7.1.2", + "glob2base": "0.0.12", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "resolve": "1.7.1", + "safe-buffer": "5.1.2", + "shell-quote": "1.6.1", + "subarg": "1.0.0" }, "dependencies": { "chokidar": { @@ -2494,15 +2494,15 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } } } @@ -2512,8 +2512,8 @@ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "bn.js": "4.11.8", + "elliptic": "6.4.0" } }, "create-error-class": { @@ -2521,7 +2521,7 @@ "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "requires": { - "capture-stack-trace": "^1.0.0" + "capture-stack-trace": "1.0.0" } }, "create-hash": { @@ -2529,11 +2529,11 @@ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" } }, "create-hmac": { @@ -2541,12 +2541,12 @@ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" } }, "cross-spawn": { @@ -2554,8 +2554,8 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "lru-cache": "4.1.2", + "which": "1.3.0" } }, "cryptiles": { @@ -2563,7 +2563,7 @@ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "requires": { - "boom": "5.x.x" + "boom": "5.2.0" }, "dependencies": { "boom": { @@ -2571,7 +2571,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "requires": { - "hoek": "4.x.x" + "hoek": "4.2.1" } } } @@ -2581,17 +2581,17 @@ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.3", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" } }, "crypto-random-string": { @@ -2609,10 +2609,10 @@ "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", + "boolbase": "1.0.0", + "css-what": "2.1.0", "domutils": "1.5.1", - "nth-check": "~1.0.1" + "nth-check": "1.0.1" } }, "css-selector-tokenizer": { @@ -2620,9 +2620,9 @@ "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" + "cssesc": "0.1.0", + "fastparse": "1.1.1", + "regexpu-core": "1.0.0" } }, "css-what": { @@ -2635,7 +2635,7 @@ "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", "requires": { - "through": "X.X.X" + "through": "2.3.8" } }, "cssesc": { @@ -2653,7 +2653,7 @@ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "requires": { - "array-find-index": "^1.0.1" + "array-find-index": "1.0.2" } }, "custom-event": { @@ -2671,7 +2671,7 @@ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "0.10.42" } }, "dargs": { @@ -2679,7 +2679,7 @@ "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "dashdash": { @@ -2687,7 +2687,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "date-now": { @@ -2700,7 +2700,7 @@ "resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "requires": { - "time-zone": "^1.0.0" + "time-zone": "1.0.0" } }, "dateformat": { @@ -2732,8 +2732,8 @@ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" + "decamelize": "1.2.0", + "map-obj": "1.0.1" }, "dependencies": { "map-obj": { @@ -2768,7 +2768,7 @@ "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "2.0.0" }, "dependencies": { "strip-bom": { @@ -2776,7 +2776,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } } } @@ -2786,8 +2786,8 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "foreach": "2.0.5", + "object-keys": "1.0.11" } }, "define-property": { @@ -2795,8 +2795,8 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -2804,7 +2804,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -2812,7 +2812,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -2820,9 +2820,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "isobject": { @@ -2842,13 +2842,13 @@ "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" }, "dependencies": { "globby": { @@ -2856,12 +2856,12 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -2891,8 +2891,8 @@ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "destroy": { @@ -2905,7 +2905,7 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "detect-node": { @@ -2919,8 +2919,8 @@ "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", "dev": true, "requires": { - "asap": "^2.0.0", - "wrappy": "1" + "asap": "2.0.6", + "wrappy": "1.0.2" } }, "di": { @@ -2938,9 +2938,9 @@ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" } }, "dir-glob": { @@ -2948,8 +2948,8 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" + "arrify": "1.0.1", + "path-type": "3.0.0" } }, "dns-equal": { @@ -2962,8 +2962,8 @@ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" + "ip": "1.1.5", + "safe-buffer": "5.1.2" } }, "dns-txt": { @@ -2971,7 +2971,7 @@ "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", "requires": { - "buffer-indexof": "^1.0.0" + "buffer-indexof": "1.1.1" } }, "dom-converter": { @@ -2979,7 +2979,7 @@ "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", "requires": { - "utila": "~0.3" + "utila": "0.3.3" }, "dependencies": { "utila": { @@ -2994,10 +2994,10 @@ "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" + "custom-event": "1.0.1", + "ent": "2.2.0", + "extend": "3.0.1", + "void-elements": "2.0.1" } }, "dom-serializer": { @@ -3005,8 +3005,8 @@ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" + "domelementtype": "1.1.3", + "entities": "1.1.1" }, "dependencies": { "domelementtype": { @@ -3031,7 +3031,7 @@ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", "requires": { - "domelementtype": "1" + "domelementtype": "1.3.0" } }, "domino": { @@ -3044,8 +3044,8 @@ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" } }, "dot-prop": { @@ -3053,7 +3053,7 @@ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", "requires": { - "is-obj": "^1.0.0" + "is-obj": "1.0.1" } }, "duplexer": { @@ -3071,10 +3071,10 @@ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" } }, "ecc-jsbn": { @@ -3083,7 +3083,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "0.1.1" } }, "ee-first": { @@ -3106,13 +3106,13 @@ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "emojis-list": { @@ -3130,7 +3130,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { - "once": "^1.4.0" + "once": "1.4.0" } }, "engine.io": { @@ -3151,7 +3151,7 @@ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", "requires": { - "mime-types": "~2.1.11", + "mime-types": "2.1.18", "negotiator": "0.6.1" } }, @@ -3222,9 +3222,9 @@ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "tapable": "1.0.0" } }, "ent": { @@ -3242,7 +3242,7 @@ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "requires": { - "prr": "~1.0.1" + "prr": "1.0.1" } }, "error-ex": { @@ -3250,7 +3250,7 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "es-abstract": { @@ -3258,11 +3258,11 @@ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.1", + "is-callable": "1.1.3", + "is-regex": "1.0.4" } }, "es-to-primitive": { @@ -3270,9 +3270,9 @@ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" } }, "es5-ext": { @@ -3280,9 +3280,9 @@ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" } }, "es6-iterator": { @@ -3290,9 +3290,9 @@ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-symbol": "3.1.1" } }, "es6-promise": { @@ -3305,8 +3305,8 @@ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "1.0.0", + "es5-ext": "0.10.42" } }, "escape-html": { @@ -3324,11 +3324,11 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" + "esprima": "2.7.3", + "estraverse": "1.9.3", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.2.0" }, "dependencies": { "source-map": { @@ -3337,7 +3337,7 @@ "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", "optional": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -3347,8 +3347,8 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" }, "dependencies": { "estraverse": { @@ -3368,7 +3368,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { - "estraverse": "^4.1.0" + "estraverse": "4.2.0" }, "dependencies": { "estraverse": { @@ -3413,7 +3413,7 @@ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", "requires": { - "original": ">=0.0.5" + "original": "1.0.0" } }, "evp_bytestokey": { @@ -3421,8 +3421,8 @@ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "md5.js": "1.3.4", + "safe-buffer": "5.1.2" } }, "execa": { @@ -3430,13 +3430,13 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" }, "dependencies": { "cross-spawn": { @@ -3444,9 +3444,9 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" } } } @@ -3461,9 +3461,9 @@ "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" + "array-slice": "0.2.3", + "array-unique": "0.2.1", + "braces": "0.1.5" }, "dependencies": { "braces": { @@ -3471,7 +3471,7 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", "requires": { - "expand-range": "^0.1.0" + "expand-range": "0.1.1" } }, "expand-range": { @@ -3479,8 +3479,8 @@ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" + "is-number": "0.1.1", + "repeat-string": "0.2.2" } }, "is-number": { @@ -3500,7 +3500,7 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "expand-range": { @@ -3508,7 +3508,7 @@ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.3" } }, "express": { @@ -3516,36 +3516,36 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", "requires": { - "accepts": "~1.3.5", + "accepts": "1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.2", "content-disposition": "0.5.2", - "content-type": "~1.0.4", + "content-type": "1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", + "depd": "1.1.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", "finalhandler": "1.1.1", "fresh": "0.5.2", "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", + "proxy-addr": "2.0.3", "qs": "6.5.1", - "range-parser": "~1.2.0", + "range-parser": "1.2.0", "safe-buffer": "5.1.1", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", + "statuses": "1.4.0", + "type-is": "1.6.16", "utils-merge": "1.0.1", - "vary": "~1.1.2" + "vary": "1.1.2" }, "dependencies": { "safe-buffer": { @@ -3565,8 +3565,8 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -3574,7 +3574,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -3584,7 +3584,7 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "extsprintf": { @@ -3617,7 +3617,7 @@ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", "requires": { - "websocket-driver": ">=0.5.1" + "websocket-driver": "0.7.0" } }, "file-loader": { @@ -3625,8 +3625,8 @@ "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^0.4.5" + "loader-utils": "1.1.0", + "schema-utils": "0.4.5" } }, "filename-regex": { @@ -3639,8 +3639,8 @@ "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" + "glob": "7.1.2", + "minimatch": "3.0.4" } }, "fill-range": { @@ -3648,11 +3648,11 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "finalhandler": { @@ -3661,12 +3661,12 @@ "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.4.0", + "unpipe": "1.0.0" } }, "find-cache-dir": { @@ -3674,9 +3674,9 @@ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "commondir": "1.0.1", + "make-dir": "1.2.0", + "pkg-dir": "2.0.0" } }, "find-index": { @@ -3694,7 +3694,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "flush-write-stream": { @@ -3702,8 +3702,8 @@ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "follow-redirects": { @@ -3711,7 +3711,7 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", "requires": { - "debug": "^3.1.0" + "debug": "3.1.0" }, "dependencies": { "debug": { @@ -3739,7 +3739,7 @@ "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "foreach": { @@ -3757,9 +3757,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "^0.4.0", + "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "^2.1.12" + "mime-types": "2.1.18" } }, "forwarded": { @@ -3772,7 +3772,7 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "fresh": { @@ -3785,8 +3785,8 @@ "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "fs-access": { @@ -3794,7 +3794,7 @@ "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "requires": { - "null-check": "^1.0.0" + "null-check": "1.0.0" } }, "fs-extra": { @@ -3802,9 +3802,9 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" } }, "fs-write-stream-atomic": { @@ -3812,10 +3812,10 @@ "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.6" } }, "fs.realpath": { @@ -3829,8 +3829,8 @@ "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.9.0" + "nan": "2.10.0", + "node-pre-gyp": "0.9.1" }, "dependencies": { "abbrev": { @@ -3852,8 +3852,8 @@ "bundled": true, "optional": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "balanced-match": { @@ -3864,7 +3864,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -3918,7 +3918,7 @@ "bundled": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "fs.realpath": { @@ -3931,14 +3931,14 @@ "bundled": true, "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" } }, "glob": { @@ -3946,12 +3946,12 @@ "bundled": true, "optional": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-unicode": { @@ -3964,7 +3964,7 @@ "bundled": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": "2.1.2" } }, "ignore-walk": { @@ -3972,7 +3972,7 @@ "bundled": true, "optional": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { @@ -3980,8 +3980,8 @@ "bundled": true, "optional": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -3997,7 +3997,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { @@ -4009,7 +4009,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -4020,8 +4020,8 @@ "version": "2.2.4", "bundled": true, "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, "minizlib": { @@ -4029,7 +4029,7 @@ "bundled": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "mkdirp": { @@ -4049,9 +4049,9 @@ "bundled": true, "optional": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" } }, "node-pre-gyp": { @@ -4059,16 +4059,16 @@ "bundled": true, "optional": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" } }, "nopt": { @@ -4076,8 +4076,8 @@ "bundled": true, "optional": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { @@ -4090,8 +4090,8 @@ "bundled": true, "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { @@ -4099,10 +4099,10 @@ "bundled": true, "optional": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "number-is-nan": { @@ -4118,7 +4118,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-homedir": { @@ -4136,8 +4136,8 @@ "bundled": true, "optional": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { @@ -4155,10 +4155,10 @@ "bundled": true, "optional": true, "requires": { - "deep-extend": "~0.4.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { "minimist": { @@ -4173,13 +4173,13 @@ "bundled": true, "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "rimraf": { @@ -4187,7 +4187,7 @@ "bundled": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-buffer": { @@ -4223,9 +4223,9 @@ "version": "1.0.2", "bundled": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { @@ -4233,14 +4233,14 @@ "bundled": true, "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { @@ -4253,13 +4253,13 @@ "bundled": true, "optional": true, "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, "util-deprecate": { @@ -4272,7 +4272,7 @@ "bundled": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "1.0.2" } }, "wrappy": { @@ -4290,10 +4290,10 @@ "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" } }, "function-bind": { @@ -4306,14 +4306,14 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" } }, "gaze": { @@ -4321,7 +4321,7 @@ "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", "requires": { - "globule": "^1.0.0" + "globule": "1.2.0" } }, "generate-function": { @@ -4334,7 +4334,7 @@ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "requires": { - "is-property": "^1.0.0" + "is-property": "1.0.2" } }, "get-caller-file": { @@ -4347,11 +4347,11 @@ "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", "requires": { - "hosted-git-info": "^2.1.4", - "meow": "^3.3.0", - "normalize-package-data": "^2.3.0", - "parse-github-repo-url": "^1.3.0", - "through2": "^2.0.0" + "hosted-git-info": "2.6.0", + "meow": "3.7.0", + "normalize-package-data": "2.4.0", + "parse-github-repo-url": "1.4.1", + "through2": "2.0.3" }, "dependencies": { "camelcase": { @@ -4364,8 +4364,8 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, "indent-string": { @@ -4373,7 +4373,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "map-obj": { @@ -4386,16 +4386,16 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } }, "redent": { @@ -4403,8 +4403,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" } }, "strip-indent": { @@ -4412,7 +4412,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "trim-newlines": { @@ -4442,7 +4442,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "git-raw-commits": { @@ -4450,11 +4450,11 @@ "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", "requires": { - "dargs": "^4.0.1", - "lodash.template": "^4.0.2", - "meow": "^4.0.0", - "split2": "^2.0.0", - "through2": "^2.0.0" + "dargs": "4.1.0", + "lodash.template": "4.4.0", + "meow": "4.0.1", + "split2": "2.2.0", + "through2": "2.0.3" } }, "git-remote-origin-url": { @@ -4462,8 +4462,8 @@ "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", "requires": { - "gitconfiglocal": "^1.0.0", - "pify": "^2.3.0" + "gitconfiglocal": "1.0.0", + "pify": "2.3.0" }, "dependencies": { "pify": { @@ -4478,8 +4478,8 @@ "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==", "requires": { - "meow": "^4.0.0", - "semver": "^5.5.0" + "meow": "4.0.1", + "semver": "5.5.0" } }, "gitconfiglocal": { @@ -4487,7 +4487,7 @@ "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", "requires": { - "ini": "^1.3.2" + "ini": "1.3.5" } }, "glob": { @@ -4495,12 +4495,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-base": { @@ -4508,8 +4508,8 @@ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" } }, "glob-parent": { @@ -4517,7 +4517,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "glob2base": { @@ -4525,7 +4525,7 @@ "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", "requires": { - "find-index": "^0.1.1" + "find-index": "0.1.1" } }, "global-dirs": { @@ -4533,7 +4533,7 @@ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "requires": { - "ini": "^1.3.4" + "ini": "1.3.5" } }, "globals": { @@ -4546,12 +4546,12 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.8", + "pify": "3.0.0", + "slash": "1.0.0" } }, "globule": { @@ -4559,9 +4559,9 @@ "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.4", - "minimatch": "~3.0.2" + "glob": "7.1.2", + "lodash": "4.17.10", + "minimatch": "3.0.4" } }, "got": { @@ -4569,17 +4569,17 @@ "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" } }, "graceful-fs": { @@ -4597,10 +4597,10 @@ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -4608,7 +4608,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -4623,8 +4623,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" + "ajv": "5.5.2", + "har-schema": "2.0.0" }, "dependencies": { "ajv": { @@ -4632,10 +4632,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } } } @@ -4645,7 +4645,7 @@ "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "requires": { - "function-bind": "^1.0.2" + "function-bind": "1.1.1" } }, "has-ansi": { @@ -4653,7 +4653,7 @@ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-binary": { @@ -4696,9 +4696,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -4713,8 +4713,8 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "is-number": { @@ -4722,7 +4722,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4730,7 +4730,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4740,7 +4740,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4750,8 +4750,8 @@ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "hash.js": { @@ -4759,8 +4759,8 @@ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "hawk": { @@ -4768,10 +4768,10 @@ "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "requires": { - "boom": "4.x.x", - "cryptiles": "3.x.x", - "hoek": "4.x.x", - "sntp": "2.x.x" + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" } }, "he": { @@ -4784,9 +4784,9 @@ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "hoek": { @@ -4804,10 +4804,10 @@ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" + "inherits": "2.0.3", + "obuf": "1.1.2", + "readable-stream": "2.3.6", + "wbuf": "1.7.3" } }, "html-entities": { @@ -4820,13 +4820,13 @@ "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.15.tgz", "integrity": "sha512-OZa4rfb6tZOZ3Z8Xf0jKxXkiDcFWldQePGYFDcgKqES2sXeWaEv9y6QQvWUtX3ySI3feApQi5uCsHLINQ6NoAw==", "requires": { - "camel-case": "3.0.x", - "clean-css": "4.1.x", - "commander": "2.15.x", - "he": "1.1.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.3.x" + "camel-case": "3.0.0", + "clean-css": "4.1.11", + "commander": "2.15.1", + "he": "1.1.1", + "param-case": "2.1.1", + "relateurl": "0.2.7", + "uglify-js": "3.3.22" }, "dependencies": { "source-map": { @@ -4839,8 +4839,8 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { - "commander": "~2.15.0", - "source-map": "~0.6.1" + "commander": "2.15.1", + "source-map": "0.6.1" } } } @@ -4850,12 +4850,12 @@ "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", + "html-minifier": "3.5.15", + "loader-utils": "0.2.17", + "lodash": "4.17.10", + "pretty-error": "2.1.1", + "tapable": "1.0.0", + "toposort": "1.0.6", "util.promisify": "1.0.0" }, "dependencies": { @@ -4877,10 +4877,10 @@ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", "requires": { - "domelementtype": "1", - "domhandler": "2.1", - "domutils": "1.1", - "readable-stream": "1.0" + "domelementtype": "1.3.0", + "domhandler": "2.1.0", + "domutils": "1.1.6", + "readable-stream": "1.0.34" }, "dependencies": { "domutils": { @@ -4888,7 +4888,7 @@ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", "requires": { - "domelementtype": "1" + "domelementtype": "1.3.0" } }, "isarray": { @@ -4901,10 +4901,10 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -4924,10 +4924,10 @@ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { - "depd": "~1.1.2", + "depd": "1.1.2", "inherits": "2.0.3", "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "statuses": "1.4.0" } }, "http-parser-js": { @@ -4940,9 +4940,9 @@ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" + "eventemitter3": "3.1.0", + "follow-redirects": "1.4.1", + "requires-port": "1.0.0" } }, "http-proxy-middleware": { @@ -4950,10 +4950,10 @@ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" + "http-proxy": "1.17.0", + "is-glob": "4.0.0", + "lodash": "4.17.10", + "micromatch": "3.1.10" }, "dependencies": { "arr-diff": { @@ -4971,16 +4971,16 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -4988,7 +4988,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -4998,13 +4998,13 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -5012,7 +5012,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -5020,7 +5020,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -5028,7 +5028,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -5036,7 +5036,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5046,7 +5046,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -5054,7 +5054,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5064,9 +5064,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" } }, "kind-of": { @@ -5081,14 +5081,14 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -5096,7 +5096,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -5104,7 +5104,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5114,10 +5114,10 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -5125,7 +5125,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5135,7 +5135,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -5143,7 +5143,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -5151,9 +5151,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-extglob": { @@ -5166,7 +5166,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-number": { @@ -5174,7 +5174,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -5182,7 +5182,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5202,19 +5202,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } } } @@ -5224,9 +5224,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" } }, "https-browserify": { @@ -5239,9 +5239,9 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", "requires": { - "agent-base": "2", - "debug": "2", - "extend": "3" + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" } }, "husky": { @@ -5249,9 +5249,9 @@ "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", "requires": { - "is-ci": "^1.0.10", - "normalize-path": "^1.0.0", - "strip-indent": "^2.0.0" + "is-ci": "1.1.0", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" }, "dependencies": { "normalize-path": { @@ -5302,8 +5302,8 @@ "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" } }, "imurmurhash": { @@ -5331,8 +5331,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -5355,7 +5355,7 @@ "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", "requires": { - "meow": "^3.3.0" + "meow": "3.7.0" }, "dependencies": { "camelcase": { @@ -5368,8 +5368,8 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, "indent-string": { @@ -5377,7 +5377,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "map-obj": { @@ -5390,16 +5390,16 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } }, "redent": { @@ -5407,8 +5407,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" } }, "strip-indent": { @@ -5416,7 +5416,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "trim-newlines": { @@ -5431,7 +5431,7 @@ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -5459,7 +5459,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-arrayish": { @@ -5472,7 +5472,7 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -5485,7 +5485,7 @@ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-callable": { @@ -5498,7 +5498,7 @@ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "requires": { - "ci-info": "^1.0.0" + "ci-info": "1.1.3" } }, "is-data-descriptor": { @@ -5506,7 +5506,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-date-object": { @@ -5519,9 +5519,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -5546,7 +5546,7 @@ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-extendable": { @@ -5564,7 +5564,7 @@ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -5572,7 +5572,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-glob": { @@ -5580,7 +5580,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-installed-globally": { @@ -5588,8 +5588,8 @@ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" } }, "is-module": { @@ -5607,11 +5607,11 @@ "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "is-my-ip-valid": "1.0.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" } }, "is-npm": { @@ -5624,7 +5624,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-obj": { @@ -5637,7 +5637,7 @@ "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "requires": { - "is-number": "^4.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { @@ -5657,7 +5657,7 @@ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -5665,7 +5665,7 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-plain-obj": { @@ -5678,7 +5678,7 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -5728,7 +5728,7 @@ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "requires": { - "has": "^1.0.1" + "has": "1.0.1" } }, "is-retry-allowed": { @@ -5756,7 +5756,7 @@ "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", "requires": { - "text-extensions": "^1.0.0" + "text-extensions": "1.7.0" } }, "is-typedarray": { @@ -5812,20 +5812,20 @@ "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" + "abbrev": "1.0.9", + "async": "1.5.2", + "escodegen": "1.8.1", + "esprima": "2.7.3", + "glob": "5.0.15", + "handlebars": "4.0.11", + "js-yaml": "3.11.0", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "once": "1.4.0", + "resolve": "1.1.7", + "supports-color": "3.2.3", + "which": "1.3.0", + "wordwrap": "1.0.0" }, "dependencies": { "glob": { @@ -5833,11 +5833,11 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-flag": { @@ -5855,7 +5855,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } }, "wordwrap": { @@ -5870,18 +5870,18 @@ "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", "requires": { - "async": "^2.1.4", - "compare-versions": "^3.1.0", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", - "istanbul-lib-report": "^1.1.4", - "istanbul-lib-source-maps": "^1.2.4", - "istanbul-reports": "^1.3.0", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", - "once": "^1.4.0" + "async": "2.6.0", + "compare-versions": "3.1.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.2.0", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-report": "1.1.4", + "istanbul-lib-source-maps": "1.2.4", + "istanbul-reports": "1.3.0", + "js-yaml": "3.11.0", + "mkdirp": "0.5.1", + "once": "1.4.0" }, "dependencies": { "async": { @@ -5899,10 +5899,10 @@ "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" + "convert-source-map": "1.5.1", + "istanbul-lib-instrument": "1.10.1", + "loader-utils": "1.1.0", + "schema-utils": "0.3.0" }, "dependencies": { "ajv": { @@ -5910,10 +5910,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "schema-utils": { @@ -5921,7 +5921,7 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "requires": { - "ajv": "^5.0.0" + "ajv": "5.5.2" } } } @@ -5936,7 +5936,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz", "integrity": "sha512-p3En6/oGkFQV55Up8ZPC2oLxvgSxD8CzA0yBrhRZSh3pfv3OFj9aSGVC0yoerAi/O4u7jUVnOGVX1eVFM+0tmQ==", "requires": { - "append-transform": "^0.4.0" + "append-transform": "0.4.0" } }, "istanbul-lib-instrument": { @@ -5944,13 +5944,13 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", - "semver": "^5.3.0" + "babel-generator": "6.26.1", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.2.0", + "semver": "5.5.0" } }, "istanbul-lib-report": { @@ -5958,10 +5958,10 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", "requires": { - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" }, "dependencies": { "has-flag": { @@ -5974,7 +5974,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -5984,11 +5984,11 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz", "integrity": "sha512-UzuK0g1wyQijiaYQxj/CdNycFhAd2TLtO2obKQMTZrZ1jzEMRY3rvpASEKkaxbRR6brvdovfA03znPa/pXcejg==", "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" }, "dependencies": { "debug": { @@ -6006,7 +6006,7 @@ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", "requires": { - "handlebars": "^4.0.3" + "handlebars": "4.0.11" } }, "jasmine": { @@ -6014,9 +6014,9 @@ "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=", "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.99.0" + "exit": "0.1.2", + "glob": "7.1.2", + "jasmine-core": "2.99.1" } }, "jasmine-core": { @@ -6057,8 +6057,8 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.0" }, "dependencies": { "esprima": { @@ -6114,7 +6114,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "jsonify": { @@ -6148,11 +6148,11 @@ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", "requires": { - "core-js": "~2.3.0", - "es6-promise": "~3.0.2", - "lie": "~3.1.0", - "pako": "~1.0.2", - "readable-stream": "~2.0.6" + "core-js": "2.3.0", + "es6-promise": "3.0.2", + "lie": "3.1.1", + "pako": "1.0.6", + "readable-stream": "2.0.6" }, "dependencies": { "core-js": { @@ -6175,12 +6175,12 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" } }, "string_decoder": { @@ -6195,33 +6195,33 @@ "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", "integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "chokidar": "^1.4.1", - "colors": "^1.1.0", - "combine-lists": "^1.0.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^3.8.0", - "log4js": "^0.6.31", - "mime": "^1.3.4", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", + "bluebird": "3.5.1", + "body-parser": "1.18.2", + "chokidar": "1.7.0", + "colors": "1.1.2", + "combine-lists": "1.0.1", + "connect": "3.6.6", + "core-js": "2.5.5", + "di": "0.0.1", + "dom-serialize": "2.2.1", + "expand-braces": "0.1.2", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "http-proxy": "1.17.0", + "isbinaryfile": "3.0.2", + "lodash": "3.10.1", + "log4js": "0.6.38", + "mime": "1.4.1", + "minimatch": "3.0.4", + "optimist": "0.6.1", + "qjobs": "1.2.0", + "range-parser": "1.2.0", + "rimraf": "2.6.2", + "safe-buffer": "5.1.2", "socket.io": "1.7.3", - "source-map": "^0.5.3", + "source-map": "0.5.7", "tmp": "0.0.31", - "useragent": "^2.1.12" + "useragent": "2.3.0" }, "dependencies": { "chokidar": { @@ -6229,15 +6229,15 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } }, "lodash": { @@ -6252,8 +6252,8 @@ "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" + "fs-access": "1.0.1", + "which": "1.3.0" } }, "karma-cli": { @@ -6261,7 +6261,7 @@ "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", "requires": { - "resolve": "^1.1.6" + "resolve": "1.7.1" } }, "karma-coverage-istanbul-reporter": { @@ -6269,8 +6269,8 @@ "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.2.tgz", "integrity": "sha512-sQHexslLF+QHzaKfK8+onTYMyvSwv+p5cDayVxhpEELGa3z0QuB+l0IMsicIkkBNMOJKQaqueiRoW7iuo7lsog==", "requires": { - "istanbul-api": "^1.1.14", - "minimatch": "^3.0.4" + "istanbul-api": "1.3.1", + "minimatch": "3.0.4" } }, "karma-jasmine": { @@ -6283,7 +6283,7 @@ "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", "requires": { - "karma-jasmine": "^1.0.2" + "karma-jasmine": "1.1.1" } }, "karma-source-map-support": { @@ -6291,7 +6291,7 @@ "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.2.0.tgz", "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=", "requires": { - "source-map-support": "^0.4.1" + "source-map-support": "0.4.18" }, "dependencies": { "source-map-support": { @@ -6299,7 +6299,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } } } @@ -6314,7 +6314,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "latest-version": { @@ -6322,7 +6322,7 @@ "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "requires": { - "package-json": "^4.0.0" + "package-json": "4.0.1" } }, "lazy-cache": { @@ -6336,7 +6336,7 @@ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "leb": { @@ -6349,14 +6349,14 @@ "resolved": "https://registry.npmjs.org/less/-/less-3.0.4.tgz", "integrity": "sha512-q3SyEnPKbk9zh4l36PGeW2fgynKu+FpbhiUNx/yaiBUQ3V0CbACCgb9FzYWcRgI2DJlP6eI4jc8XPrCTi55YcQ==", "requires": { - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" + "errno": "0.1.7", + "graceful-fs": "4.1.11", + "image-size": "0.5.5", + "mime": "1.4.1", + "mkdirp": "0.5.1", + "promise": "7.3.1", + "request": "2.85.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -6372,9 +6372,9 @@ "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" + "clone": "2.1.1", + "loader-utils": "1.1.0", + "pify": "3.0.0" } }, "levn": { @@ -6382,8 +6382,8 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "license-checker": { @@ -6392,16 +6392,16 @@ "integrity": "sha512-TAZDfuhEM1oZcBXICOeTBMt+bXIHllvoKHZA658YgPLzcnT45MS2Tjqqwkd5ctkHOlKJ8fTdl5dft2YTCe/4LQ==", "dev": true, "requires": { - "chalk": "~0.5.1", - "debug": "^2.2.0", - "mkdirp": "^0.3.5", - "nopt": "^2.2.0", - "read-installed": "~4.0.3", - "semver": "^5.3.0", - "spdx": "^0.5.1", - "spdx-correct": "^2.0.3", - "spdx-satisfies": "^0.1.3", - "treeify": "^1.0.1" + "chalk": "0.5.1", + "debug": "2.6.9", + "mkdirp": "0.3.5", + "nopt": "2.2.1", + "read-installed": "4.0.3", + "semver": "5.5.0", + "spdx": "0.5.1", + "spdx-correct": "2.0.4", + "spdx-satisfies": "0.1.3", + "treeify": "1.1.0" }, "dependencies": { "ansi-regex": { @@ -6422,11 +6422,11 @@ "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", "dev": true, "requires": { - "ansi-styles": "^1.1.0", - "escape-string-regexp": "^1.0.0", - "has-ansi": "^0.1.0", - "strip-ansi": "^0.3.0", - "supports-color": "^0.2.0" + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" } }, "has-ansi": { @@ -6435,7 +6435,7 @@ "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", "dev": true, "requires": { - "ansi-regex": "^0.2.0" + "ansi-regex": "0.2.1" } }, "mkdirp": { @@ -6450,7 +6450,7 @@ "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", "dev": true, "requires": { - "abbrev": "1" + "abbrev": "1.0.9" } }, "spdx-correct": { @@ -6459,8 +6459,8 @@ "integrity": "sha512-c+4gPpt9YDhz7cHlz5UrsHzxxRi4ksclxnEEKsuGT9JdwSC+ZNmsGbYRzzgxyZaBYpcWnlu+4lPcdLKx4DOCmA==", "dev": true, "requires": { - "spdx-expression-parse": "^2.0.1", - "spdx-license-ids": "^2.0.1" + "spdx-expression-parse": "2.0.2", + "spdx-license-ids": "2.0.1" } }, "spdx-expression-parse": { @@ -6469,8 +6469,8 @@ "integrity": "sha512-oFxOkWCfFS0ltNp0H66gXlU4NF6bxg7RkoTYR0413t+yTY9zyj+AIWsjtN8dcVp6703ijDYBWBIARlJ7DkyP9Q==", "dev": true, "requires": { - "spdx-exceptions": "^2.0.0", - "spdx-license-ids": "^2.0.1" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "2.0.1" } }, "spdx-license-ids": { @@ -6485,7 +6485,7 @@ "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", "dev": true, "requires": { - "ansi-regex": "^0.2.1" + "ansi-regex": "0.2.1" } }, "supports-color": { @@ -6501,7 +6501,7 @@ "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", "requires": { - "ejs": "^2.5.7" + "ejs": "2.5.9" } }, "lie": { @@ -6509,7 +6509,7 @@ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", "requires": { - "immediate": "~3.0.5" + "immediate": "3.0.6" } }, "load-json-file": { @@ -6517,10 +6517,10 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" } }, "loader-runner": { @@ -6533,9 +6533,9 @@ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" } }, "locate-character": { @@ -6548,8 +6548,8 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, "lodash": { @@ -6587,8 +6587,8 @@ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", "requires": { - "lodash._reinterpolate": "~3.0.0", - "lodash.templatesettings": "^4.0.0" + "lodash._reinterpolate": "3.0.0", + "lodash.templatesettings": "4.1.0" } }, "lodash.templatesettings": { @@ -6596,7 +6596,7 @@ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", "requires": { - "lodash._reinterpolate": "~3.0.0" + "lodash._reinterpolate": "3.0.0" } }, "log-symbols": { @@ -6604,7 +6604,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "requires": { - "chalk": "^2.0.1" + "chalk": "2.2.2" } }, "log4js": { @@ -6612,8 +6612,8 @@ "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", "requires": { - "readable-stream": "~1.0.2", - "semver": "~4.3.3" + "readable-stream": "1.0.34", + "semver": "4.3.6" }, "dependencies": { "isarray": { @@ -6626,10 +6626,10 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "semver": { @@ -6654,8 +6654,8 @@ "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", "requires": { - "es6-symbol": "^3.1.1", - "object.assign": "^4.1.0" + "es6-symbol": "3.1.1", + "object.assign": "4.1.0" } }, "long": { @@ -6673,7 +6673,7 @@ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "loud-rejection": { @@ -6681,8 +6681,8 @@ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" } }, "lower-case": { @@ -6700,8 +6700,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "magic-string": { @@ -6709,7 +6709,7 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "requires": { - "vlq": "^0.2.2" + "vlq": "0.2.3" } }, "make-dir": { @@ -6717,7 +6717,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "make-error": { @@ -6740,7 +6740,7 @@ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "material-design-icons": { @@ -6753,8 +6753,8 @@ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, "media-typer": { @@ -6767,7 +6767,7 @@ "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "memory-fs": { @@ -6775,8 +6775,8 @@ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" + "errno": "0.1.7", + "readable-stream": "2.3.6" } }, "meow": { @@ -6784,15 +6784,15 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" + "camelcase-keys": "4.2.0", + "decamelize-keys": "1.1.0", + "loud-rejection": "1.6.0", + "minimist": "1.2.0", + "minimist-options": "3.0.2", + "normalize-package-data": "2.4.0", + "read-pkg-up": "3.0.0", + "redent": "2.0.0", + "trim-newlines": "2.0.0" }, "dependencies": { "read-pkg": { @@ -6800,9 +6800,9 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" } }, "read-pkg-up": { @@ -6810,8 +6810,8 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "find-up": "2.1.0", + "read-pkg": "3.0.0" } } } @@ -6831,19 +6831,19 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, "miller-rabin": { @@ -6851,8 +6851,8 @@ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "bn.js": "4.11.8", + "brorand": "1.1.0" } }, "mime": { @@ -6870,7 +6870,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { - "mime-db": "~1.33.0" + "mime-db": "1.33.0" } }, "mimic-fn": { @@ -6883,8 +6883,8 @@ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", "requires": { - "loader-utils": "^1.1.0", - "webpack-sources": "^1.1.0" + "loader-utils": "1.1.0", + "webpack-sources": "1.1.0" } }, "minimalistic-assert": { @@ -6902,7 +6902,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -6915,8 +6915,8 @@ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" + "arrify": "1.0.1", + "is-plain-obj": "1.1.0" } }, "minipass": { @@ -6924,8 +6924,8 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" + "safe-buffer": "5.1.2", + "yallist": "3.0.2" }, "dependencies": { "yallist": { @@ -6940,7 +6940,7 @@ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "mississippi": { @@ -6948,16 +6948,16 @@ "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" + "concat-stream": "1.6.2", + "duplexify": "3.5.4", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.3", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.4.0", + "stream-each": "1.2.2", + "through2": "2.0.3" } }, "mixin-deep": { @@ -6965,8 +6965,8 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -6974,7 +6974,7 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -6984,8 +6984,8 @@ "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" + "for-in": "0.1.8", + "is-extendable": "0.1.1" }, "dependencies": { "for-in": { @@ -7020,12 +7020,12 @@ "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, "ms": { @@ -7038,8 +7038,8 @@ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" + "dns-packet": "1.3.1", + "thunky": "1.0.2" } }, "multicast-dns-service-types": { @@ -7057,18 +7057,18 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "arr-diff": { @@ -7108,32 +7108,32 @@ "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-3.0.0-rc.2.tgz", "integrity": "sha512-NhIQcIvHiOqHblSmtTgECSsfL59V6lfn6Ris9byXN7NaTaUxOF9EWZQqQC09mu8a+YW/H+6Pk2uAjQ99DH9NQw==", "requires": { - "@ngtools/json-schema": "^1.1.0", - "autoprefixer": "^8.0.0", - "browserslist": "^3.0.0", - "chalk": "^2.3.1", - "commander": "^2.12.0", - "cpx": "^1.5.0", - "fs-extra": "^5.0.0", - "glob": "^7.1.2", - "injection-js": "^2.2.1", - "less": "^3.0.0", - "node-sass": "^4.5.3", - "node-sass-tilde-importer": "^1.0.0", - "postcss": "^6.0.2", - "postcss-clean": "^1.1.0", - "postcss-url": "^7.3.0", - "read-pkg-up": "^3.0.0", - "rimraf": "^2.6.1", - "rollup": "^0.57.1", + "@ngtools/json-schema": "1.1.0", + "autoprefixer": "8.4.1", + "browserslist": "3.2.6", + "chalk": "2.4.1", + "commander": "2.15.1", + "cpx": "1.5.0", + "fs-extra": "5.0.0", + "glob": "7.1.2", + "injection-js": "2.2.1", + "less": "3.0.4", + "node-sass": "4.9.0", + "node-sass-tilde-importer": "1.0.2", + "postcss": "6.0.22", + "postcss-clean": "1.1.0", + "postcss-url": "7.3.2", + "read-pkg-up": "3.0.0", + "rimraf": "2.6.2", + "rollup": "0.57.1", "rollup-plugin-commonjs": "9.1.0", - "rollup-plugin-node-resolve": "^3.0.0", - "rxjs": "^5.5.0", - "sorcery": "^0.10.0", - "strip-bom": "^3.0.0", - "stylus": "^0.54.5", - "uglify-js": "^3.0.7", - "update-notifier": "^2.3.0" + "rollup-plugin-node-resolve": "3.3.0", + "rxjs": "5.5.10", + "sorcery": "0.10.0", + "strip-bom": "3.0.0", + "stylus": "0.54.5", + "uglify-js": "3.3.22", + "update-notifier": "2.5.0" }, "dependencies": { "chalk": { @@ -7141,9 +7141,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "read-pkg": { @@ -7188,8 +7188,8 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", "requires": { - "commander": "~2.15.0", - "source-map": "~0.6.1" + "commander": "2.15.1", + "source-map": "0.6.1" } } } @@ -7199,7 +7199,7 @@ "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "requires": { - "lower-case": "^1.1.1" + "lower-case": "1.1.4" } }, "node-forge": { @@ -7212,19 +7212,19 @@ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "2", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" + "fstream": "1.0.11", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "npmlog": "4.1.2", + "osenv": "0.1.5", + "request": "2.85.0", + "rimraf": "2.6.2", + "semver": "5.3.0", + "tar": "2.2.1", + "which": "1.3.0" }, "dependencies": { "semver": { @@ -7237,9 +7237,9 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" } } } @@ -7249,28 +7249,28 @@ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.2", + "string_decoder": "1.1.1", + "timers-browserify": "2.0.10", "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", + "url": "0.11.0", + "util": "0.10.3", "vm-browserify": "0.0.4" }, "dependencies": { @@ -7286,25 +7286,25 @@ "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.3.1", - "npmlog": "^4.0.0", - "request": "~2.79.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" + "async-foreach": "0.1.3", + "chalk": "1.1.3", + "cross-spawn": "3.0.1", + "gaze": "1.1.2", + "get-stdin": "4.0.1", + "glob": "7.1.2", + "in-publish": "2.0.0", + "lodash.assign": "4.2.0", + "lodash.clonedeep": "4.5.0", + "lodash.mergewith": "4.6.1", + "meow": "3.7.0", + "mkdirp": "0.5.1", + "nan": "2.10.0", + "node-gyp": "3.6.2", + "npmlog": "4.1.2", + "request": "2.79.0", + "sass-graph": "2.2.4", + "stdout-stream": "1.4.0", + "true-case-path": "1.0.2" }, "dependencies": { "ansi-styles": { @@ -7327,7 +7327,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "requires": { - "hoek": "2.x.x" + "hoek": "2.16.3" } }, "camelcase": { @@ -7340,8 +7340,8 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, "caseless": { @@ -7366,7 +7366,7 @@ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "requires": { - "boom": "2.x.x" + "boom": "2.10.1" } }, "form-data": { @@ -7374,9 +7374,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "har-validator": { @@ -7395,10 +7395,10 @@ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" } }, "hoek": { @@ -7411,9 +7411,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" } }, "indent-string": { @@ -7421,7 +7421,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "map-obj": { @@ -7434,16 +7434,16 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } }, "qs": { @@ -7456,8 +7456,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" } }, "request": { @@ -7492,7 +7492,7 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "requires": { - "hoek": "2.x.x" + "hoek": "2.16.3" } }, "strip-indent": { @@ -7500,7 +7500,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "supports-color": { @@ -7525,7 +7525,7 @@ "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", "requires": { - "find-parent-dir": "^0.3.0" + "find-parent-dir": "0.3.0" } }, "nopt": { @@ -7533,7 +7533,7 @@ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "requires": { - "abbrev": "1" + "abbrev": "1.0.9" } }, "normalize-package-data": { @@ -7541,10 +7541,10 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -7552,7 +7552,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "normalize-range": { @@ -7565,10 +7565,10 @@ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" + "hosted-git-info": "2.6.0", + "osenv": "0.1.5", + "semver": "5.5.0", + "validate-npm-package-name": "3.0.0" } }, "npm-registry-client": { @@ -7576,18 +7576,18 @@ "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz", "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", "requires": { - "concat-stream": "^1.5.2", - "graceful-fs": "^4.1.6", - "normalize-package-data": "~1.0.1 || ^2.0.0", - "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", - "npmlog": "2 || ^3.1.0 || ^4.0.0", - "once": "^1.3.3", - "request": "^2.74.0", - "retry": "^0.10.0", - "safe-buffer": "^5.1.1", - "semver": "2 >=2.2.1 || 3.x || 4 || 5", - "slide": "^1.1.3", - "ssri": "^5.2.4" + "concat-stream": "1.6.2", + "graceful-fs": "4.1.11", + "normalize-package-data": "2.4.0", + "npm-package-arg": "6.1.0", + "npmlog": "4.1.2", + "once": "1.4.0", + "request": "2.85.0", + "retry": "0.10.1", + "safe-buffer": "5.1.2", + "semver": "5.5.0", + "slide": "1.1.6", + "ssri": "5.3.0" } }, "npm-run-path": { @@ -7595,7 +7595,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "npmlog": { @@ -7603,10 +7603,10 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "nth-check": { @@ -7614,7 +7614,7 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", "requires": { - "boolbase": "~1.0.0" + "boolbase": "1.0.0" } }, "null-check": { @@ -7652,9 +7652,9 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -7662,7 +7662,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -7677,7 +7677,7 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -7692,10 +7692,10 @@ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "define-properties": "1.1.2", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "object-keys": "1.0.11" } }, "object.getownpropertydescriptors": { @@ -7703,8 +7703,8 @@ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "define-properties": "1.1.2", + "es-abstract": "1.11.0" } }, "object.omit": { @@ -7712,8 +7712,8 @@ "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "object.pick": { @@ -7721,7 +7721,7 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -7754,7 +7754,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "opn": { @@ -7762,7 +7762,7 @@ "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", "requires": { - "is-wsl": "^1.1.0" + "is-wsl": "1.1.0" } }, "optimist": { @@ -7770,8 +7770,8 @@ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.10", + "wordwrap": "0.0.3" }, "dependencies": { "minimist": { @@ -7786,12 +7786,12 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" }, "dependencies": { "wordwrap": { @@ -7811,7 +7811,7 @@ "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", "requires": { - "url-parse": "1.0.x" + "url-parse": "1.0.5" }, "dependencies": { "url-parse": { @@ -7819,8 +7819,8 @@ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", "requires": { - "querystringify": "0.0.x", - "requires-port": "1.0.x" + "querystringify": "0.0.4", + "requires-port": "1.0.0" } } } @@ -7840,7 +7840,7 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "^1.0.0" + "lcid": "1.0.0" } }, "os-tmpdir": { @@ -7853,8 +7853,8 @@ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "p-finally": { @@ -7867,7 +7867,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -7875,7 +7875,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.2.0" } }, "p-map": { @@ -7893,10 +7893,10 @@ "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" } }, "pako": { @@ -7909,9 +7909,9 @@ "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "param-case": { @@ -7919,7 +7919,7 @@ "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", "requires": { - "no-case": "^2.2.0" + "no-case": "2.3.2" } }, "parse-asn1": { @@ -7927,11 +7927,11 @@ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" } }, "parse-github-repo-url": { @@ -7944,10 +7944,10 @@ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, "parse-json": { @@ -7955,8 +7955,8 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.2" } }, "parse-ms": { @@ -7974,7 +7974,7 @@ "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", "requires": { - "better-assert": "~1.0.0" + "better-assert": "1.0.2" } }, "parseqs": { @@ -7982,7 +7982,7 @@ "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "requires": { - "better-assert": "~1.0.0" + "better-assert": "1.0.2" } }, "parseuri": { @@ -7990,7 +7990,7 @@ "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", "requires": { - "better-assert": "~1.0.0" + "better-assert": "1.0.2" } }, "parseurl": { @@ -8048,7 +8048,7 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "pbkdf2": { @@ -8056,11 +8056,11 @@ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.2", + "sha.js": "2.4.11" } }, "performance-now": { @@ -8083,7 +8083,7 @@ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -8091,7 +8091,7 @@ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "requires": { - "find-up": "^2.1.0" + "find-up": "2.1.0" } }, "plur": { @@ -8099,7 +8099,7 @@ "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "requires": { - "irregular-plurals": "^1.0.0" + "irregular-plurals": "1.4.0" } }, "popper.js": { @@ -8112,9 +8112,9 @@ "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" + "async": "1.5.2", + "debug": "2.6.9", + "mkdirp": "0.5.1" } }, "posix-character-classes": { @@ -8127,9 +8127,9 @@ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" }, "dependencies": { "chalk": { @@ -8137,9 +8137,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "source-map": { @@ -8154,8 +8154,8 @@ "resolved": "https://registry.npmjs.org/postcss-clean/-/postcss-clean-1.1.0.tgz", "integrity": "sha512-83g3GqMbCM5NL6MlbbPLJ/m2NrUepBF44MoDk4Gt04QGXeXKh9+ilQa0DzLnYnvqYHQCw83nckuEzBFr2muwbg==", "requires": { - "clean-css": "^4.x", - "postcss": "^6.x" + "clean-css": "4.1.11", + "postcss": "6.0.22" } }, "postcss-import": { @@ -8163,10 +8163,10 @@ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", "requires": { - "postcss": "^6.0.1", - "postcss-value-parser": "^3.2.3", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" + "postcss": "6.0.22", + "postcss-value-parser": "3.3.0", + "read-cache": "1.0.0", + "resolve": "1.7.1" } }, "postcss-load-config": { @@ -8174,10 +8174,10 @@ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", "requires": { - "cosmiconfig": "^2.1.0", - "object-assign": "^4.1.0", - "postcss-load-options": "^1.2.0", - "postcss-load-plugins": "^2.3.0" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1", + "postcss-load-options": "1.2.0", + "postcss-load-plugins": "2.3.0" } }, "postcss-load-options": { @@ -8185,8 +8185,8 @@ "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", "requires": { - "cosmiconfig": "^2.1.0", - "object-assign": "^4.1.0" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" } }, "postcss-load-plugins": { @@ -8194,8 +8194,8 @@ "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", "requires": { - "cosmiconfig": "^2.1.1", - "object-assign": "^4.1.0" + "cosmiconfig": "2.2.2", + "object-assign": "4.1.1" } }, "postcss-loader": { @@ -8203,10 +8203,10 @@ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz", "integrity": "sha512-pV7kB5neJ0/1tZ8L1uGOBNTVBCSCXQoIsZMsrwvO8V2rKGa2tBl/f80GGVxow2jJnRJ2w1ocx693EKhZAb9Isg==", "requires": { - "loader-utils": "^1.1.0", - "postcss": "^6.0.0", - "postcss-load-config": "^1.2.0", - "schema-utils": "^0.4.0" + "loader-utils": "1.1.0", + "postcss": "6.0.22", + "postcss-load-config": "1.2.0", + "schema-utils": "0.4.5" } }, "postcss-url": { @@ -8214,11 +8214,11 @@ "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", "requires": { - "mime": "^1.4.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.0", - "postcss": "^6.0.1", - "xxhashjs": "^0.2.1" + "mime": "1.4.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "postcss": "6.0.22", + "xxhashjs": "0.2.2" } }, "postcss-value-parser": { @@ -8246,8 +8246,8 @@ "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" + "renderkid": "2.0.1", + "utila": "0.4.0" } }, "pretty-ms": { @@ -8255,8 +8255,8 @@ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", "requires": { - "parse-ms": "^1.0.0", - "plur": "^2.1.2" + "parse-ms": "1.0.1", + "plur": "2.1.2" } }, "process": { @@ -8275,7 +8275,7 @@ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "optional": true, "requires": { - "asap": "~2.0.3" + "asap": "2.0.6" } }, "promise-inflight": { @@ -8288,21 +8288,21 @@ "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.1.tgz", "integrity": "sha512-AW9qJ0prx2QEMy1gnhJ1Sl1WBQL2R3fx/VnG09FEmWprPIQPK14t0B83OB/pAGddpxiDCAAV0KiNNLf2c2Y/lQ==", "requires": { - "@types/node": "^6.0.46", - "@types/q": "^0.0.32", - "@types/selenium-webdriver": "~2.53.39", - "blocking-proxy": "^1.0.0", - "chalk": "^1.1.3", - "glob": "^7.0.3", + "@types/node": "6.0.106", + "@types/q": "0.0.32", + "@types/selenium-webdriver": "2.53.43", + "blocking-proxy": "1.0.1", + "chalk": "1.1.3", + "glob": "7.1.2", "jasmine": "2.8.0", - "jasminewd2": "^2.1.0", - "optimist": "~0.6.0", + "jasminewd2": "2.2.0", + "optimist": "0.6.1", "q": "1.4.1", - "saucelabs": "~1.3.0", + "saucelabs": "1.3.0", "selenium-webdriver": "3.6.0", - "source-map-support": "~0.4.0", - "webdriver-js-extender": "^1.0.0", - "webdriver-manager": "^12.0.6" + "source-map-support": "0.4.18", + "webdriver-js-extender": "1.0.0", + "webdriver-manager": "12.0.6" }, "dependencies": { "@types/node": { @@ -8325,11 +8325,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "jasmine": { @@ -8337,9 +8337,9 @@ "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.8.0" + "exit": "0.1.2", + "glob": "7.1.2", + "jasmine-core": "2.8.0" } }, "jasmine-core": { @@ -8357,7 +8357,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" } }, "supports-color": { @@ -8370,17 +8370,17 @@ "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz", "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", "requires": { - "adm-zip": "^0.4.7", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.78.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" + "adm-zip": "0.4.9", + "chalk": "1.1.3", + "del": "2.2.2", + "glob": "7.1.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "q": "1.4.1", + "request": "2.85.0", + "rimraf": "2.6.2", + "semver": "5.5.0", + "xml2js": "0.4.19" } } } @@ -8390,7 +8390,7 @@ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", "requires": { - "forwarded": "~0.1.2", + "forwarded": "0.1.2", "ipaddr.js": "1.6.0" } }, @@ -8409,11 +8409,11 @@ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" } }, "pump": { @@ -8421,8 +8421,8 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, "pumpify": { @@ -8430,9 +8430,9 @@ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "requires": { - "duplexify": "^3.5.3", - "inherits": "^2.0.3", - "pump": "^2.0.0" + "duplexify": "3.5.4", + "inherits": "2.0.3", + "pump": "2.0.1" } }, "punycode": { @@ -8480,8 +8480,8 @@ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "is-number": { @@ -8489,7 +8489,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -8497,7 +8497,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -8507,7 +8507,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -8517,7 +8517,7 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "requires": { - "safe-buffer": "^5.1.0" + "safe-buffer": "5.1.2" } }, "randomfill": { @@ -8525,8 +8525,8 @@ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "randombytes": "2.0.6", + "safe-buffer": "5.1.2" } }, "range-parser": { @@ -8558,7 +8558,7 @@ "depd": "1.1.1", "inherits": "2.0.3", "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" + "statuses": "1.4.0" } }, "setprototypeof": { @@ -8578,10 +8578,10 @@ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", "requires": { - "deep-extend": "~0.4.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" } }, "read-cache": { @@ -8589,7 +8589,7 @@ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", "requires": { - "pify": "^2.3.0" + "pify": "2.3.0" }, "dependencies": { "pify": { @@ -8605,13 +8605,13 @@ "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", "dev": true, "requires": { - "debuglog": "^1.0.1", - "graceful-fs": "^4.1.2", - "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "slide": "~1.1.3", - "util-extend": "^1.0.1" + "debuglog": "1.0.1", + "graceful-fs": "4.1.11", + "read-package-json": "2.0.13", + "readdir-scoped-modules": "1.0.2", + "semver": "5.5.0", + "slide": "1.1.6", + "util-extend": "1.0.3" } }, "read-package-json": { @@ -8620,11 +8620,11 @@ "integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==", "dev": true, "requires": { - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "json-parse-better-errors": "^1.0.1", - "normalize-package-data": "^2.0.0", - "slash": "^1.0.0" + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "json-parse-better-errors": "1.0.2", + "normalize-package-data": "2.4.0", + "slash": "1.0.0" } }, "read-pkg": { @@ -8632,9 +8632,9 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" }, "dependencies": { "load-json-file": { @@ -8642,11 +8642,11 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "parse-json": { @@ -8654,7 +8654,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } }, "path-type": { @@ -8662,9 +8662,9 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "pify": { @@ -8677,7 +8677,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } } } @@ -8687,8 +8687,8 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" }, "dependencies": { "find-up": { @@ -8696,8 +8696,8 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "path-exists": { @@ -8705,7 +8705,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } } } @@ -8715,13 +8715,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "readdir-scoped-modules": { @@ -8730,10 +8730,10 @@ "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", "dev": true, "requires": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" + "debuglog": "1.0.1", + "dezalgo": "1.0.3", + "graceful-fs": "4.1.11", + "once": "1.4.0" } }, "readdirp": { @@ -8741,10 +8741,10 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" } }, "redent": { @@ -8752,8 +8752,8 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" + "indent-string": "3.2.0", + "strip-indent": "2.0.0" } }, "reflect-metadata": { @@ -8776,7 +8776,7 @@ "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "regex-not": { @@ -8784,8 +8784,8 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "regexpu-core": { @@ -8793,9 +8793,9 @@ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, "registry-auth-token": { @@ -8803,8 +8803,8 @@ "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "rc": "1.2.6", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -8812,7 +8812,7 @@ "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "requires": { - "rc": "^1.0.1" + "rc": "1.2.6" } }, "regjsgen": { @@ -8825,7 +8825,7 @@ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { - "jsesc": "~0.5.0" + "jsesc": "0.5.0" } }, "relateurl": { @@ -8843,11 +8843,11 @@ "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", "requires": { - "css-select": "^1.1.0", - "dom-converter": "~0.1", - "htmlparser2": "~3.3.0", - "strip-ansi": "^3.0.0", - "utila": "~0.3" + "css-select": "1.2.0", + "dom-converter": "0.1.4", + "htmlparser2": "3.3.0", + "strip-ansi": "3.0.1", + "utila": "0.3.3" }, "dependencies": { "utila": { @@ -8872,7 +8872,7 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "request": { @@ -8880,28 +8880,28 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "hawk": "~6.0.2", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "stringstream": "~0.0.5", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.2", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" } }, "require-directory": { @@ -8934,7 +8934,7 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } }, "resolve-cwd": { @@ -8942,7 +8942,7 @@ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "3.0.0" } }, "resolve-from": { @@ -8971,7 +8971,7 @@ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -8979,7 +8979,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "ripemd160": { @@ -8987,8 +8987,8 @@ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, "rollup": { @@ -8996,17 +8996,17 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.57.1.tgz", "integrity": "sha512-I18GBqP0qJoJC1K1osYjreqA8VAKovxuI3I81RSk0Dmr4TgloI0tAULjZaox8OsJ+n7XRrhH6i0G2By/pj1LCA==", "requires": { - "@types/acorn": "^4.0.3", - "acorn": "^5.5.3", - "acorn-dynamic-import": "^3.0.0", - "date-time": "^2.1.0", - "is-reference": "^1.1.0", - "locate-character": "^2.0.5", - "pretty-ms": "^3.1.0", - "require-relative": "^0.8.7", - "rollup-pluginutils": "^2.0.1", - "signal-exit": "^3.0.2", - "sourcemap-codec": "^1.4.1" + "@types/acorn": "4.0.3", + "acorn": "5.5.3", + "acorn-dynamic-import": "3.0.0", + "date-time": "2.1.0", + "is-reference": "1.1.0", + "locate-character": "2.0.5", + "pretty-ms": "3.1.0", + "require-relative": "0.8.7", + "rollup-pluginutils": "2.0.1", + "signal-exit": "3.0.2", + "sourcemap-codec": "1.4.1" } }, "rollup-plugin-commonjs": { @@ -9014,10 +9014,10 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.0.tgz", "integrity": "sha512-NrfE0g30QljNCnlJr7I2Xguz+44mh0dCxvfxwLnCwtaCK2LwFUp1zzAs8MQuOfhH4mRskqsjfOwGUap/L+WtEw==", "requires": { - "estree-walker": "^0.5.1", - "magic-string": "^0.22.4", - "resolve": "^1.5.0", - "rollup-pluginutils": "^2.0.1" + "estree-walker": "0.5.1", + "magic-string": "0.22.5", + "resolve": "1.7.1", + "rollup-pluginutils": "2.0.1" }, "dependencies": { "estree-walker": { @@ -9032,9 +9032,9 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", "requires": { - "builtin-modules": "^2.0.0", - "is-module": "^1.0.0", - "resolve": "^1.1.6" + "builtin-modules": "2.0.0", + "is-module": "1.0.0", + "resolve": "1.7.1" }, "dependencies": { "builtin-modules": { @@ -9049,8 +9049,8 @@ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", "integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=", "requires": { - "estree-walker": "^0.3.0", - "micromatch": "^2.3.11" + "estree-walker": "0.3.1", + "micromatch": "2.3.11" } }, "run-queue": { @@ -9058,7 +9058,7 @@ "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "requires": { - "aproba": "^1.1.1" + "aproba": "1.2.0" } }, "rxjs": { @@ -9066,7 +9066,7 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.0" } }, "safe-buffer": { @@ -9079,7 +9079,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "sander": { @@ -9087,10 +9087,10 @@ "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", "requires": { - "es6-promise": "^3.1.2", - "graceful-fs": "^4.1.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2" + "es6-promise": "3.3.1", + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" } }, "sass-graph": { @@ -9098,10 +9098,10 @@ "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "glob": "7.1.2", + "lodash": "4.17.10", + "scss-tokenizer": "0.2.3", + "yargs": "7.1.0" }, "dependencies": { "camelcase": { @@ -9114,9 +9114,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" } }, "y18n": { @@ -9129,19 +9129,19 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "5.0.0" } } } @@ -9151,11 +9151,11 @@ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.0.1.tgz", "integrity": "sha512-MeVVJFejJELlAbA7jrRchi88PGP6U9yIfqyiG+bBC4a9s2PX+ulJB9h8bbEohtPBfZmlLhNZ0opQM9hovRXvlw==", "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0" + "clone-deep": "2.0.2", + "loader-utils": "1.1.0", + "lodash.tail": "4.1.1", + "neo-async": "2.5.1", + "pify": "3.0.0" } }, "saucelabs": { @@ -9163,7 +9163,7 @@ "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", "requires": { - "https-proxy-agent": "^1.0.0" + "https-proxy-agent": "1.0.0" } }, "sax": { @@ -9176,8 +9176,8 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "ajv": "6.4.0", + "ajv-keywords": "3.1.0" } }, "scss-tokenizer": { @@ -9185,8 +9185,8 @@ "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" + "js-base64": "2.4.3", + "source-map": "0.4.4" }, "dependencies": { "source-map": { @@ -9194,7 +9194,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -9209,10 +9209,10 @@ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", "requires": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", + "jszip": "3.1.5", + "rimraf": "2.6.2", "tmp": "0.0.30", - "xml2js": "^0.4.17" + "xml2js": "0.4.19" }, "dependencies": { "tmp": { @@ -9220,7 +9220,7 @@ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", "requires": { - "os-tmpdir": "~1.0.1" + "os-tmpdir": "1.0.2" } } } @@ -9243,7 +9243,7 @@ "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "requires": { - "semver": "^5.0.3" + "semver": "5.5.0" } }, "semver-dsl": { @@ -9251,7 +9251,7 @@ "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", "requires": { - "semver": "^5.3.0" + "semver": "5.5.0" } }, "semver-intersect": { @@ -9259,7 +9259,7 @@ "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz", "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=", "requires": { - "semver": "^5.0.0" + "semver": "5.5.0" } }, "send": { @@ -9268,18 +9268,18 @@ "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", + "http-errors": "1.6.3", "mime": "1.4.1", "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" } }, "serialize-javascript": { @@ -9292,13 +9292,13 @@ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "requires": { - "accepts": "~1.3.4", + "accepts": "1.3.5", "batch": "0.6.1", "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" + "escape-html": "1.0.3", + "http-errors": "1.6.3", + "mime-types": "2.1.18", + "parseurl": "1.3.2" } }, "serve-static": { @@ -9306,9 +9306,9 @@ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", "send": "0.16.2" } }, @@ -9327,10 +9327,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -9338,7 +9338,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -9358,8 +9358,8 @@ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.2" } }, "shallow-clone": { @@ -9367,9 +9367,9 @@ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" + "is-extendable": "0.1.1", + "kind-of": "5.1.0", + "mixin-object": "2.0.1" }, "dependencies": { "kind-of": { @@ -9384,7 +9384,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -9397,10 +9397,10 @@ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" } }, "signal-exit": { @@ -9413,7 +9413,7 @@ "resolved": "https://registry.npmjs.org/silent-error/-/silent-error-1.1.0.tgz", "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", "requires": { - "debug": "^2.2.0" + "debug": "2.6.9" } }, "slash": { @@ -9431,14 +9431,14 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" }, "dependencies": { "define-property": { @@ -9446,7 +9446,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -9454,7 +9454,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -9464,9 +9464,9 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -9474,7 +9474,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -9482,7 +9482,7 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -9490,7 +9490,7 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -9498,9 +9498,9 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "isobject": { @@ -9520,7 +9520,7 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" } }, "sntp": { @@ -9528,7 +9528,7 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { - "hoek": "4.x.x" + "hoek": "4.2.1" } }, "socket.io": { @@ -9663,8 +9663,8 @@ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "faye-websocket": "0.10.0", + "uuid": "3.2.1" } }, "sockjs-client": { @@ -9672,12 +9672,12 @@ "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", "requires": { - "debug": "^2.6.6", + "debug": "2.6.9", "eventsource": "0.1.6", - "faye-websocket": "~0.11.0", - "inherits": "^2.0.1", - "json3": "^3.3.2", - "url-parse": "^1.1.8" + "faye-websocket": "0.11.1", + "inherits": "2.0.3", + "json3": "3.3.2", + "url-parse": "1.4.0" }, "dependencies": { "faye-websocket": { @@ -9685,7 +9685,7 @@ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", "requires": { - "websocket-driver": ">=0.5.1" + "websocket-driver": "0.7.0" } } } @@ -9695,10 +9695,10 @@ "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", "requires": { - "buffer-crc32": "^0.2.5", - "minimist": "^1.2.0", - "sander": "^0.5.0", - "sourcemap-codec": "^1.3.0" + "buffer-crc32": "0.2.13", + "minimist": "1.2.0", + "sander": "0.5.1", + "sourcemap-codec": "1.4.1" } }, "source-list-map": { @@ -9716,11 +9716,11 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "requires": { - "atob": "^2.0.0", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-support": { @@ -9728,8 +9728,8 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "buffer-from": "1.0.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -9755,8 +9755,8 @@ "integrity": "sha1-02wnUIi0jXWpBGzUSoOM5LUzmZg=", "dev": true, "requires": { - "spdx-exceptions": "^1.0.0", - "spdx-license-ids": "^1.0.0" + "spdx-exceptions": "1.0.5", + "spdx-license-ids": "1.2.2" }, "dependencies": { "spdx-exceptions": { @@ -9779,8 +9779,8 @@ "integrity": "sha1-sGrz6jSvdDfZGp9Enq8tLpPDyPs=", "dev": true, "requires": { - "spdx-expression-parse": "^1.0.0", - "spdx-ranges": "^1.0.0" + "spdx-expression-parse": "1.0.4", + "spdx-ranges": "1.0.1" }, "dependencies": { "spdx-expression-parse": { @@ -9796,8 +9796,8 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -9810,8 +9810,8 @@ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -9831,8 +9831,8 @@ "integrity": "sha1-Z6HydOYRXUquKK/kdNt2FkvhC9w=", "dev": true, "requires": { - "spdx-compare": "^0.1.2", - "spdx-expression-parse": "^1.0.0" + "spdx-compare": "0.1.2", + "spdx-expression-parse": "1.0.4" }, "dependencies": { "spdx-expression-parse": { @@ -9848,12 +9848,12 @@ "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" + "debug": "2.6.9", + "handle-thing": "1.2.5", + "http-deceiver": "1.2.7", + "safe-buffer": "5.1.2", + "select-hose": "2.0.0", + "spdy-transport": "2.1.0" } }, "spdy-transport": { @@ -9861,13 +9861,13 @@ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" + "debug": "2.6.9", + "detect-node": "2.0.3", + "hpack.js": "2.1.6", + "obuf": "1.1.2", + "readable-stream": "2.3.6", + "safe-buffer": "5.1.2", + "wbuf": "1.7.3" } }, "split": { @@ -9875,7 +9875,7 @@ "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "requires": { - "through": "2" + "through": "2.3.8" } }, "split-string": { @@ -9883,7 +9883,7 @@ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "split2": { @@ -9891,7 +9891,7 @@ "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "requires": { - "through2": "^2.0.2" + "through2": "2.0.3" } }, "sprintf-js": { @@ -9904,14 +9904,14 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "tweetnacl": "~0.14.0" + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" } }, "ssri": { @@ -9919,7 +9919,7 @@ "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", "requires": { - "safe-buffer": "^5.1.1" + "safe-buffer": "5.1.2" } }, "static-extend": { @@ -9927,8 +9927,8 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -9936,7 +9936,7 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -9946,7 +9946,7 @@ "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.6.2.tgz", "integrity": "sha1-LFlJtTHgf4eojm6k3PrFOqjHWis=", "requires": { - "lodash": "^4.17.4" + "lodash": "4.17.10" } }, "statuses": { @@ -9959,7 +9959,7 @@ "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", "requires": { - "readable-stream": "^2.0.1" + "readable-stream": "2.3.6" } }, "stream-browserify": { @@ -9967,8 +9967,8 @@ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, "stream-each": { @@ -9976,8 +9976,8 @@ "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" } }, "stream-http": { @@ -9985,11 +9985,11 @@ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.2.tgz", "integrity": "sha512-QllfrBhqF1DPcz46WxKTs6Mz1Bpc+8Qm6vbqOpVav5odAXwbyzwnEczoWqtxrsmlO+cJqtPrp/8gWKWjaKLLlA==", "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" } }, "stream-shift": { @@ -10002,9 +10002,9 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { @@ -10012,7 +10012,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "stringstream": { @@ -10025,7 +10025,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -10053,8 +10053,8 @@ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz", "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==", "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^0.4.5" + "loader-utils": "1.1.0", + "schema-utils": "0.4.5" } }, "stylus": { @@ -10062,12 +10062,12 @@ "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" + "css-parse": "1.7.0", + "debug": "2.6.9", + "glob": "7.0.6", + "mkdirp": "0.5.1", + "sax": "0.5.8", + "source-map": "0.1.43" }, "dependencies": { "glob": { @@ -10075,12 +10075,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "source-map": { @@ -10088,7 +10088,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -10098,9 +10098,9 @@ "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" + "loader-utils": "1.1.0", + "lodash.clonedeep": "4.5.0", + "when": "3.6.4" } }, "subarg": { @@ -10108,7 +10108,7 @@ "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "requires": { - "minimist": "^1.1.0" + "minimist": "1.2.0" } }, "supports-color": { @@ -10116,7 +10116,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } }, "symbol-observable": { @@ -10134,11 +10134,11 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-3.2.1.tgz", "integrity": "sha512-ZSzds1E0IqutvMU8HxjMaU8eB7urw2fGwTq88ukDOVuUIh0656l7/P7LiVPxhO5kS4flcRJQk8USG+cghQbTUQ==", "requires": { - "chownr": "^1.0.1", - "minipass": "^2.0.2", - "minizlib": "^1.0.3", - "mkdirp": "^0.5.0", - "yallist": "^3.0.2" + "chownr": "1.0.1", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "yallist": "3.0.2" }, "dependencies": { "yallist": { @@ -10153,8 +10153,8 @@ "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", "requires": { - "os-tmpdir": "^1.0.0", - "rimraf": "~2.2.6" + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" }, "dependencies": { "rimraf": { @@ -10169,7 +10169,7 @@ "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "requires": { - "execa": "^0.7.0" + "execa": "0.7.0" } }, "text-extensions": { @@ -10187,8 +10187,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.6", + "xtend": "4.0.1" } }, "thunky": { @@ -10211,7 +10211,7 @@ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "requires": { - "setimmediate": "^1.0.4" + "setimmediate": "1.0.5" } }, "tmp": { @@ -10219,7 +10219,7 @@ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", "requires": { - "os-tmpdir": "~1.0.1" + "os-tmpdir": "1.0.2" } }, "to-array": { @@ -10242,7 +10242,7 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "to-regex": { @@ -10250,10 +10250,10 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -10261,8 +10261,8 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" }, "dependencies": { "is-number": { @@ -10270,7 +10270,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } } } @@ -10285,7 +10285,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "^1.4.1" + "punycode": "1.4.1" }, "dependencies": { "punycode": { @@ -10326,7 +10326,7 @@ "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", "requires": { - "glob": "^6.0.4" + "glob": "6.0.4" }, "dependencies": { "glob": { @@ -10334,11 +10334,11 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } } } @@ -10348,14 +10348,14 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz", "integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==", "requires": { - "arrify": "^1.0.0", - "chalk": "^2.3.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.3", - "yn": "^2.0.0" + "arrify": "1.0.1", + "chalk": "2.4.1", + "diff": "3.5.0", + "make-error": "1.3.4", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map-support": "0.5.5", + "yn": "2.0.0" }, "dependencies": { "chalk": { @@ -10363,9 +10363,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } } } @@ -10375,10 +10375,10 @@ "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", "requires": { - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map": "^0.6.0", - "source-map-support": "^0.5.0" + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map": "0.6.1", + "source-map-support": "0.5.5" }, "dependencies": { "source-map": { @@ -10398,18 +10398,18 @@ "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.12.1" + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.4.1", + "commander": "2.15.1", + "diff": "3.5.0", + "glob": "7.1.2", + "js-yaml": "3.11.0", + "minimatch": "3.0.4", + "resolve": "1.7.1", + "semver": "5.5.0", + "tslib": "1.9.0", + "tsutils": "2.22.2" }, "dependencies": { "chalk": { @@ -10417,19 +10417,25 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } } } }, + "tslint-no-circular-imports": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tslint-no-circular-imports/-/tslint-no-circular-imports-0.3.0.tgz", + "integrity": "sha1-xSfn0csw77F/DPrQTmHmXIBMUXM=", + "dev": true + }, "tsutils": { "version": "2.22.2", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.22.2.tgz", "integrity": "sha512-u06FUSulCJ+Y8a2ftuqZN6kIGqdP2yJjUPEngXqmdPND4UQfb04igcotH+dw+IFr417yP6muCLE8/5/Qlfnx0w==", "requires": { - "tslib": "^1.8.1" + "tslib": "1.9.0" } }, "tty-browserify": { @@ -10442,7 +10448,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -10456,7 +10462,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "type-is": { @@ -10465,7 +10471,7 @@ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "requires": { "media-typer": "0.3.0", - "mime-types": "~2.1.18" + "mime-types": "2.1.18" } }, "typedarray": { @@ -10484,9 +10490,9 @@ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" } }, "uglify-to-browserify": { @@ -10500,14 +10506,14 @@ "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.5.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.6.0" }, "dependencies": { "commander": { @@ -10525,8 +10531,8 @@ "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" + "commander": "2.13.0", + "source-map": "0.6.1" } } } @@ -10541,10 +10547,10 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -10552,7 +10558,7 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -10560,10 +10566,10 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -10573,7 +10579,7 @@ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", "requires": { - "unique-slug": "^2.0.0" + "unique-slug": "2.0.0" } }, "unique-slug": { @@ -10581,7 +10587,7 @@ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "requires": { - "imurmurhash": "^0.1.4" + "imurmurhash": "0.1.4" } }, "unique-string": { @@ -10589,7 +10595,7 @@ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "1.0.0" } }, "universalify": { @@ -10607,8 +10613,8 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -10616,9 +10622,9 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -10658,16 +10664,16 @@ "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "boxen": "1.3.0", + "chalk": "2.2.2", + "configstore": "3.1.2", + "import-lazy": "2.1.0", + "is-ci": "1.1.0", + "is-installed-globally": "0.1.0", + "is-npm": "1.0.0", + "latest-version": "3.1.0", + "semver-diff": "2.1.0", + "xdg-basedir": "3.0.0" } }, "upper-case": { @@ -10680,7 +10686,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", "requires": { - "punycode": "^2.1.0" + "punycode": "2.1.0" } }, "urix": { @@ -10714,9 +10720,9 @@ "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz", "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==", "requires": { - "loader-utils": "^1.1.0", - "mime": "^2.0.3", - "schema-utils": "^0.4.3" + "loader-utils": "1.1.0", + "mime": "2.3.1", + "schema-utils": "0.4.5" }, "dependencies": { "mime": { @@ -10731,8 +10737,8 @@ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz", "integrity": "sha512-ERuGxDiQ6Xw/agN4tuoCRbmwRuZP0cJ1lJxJubXr5Q/5cDa78+Dc4wfvtxzhzhkm5VvmW6Mf8EVj9SPGN4l8Lg==", "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" + "querystringify": "2.0.0", + "requires-port": "1.0.0" }, "dependencies": { "querystringify": { @@ -10747,7 +10753,7 @@ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "1.0.4" } }, "use": { @@ -10755,7 +10761,7 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" }, "dependencies": { "kind-of": { @@ -10770,8 +10776,8 @@ "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "requires": { - "lru-cache": "4.1.x", - "tmp": "0.0.x" + "lru-cache": "4.1.2", + "tmp": "0.0.31" } }, "util": { @@ -10805,8 +10811,8 @@ "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" + "define-properties": "1.1.2", + "object.getownpropertydescriptors": "2.0.3" } }, "utila": { @@ -10829,8 +10835,8 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "validate-npm-package-name": { @@ -10838,7 +10844,7 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "requires": { - "builtins": "^1.0.3" + "builtins": "1.0.3" } }, "vary": { @@ -10851,9 +10857,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "^1.0.0", + "assert-plus": "1.0.0", "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "extsprintf": "1.3.0" } }, "vlq": { @@ -10879,9 +10885,9 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "chokidar": "2.0.3", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" } }, "wbuf": { @@ -10889,7 +10895,7 @@ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "requires": { - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "1.0.1" } }, "webassemblyjs": { @@ -10901,7 +10907,7 @@ "@webassemblyjs/validation": "1.3.1", "@webassemblyjs/wasm-parser": "1.3.1", "@webassemblyjs/wast-parser": "1.3.1", - "long": "^3.2.0" + "long": "3.2.0" } }, "webdriver-js-extender": { @@ -10909,8 +10915,8 @@ "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", "requires": { - "@types/selenium-webdriver": "^2.53.35", - "selenium-webdriver": "^2.53.2" + "@types/selenium-webdriver": "2.53.43", + "selenium-webdriver": "2.53.3" }, "dependencies": { "sax": { @@ -10924,9 +10930,9 @@ "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", "requires": { "adm-zip": "0.4.4", - "rimraf": "^2.2.8", + "rimraf": "2.6.2", "tmp": "0.0.24", - "ws": "^1.0.1", + "ws": "1.1.2", "xml2js": "0.4.4" } }, @@ -10940,8 +10946,8 @@ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", "requires": { - "sax": "0.6.x", - "xmlbuilder": ">=1.0.0" + "sax": "0.6.1", + "xmlbuilder": "9.0.7" } } } @@ -10954,25 +10960,25 @@ "@webassemblyjs/ast": "1.3.1", "@webassemblyjs/wasm-edit": "1.3.1", "@webassemblyjs/wasm-parser": "1.3.1", - "acorn": "^5.0.0", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^0.1.1", - "enhanced-resolve": "^4.0.0", - "eslint-scope": "^3.7.1", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.0.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" + "acorn": "5.5.3", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.4.0", + "ajv-keywords": "3.1.0", + "chrome-trace-event": "0.1.3", + "enhanced-resolve": "4.0.0", + "eslint-scope": "3.7.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "neo-async": "2.5.1", + "node-libs-browser": "2.1.0", + "schema-utils": "0.4.5", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.2.5", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0" }, "dependencies": { "arr-diff": { @@ -11230,8 +11236,8 @@ "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" + "source-list-map": "0.1.8", + "source-map": "0.4.4" }, "dependencies": { "source-list-map": { @@ -11244,7 +11250,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -11254,13 +11260,13 @@ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", "requires": { - "loud-rejection": "^1.6.0", - "memory-fs": "~0.4.1", - "mime": "^2.1.0", - "path-is-absolute": "^1.0.0", - "range-parser": "^1.0.3", - "url-join": "^4.0.0", - "webpack-log": "^1.0.1" + "loud-rejection": "1.6.0", + "memory-fs": "0.4.1", + "mime": "2.3.1", + "path-is-absolute": "1.0.1", + "range-parser": "1.2.0", + "url-join": "4.0.0", + "webpack-log": "1.2.0" }, "dependencies": { "mime": { @@ -11276,32 +11282,32 @@ "integrity": "sha512-itcIUDFkHuj1/QQxzUFOEXXmxOj5bku2ScLEsOFPapnq2JRTm58gPdtnBphBJOKL2+M3p6+xygL64bI+3eyzzw==", "requires": { "ansi-html": "0.0.7", - "array-includes": "^3.0.3", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^1.0.0", + "array-includes": "3.0.3", + "bonjour": "3.5.0", + "chokidar": "2.0.3", + "compression": "1.7.2", + "connect-history-api-fallback": "1.5.0", + "debug": "3.1.0", + "del": "3.0.0", + "express": "4.16.3", + "html-entities": "1.2.1", + "http-proxy-middleware": "0.18.0", + "import-local": "1.0.0", "internal-ip": "1.2.0", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "selfsigned": "^1.9.1", - "serve-index": "^1.7.2", + "ip": "1.1.5", + "killable": "1.0.0", + "loglevel": "1.6.1", + "opn": "5.3.0", + "portfinder": "1.0.13", + "selfsigned": "1.10.2", + "serve-index": "1.9.1", "sockjs": "0.3.19", "sockjs-client": "1.1.4", - "spdy": "^3.4.1", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", + "spdy": "3.4.7", + "strip-ansi": "3.0.1", + "supports-color": "5.4.0", "webpack-dev-middleware": "3.1.3", - "webpack-log": "^1.1.2", + "webpack-log": "1.2.0", "yargs": "11.0.0" }, "dependencies": { @@ -11320,9 +11326,9 @@ "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" }, "dependencies": { "strip-ansi": { @@ -11453,10 +11459,10 @@ "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", "requires": { - "chalk": "^2.1.0", - "log-symbols": "^2.1.0", - "loglevelnext": "^1.0.1", - "uuid": "^3.1.0" + "chalk": "2.2.2", + "log-symbols": "2.2.0", + "loglevelnext": "1.0.5", + "uuid": "3.2.1" } }, "webpack-merge": { @@ -11464,7 +11470,7 @@ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.2.tgz", "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==", "requires": { - "lodash": "^4.17.5" + "lodash": "4.17.10" } }, "webpack-sources": { @@ -11472,8 +11478,8 @@ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "source-list-map": "2.0.0", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -11488,7 +11494,7 @@ "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.4.tgz", "integrity": "sha1-xcTj1pD50vZKlVDgeodn+Xlqpdg=", "requires": { - "webpack-core": "^0.6.8" + "webpack-core": "0.6.9" } }, "websocket-driver": { @@ -11496,8 +11502,8 @@ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" + "http-parser-js": "0.4.12", + "websocket-extensions": "0.1.3" } }, "websocket-extensions": { @@ -11515,7 +11521,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -11528,7 +11534,7 @@ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "requires": { - "string-width": "^1.0.2" + "string-width": "1.0.2" } }, "widest-line": { @@ -11536,7 +11542,7 @@ "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "requires": { - "string-width": "^2.1.1" + "string-width": "2.1.1" }, "dependencies": { "ansi-regex": { @@ -11554,8 +11560,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -11563,7 +11569,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -11584,7 +11590,7 @@ "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "requires": { - "errno": "~0.1.7" + "errno": "0.1.7" } }, "wrap-ansi": { @@ -11592,8 +11598,8 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" } }, "wrappy": { @@ -11606,9 +11612,9 @@ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" } }, "ws": { @@ -11616,8 +11622,8 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" + "options": "0.0.6", + "ultron": "1.0.2" } }, "wtf-8": { @@ -11640,8 +11646,8 @@ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" + "sax": "1.2.4", + "xmlbuilder": "9.0.7" }, "dependencies": { "sax": { @@ -11671,7 +11677,7 @@ "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", "requires": { - "cuint": "^0.2.2" + "cuint": "0.2.2" } }, "y18n": { @@ -11690,9 +11696,9 @@ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } }, @@ -11701,7 +11707,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", "requires": { - "camelcase": "^3.0.0" + "camelcase": "3.0.0" }, "dependencies": { "camelcase": { diff --git a/package.json b/package.json index 67c6f5909f..101f8f48ee 100644 --- a/package.json +++ b/package.json @@ -162,6 +162,7 @@ "zone.js": "^0.8.19" }, "devDependencies": { - "license-checker": "^16.0.0" + "license-checker": "^16.0.0", + "tslint-no-circular-imports": "^0.3.0" } } diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 5143204494..a3e0e1ac6a 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -23,15 +23,6 @@ import { import { resolve as nodeResolve } from '@angular-devkit/core/node'; import { Observable, forkJoin, of, throwError } from 'rxjs'; import { concatMap, map, tap } from 'rxjs/operators'; -import { - BuildEvent, - Builder, - BuilderConstructor, - BuilderContext, - BuilderDescription, - BuilderPaths, - BuilderPathsMap, -} from './builder'; export class ProjectNotFoundException extends BaseException { constructor(projectName: string) { @@ -68,6 +59,44 @@ export class BuilderNotFoundException extends BaseException { } } +export interface BuilderContext { + logger: logging.Logger; + host: virtualFs.Host<{}>; + workspace: experimental.workspace.Workspace; + architect: Architect; +} + +// TODO: use Build Event Protocol +// https://docs.bazel.build/versions/master/build-event-protocol.html +// https://github.com/googleapis/googleapis/tree/master/google/devtools/build/v1 +export interface BuildEvent { + success: boolean; +} + +export interface Builder { + run(builderConfig: BuilderConfiguration>): Observable; +} + +export interface BuilderPathsMap { + builders: { [k: string]: BuilderPaths }; +} + +export interface BuilderPaths { + class: Path; + schema: Path; + description: string; +} + +export interface BuilderDescription { + name: string; + schema: JsonObject; + description: string; +} + +export interface BuilderConstructor { + new(context: BuilderContext): Builder; +} + export interface BuilderConfiguration { root: Path; sourceRoot?: Path; diff --git a/packages/angular_devkit/architect/src/builder.ts b/packages/angular_devkit/architect/src/builder.ts deleted file mode 100644 index 525e03a41e..0000000000 --- a/packages/angular_devkit/architect/src/builder.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { JsonObject, Path, experimental, logging, virtualFs } from '@angular-devkit/core'; -import { Observable } from 'rxjs'; -import { Architect, BuilderConfiguration } from './architect'; - - -export interface BuilderContext { - logger: logging.Logger; - host: virtualFs.Host<{}>; - workspace: experimental.workspace.Workspace; - architect: Architect; -} - -// TODO: use Build Event Protocol -// https://docs.bazel.build/versions/master/build-event-protocol.html -// https://github.com/googleapis/googleapis/tree/master/google/devtools/build/v1 -export interface BuildEvent { - success: boolean; -} - -export interface Builder { - run(builderConfig: BuilderConfiguration>): Observable; -} - -export interface BuilderPathsMap { - builders: { [k: string]: BuilderPaths }; -} - -export interface BuilderPaths { - class: Path; - schema: Path; - description: string; -} - -export interface BuilderDescription { - name: string; - schema: JsonObject; - description: string; -} - -export interface BuilderConstructor { - new(context: BuilderContext): Builder; -} diff --git a/packages/angular_devkit/architect/src/index.ts b/packages/angular_devkit/architect/src/index.ts index 44e3fe06ab..c4635420df 100644 --- a/packages/angular_devkit/architect/src/index.ts +++ b/packages/angular_devkit/architect/src/index.ts @@ -7,4 +7,3 @@ */ export * from './architect'; -export * from './builder'; diff --git a/packages/angular_devkit/schematics/src/engine/collection.ts b/packages/angular_devkit/schematics/src/engine/collection.ts deleted file mode 100644 index d15705c0fd..0000000000 --- a/packages/angular_devkit/schematics/src/engine/collection.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { SchematicEngine } from './engine'; -import { Collection, CollectionDescription, Schematic } from './interface'; - - -export class CollectionImpl - implements Collection { - constructor(private _description: CollectionDescription, - private _engine: SchematicEngine, - public readonly baseDescriptions?: Array>) { - } - - get description() { return this._description; } - get name() { return this.description.name || ''; } - - createSchematic(name: string, allowPrivate = false): Schematic { - return this._engine.createSchematic(name, this, allowPrivate); - } - - listSchematicNames(): string[] { - return this._engine.listSchematicNames(this); - } -} diff --git a/packages/angular_devkit/schematics/src/engine/engine.ts b/packages/angular_devkit/schematics/src/engine/engine.ts index f168e47261..841e9a835f 100644 --- a/packages/angular_devkit/schematics/src/engine/engine.ts +++ b/packages/angular_devkit/schematics/src/engine/engine.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { BaseException, logging } from '@angular-devkit/core'; +import { BaseException, PriorityQueue, logging } from '@angular-devkit/core'; import { Observable, from as observableFrom } from 'rxjs'; import { concatMap } from 'rxjs/operators'; import { Url } from 'url'; @@ -13,24 +13,23 @@ import { MergeStrategy } from '../tree/interface'; import { NullTree } from '../tree/null'; import { empty } from '../tree/static'; import { Workflow } from '../workflow'; -import { CollectionImpl } from './collection'; import { Collection, CollectionDescription, Engine, EngineHost, Schematic, + SchematicContext, SchematicDescription, Source, - TypedSchematicContext, -} from './interface'; -import { SchematicImpl } from './schematic'; -import { + TaskConfiguration, TaskConfigurationGenerator, TaskExecutor, TaskId, - TaskScheduler, -} from './task'; + TaskInfo, + TypedSchematicContext, +} from './interface'; +import { SchematicImpl } from './schematic'; export class UnknownUrlSourceProtocol extends BaseException { @@ -70,6 +69,95 @@ export class UnregisteredTaskException extends BaseException { } } +export class UnknownTaskDependencyException extends BaseException { + constructor(id: TaskId) { + super(`Unknown task dependency [ID: ${id.id}].`); + } +} + +export class CollectionImpl + implements Collection { + constructor(private _description: CollectionDescription, + private _engine: SchematicEngine, + public readonly baseDescriptions?: Array>) { + } + + get description() { return this._description; } + get name() { return this.description.name || ''; } + + createSchematic(name: string, allowPrivate = false): Schematic { + return this._engine.createSchematic(name, this, allowPrivate); + } + + listSchematicNames(): string[] { + return this._engine.listSchematicNames(this); + } +} + +export class TaskScheduler { + private _queue = new PriorityQueue((x, y) => x.priority - y.priority); + private _taskIds = new Map(); + private static _taskIdCounter = 1; + + constructor(private _context: SchematicContext) {} + + private _calculatePriority(dependencies: Set): number { + if (dependencies.size === 0) { + return 0; + } + + const prio = [...dependencies].reduce((prio, task) => prio + task.priority, 1); + + return prio; + } + + private _mapDependencies(dependencies?: Array): Set { + if (!dependencies) { + return new Set(); + } + + const tasks = dependencies.map(dep => { + const task = this._taskIds.get(dep); + if (!task) { + throw new UnknownTaskDependencyException(dep); + } + + return task; + }); + + return new Set(tasks); + } + + schedule(taskConfiguration: TaskConfiguration): TaskId { + const dependencies = this._mapDependencies(taskConfiguration.dependencies); + const priority = this._calculatePriority(dependencies); + + const task = { + id: TaskScheduler._taskIdCounter++, + priority, + configuration: taskConfiguration, + context: this._context, + }; + + this._queue.push(task); + + const id = { id: task.id }; + this._taskIds.set(id, task); + + return id; + } + + finalize(): ReadonlyArray { + const tasks = this._queue.toArray(); + this._queue.clear(); + this._taskIds.clear(); + + return tasks; + } + +} + + export class SchematicEngine implements Engine { diff --git a/packages/angular_devkit/schematics/src/engine/index.ts b/packages/angular_devkit/schematics/src/engine/index.ts new file mode 100644 index 0000000000..9f8b476cc2 --- /dev/null +++ b/packages/angular_devkit/schematics/src/engine/index.ts @@ -0,0 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +export * from './engine'; +export * from './interface'; +export * from './schematic'; diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 25ba5812f5..7470d2e678 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -10,9 +10,37 @@ import { Observable } from 'rxjs'; import { Url } from 'url'; import { FileEntry, MergeStrategy, Tree } from '../tree/interface'; import { Workflow } from '../workflow'; -import { TaskConfigurationGenerator, TaskExecutor, TaskId } from './task'; +export interface TaskConfiguration { + name: string; + dependencies?: Array; + options?: T; +} + +export interface TaskConfigurationGenerator { + toConfiguration(): TaskConfiguration; +} + +export type TaskExecutor + = (options: T | undefined, context: SchematicContext) => Promise | Observable; + +export interface TaskExecutorFactory { + readonly name: string; + create(options?: T): Promise | Observable; +} + +export interface TaskId { + readonly id: number; +} + +export interface TaskInfo { + readonly id: number; + readonly priority: number; + readonly configuration: TaskConfiguration; + readonly context: SchematicContext; +} + /** * The description (metadata) of a collection. This type contains every information the engine * needs to run. The CollectionMetadataT type parameter contains additional metadata that you diff --git a/packages/angular_devkit/schematics/src/engine/task.ts b/packages/angular_devkit/schematics/src/engine/task.ts deleted file mode 100644 index bff301f8d6..0000000000 --- a/packages/angular_devkit/schematics/src/engine/task.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { BaseException, PriorityQueue } from '@angular-devkit/core'; -import { Observable } from 'rxjs'; -import { SchematicContext } from './interface'; - -export class UnknownTaskDependencyException extends BaseException { - constructor(id: TaskId) { - super(`Unknown task dependency [ID: ${id.id}].`); - } -} - -export interface TaskConfiguration { - name: string; - dependencies?: Array; - options?: T; -} - -export interface TaskConfigurationGenerator { - toConfiguration(): TaskConfiguration; -} - -export type TaskExecutor - = (options: T | undefined, context: SchematicContext) => Promise | Observable; - -export interface TaskExecutorFactory { - readonly name: string; - create(options?: T): Promise | Observable; -} - -export interface TaskId { - readonly id: number; -} - -export interface TaskInfo { - readonly id: number; - readonly priority: number; - readonly configuration: TaskConfiguration; - readonly context: SchematicContext; -} - -export class TaskScheduler { - private _queue = new PriorityQueue((x, y) => x.priority - y.priority); - private _taskIds = new Map(); - private static _taskIdCounter = 1; - - constructor(private _context: SchematicContext) {} - - private _calculatePriority(dependencies: Set): number { - if (dependencies.size === 0) { - return 0; - } - - const prio = [...dependencies].reduce((prio, task) => prio + task.priority, 1); - - return prio; - } - - private _mapDependencies(dependencies?: Array): Set { - if (!dependencies) { - return new Set(); - } - - const tasks = dependencies.map(dep => { - const task = this._taskIds.get(dep); - if (!task) { - throw new UnknownTaskDependencyException(dep); - } - - return task; - }); - - return new Set(tasks); - } - - schedule(taskConfiguration: TaskConfiguration): TaskId { - const dependencies = this._mapDependencies(taskConfiguration.dependencies); - const priority = this._calculatePriority(dependencies); - - const task = { - id: TaskScheduler._taskIdCounter++, - priority, - configuration: taskConfiguration, - context: this._context, - }; - - this._queue.push(task); - - const id = { id: task.id }; - this._taskIds.set(id, task); - - return id; - } - - finalize(): ReadonlyArray { - const tasks = this._queue.toArray(); - this._queue.clear(); - this._taskIds.clear(); - - return tasks; - } - -} diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index 370f76bff3..be680d8abc 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -13,16 +13,7 @@ import { branch, empty, merge, optimize, partition } from './tree/static'; export { SchematicsException } from './exception/exception'; export * from './tree/action'; -export * from './engine/collection'; -export * from './engine/engine'; -export * from './engine/interface'; -export { - TaskConfiguration, - TaskConfigurationGenerator, - TaskExecutor, - TaskExecutorFactory, - TaskId, -} from './engine/task'; +export * from './engine'; export * from './exception/exception'; export * from './tree/interface'; export * from './rules/base'; diff --git a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts index 698ca0cc7f..66a36402e9 100644 --- a/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-modules-test-engine-host.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { TaskConfiguration, TaskConfigurationGenerator, TaskId } from '../src/engine/task'; +import { TaskConfiguration, TaskConfigurationGenerator, TaskId } from '../src/engine'; import { FileSystemSchematicContext } from './description'; import { NodeModulesEngineHost } from './node-module-engine-host'; diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 99077dd185..bc0b25201c 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -27,12 +27,12 @@ import { findNode, getDecoratorMetadata, getSourceNodes, + insertImport, isImported, } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { getWorkspace, getWorkspacePath } from '../utility/config'; import { getAppModulePath } from '../utility/ng-ast-utils'; -import { insertImport } from '../utility/route-utils'; import { Schema as AppShellOptions } from './schema'; diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index 4fd3e46f8d..c8d2c602f8 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -20,14 +20,13 @@ import { } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import * as ts from 'typescript'; -import { addSymbolToNgModuleMetadata, isImported } from '../utility/ast-utils'; +import { addSymbolToNgModuleMetadata, insertImport, isImported } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; import { getWorkspace, getWorkspacePath, } from '../utility/config'; import { getAppModulePath } from '../utility/ng-ast-utils'; -import { insertImport } from '../utility/route-utils'; import { Schema as ServiceWorkerOptions } from './schema'; const packageJsonPath = '/package.json'; diff --git a/packages/schematics/angular/utility/ast-utils.ts b/packages/schematics/angular/utility/ast-utils.ts index 253c9692dc..99640ce86a 100644 --- a/packages/schematics/angular/utility/ast-utils.ts +++ b/packages/schematics/angular/utility/ast-utils.ts @@ -6,8 +6,86 @@ * found in the LICENSE file at https://angular.io/license */ import * as ts from 'typescript'; -import { Change, InsertChange } from './change'; -import { insertImport } from './route-utils'; +import { Change, InsertChange, NoopChange } from './change'; + + +/** + * Add Import `import { symbolName } from fileName` if the import doesn't exit + * already. Assumes fileToEdit can be resolved and accessed. + * @param fileToEdit (file we want to add import to) + * @param symbolName (item to import) + * @param fileName (path to the file) + * @param isDefault (if true, import follows style for importing default exports) + * @return Change + */ +export function insertImport(source: ts.SourceFile, fileToEdit: string, symbolName: string, + fileName: string, isDefault = false): Change { + const rootNode = source; + const allImports = findNodes(rootNode, ts.SyntaxKind.ImportDeclaration); + + // get nodes that map to import statements from the file fileName + const relevantImports = allImports.filter(node => { + // StringLiteral of the ImportDeclaration is the import file (fileName in this case). + const importFiles = node.getChildren() + .filter(child => child.kind === ts.SyntaxKind.StringLiteral) + .map(n => (n as ts.StringLiteral).text); + + return importFiles.filter(file => file === fileName).length === 1; + }); + + if (relevantImports.length > 0) { + let importsAsterisk = false; + // imports from import file + const imports: ts.Node[] = []; + relevantImports.forEach(n => { + Array.prototype.push.apply(imports, findNodes(n, ts.SyntaxKind.Identifier)); + if (findNodes(n, ts.SyntaxKind.AsteriskToken).length > 0) { + importsAsterisk = true; + } + }); + + // if imports * from fileName, don't add symbolName + if (importsAsterisk) { + return new NoopChange(); + } + + const importTextNodes = imports.filter(n => (n as ts.Identifier).text === symbolName); + + // insert import if it's not there + if (importTextNodes.length === 0) { + const fallbackPos = + findNodes(relevantImports[0], ts.SyntaxKind.CloseBraceToken)[0].getStart() || + findNodes(relevantImports[0], ts.SyntaxKind.FromKeyword)[0].getStart(); + + return insertAfterLastOccurrence(imports, `, ${symbolName}`, fileToEdit, fallbackPos); + } + + return new NoopChange(); + } + + // no such import declaration exists + const useStrict = findNodes(rootNode, ts.SyntaxKind.StringLiteral) + .filter((n: ts.StringLiteral) => n.text === 'use strict'); + let fallbackPos = 0; + if (useStrict.length > 0) { + fallbackPos = useStrict[0].end; + } + const open = isDefault ? '' : '{ '; + const close = isDefault ? '' : ' }'; + // if there are no imports or 'use strict' statement, insert import at beginning of file + const insertAtBeginning = allImports.length === 0 && useStrict.length === 0; + const separator = insertAtBeginning ? '' : ';\n'; + const toInsert = `${separator}import ${open}${symbolName}${close}` + + ` from '${fileName}'${insertAtBeginning ? ';\n' : ''}`; + + return insertAfterLastOccurrence( + allImports, + toInsert, + fileToEdit, + fallbackPos, + ts.SyntaxKind.StringLiteral, + ); +} /** diff --git a/packages/schematics/angular/utility/route-utils.ts b/packages/schematics/angular/utility/route-utils.ts deleted file mode 100644 index 67e7e4974d..0000000000 --- a/packages/schematics/angular/utility/route-utils.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import * as ts from 'typescript'; -import { findNodes, insertAfterLastOccurrence } from './ast-utils'; -import { Change, NoopChange } from './change'; - - -/** -* Add Import `import { symbolName } from fileName` if the import doesn't exit -* already. Assumes fileToEdit can be resolved and accessed. -* @param fileToEdit (file we want to add import to) -* @param symbolName (item to import) -* @param fileName (path to the file) -* @param isDefault (if true, import follows style for importing default exports) -* @return Change -*/ - -export function insertImport(source: ts.SourceFile, fileToEdit: string, symbolName: string, - fileName: string, isDefault = false): Change { - const rootNode = source; - const allImports = findNodes(rootNode, ts.SyntaxKind.ImportDeclaration); - - // get nodes that map to import statements from the file fileName - const relevantImports = allImports.filter(node => { - // StringLiteral of the ImportDeclaration is the import file (fileName in this case). - const importFiles = node.getChildren() - .filter(child => child.kind === ts.SyntaxKind.StringLiteral) - .map(n => (n as ts.StringLiteral).text); - - return importFiles.filter(file => file === fileName).length === 1; - }); - - if (relevantImports.length > 0) { - let importsAsterisk = false; - // imports from import file - const imports: ts.Node[] = []; - relevantImports.forEach(n => { - Array.prototype.push.apply(imports, findNodes(n, ts.SyntaxKind.Identifier)); - if (findNodes(n, ts.SyntaxKind.AsteriskToken).length > 0) { - importsAsterisk = true; - } - }); - - // if imports * from fileName, don't add symbolName - if (importsAsterisk) { - return new NoopChange(); - } - - const importTextNodes = imports.filter(n => (n as ts.Identifier).text === symbolName); - - // insert import if it's not there - if (importTextNodes.length === 0) { - const fallbackPos = - findNodes(relevantImports[0], ts.SyntaxKind.CloseBraceToken)[0].getStart() || - findNodes(relevantImports[0], ts.SyntaxKind.FromKeyword)[0].getStart(); - - return insertAfterLastOccurrence(imports, `, ${symbolName}`, fileToEdit, fallbackPos); - } - - return new NoopChange(); - } - - // no such import declaration exists - const useStrict = findNodes(rootNode, ts.SyntaxKind.StringLiteral) - .filter((n: ts.StringLiteral) => n.text === 'use strict'); - let fallbackPos = 0; - if (useStrict.length > 0) { - fallbackPos = useStrict[0].end; - } - const open = isDefault ? '' : '{ '; - const close = isDefault ? '' : ' }'; - // if there are no imports or 'use strict' statement, insert import at beginning of file - const insertAtBeginning = allImports.length === 0 && useStrict.length === 0; - const separator = insertAtBeginning ? '' : ';\n'; - const toInsert = `${separator}import ${open}${symbolName}${close}` + - ` from '${fileName}'${insertAtBeginning ? ';\n' : ''}`; - - return insertAfterLastOccurrence( - allImports, - toInsert, - fileToEdit, - fallbackPos, - ts.SyntaxKind.StringLiteral, - ); -} diff --git a/tslint.json b/tslint.json index 5ac13c834d..a3e5f9075c 100644 --- a/tslint.json +++ b/tslint.json @@ -1,4 +1,5 @@ { + "extends": "tslint-no-circular-imports", "rulesDirectory": [ "dist/rules" ], From 452cd1d3c70a138d55a94031aea3ced41b2888a2 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 10 May 2018 22:04:20 -0400 Subject: [PATCH 587/724] refactor(@angular-devkit/build-angular): make node-sass optional --- packages/angular_devkit/build_angular/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 4f8ebd86fb..363bcad652 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -33,7 +33,6 @@ "memory-fs": "^0.4.1", "mini-css-extract-plugin": "~0.4.0", "minimatch": "^3.0.4", - "node-sass": "^4.9.0", "parse5": "^4.0.0", "opn": "^5.1.0", "portfinder": "^1.0.13", @@ -60,5 +59,8 @@ "webpack-merge": "^4.1.2", "webpack-sources": "^1.1.0", "webpack-subresource-integrity": "^1.1.0-rc.4" + }, + "optionalDependencies": { + "node-sass": "^4.9.0" } } \ No newline at end of file From db2f93cbb8a4620c131fda1d7f70ada96c3f321c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 11 May 2018 13:13:16 -0400 Subject: [PATCH 588/724] fix(@schematics/update): support upper unbounded ranges Fixes: angular/angular-cli#10621 --- packages/schematics/update/update/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index b4ffdefdd3..c2e00a0c11 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -38,7 +38,9 @@ const peerCompatibleWhitelist: { [name: string]: PeerVersionTransform } = { while (!semver.gtr(major + '.0.0', range)) { major++; if (major >= 99) { - throw new SchematicsException(`Invalid range: ${JSON.stringify(range)}`); + // Use original range if it supports a major this high + // Range is most likely unbounded (e.g., >=5.0.0) + return range; } } From ab3c5c5d9f149eb34cdc0f4a2cd826374c285482 Mon Sep 17 00:00:00 2001 From: guurgle Date: Sat, 12 May 2018 10:48:48 -0700 Subject: [PATCH 589/724] fix(@angular-devkit/build-angular): Remove space in "${options.host}: ${options.port}" --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index ca4944d42f..3bcc5b2fd7 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -178,8 +178,8 @@ export class DevServerBuilder implements Builder { this.context.logger.info(tags.oneLine` ** - Angular Live Development Server is listening on ${options.host}: - ${options.port}, open your browser on ${serverAddress}${webpackDevServerConfig.publicPath} + Angular Live Development Server is listening on ${options.host}:${options.port}, + open your browser on ${serverAddress}${webpackDevServerConfig.publicPath} ** `); From 6b047492a20264d0a11d140b0107e6043e366ebf Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 10 May 2018 09:45:30 +0100 Subject: [PATCH 590/724] docs: add snapshot links Fix https://github.com/angular/devkit/issues/762 --- README.md | 28 ++++++++++++++-------------- scripts/templates/readme.ejs | 3 +++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a96f3614bb..4b7737e7ef 100644 --- a/README.md +++ b/README.md @@ -50,29 +50,29 @@ This is a monorepo which contains many packages: | Project | Package | Version | Links | |---|---|---|---| -**Architect** | [`@angular-devkit/architect`](https://npmjs.com/package/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](https://npmjs.com/package/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) -**Architect CLI** | [`@angular-devkit/architect-cli`](https://npmjs.com/package/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](https://npmjs.com/package/@angular-devkit/architect-cli) | -**Build Angular** | [`@angular-devkit/build-angular`](https://npmjs.com/package/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](https://npmjs.com/package/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) -**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) -**Build Optimizer** | [`@angular-devkit/build-optimizer`](https://npmjs.com/package/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](https://npmjs.com/package/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) -**Core** | [`@angular-devkit/core`](https://npmjs.com/package/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](https://npmjs.com/package/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) -**Schematics** | [`@angular-devkit/schematics`](https://npmjs.com/package/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](https://npmjs.com/package/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) -**Schematics CLI** | [`@angular-devkit/schematics-cli`](https://npmjs.com/package/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](https://npmjs.com/package/@angular-devkit/schematics-cli) | +**Architect** | [`@angular-devkit/architect`](https://npmjs.com/package/@angular-devkit/architect) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect/latest.svg)](https://npmjs.com/package/@angular-devkit/architect) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md) [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-architect-builds) +**Architect CLI** | [`@angular-devkit/architect-cli`](https://npmjs.com/package/@angular-devkit/architect-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Farchitect-cli/latest.svg)](https://npmjs.com/package/@angular-devkit/architect-cli) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-architect-cli-builds) +**Build Angular** | [`@angular-devkit/build-angular`](https://npmjs.com/package/@angular-devkit/build-angular) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-angular/latest.svg)](https://npmjs.com/package/@angular-devkit/build-angular) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md) [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-build-angular-builds) +**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-ng-packagr/latest.svg)](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md) [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-build-ng-packagr-builds) +**Build Optimizer** | [`@angular-devkit/build-optimizer`](https://npmjs.com/package/@angular-devkit/build-optimizer) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fbuild-optimizer/latest.svg)](https://npmjs.com/package/@angular-devkit/build-optimizer) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md) [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-build-optimizer-builds) +**Core** | [`@angular-devkit/core`](https://npmjs.com/package/@angular-devkit/core) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fcore/latest.svg)](https://npmjs.com/package/@angular-devkit/core) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md) [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-core-builds) +**Schematics** | [`@angular-devkit/schematics`](https://npmjs.com/package/@angular-devkit/schematics) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics/latest.svg)](https://npmjs.com/package/@angular-devkit/schematics) | [![README](https://img.shields.io/badge/README--green.svg)](https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md) [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-schematics-builds) +**Schematics CLI** | [`@angular-devkit/schematics-cli`](https://npmjs.com/package/@angular-devkit/schematics-cli) | [![latest](https://img.shields.io/npm/v/%40angular-devkit%2Fschematics-cli/latest.svg)](https://npmjs.com/package/@angular-devkit/schematics-cli) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-devkit-schematics-cli-builds) #### Schematics | Project | Package | Version | Links | |---|---|---|---| -**Angular PWA Schematics** | [`@angular/pwa`](https://npmjs.com/package/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](https://npmjs.com/package/@angular/pwa) | -**Angular Schematics** | [`@schematics/angular`](https://npmjs.com/package/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](https://npmjs.com/package/@schematics/angular) | -**Package JSON Update Schematics** | [`@schematics/package-update`](https://npmjs.com/package/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](https://npmjs.com/package/@schematics/package-update) | -**Schematics Schematics** | [`@schematics/schematics`](https://npmjs.com/package/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](https://npmjs.com/package/@schematics/schematics) | -**Package Update Schematics** | [`@schematics/update`](https://npmjs.com/package/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](https://npmjs.com/package/@schematics/update) | +**Angular PWA Schematics** | [`@angular/pwa`](https://npmjs.com/package/@angular/pwa) | [![latest](https://img.shields.io/npm/v/%40angular%2Fpwa/latest.svg)](https://npmjs.com/package/@angular/pwa) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/angular-pwa-builds) +**Angular Schematics** | [`@schematics/angular`](https://npmjs.com/package/@schematics/angular) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fangular/latest.svg)](https://npmjs.com/package/@schematics/angular) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/schematics-angular-builds) +**Package JSON Update Schematics** | [`@schematics/package-update`](https://npmjs.com/package/@schematics/package-update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fpackage-update/latest.svg)](https://npmjs.com/package/@schematics/package-update) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/schematics-package-update-builds) +**Schematics Schematics** | [`@schematics/schematics`](https://npmjs.com/package/@schematics/schematics) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fschematics/latest.svg)](https://npmjs.com/package/@schematics/schematics) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/schematics-schematics-builds) +**Package Update Schematics** | [`@schematics/update`](https://npmjs.com/package/@schematics/update) | [![latest](https://img.shields.io/npm/v/%40schematics%2Fupdate/latest.svg)](https://npmjs.com/package/@schematics/update) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/schematics-update-builds) #### Misc | Project | Package | Version | Links | |---|---|---|---| -**Webpack Angular Plugin** | [`@ngtools/webpack`](https://npmjs.com/package/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](https://npmjs.com/package/@ngtools/webpack) | +**Webpack Angular Plugin** | [`@ngtools/webpack`](https://npmjs.com/package/@ngtools/webpack) | [![latest](https://img.shields.io/npm/v/%40ngtools%2Fwebpack/latest.svg)](https://npmjs.com/package/@ngtools/webpack) | [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/angular/ngtools-webpack-builds) diff --git a/scripts/templates/readme.ejs b/scripts/templates/readme.ejs index 8732ef3a83..8b7c013cf1 100644 --- a/scripts/templates/readme.ejs +++ b/scripts/templates/readme.ejs @@ -82,6 +82,9 @@ for (const pkgName of Object.keys(packages)) { %> | [![latest](https://img.shields.io/npm/v/<%= encode(pkgName) %>/latest.svg)](https://npmjs.com/package/<%= pkgName %>)<% %> | <% for (const link of mrPkg.links || []) { %>[![<%= link.label %>](https://img.shields.io/badge/<%= link.label %>--<%= link.color || 'green' %>.svg)](<%= link.url %>)<% + } + if (mrPkg.snapshotRepo) { + %> [![snapshot](https://img.shields.io/badge/snapshot--blue.svg)](https://github.com/<%= mrPkg.snapshotRepo %>)<% } %> <% } %> <% } %> From 8a72879caf0b6d03d71ba45b1c0879e8ef3329b5 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Tue, 17 Apr 2018 12:08:00 +0200 Subject: [PATCH 591/724] fix(@schematics/angular): e2e should use the prefix Now that the CLI repects the prefix specified, the generated e2e test should also use it. --- packages/schematics/angular/application/index.ts | 1 + packages/schematics/angular/e2e/files/src/app.e2e-spec.ts | 2 +- packages/schematics/angular/e2e/schema.d.ts | 4 ++++ packages/schematics/angular/e2e/schema.json | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 80a71d0153..176cbbb2b1 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -275,6 +275,7 @@ export default function (options: ApplicationOptions): Rule { name: `${options.name}-e2e`, relatedAppName: options.name, rootSelector: appRootSelector, + prefix: options.prefix || 'app', }; if (options.projectRoot !== undefined) { e2eOptions.projectRoot = 'e2e'; diff --git a/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts index e42d1f965f..142212d50d 100644 --- a/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts +++ b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts @@ -9,6 +9,6 @@ describe('workspace-project App', () => { it('should display welcome message', () => { page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to app!'); + expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!'); }); }); diff --git a/packages/schematics/angular/e2e/schema.d.ts b/packages/schematics/angular/e2e/schema.d.ts index 2180f69412..5d29ba12d4 100644 --- a/packages/schematics/angular/e2e/schema.d.ts +++ b/packages/schematics/angular/e2e/schema.d.ts @@ -23,4 +23,8 @@ export interface Schema { * The name of the app being tested. */ relatedAppName: string; + /** + * The prefix to apply. + */ + prefix?: string; } diff --git a/packages/schematics/angular/e2e/schema.json b/packages/schematics/angular/e2e/schema.json index df166cf4a2..491d77d426 100644 --- a/packages/schematics/angular/e2e/schema.json +++ b/packages/schematics/angular/e2e/schema.json @@ -26,6 +26,13 @@ "relatedAppName": { "description": "The name of the app being tested.", "type": "string" + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "The prefix to apply to generated selectors.", + "default": "app", + "alias": "p" } }, "required": [ From c77c7b0d8df1b4fbc2ef401b46f1d35d5310e2af Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Tue, 1 May 2018 21:41:40 -0400 Subject: [PATCH 592/724] fix(@schematics/angular): generate server tsconfig to correct location for universal schematic --- .../{src => root}/__tsconfigFileName__.json | 2 +- .../schematics/angular/universal/index.ts | 25 ++++++++-- .../angular/universal/index_spec.ts | 47 +++++++++++++++++-- 3 files changed, 64 insertions(+), 10 deletions(-) rename packages/schematics/angular/universal/files/{src => root}/__tsconfigFileName__.json (58%) diff --git a/packages/schematics/angular/universal/files/src/__tsconfigFileName__.json b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json similarity index 58% rename from packages/schematics/angular/universal/files/src/__tsconfigFileName__.json rename to packages/schematics/angular/universal/files/root/__tsconfigFileName__.json index 47a5d8858e..8db992afb9 100644 --- a/packages/schematics/angular/universal/files/src/__tsconfigFileName__.json +++ b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json @@ -6,6 +6,6 @@ "module": "commonjs" }, "angularCompilerOptions": { - "entryModule": "<%= appDir %>/<%= stripTsExtension(rootModuleFileName) %>#<%= rootModuleClassName %>" + "entryModule": "<%= rootInSrc ? '' : 'src/' %><%= appDir %>/<%= stripTsExtension(rootModuleFileName) %>#<%= rootModuleClassName %>" } } diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index f03a2e0361..b6f79ba235 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -7,8 +7,10 @@ */ import { JsonObject, + Path, basename, experimental, + join, normalize, parseJson, strings, @@ -67,7 +69,7 @@ function getClientArchitect( return clientArchitect; } -function updateConfigFile(options: UniversalOptions): Rule { +function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): Rule { return (host: Tree) => { const workspace = getWorkspace(host); if (!workspace.projects[options.clientProject]) { @@ -82,7 +84,7 @@ function updateConfigFile(options: UniversalOptions): Rule { const builderOptions: JsonObject = { outputPath: `dist/${options.clientProject}-server`, main: `${clientProject.root}src/main.server.ts`, - tsConfig: `${clientProject.root}src/tsconfig.server.json`, + tsConfig: join(tsConfigDirectory, `${options.tsconfigFileName}.json`), }; const serverTarget: JsonObject = { builder: '@angular-devkit/build-angular:server', @@ -214,26 +216,39 @@ export default function (options: UniversalOptions): Rule { const clientArchitect = getClientArchitect(host, options); const outDir = getTsConfigOutDir(host, clientArchitect); const tsConfigExtends = basename(clientArchitect.build.options.tsConfig); + const rootInSrc = clientProject.root === ''; + const tsConfigDirectory = join(normalize(clientProject.root), rootInSrc ? 'src' : ''); if (!options.skipInstall) { context.addTask(new NodePackageInstallTask()); } - const templateSource = apply(url('./files'), [ + const templateSource = apply(url('./files/src'), [ + template({ + ...strings, + ...options as object, + stripTsExtension: (s: string) => { return s.replace(/\.ts$/, ''); }, + }), + move(join(normalize(clientProject.root), 'src')), + ]); + + const rootSource = apply(url('./files/root'), [ template({ ...strings, ...options as object, stripTsExtension: (s: string) => { return s.replace(/\.ts$/, ''); }, outDir, tsConfigExtends, + rootInSrc, }), - move(clientProject.root), + move(tsConfigDirectory), ]); return chain([ mergeWith(templateSource), + mergeWith(rootSource), addDependencies(), - updateConfigFile(options), + updateConfigFile(options, tsConfigDirectory), wrapBootstrapCall(options), addServerTransition(options), ])(host, context); diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 9049ed690b..7e43e3393b 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -19,6 +19,9 @@ describe('Universal Schematic', () => { const defaultOptions: UniversalOptions = { clientProject: 'bar', }; + const workspaceUniversalOptions: UniversalOptions = { + clientProject: 'workspace', + }; const workspaceOptions: WorkspaceOptions = { name: 'workspace', @@ -36,10 +39,22 @@ describe('Universal Schematic', () => { skipPackageJson: false, }; + const initialWorkspaceAppOptions: ApplicationOptions = { + name: 'workspace', + projectRoot: '', + inlineStyle: false, + inlineTemplate: false, + routing: false, + style: 'css', + skipTests: false, + skipPackageJson: false, + }; + let appTree: UnitTestTree; beforeEach(() => { appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = schematicRunner.runSchematic('application', initialWorkspaceAppOptions, appTree); appTree = schematicRunner.runSchematic('application', appOptions, appTree); }); @@ -57,9 +72,30 @@ describe('Universal Schematic', () => { expect(contents).toMatch(/export { AppServerModule } from '\.\/app\/app\.server\.module'/); }); - it('should create a tsconfig file', () => { + it('should create a tsconfig file for the workspace project', () => { + const tree = schematicRunner.runSchematic('universal', workspaceUniversalOptions, appTree); + const filePath = '/src/tsconfig.server.json'; + expect(tree.exists(filePath)).toEqual(true); + const contents = tree.readContent(filePath); + expect(JSON.parse(contents)).toEqual({ + extends: './tsconfig.app.json', + compilerOptions: { + outDir: '../out-tsc/app-server', + baseUrl: '.', + module: 'commonjs', + }, + angularCompilerOptions: { + entryModule: 'app/app.server.module#AppServerModule', + }, + }); + const angularConfig = JSON.parse(tree.readContent('angular.json')); + expect(angularConfig.projects.workspace.architect.server.options.tsConfig) + .toEqual('src/tsconfig.server.json'); + }); + + it('should create a tsconfig file for a generated application', () => { const tree = schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/projects/bar/src/tsconfig.server.json'; + const filePath = '/projects/bar/tsconfig.server.json'; expect(tree.exists(filePath)).toEqual(true); const contents = tree.readContent(filePath); expect(JSON.parse(contents)).toEqual({ @@ -70,9 +106,12 @@ describe('Universal Schematic', () => { module: 'commonjs', }, angularCompilerOptions: { - entryModule: 'app/app.server.module#AppServerModule', + entryModule: 'src/app/app.server.module#AppServerModule', }, }); + const angularConfig = JSON.parse(tree.readContent('angular.json')); + expect(angularConfig.projects.bar.architect.server.options.tsConfig) + .toEqual('projects/bar/tsconfig.server.json'); }); it('should add dependency: @angular/platform-server', () => { @@ -93,7 +132,7 @@ describe('Universal Schematic', () => { const opts = arch.server.options; expect(opts.outputPath).toEqual('dist/bar-server'); expect(opts.main).toEqual('projects/bar/src/main.server.ts'); - expect(opts.tsConfig).toEqual('projects/bar/src/tsconfig.server.json'); + expect(opts.tsConfig).toEqual('projects/bar/tsconfig.server.json'); }); it('should add a server transition to BrowerModule import', () => { From 98592772a4619d340806c92119bcfda7727649df Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 2 May 2018 11:39:25 -0700 Subject: [PATCH 593/724] fix(@schematics/update): Allow usage strict SSL configuration fixes #10596 --- packages/schematics/update/update/npm.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index 5656b5ef54..372621e32f 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -91,6 +91,7 @@ export function getNpmPackageJson( return concat( getNpmConfigOption('proxy'), getNpmConfigOption('https-proxy'), + getNpmConfigOption('strict-ssl'), ).pipe( toArray(), concatMap(options => { @@ -101,6 +102,13 @@ export function getNpmPackageJson( http: options[0], https: options[1], }, + ssl: { + ...(options[2] === 'false' + ? { strict: false } + : (options[2] === 'true' + ? { strict: true } + : {})), + }, }); client.log.level = 'silent'; const params = { From dec89d702e3646b375d4c6bf4fbeef798f788007 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Mon, 14 May 2018 15:51:47 -0400 Subject: [PATCH 594/724] fix(@schematics/angular): Fix new project default options --- packages/schematics/angular/ng-new/schema.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json index 9a53a97e89..e25ab42f07 100644 --- a/packages/schematics/angular/ng-new/schema.json +++ b/packages/schematics/angular/ng-new/schema.json @@ -6,9 +6,7 @@ "properties": { "directory": { "type": "string", - "format": "path", - "description": "The directory name to create the workspace in.", - "default": "" + "description": "The directory name to create the workspace in." }, "name": { "description": "The name of the workspace.", From ddf7eddec3d7eb8f6f2c1277d2b951f73f151e0b Mon Sep 17 00:00:00 2001 From: Amit Portnoy <1131991+amitport@users.noreply.github.com> Date: Mon, 14 May 2018 08:09:56 +0300 Subject: [PATCH 595/724] fix(@angular-devkit/build-angular): support mjs extension fix for https://github.com/angular/angular-cli/issues/10744 --- .../src/angular-cli-files/models/webpack-configs/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index d34b783cf9..76b4709277 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -237,7 +237,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) { mode: buildOptions.optimization ? 'production' : 'development', devtool: false, resolve: { - extensions: ['.ts', '.js'], + extensions: ['.ts', '.mjs', '.js'], symlinks: !buildOptions.preserveSymlinks, modules: [ wco.tsConfig.options.baseUrl || projectRoot, From d715cc9149bd811278a5ac53c8ab1f597bb0c9ed Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 11 May 2018 10:23:05 +0100 Subject: [PATCH 596/724] fix(@schematics/angular): fix scoped library paths Partially address https://github.com/angular/angular-cli/issues/10615 --- .../files/__projectRoot__/ng-package.json | 4 ++-- .../__projectRoot__/ng-package.prod.json | 4 ++-- packages/schematics/angular/library/index.ts | 23 ++++++++++--------- .../schematics/angular/library/index_spec.ts | 6 ++++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json index 97c51503bb..96795b12e9 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/ng-package.json +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.json @@ -1,6 +1,6 @@ { - "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/ng-package.schema.json", - "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/<%= dasherize(packageName) %>", + "$schema": "<%= relativePathToWorkspaceRoot %>/node_modules/ng-packagr/ng-package.schema.json", + "dest": "<%= relativePathToWorkspaceRoot %>/<%= distRoot %>", "deleteDestPath": false, "lib": { "entryFile": "src/<%= entryFile %>.ts" diff --git a/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json b/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json index f41a75a4cc..c0f915caf7 100644 --- a/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json +++ b/packages/schematics/angular/library/files/__projectRoot__/ng-package.prod.json @@ -1,6 +1,6 @@ { - "$schema": "<%= projectRoot.split('/').map(x => '..').join('/') %>/node_modules/ng-packagr/ng-package.schema.json", - "dest": "<%= projectRoot.split('/').map(x => '..').join('/') %>/dist/lib", + "$schema": "<%= relativePathToWorkspaceRoot %>/node_modules/ng-packagr/ng-package.schema.json", + "dest": "<%= relativePathToWorkspaceRoot %>/<%= distRoot %>", "lib": { "entryFile": "src/<%= entryFile %>.ts" } diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 10fb3736e1..71d25e8e4e 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -69,7 +69,7 @@ function updateJsonFile(host: Tree, path: string, callback: UpdateJsonFn): return host; } -function updateTsConfig(npmPackageName: string) { +function updateTsConfig(packageName: string, distRoot: string) { return (host: Tree) => { if (!host.exists('tsconfig.json')) { return host; } @@ -78,10 +78,10 @@ function updateTsConfig(npmPackageName: string) { if (!tsconfig.compilerOptions.paths) { tsconfig.compilerOptions.paths = {}; } - if (!tsconfig.compilerOptions.paths[npmPackageName]) { - tsconfig.compilerOptions.paths[npmPackageName] = []; + if (!tsconfig.compilerOptions.paths[packageName]) { + tsconfig.compilerOptions.paths[packageName] = []; } - tsconfig.compilerOptions.paths[npmPackageName].push(`dist/${npmPackageName}`); + tsconfig.compilerOptions.paths[packageName].push(distRoot); }); }; } @@ -183,7 +183,7 @@ export default function (options: LibraryOptions): Rule { // If scoped project (i.e. "@foo/bar"), convert projectDir to "foo/bar". const packageName = options.name; - let scopeName = ''; + let scopeName = null; if (/^@.*\/.*/.test(options.name)) { const [scope, name] = options.name.split('/'); scopeName = scope.replace(/^@/, ''); @@ -192,11 +192,11 @@ export default function (options: LibraryOptions): Rule { const workspace = getWorkspace(host); const newProjectRoot = workspace.newProjectRoot; - let projectRoot = `${newProjectRoot}/${strings.dasherize(options.name)}`; - if (scopeName) { - projectRoot = - `${newProjectRoot}/${strings.dasherize(scopeName)}/${strings.dasherize(options.name)}`; - } + + const scopeFolder = scopeName ? strings.dasherize(scopeName) + '/' : ''; + const folderName = `${scopeFolder}${strings.dasherize(options.name)}`; + const projectRoot = `${newProjectRoot}/${folderName}`; + const distRoot = `dist/${folderName}`; const sourceDir = `${projectRoot}/src/lib`; const relativePathToWorkspaceRoot = projectRoot.split('/').map(x => '..').join('/'); @@ -207,6 +207,7 @@ export default function (options: LibraryOptions): Rule { ...options, packageName, projectRoot, + distRoot, relativePathToWorkspaceRoot, prefix, }), @@ -219,7 +220,7 @@ export default function (options: LibraryOptions): Rule { branchAndMerge(mergeWith(templateSource)), addAppToWorkspaceFile(options, workspace, projectRoot, packageName), options.skipPackageJson ? noop() : addDependenciesToPackageJson(), - options.skipTsConfig ? noop() : updateTsConfig(options.name), + options.skipTsConfig ? noop() : updateTsConfig(packageName, distRoot), schematic('module', { name: options.name, commonModule: false, diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index fe0e87dad1..54f299ffc0 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -240,11 +240,15 @@ describe('Library Schematic', () => { const cfg = JSON.parse(tree.readContent('/angular.json')); expect(cfg.projects['@myscope/mylib']).toBeDefined(); + + const rootTsCfg = JSON.parse(tree.readContent('/tsconfig.json')); + expect(rootTsCfg.compilerOptions.paths['@myscope/mylib']).toEqual(['dist/myscope/mylib']); }); it(`should dasherize scoped libraries`, () => { const scopedName = '@myScope/myLib'; const expectedScopeName = '@my-scope/my-lib'; + const expectedFolderName = 'my-scope/my-lib'; const options = { ...defaultOptions, name: scopedName }; const tree = schematicRunner.runSchematic('library', options, workspaceTree); @@ -252,7 +256,7 @@ describe('Library Schematic', () => { expect(tree.readContent(pkgJsonPath)).toContain(expectedScopeName); const ngPkgJsonPath = '/projects/my-scope/my-lib/ng-package.json'; - expect(tree.readContent(ngPkgJsonPath)).toContain(expectedScopeName); + expect(tree.readContent(ngPkgJsonPath)).toContain(expectedFolderName); const pkgJson = JSON.parse(tree.readContent(pkgJsonPath)); expect(pkgJson.name).toEqual(expectedScopeName); From d05133c81cadb22bdac64851899f4062a45743bb Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 10 May 2018 17:41:18 +0300 Subject: [PATCH 597/724] fix(@ngtools/webpack): resolve all file requests with the virtual fs fixes #885 --- packages/ngtools/webpack/src/compiler_host.ts | 5 ++--- .../ngtools/webpack/src/virtual_file_system_decorator.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index 7ed4d444fe..adb3ed12da 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -232,12 +232,11 @@ export class WebpackCompilerHost implements ts.CompilerHost { return stats.content; } - // Does not delegate, use with `fileExists/directoryExists()`. - stat(path: string): VirtualStats { + stat(path: string): VirtualStats | null { const p = this.resolve(path); const stats = this._files[p] || this._directories[p]; if (!stats) { - throw new Error(`File not found: ${JSON.stringify(p)}`); + return this._syncHost.stat(p) as VirtualStats | null; } return stats; diff --git a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts index e7b4cb049f..034d4927c0 100644 --- a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts +++ b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts @@ -18,9 +18,8 @@ export class VirtualFileSystemDecorator implements InputFileSystem { private _webpackCompilerHost: WebpackCompilerHost, ) { } - // We only need to intercept calls to individual files that are present in WebpackCompilerHost. private _readFileSync(path: string): string | null { - if (this._webpackCompilerHost.fileExists(path, false)) { + if (this._webpackCompilerHost.fileExists(path)) { return this._webpackCompilerHost.readFile(path) || null; } @@ -28,7 +27,7 @@ export class VirtualFileSystemDecorator implements InputFileSystem { } private _statSync(path: string): Stats | null { - if (this._webpackCompilerHost.fileExists(path, false)) { + if (this._webpackCompilerHost.fileExists(path)) { return this._webpackCompilerHost.stat(path); } From be24fed29e3b61aacbbca09e4db185e5c0946783 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Fri, 11 May 2018 23:22:26 +0300 Subject: [PATCH 598/724] feat(@ngtools/webpack): return Buffer for file system requests --- packages/ngtools/webpack/src/compiler_host.ts | 103 ++++++++++++++---- .../src/virtual_file_system_decorator.ts | 8 +- packages/ngtools/webpack/src/webpack.ts | 4 +- 3 files changed, 86 insertions(+), 29 deletions(-) diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index adb3ed12da..e11acf71fe 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -74,25 +74,61 @@ export class VirtualDirStats extends VirtualStats { export class VirtualFileStats extends VirtualStats { private _sourceFile: ts.SourceFile | null; - constructor(_fileName: string, private _content: string) { + private _content: string | null; + private _bufferContent: virtualFs.FileBuffer | null; + + constructor(_fileName: string) { super(_fileName); } - get content() { return this._content; } + static createFromString(_fileName: string, _content: string) { + const stats = new VirtualFileStats(_fileName); + stats.content = _content; + + return stats; + } + + static createFromBuffer(_fileName: string, _buffer: virtualFs.FileBuffer) { + const stats = new VirtualFileStats(_fileName); + stats.bufferContent = _buffer; + + return stats; + } + + get content() { + if (!this._content && this.bufferContent) { + this._content = virtualFs.fileBufferToString(this.bufferContent); + } + + return this._content || ''; + } set content(v: string) { this._content = v; - this._mtime = new Date(); - this._sourceFile = null; + this._bufferContent = null; + this.resetMetadata(); + } + + get bufferContent() { + if (!this._bufferContent && this._content) { + this._bufferContent = virtualFs.stringToFileBuffer(this._content); + } + + return this._bufferContent || virtualFs.stringToFileBuffer(''); + } + set bufferContent(buf: virtualFs.FileBuffer) { + this._bufferContent = buf; + this._content = null; + this.resetMetadata(); } + setSourceFile(sourceFile: ts.SourceFile) { this._sourceFile = sourceFile; } getSourceFile(languageVersion: ts.ScriptTarget, setParentNodes: boolean) { if (!this._sourceFile) { - // console.log(this._path) this._sourceFile = ts.createSourceFile( workaroundResolve(this._path), - this._content, + this.content, languageVersion, setParentNodes); } @@ -100,12 +136,16 @@ export class VirtualFileStats extends VirtualStats { return this._sourceFile; } + private resetMetadata(): void { + this._mtime = new Date(); + this._sourceFile = null; + } + isFile() { return true; } - get size() { return this._content.length; } + get size() { return this.content.length; } } - export class WebpackCompilerHost implements ts.CompilerHost { private _syncHost: virtualFs.SyncDelegateHost; private _files: {[path: string]: VirtualFileStats | null} = Object.create(null); @@ -149,8 +189,8 @@ export class WebpackCompilerHost implements ts.CompilerHost { } } - private _setFileContent(fileName: Path, content: string) { - this._files[fileName] = new VirtualFileStats(fileName, content); + private _cacheFile(fileName: string, stats: VirtualFileStats) { + this._files[fileName] = stats; let p = dirname(fileName); while (p && !this._directories[p]) { @@ -211,25 +251,41 @@ export class WebpackCompilerHost implements ts.CompilerHost { } readFile(fileName: string): string | undefined { + const stats = this.findVirtualFile(fileName); + + return stats && stats.content; + } + + readFileBuffer(fileName: string): Buffer | undefined { + const stats = this.findVirtualFile(fileName); + if (stats) { + const buffer = Buffer.from(stats.bufferContent); + + return buffer; + } + } + + private findVirtualFile(fileName: string): VirtualFileStats | undefined { const p = this.resolve(fileName); const stats = this._files[p]; - if (!stats) { - try { - const result = virtualFs.fileBufferToString(this._syncHost.read(p)); - if (result !== undefined) { - if (this._cache) { - this._setFileContent(p, result); - } + if (stats) { + return stats; + } + + try { + const fileBuffer = this._syncHost.read(p); + if (fileBuffer) { + const stats = VirtualFileStats.createFromBuffer(p, fileBuffer); + if (this._cache) { + this._cacheFile(p, stats); } - return result; - } catch (e) { - return undefined; + return stats; } + } catch (e) { + return undefined; } - - return stats.content; } stat(path: string): VirtualStats | null { @@ -344,7 +400,8 @@ export class WebpackCompilerHost implements ts.CompilerHost { _sourceFiles?: ReadonlyArray, ): void => { const p = this.resolve(fileName); - this._setFileContent(p, data); + const stats = VirtualFileStats.createFromString(p, data); + this._cacheFile(p, stats); }; } diff --git a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts index 034d4927c0..205a87e2c3 100644 --- a/packages/ngtools/webpack/src/virtual_file_system_decorator.ts +++ b/packages/ngtools/webpack/src/virtual_file_system_decorator.ts @@ -18,9 +18,9 @@ export class VirtualFileSystemDecorator implements InputFileSystem { private _webpackCompilerHost: WebpackCompilerHost, ) { } - private _readFileSync(path: string): string | null { + private _readFileSync(path: string): Buffer | null { if (this._webpackCompilerHost.fileExists(path)) { - return this._webpackCompilerHost.readFile(path) || null; + return this._webpackCompilerHost.readFileBuffer(path) || null; } return null; @@ -51,7 +51,7 @@ export class VirtualFileSystemDecorator implements InputFileSystem { this._inputFileSystem.readdir(path, callback); } - readFile(path: string, callback: Callback): void { + readFile(path: string, callback: Callback): void { const result = this._readFileSync(path); if (result) { callback(null, result); @@ -78,7 +78,7 @@ export class VirtualFileSystemDecorator implements InputFileSystem { return this._inputFileSystem.readdirSync(path); } - readFileSync(path: string): string { + readFileSync(path: string): string | Buffer { const result = this._readFileSync(path); return result || this._inputFileSystem.readFileSync(path); diff --git a/packages/ngtools/webpack/src/webpack.ts b/packages/ngtools/webpack/src/webpack.ts index 660f39edf5..91169a791c 100644 --- a/packages/ngtools/webpack/src/webpack.ts +++ b/packages/ngtools/webpack/src/webpack.ts @@ -51,13 +51,13 @@ export interface NormalModuleFactoryRequest { export interface InputFileSystem { stat(path: string, callback: Callback): void; readdir(path: string, callback: Callback): void; - readFile(path: string, callback: Callback): void; + readFile(path: string, callback: Callback): void; // tslint:disable-next-line:no-any readJson(path: string, callback: Callback): void; readlink(path: string, callback: Callback): void; statSync(path: string): Stats; readdirSync(path: string): string[]; - readFileSync(path: string): string; + readFileSync(path: string): string | Buffer; // tslint:disable-next-line:no-any readJsonSync(path: string): any; readlinkSync(path: string): string; From 3307679267c7effc5f3462247a7cc5183d09b186 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 14 May 2018 14:15:34 -0700 Subject: [PATCH 599/724] fix(@schematics/schematics): should not have test node_modules specs Fix #860 --- packages/schematics/schematics/blank/project-files/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/schematics/blank/project-files/package.json b/packages/schematics/schematics/blank/project-files/package.json index d7ee703dfa..abd157f926 100644 --- a/packages/schematics/schematics/blank/project-files/package.json +++ b/packages/schematics/schematics/blank/project-files/package.json @@ -4,7 +4,7 @@ "description": "A blank schematics", "scripts": { "build": "tsc -p tsconfig.json", - "test": "npm run build && jasmine **/*_spec.js" + "test": "npm run build && jasmine src/**/*_spec.js" }, "keywords": [ "schematics" From 5c442a9c617b5d993e54e4a75fd1d88c2e63ec75 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 15 May 2018 21:34:05 -0400 Subject: [PATCH 600/724] fix(@angular-devkit/build-angular): support server sourcemaps Fixes: angular/angular-cli#10680 --- .../models/webpack-configs/server.ts | 1 + .../build_angular/test/server/base_spec_large.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts index 51e8ee9b14..389756d49d 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts @@ -17,6 +17,7 @@ import { WebpackConfigOptions } from '../build-options'; export function getServerConfig(wco: WebpackConfigOptions) { const config: any = { + devtool: wco.buildOptions.sourceMap ? 'source-map' : false, resolve: { mainFields: [ ...(wco.supportES2015 ? ['es2015'] : []), diff --git a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts index ccac7ea876..068d4085dd 100644 --- a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts @@ -30,4 +30,19 @@ describe('Server Builder', () => { }), ).subscribe(undefined, done.fail, done); }, Timeout.Standard); + + it('supports sourcemaps', (done) => { + const overrides = { sourceMap: true }; + + runTargetSpec(host, { project: 'app', target: 'server' }, overrides).pipe( + tap((buildEvent) => { + expect(buildEvent.success).toBe(true); + + const fileName = join(outputPath, 'main.js'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + expect(content).toMatch(/AppServerModuleNgFactory/); + expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBeTruthy(); + }), + ).subscribe(undefined, done.fail, done); + }, Timeout.Standard); }); From a820750f1bcea5f7ce43d7f93a7e956d4428df26 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 15 May 2018 11:39:38 -0400 Subject: [PATCH 601/724] fix(@angular-devkit/build-angular): perform surgical updates to index.html Fixes: angular/angular-cli#10696 --- .../plugins/index-html-webpack-plugin.ts | 136 ++++++++++++------ ...-bom_spec_large.ts => index_spec_large.ts} | 40 +++++- .../test/browser/service-worker_spec_large.ts | 4 +- 3 files changed, 134 insertions(+), 46 deletions(-) rename packages/angular_devkit/build_angular/test/browser/{index-bom_spec_large.ts => index_spec_large.ts} (54%) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts index a8805ef8f0..be4c1497cd 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts @@ -7,7 +7,7 @@ */ import { createHash } from 'crypto'; import { Compiler, compilation } from 'webpack'; -import { RawSource } from 'webpack-sources'; +import { RawSource, ReplaceSource } from 'webpack-sources'; const parse5 = require('parse5'); @@ -95,71 +95,94 @@ export class IndexHtmlWebpackPlugin { // Find the head and body elements const treeAdapter = parse5.treeAdapters.default; - const document = parse5.parse(inputContent, { treeAdapter }); + const document = parse5.parse(inputContent, { treeAdapter, locationInfo: true }); let headElement; let bodyElement; - for (const topNode of document.childNodes) { - if (topNode.tagName === 'html') { - for (const htmlNode of topNode.childNodes) { - if (htmlNode.tagName === 'head') { - headElement = htmlNode; + for (const docChild of document.childNodes) { + if (docChild.tagName === 'html') { + for (const htmlChild of docChild.childNodes) { + if (htmlChild.tagName === 'head') { + headElement = htmlChild; } - if (htmlNode.tagName === 'body') { - bodyElement = htmlNode; + if (htmlChild.tagName === 'body') { + bodyElement = htmlChild; } } } } - // Inject into the html - if (!headElement || !bodyElement) { throw new Error('Missing head and/or body elements'); } + // Determine script insertion point + let scriptInsertionPoint; + if (bodyElement.__location && bodyElement.__location.endTag) { + scriptInsertionPoint = bodyElement.__location.endTag.startOffset; + } else { + // Less accurate fallback + // parse5 4.x does not provide locations if malformed html is present + scriptInsertionPoint = inputContent.indexOf(''); + } + + let styleInsertionPoint; + if (headElement.__location && headElement.__location.endTag) { + styleInsertionPoint = headElement.__location.endTag.startOffset; + } else { + // Less accurate fallback + // parse5 4.x does not provide locations if malformed html is present + styleInsertionPoint = inputContent.indexOf(''); + } + + // Inject into the html + const indexSource = new ReplaceSource(new RawSource(inputContent), this._options.input); + + const scriptElements = treeAdapter.createDocumentFragment(); for (const script of scripts) { const attrs = [ { name: 'type', value: 'text/javascript' }, { name: 'src', value: (this._options.deployUrl || '') + script }, ]; + if (this._options.sri) { - const algo = 'sha384'; - const hash = createHash(algo) - .update(compilation.assets[script].source(), 'utf8') - .digest('base64'); - attrs.push( - { name: 'integrity', value: `${algo}-${hash}` }, - { name: 'crossorigin', value: 'anonymous' }, - ); + const content = compilation.assets[script].source(); + attrs.push(...this._generateSriAttributes(content)); } - const element = treeAdapter.createElement( - 'script', - undefined, - attrs, - ); - treeAdapter.appendChild(bodyElement, element); + const element = treeAdapter.createElement('script', undefined, attrs); + treeAdapter.appendChild(scriptElements, element); } + indexSource.insert( + scriptInsertionPoint, + parse5.serialize(scriptElements, { treeAdapter }), + ); + // Adjust base href if specified - if (this._options.baseHref != undefined) { + if (typeof this._options.baseHref == 'string') { let baseElement; - for (const node of headElement.childNodes) { - if (node.tagName === 'base') { - baseElement = node; - break; + for (const headChild of headElement.childNodes) { + if (headChild.tagName === 'base') { + baseElement = headChild; } } + const baseFragment = treeAdapter.createDocumentFragment(); + if (!baseElement) { - const element = treeAdapter.createElement( + baseElement = treeAdapter.createElement( 'base', undefined, [ { name: 'href', value: this._options.baseHref }, ], ); - treeAdapter.appendChild(headElement, element); + + treeAdapter.appendChild(baseFragment, baseElement); + indexSource.insert( + headElement.__location.startTag.endOffset + 1, + parse5.serialize(baseFragment, { treeAdapter }), + ); } else { let hrefAttribute; for (const attribute of baseElement.attrs) { @@ -172,24 +195,51 @@ export class IndexHtmlWebpackPlugin { } else { baseElement.attrs.push({ name: 'href', value: this._options.baseHref }); } + + treeAdapter.appendChild(baseFragment, baseElement); + indexSource.replace( + baseElement.__location.startOffset, + baseElement.__location.endOffset, + parse5.serialize(baseFragment, { treeAdapter }), + ); } } + const styleElements = treeAdapter.createDocumentFragment(); for (const stylesheet of stylesheets) { - const element = treeAdapter.createElement( - 'link', - undefined, - [ - { name: 'rel', value: 'stylesheet' }, - { name: 'href', value: (this._options.deployUrl || '') + stylesheet }, - ], - ); - treeAdapter.appendChild(headElement, element); + const attrs = [ + { name: 'rel', value: 'stylesheet' }, + { name: 'href', value: (this._options.deployUrl || '') + stylesheet }, + ]; + + if (this._options.sri) { + const content = compilation.assets[stylesheet].source(); + attrs.push(...this._generateSriAttributes(content)); + } + + const element = treeAdapter.createElement('link', undefined, attrs); + treeAdapter.appendChild(styleElements, element); } + indexSource.insert( + styleInsertionPoint, + parse5.serialize(styleElements, { treeAdapter }), + ); + // Add to compilation assets - const outputContent = parse5.serialize(document, { treeAdapter }); - compilation.assets[this._options.output] = new RawSource(outputContent); + compilation.assets[this._options.output] = indexSource; }); } + + private _generateSriAttributes(content: string) { + const algo = 'sha384'; + const hash = createHash(algo) + .update(content, 'utf8') + .digest('base64'); + + return [ + { name: 'integrity', value: `${algo}-${hash}` }, + { name: 'crossorigin', value: 'anonymous' }, + ]; + } } diff --git a/packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/index_spec_large.ts similarity index 54% rename from packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts rename to packages/angular_devkit/build_angular/test/browser/index_spec_large.ts index 6164ce1c15..78377fb533 100644 --- a/packages/angular_devkit/build_angular/test/browser/index-bom_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/index_spec_large.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { join, normalize, tags, virtualFs } from '@angular-devkit/core'; import { tap } from 'rxjs/operators'; import { Timeout, browserTargetSpec, host, runTargetSpec } from '../utils'; @@ -52,4 +52,42 @@ describe('Browser Builder works with BOM index.html', () => { }), ).subscribe(undefined, done.fail, done); }, Timeout.Basic); + + it('keeps escaped charaters', (done) => { + host.writeMultipleFiles({ + 'src/index.html': tags.oneLine` + í + + `, + }); + + runTargetSpec(host, browserTargetSpec).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + // tslint:disable-next-line:max-line-length + expect(content).toBe(`í `); + }), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); + + it('keeps custom template charaters', (done) => { + host.writeMultipleFiles({ + 'src/index.html': tags.oneLine` + <%= csrf_meta_tags %> + + `, + }); + + runTargetSpec(host, browserTargetSpec).pipe( + tap((buildEvent) => expect(buildEvent.success).toBe(true)), + tap(() => { + const fileName = join(outputPath, 'index.html'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + // tslint:disable-next-line:max-line-length + expect(content).toBe(`<%= csrf_meta_tags %> `); + }), + ).subscribe(undefined, done.fail, done); + }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts index 081faac7ee..a14764cdd5 100644 --- a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts @@ -98,7 +98,7 @@ describe('Browser Builder', () => { hashTable: { '/favicon.ico': '84161b857f5c547e3699ddfbffc6d8d737542e01', '/assets/folder-asset.txt': '617f202968a6a81050aa617c2e28e1dca11ce8d4', - '/index.html': '3e659d6e536916b7d178d02a2e6e5492f868bf68', + '/index.html': '843c96f0aeadc8f093b1b2203c08891ecd8f7425', }, }); }), @@ -153,7 +153,7 @@ describe('Browser Builder', () => { hashTable: { '/foo/bar/favicon.ico': '84161b857f5c547e3699ddfbffc6d8d737542e01', '/foo/bar/assets/folder-asset.txt': '617f202968a6a81050aa617c2e28e1dca11ce8d4', - '/foo/bar/index.html': '5b53fa9e07e4111b8ef84613fb989a56fee502b0', + '/foo/bar/index.html': '9ef50361678004b3b197c12cbc74962e5a15b844', }, }); }), From 89cb1f18045041f8c4e8613818a164e19fa04753 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Thu, 10 May 2018 15:43:10 -0700 Subject: [PATCH 602/724] ci: add changelog generator e.g. to use: ```sh devkit-admin changelog --from=v6.0.0 --to=v6.0.1 --githubToken=123abcdef ``` This will create a draft release on Github. --- package-lock.json | 248 ++++++++++++++++++ package.json | 3 + scripts/changelog.ts | 119 +++++++++ scripts/templates/changelog-feat.ejs | 23 ++ scripts/templates/changelog-fix.ejs | 23 ++ .../templates/changelog-special-thanks.ejs | 17 ++ scripts/templates/changelog.ejs | 66 +++++ 7 files changed, 499 insertions(+) create mode 100644 scripts/changelog.ts create mode 100644 scripts/templates/changelog-feat.ejs create mode 100644 scripts/templates/changelog-fix.ejs create mode 100644 scripts/templates/changelog-special-thanks.ejs create mode 100644 scripts/templates/changelog.ejs diff --git a/package-lock.json b/package-lock.json index 6e2c677218..6f40df66e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -136,6 +136,12 @@ "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true + }, "@types/acorn": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.3.tgz", @@ -1464,6 +1470,29 @@ "schema-utils": "0.4.5" } }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + } + } + }, "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -1979,6 +2008,15 @@ } } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "1.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2748,6 +2786,15 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "1.0.0" + } + }, "deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -4445,6 +4492,58 @@ "assert-plus": "1.0.0" } }, + "gh-got": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-7.0.0.tgz", + "integrity": "sha1-9szjAuhQMn7S0RwACAxWZW8eJDI=", + "dev": true, + "requires": { + "got": "8.3.1", + "is-plain-obj": "1.1.0" + }, + "dependencies": { + "got": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.1.tgz", + "integrity": "sha512-tiLX+bnYm5A56T5N/n9Xo89vMaO1mrS9qoDqj3u/anVooqGozvY/HbXzEpDfbNeKsHCBpK40gSbz8wGYSp3i1w==", + "dev": true, + "requires": { + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "mimic-response": "1.0.0", + "p-cancelable": "0.4.1", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "2.0.0" + } + } + } + }, "git-raw-commits": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", @@ -4681,11 +4780,26 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "1.4.2" + } + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -4914,6 +5028,12 @@ } } }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -5426,6 +5546,16 @@ } } }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "2.3.0", + "p-is-promise": "1.1.0" + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -5632,6 +5762,12 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, "is-odd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", @@ -6009,6 +6145,16 @@ "handlebars": "4.0.11" } }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" + } + }, "jasmine": { "version": "2.99.0", "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", @@ -6079,6 +6225,12 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -6304,6 +6456,15 @@ } } }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "killable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", @@ -6878,6 +7039,12 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, "mini-css-extract-plugin": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", @@ -7560,6 +7727,25 @@ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } + } + }, "npm-package-arg": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", @@ -7857,11 +8043,23 @@ "os-tmpdir": "1.0.2" } }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "dev": true + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, "p-limit": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", @@ -7883,6 +8081,15 @@ "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "1.0.0" + } + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -8455,6 +8662,17 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "0.2.0", + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + } + }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -8955,6 +9173,15 @@ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "1.0.1" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -9701,6 +9928,15 @@ "sourcemap-codec": "1.4.1" } }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -9997,6 +10233,12 @@ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -10756,6 +10998,12 @@ "prepend-http": "1.0.4" } }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, "use": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", diff --git a/package.json b/package.json index 101f8f48ee..b2182eec87 100644 --- a/package.json +++ b/package.json @@ -162,6 +162,9 @@ "zone.js": "^0.8.19" }, "devDependencies": { + "conventional-commits-parser": "^2.1.7", + "gh-got": "^7.0.0", + "git-raw-commits": "^1.3.6", "license-checker": "^16.0.0", "tslint-no-circular-imports": "^0.3.0" } diff --git a/scripts/changelog.ts b/scripts/changelog.ts new file mode 100644 index 0000000000..803fb3199a --- /dev/null +++ b/scripts/changelog.ts @@ -0,0 +1,119 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-implicit-dependencies +import { JsonObject, logging } from '@angular-devkit/core'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as semver from 'semver'; + +const changelogTemplate = require('./templates/changelog').default; + +const conventionalCommitsParser = require('conventional-commits-parser'); +const gitRawCommits = require('git-raw-commits'); +const ghGot = require('gh-got'); +const through = require('through2'); + + +export interface ChangelogOptions { + from: string; + to?: string; + githubTokenFile?: string; + githubToken?: string; + + stdout?: boolean; +} + + +export default function(args: ChangelogOptions, logger: logging.Logger) { + const commits: JsonObject[] = []; + let toSha: string | null = null; + + const githubToken = ( + args.githubToken + || (args.githubTokenFile && fs.readFileSync(args.githubTokenFile, 'utf-8')) + || '' + ).trim(); + + new Promise((resolve) => { + (gitRawCommits({ + from: args.from, + to: args.to || 'HEAD', + format: '%B%n-hash-%n%H%n-gitTags-%n%D%n-committerDate-%n%ci%n-authorName-%n%aN%n', + }) as NodeJS.ReadStream) + .on('error', err => { + logger.fatal('An error happened: ' + err.message); + process.exit(1); + }) + .pipe(through((chunk: Buffer, enc: string, callback: Function) => { + // Replace github URLs with `@XYZ#123` + const commit = chunk.toString('utf-8') + .replace(/https?:\/\/github.com\/(.*?)\/issues\/(\d+)/g, '@$1#$2'); + + callback(undefined, new Buffer(commit)); + })) + .pipe(conventionalCommitsParser({ + headerPattern: /^(\w*)(?:\(([^)]*)\))?: (.*)$/, + headerCorrespondence: ['type', 'scope', 'subject'], + noteKeywords: ['BREAKING CHANGE'], + revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./, + revertCorrespondence: [`header`, `hash`], + })) + .pipe(through.obj((chunk: JsonObject, _: string, cb: Function) => { + try { + const maybeTag = chunk.gitTags && (chunk.gitTags as string).match(/tag: (.*)/); + const tags = maybeTag && maybeTag[1].split(/,/g); + chunk['tags'] = tags; + + if (tags && tags.find(x => x == args.to)) { + toSha = chunk.hash as string; + } + + commits.push(chunk); + cb(); + } catch (err) { + cb(err); + } + })) + .on('finish', resolve); + }) + .then(() => { + const markdown: string = changelogTemplate({ + ...args, + include: (x: string, v: {}) => require('./' + path.join('templates', x)).default(v), + commits, + }); + + if (args.stdout) { + console.log(markdown); + process.exit(0); + } + + // Check if we need to edit or create a new one. + return ghGot('repos/angular/devkit/releases').then((x: JsonObject) => [x, markdown]); + }) + .then(([body, markdown]) => { + const json = body.body; + + const maybeRelease = json.find((x: JsonObject) => x.tag_name == args.to); + const id = maybeRelease ? `/${maybeRelease.id}` : ''; + + const semversion = (args.to && semver.parse(args.to)) || { prerelease: '' }; + + return ghGot('repos/angular/devkit/releases' + id, { + body: { + body: markdown, + draft: !maybeRelease, + name: args.to, + prerelease: semversion.prerelease.length > 0, + tag_name: args.to, + ...(toSha ? { target_commitish: toSha } : {}), + }, + token: githubToken, + }); + }); +} diff --git a/scripts/templates/changelog-feat.ejs b/scripts/templates/changelog-feat.ejs new file mode 100644 index 0000000000..3a4ddbda2a --- /dev/null +++ b/scripts/templates/changelog-feat.ejs @@ -0,0 +1,23 @@ +<% + if (!hash) { + return; + } + + const shortSha = hash && hash.slice(0, 7); +%>| <%# Commit: %><% + if (shortSha) { + %>[![Bug Fix](https://img.shields.io/badge/<%= shortSha %>-feat-yellow.svg)](https://github.com/angular/devkit/commit/<%= hash %>)<% + } %><% +%>| <%# Desc: %><%= subject +%>| <%# Notes: %><% + for (const reference of references) { + if (!reference.action || !reference.issue) { + continue; + } + + const issue = reference.issue; + const owner = reference.owner || 'angular'; + const repository = reference.repository || (issue > 10000 ? 'angular-cli' : 'devkit'); + %>[Closes #<%= issue %>](https://github.com/<%= owner %>/<%= repository %>/issues/<%= issue %>)<% + } +%> diff --git a/scripts/templates/changelog-fix.ejs b/scripts/templates/changelog-fix.ejs new file mode 100644 index 0000000000..2d301caf03 --- /dev/null +++ b/scripts/templates/changelog-fix.ejs @@ -0,0 +1,23 @@ +<% + if (!hash) { + return; + } + + const shortSha = hash && hash.slice(0, 7); +%>| <%# Commit: %><% + if (shortSha) { + %>[![Bug Fix](https://img.shields.io/badge/<%= shortSha %>-fix-green.svg)](https://github.com/angular/devkit/commit/<%= hash %>)<% + } %><% +%>| <%# Desc: %><%= subject +%>| <%# Notes: %><% + for (const reference of references) { + if (!reference.action || !reference.issue) { + continue; + } + + const issue = reference.issue; + const owner = reference.owner || 'angular'; + const repository = reference.repository || (issue > 10000 ? 'angular-cli' : 'devkit'); + %>[Closes #<%= issue %>](https://github.com/<%= owner %>/<%= repository %>/issues/<%= issue %>)<% + } +%> diff --git a/scripts/templates/changelog-special-thanks.ejs b/scripts/templates/changelog-special-thanks.ejs new file mode 100644 index 0000000000..320437935f --- /dev/null +++ b/scripts/templates/changelog-special-thanks.ejs @@ -0,0 +1,17 @@ +<% +const counter = Object.create(null); + +for (const commit of commits) { + const name = commit.authorName; + if (name) { + counter[name] = (counter[name] || 0) + 1; + } +} + +const sortedCount = [...Object.entries(counter)].sort((a, b) => b[1] - a[1]).map(x => x[0]); + +for (const count of sortedCount.join(', ')) { + %><%= count[0] %><% +} + +%> diff --git a/scripts/templates/changelog.ejs b/scripts/templates/changelog.ejs new file mode 100644 index 0000000000..25337d7adc --- /dev/null +++ b/scripts/templates/changelog.ejs @@ -0,0 +1,66 @@ +<%# + The data structure for this file looks like this: + { + from: 'v1.2.3', + to: 'v1.2.4', + // For a commit with description: + // ------------------------------------------------------ + // feat(@angular/pwa): add something to this + // + // Fixes #123 + // ------------------------------------------------------ + // See https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser + commits: [ { + type: 'feat', // | 'fix' | 'refactor' | 'build' | 'test' | 'ci' + scope: '@angular/pwa', // package name (or null) + subject: 'add something to this', + header: 'feat(@angular/pwa): add something to this', + body: null, + footer: 'Fixes #123', + references: [ + { + action: 'Closes', + owner: null, + repository: null, + issue: '123', + raw: '#123', + prefix: '#' + } + ], + } ] + } +%># Commits +<% + // Get unique scopes. + const scopes = commits.map(x => x.scope) + .sort() + .filter((v, i, a) => v !== a[i - 1]); + + for (const scope of scopes) { + const scopeCommits = commits + .filter(x => x.scope === scope) + .filter(x => ['fix', 'feat'].includes(x.type)); + + if (scopeCommits.length == 0) { + continue; + } +%> +## `<%= scope || 'Misc' %>` + +| Commit | Description | Notes | +|:------:| ----------- | -----:| +<% + for (const commit of scopeCommits) { + switch (commit.type) { + case 'fix': %><%= include('./changelog-fix', commit) %><% break; + case 'feat': %><%= include('./changelog-feat', commit) %><% break; + } + } +%> +<% } %> + +---- + +# Special Thanks + +<%= include('./changelog-special-thanks', { commits }) %> From 8752c8e066a04569e5b671afabbde7d2ad3005da Mon Sep 17 00:00:00 2001 From: Richard Russell Date: Sat, 12 May 2018 14:20:00 +0100 Subject: [PATCH 603/724] fix(@schematics/schematics): set ca from cafile in npm client The contents of the cafile can be passed through as ca on the ssl options to the npm client. --- packages/schematics/update/update/npm.ts | 28 ++++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index 372621e32f..3aab81f9c9 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -7,6 +7,7 @@ */ import { logging } from '@angular-devkit/core'; import { exec } from 'child_process'; +import { readFileSync } from 'fs'; import { Observable, ReplaySubject, concat, of } from 'rxjs'; import { concatMap, filter, first, map, toArray } from 'rxjs/operators'; import * as url from 'url'; @@ -41,6 +42,22 @@ function getNpmConfigOption(option: string) { }); } +function getNpmClientSslOptions(strictSsl?: string, cafile?: string) { + const sslOptions: { strict?: boolean, ca?: Buffer } = {}; + + if (strictSsl === 'false') { + sslOptions.strict = false; + } else if (strictSsl === 'true') { + sslOptions.strict = true; + } + + if (cafile) { + sslOptions.ca = readFileSync(cafile); + } + + return sslOptions; +} + /** * Get the NPM repository's package.json for a package. This is p * @param {string} packageName The package name to fetch. @@ -92,23 +109,20 @@ export function getNpmPackageJson( getNpmConfigOption('proxy'), getNpmConfigOption('https-proxy'), getNpmConfigOption('strict-ssl'), + getNpmConfigOption('cafile'), ).pipe( toArray(), concatMap(options => { const subject = new ReplaySubject(1); + const sslOptions = getNpmClientSslOptions(options[2], options[3]); + const client = new RegistryClient({ proxy: { http: options[0], https: options[1], }, - ssl: { - ...(options[2] === 'false' - ? { strict: false } - : (options[2] === 'true' - ? { strict: true } - : {})), - }, + ssl: sslOptions, }); client.log.level = 'silent'; const params = { From e0bb23474baaf36fdd3f298f308cdb844734bafd Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 11 May 2018 15:40:01 -0400 Subject: [PATCH 604/724] test: avoid calling jasmine done with error --- .../build_angular/test/browser/assets_spec_large.ts | 4 ++-- .../build_angular/test/browser/output-path_spec_large.ts | 2 +- .../build_angular/test/browser/replacements_spec_large.ts | 4 ++-- .../build_angular/test/browser/service-worker_spec_large.ts | 2 +- .../build_angular/test/dev-server/proxy_spec_large.ts | 2 +- .../build_angular/test/protractor/works_spec_large.ts | 2 +- .../build_angular/test/tslint/works_spec_large.ts | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index fbc5c3255e..dbcc4dbe2f 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -69,7 +69,7 @@ describe('Browser Builder assets', () => { }], }; - runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, () => done(), done.fail); // The node_modules folder must be deleted, otherwise code that tries to find the // node_modules folder will hit this one and can fail. @@ -85,7 +85,7 @@ describe('Browser Builder assets', () => { assets: ['not-source-root/file.txt'], }; - runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, () => done(), done.fail); // The node_modules folder must be deleted, otherwise code that tries to find the // node_modules folder will hit this one and can fail. diff --git a/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts index 703f3f646e..dd5a62c191 100644 --- a/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts @@ -37,6 +37,6 @@ describe('Browser Builder output path', () => { it('does not allow output path to be project root', (done) => { const overrides = { outputPath: './' }; - runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, () => done(), done.fail); }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts index 9937caba86..9bed4da0bf 100644 --- a/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/replacements_spec_large.ts @@ -82,7 +82,7 @@ describe('Browser Builder file replacements', () => { ], }; - runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, () => done(), done.fail); }, Timeout.Basic); it(`fails compilation with missing 'with' file`, (done) => { @@ -95,6 +95,6 @@ describe('Browser Builder file replacements', () => { ], }; - runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, done, done.fail); + runTargetSpec(host, browserTargetSpec, overrides).subscribe(undefined, () => done(), done.fail); }, Timeout.Basic); }); diff --git a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts index a14764cdd5..5d2d5eae3b 100644 --- a/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/service-worker_spec_large.ts @@ -47,7 +47,7 @@ describe('Browser Builder', () => { runTargetSpec(host, browserTargetSpec, overrides) .subscribe(event => { expect(event.success).toBe(false); - }, done, done.fail); + }, () => done(), done.fail); }, Timeout.Basic); it('works with service worker', (done) => { diff --git a/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts index d3744c4ac7..65853bd87d 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/proxy_spec_large.ts @@ -54,6 +54,6 @@ describe('Dev Server Builder proxy', () => { const overrides: Partial = { proxyConfig: '../proxy.config.json' }; runTargetSpec(host, devServerTargetSpec, overrides) - .subscribe(undefined, done, done.fail); + .subscribe(undefined, () => done(), done.fail); }, 30000); }); diff --git a/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts b/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts index ae86677ab9..e9c1558545 100644 --- a/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts @@ -33,7 +33,7 @@ describe('Protractor Builder', () => { runTargetSpec(host, protractorTargetSpec, overrides).pipe( // This should fail because no server is available for connection. - ).subscribe(undefined, done, done.fail); + ).subscribe(undefined, () => done(), done.fail); }, 30000); linuxOnlyIt('overrides protractor specs', (done) => { diff --git a/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts index 2b37c8991b..8999496845 100644 --- a/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts @@ -164,6 +164,6 @@ describe('Tslint Target', () => { }; runTargetSpec(host, tslintTargetSpec, overrides).pipe( - ).subscribe(undefined, done, done.fail); + ).subscribe(undefined, () => done(), done.fail); }, 30000); }); From 9546fcc433d2f32038bee2080577128df3a0a887 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 11 May 2018 15:47:06 -0400 Subject: [PATCH 605/724] ci: adjust AppVeyor configuration --- .appveyor.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5e490c30dd..c9be2b9b74 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,13 +1,11 @@ environment: - matrix: - - nodejs_version: "8" + nodejs_version: "10" matrix: fast_finish: true install: - ps: Install-Product node $env:nodejs_version - - npm install -g npm@~5.6.0 - npm install # Appveyor (via chocolatey) cannot use older versions of Chrome: # https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/googlechrome @@ -20,6 +18,7 @@ test_script: - npm run test-large build: off +deploy: off cache: - node_modules -> package-lock.json From c2d39aede9a4b7c507174448c29b185075dfb3c2 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 11 May 2018 22:04:04 -0400 Subject: [PATCH 606/724] fix(@angular-devkit/schematics): length check buffer access --- packages/angular_devkit/schematics/src/tree/recorder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/schematics/src/tree/recorder.ts b/packages/angular_devkit/schematics/src/tree/recorder.ts index da59b6dbea..fb58921ecd 100644 --- a/packages/angular_devkit/schematics/src/tree/recorder.ts +++ b/packages/angular_devkit/schematics/src/tree/recorder.ts @@ -22,9 +22,9 @@ export class UpdateRecorderBase implements UpdateRecorder { } static createFromFileEntry(entry: FileEntry): UpdateRecorderBase { - const c0 = entry.content.readUInt8(0, true); - const c1 = entry.content.readUInt8(1, true); - const c2 = entry.content.readUInt8(2, true); + const c0 = entry.content.byteLength > 0 && entry.content.readUInt8(0); + const c1 = entry.content.byteLength > 1 && entry.content.readUInt8(1); + const c2 = entry.content.byteLength > 2 && entry.content.readUInt8(2); // Check if we're BOM. if (c0 == 0xEF && c1 == 0xBB && c2 == 0xBF) { From 75a87ffd8febc8754318c702660c5b840b2b5b2d Mon Sep 17 00:00:00 2001 From: Bram Borggreve Date: Fri, 11 May 2018 20:57:28 -0500 Subject: [PATCH 607/724] feat(@schematics/angular): use application name as title in AppComponent --- .../angular/application/other-files/app.component.spec.ts | 4 ++-- .../angular/application/other-files/app.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/application/other-files/app.component.spec.ts b/packages/schematics/angular/application/other-files/app.component.spec.ts index df4bc18812..b21e40897e 100644 --- a/packages/schematics/angular/application/other-files/app.component.spec.ts +++ b/packages/schematics/angular/application/other-files/app.component.spec.ts @@ -17,10 +17,10 @@ describe('AppComponent', () => { const app = fixture.debugElement.componentInstance; expect(app).toBeTruthy(); })); - it(`should have as title '<%= prefix %>'`, async(() => { + it(`should have as title '<%= name %>'`, async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('<%= prefix %>'); + expect(app.title).toEqual('<%= name %>'); })); it('should render title in a h1 tag', async(() => { const fixture = TestBed.createComponent(AppComponent); diff --git a/packages/schematics/angular/application/other-files/app.component.ts b/packages/schematics/angular/application/other-files/app.component.ts index bf46b22455..c9be35dfcf 100644 --- a/packages/schematics/angular/application/other-files/app.component.ts +++ b/packages/schematics/angular/application/other-files/app.component.ts @@ -31,5 +31,5 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.<%= styleext %>']<% } %> }) export class AppComponent { - title = '<%= prefix %>'; + title = '<%= name %>'; } From 87b30a86cea7ed1f82c73334cb69fd81d81d1a07 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 16 May 2018 18:04:14 -0400 Subject: [PATCH 608/724] release: v6.0.2 --- .monorepo.json | 64 +++++++++---------- .../angular/utility/latest-versions.ts | 6 +- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index f499fc401e..002a7b9bbc 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.6.1", - "hash": "37ed7e417435c92dbf301e7b26ea37ca" + "version": "0.6.2", + "hash": "195d853a0c3edbfbe572d39539a82f9e" }, "devkit": { - "version": "0.6.1", - "hash": "18d55af567c3461aee6c0b94ecf81878" + "version": "0.6.2", + "hash": "85a4710057dd50aa7d0d54d266358c5c" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.6.1", - "hash": "439e05ee179b0f0e63baefcba68dff55", + "version": "0.6.2", + "hash": "9c0a727d6233ab172f175ed271baaad3", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,14 +64,14 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.6.1", - "hash": "a2fe73fb9e09cf60e998a7f8892fb465", + "version": "0.6.2", + "hash": "d6e4e5a1b2979f169377fde83bb10c81", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.6.1", - "hash": "29dff2bc7c6fa40d3b015577da4093c3", + "version": "0.6.2", + "hash": "ab944fad093ff4ca8aabbd05e13d90ea", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, "@angular-devkit/build-optimizer": { @@ -82,8 +82,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.6.1", - "hash": "fd4d836b3fb974620df922459b2328fa", + "version": "0.6.2", + "hash": "be1d628217e787afd2d354a5d333a452", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, "@angular-devkit/build-ng-packagr": { @@ -94,8 +94,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.6.1", - "hash": "b0768e12ade77f034265570808ef95e8", + "version": "0.6.2", + "hash": "0efd712119b51af484ea81b38283eaa4", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, "@angular-devkit/build-angular": { @@ -106,8 +106,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.6.1", - "hash": "eb9424df0ac555c4a66061dda1f72a10", + "version": "0.6.2", + "hash": "5d33c1706ab096941e491d9faaed8485", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, "@angular-devkit/core": { @@ -118,8 +118,8 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.6.1", - "hash": "b78aa2710b2e9408e535490068ee9b7a", + "version": "0.6.2", + "hash": "7ff1e423d057b8e5b2758804a30fa8f9", "snapshotRepo": "angular/angular-devkit-core-builds" }, "@angular-devkit/schematics": { @@ -130,49 +130,49 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.6.1", - "hash": "c7229eed530647c85df80c4c650f9f02", + "version": "0.6.2", + "hash": "9f83e8b9fb3b6064fc97ffd7349db486", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.6.1", - "hash": "fb9e6312c7f535096e6dbad3cb22d3f1", + "version": "0.6.2", + "hash": "9b4b991fda1a484ae44562297687549b", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.1", + "version": "6.0.2", "section": "Misc", - "hash": "983166b58b674611530c804f01e42f69", + "hash": "27060cb95b1fe46372a001af67ed59d9", "snapshotRepo": "angular/ngtools-webpack-builds" }, "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.6.1", - "hash": "29ffdd1cbdd7761b7566b6e829b3a6b2", + "version": "0.6.2", + "hash": "c8ccd40624ac6f9712f9d3d16b405785", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.6.1", + "version": "0.6.2", "section": "Schematics", - "hash": "cdbcf1590bc06fb0b7d2a78256553fc7", + "hash": "538abe124e644ed61087b7205e862a88", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.6.1", + "version": "0.6.2", "section": "Schematics", - "hash": "6d733ede048305b97646deaeda3ffc28", + "hash": "99e9e8ff20d0b3dd710861c4912b59c9", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.6.1", + "version": "0.6.2", "section": "Schematics", - "hash": "c8828f05bd165b63b9d074b45dcafc23", + "hash": "02acb20b18b25170e54e2cf263b807d1", "snapshotRepo": "angular/schematics-update-builds" } } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index bfaaeac6c4..d68008c14a 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,11 +8,11 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '^6.0.0', + Angular: '^6.0.2', RxJs: '^6.0.0', ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.6.1', - DevkitBuildNgPackagr: '~0.6.1', + DevkitBuildAngular: '~0.6.2', + DevkitBuildNgPackagr: '~0.6.2', }; From 4785f0158789d8fee2d5a2b06e2d81b46748cd70 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 16 May 2018 22:26:49 -0400 Subject: [PATCH 609/724] fix(@schematics/angular): Fix broken unit test on new app --- .../angular/application/other-files/app.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/other-files/app.component.spec.ts b/packages/schematics/angular/application/other-files/app.component.spec.ts index b21e40897e..b6a0247dcd 100644 --- a/packages/schematics/angular/application/other-files/app.component.spec.ts +++ b/packages/schematics/angular/application/other-files/app.component.spec.ts @@ -26,6 +26,6 @@ describe('AppComponent', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to <%= prefix %>!'); + expect(compiled.querySelector('h1').textContent).toContain('Welcome to <%= name %>!'); })); }); From 785c0b8b841c37d1e6b8e86525099a7d931933fa Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 17 May 2018 00:01:33 -0400 Subject: [PATCH 610/724] release: v6.0.3 --- .monorepo.json | 36 +++++++++---------- .../angular/utility/latest-versions.ts | 4 +-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.monorepo.json b/.monorepo.json index 002a7b9bbc..bbcc1437f1 100644 --- a/.monorepo.json +++ b/.monorepo.json @@ -42,18 +42,18 @@ }, "packages": { "@_/benchmark": { - "version": "0.6.2", + "version": "0.6.3", "hash": "195d853a0c3edbfbe572d39539a82f9e" }, "devkit": { - "version": "0.6.2", + "version": "0.6.3", "hash": "85a4710057dd50aa7d0d54d266358c5c" }, "@angular/pwa": { "name": "Angular PWA Schematics", "section": "Schematics", - "version": "0.6.2", - "hash": "9c0a727d6233ab172f175ed271baaad3", + "version": "0.6.3", + "hash": "9808150cc9c9d68ac8f68ef3662773b6", "snapshotRepo": "angular/angular-pwa-builds" }, "@angular-devkit/architect": { @@ -64,13 +64,13 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/architect/README.md" } ], - "version": "0.6.2", + "version": "0.6.3", "hash": "d6e4e5a1b2979f169377fde83bb10c81", "snapshotRepo": "angular/angular-devkit-architect-builds" }, "@angular-devkit/architect-cli": { "name": "Architect CLI", - "version": "0.6.2", + "version": "0.6.3", "hash": "ab944fad093ff4ca8aabbd05e13d90ea", "snapshotRepo": "angular/angular-devkit-architect-cli-builds" }, @@ -82,7 +82,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_optimizer/README.md" } ], - "version": "0.6.2", + "version": "0.6.3", "hash": "be1d628217e787afd2d354a5d333a452", "snapshotRepo": "angular/angular-devkit-build-optimizer-builds" }, @@ -94,7 +94,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_ng_packagr/README.md" } ], - "version": "0.6.2", + "version": "0.6.3", "hash": "0efd712119b51af484ea81b38283eaa4", "snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds" }, @@ -106,7 +106,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/README.md" } ], - "version": "0.6.2", + "version": "0.6.3", "hash": "5d33c1706ab096941e491d9faaed8485", "snapshotRepo": "angular/angular-devkit-build-angular-builds" }, @@ -118,7 +118,7 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/core/README.md" } ], - "version": "0.6.2", + "version": "0.6.3", "hash": "7ff1e423d057b8e5b2758804a30fa8f9", "snapshotRepo": "angular/angular-devkit-core-builds" }, @@ -130,19 +130,19 @@ "url": "https://github.com/angular/devkit/blob/master/packages/angular_devkit/schematics/README.md" } ], - "version": "0.6.2", + "version": "0.6.3", "hash": "9f83e8b9fb3b6064fc97ffd7349db486", "snapshotRepo": "angular/angular-devkit-schematics-builds" }, "@angular-devkit/schematics-cli": { "name": "Schematics CLI", - "version": "0.6.2", + "version": "0.6.3", "hash": "9b4b991fda1a484ae44562297687549b", "snapshotRepo": "angular/angular-devkit-schematics-cli-builds" }, "@ngtools/webpack": { "name": "Webpack Angular Plugin", - "version": "6.0.2", + "version": "6.0.3", "section": "Misc", "hash": "27060cb95b1fe46372a001af67ed59d9", "snapshotRepo": "angular/ngtools-webpack-builds" @@ -150,27 +150,27 @@ "@schematics/angular": { "name": "Angular Schematics", "section": "Schematics", - "version": "0.6.2", - "hash": "c8ccd40624ac6f9712f9d3d16b405785", + "version": "0.6.3", + "hash": "823149b7910d4b30c976a445cedb650d", "snapshotRepo": "angular/schematics-angular-builds" }, "@schematics/schematics": { "name": "Schematics Schematics", - "version": "0.6.2", + "version": "0.6.3", "section": "Schematics", "hash": "538abe124e644ed61087b7205e862a88", "snapshotRepo": "angular/schematics-schematics-builds" }, "@schematics/package-update": { "name": "Package JSON Update Schematics", - "version": "0.6.2", + "version": "0.6.3", "section": "Schematics", "hash": "99e9e8ff20d0b3dd710861c4912b59c9", "snapshotRepo": "angular/schematics-package-update-builds" }, "@schematics/update": { "name": "Package Update Schematics", - "version": "0.6.2", + "version": "0.6.3", "section": "Schematics", "hash": "02acb20b18b25170e54e2cf263b807d1", "snapshotRepo": "angular/schematics-update-builds" diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index d68008c14a..9464e78ee0 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -13,6 +13,6 @@ export const latestVersions = { ZoneJs: '^0.8.26', TypeScript: '~2.7.2', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.6.2', - DevkitBuildNgPackagr: '~0.6.2', + DevkitBuildAngular: '~0.6.3', + DevkitBuildNgPackagr: '~0.6.3', }; From c13af1d7cdba8b395c54cd5ef54a83a32aef6cb8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 16 May 2018 14:32:33 -0400 Subject: [PATCH 611/724] fix(@angular-devkit/build-optimizer): correct 2.8 enum export assignment --- .../build-optimizer/build-optimizer_spec.ts | 2 +- .../src/transforms/wrap-enums.ts | 69 +++++++++++++++---- .../src/transforms/wrap-enums_spec.ts | 10 +-- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts index 79d5b38084..0b031cd041 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts @@ -63,7 +63,7 @@ describe('build-optimizer', () => { ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; return ChangeDetectionStrategy; - })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); + })({}); var Clazz = /*@__PURE__*/ (function () { function Clazz() { } ${staticProperty} return Clazz; }()); var ComponentClazz = /*@__PURE__*/ (function () { function ComponentClazz() { } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts index 76231cd27e..0100b162aa 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts @@ -94,7 +94,8 @@ function visitBlockStatements( // update IIFE and replace variable statement and old IIFE updatedStatements.splice(uIndex, 2, updateEnumIife( currentStatement, - iife, + iife[0], + iife[1], )); // skip IIFE statement oIndex++; @@ -158,7 +159,10 @@ function visitBlockStatements( } // TS 2.3 enums have statements that are inside a IIFE. -function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpression | null { +function findTs2_3EnumIife( + name: string, + statement: ts.Statement, +): [ts.CallExpression, ts.Expression | undefined] | null { if (!ts.isExpressionStatement(statement)) { return null; } @@ -173,6 +177,7 @@ function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpres } const callExpression = expression; + let exportExpression; let argument = expression.arguments[0]; if (!ts.isBinaryExpression(argument)) { @@ -183,12 +188,14 @@ function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpres return null; } + let potentialExport = false; if (argument.operatorToken.kind === ts.SyntaxKind.FirstAssignment) { if (!ts.isBinaryExpression(argument.right) || argument.right.operatorToken.kind !== ts.SyntaxKind.BarBarToken) { return null; } + potentialExport = true; argument = argument.right; } @@ -200,6 +207,10 @@ function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpres return null; } + if (potentialExport && !ts.isIdentifier(argument.left)) { + exportExpression = argument.left; + } + expression = expression.expression; while (ts.isParenthesizedExpression(expression)) { expression = expression.expression; @@ -264,7 +275,7 @@ function findTs2_3EnumIife(name: string, statement: ts.Statement): ts.CallExpres } } - return callExpression; + return [callExpression, exportExpression]; } // TS 2.2 enums have statements after the variable declaration, with index statements followed @@ -362,9 +373,22 @@ function findEnumNameStatements( return enumStatements; } -function updateHostNode(hostNode: ts.VariableStatement, expression: ts.Expression): ts.Statement { +function addPureComment(node: T): T { const pureFunctionComment = '@__PURE__'; + return ts.addSyntheticLeadingComment( + node, + ts.SyntaxKind.MultiLineCommentTrivia, + pureFunctionComment, + false, + ); +} + +function updateHostNode( + hostNode: ts.VariableStatement, + expression: ts.Expression, +): ts.Statement { + // Update existing host node with the pure comment before the variable declaration initializer. const variableDeclaration = hostNode.declarationList.declarations[0]; const outerVarStmt = ts.updateVariableStatement( @@ -377,12 +401,7 @@ function updateHostNode(hostNode: ts.VariableStatement, expression: ts.Expressio variableDeclaration, variableDeclaration.name, variableDeclaration.type, - ts.addSyntheticLeadingComment( - expression, - ts.SyntaxKind.MultiLineCommentTrivia, - pureFunctionComment, - false, - ), + expression, ), ], ), @@ -391,12 +410,22 @@ function updateHostNode(hostNode: ts.VariableStatement, expression: ts.Expressio return outerVarStmt; } -function updateEnumIife(hostNode: ts.VariableStatement, iife: ts.CallExpression): ts.Statement { +function updateEnumIife( + hostNode: ts.VariableStatement, + iife: ts.CallExpression, + exportAssignment?: ts.Expression, +): ts.Statement { if (!ts.isParenthesizedExpression(iife.expression) || !ts.isFunctionExpression(iife.expression.expression)) { throw new Error('Invalid IIFE Structure'); } + // Ignore export assignment if variable is directly exported + if (hostNode.modifiers + && hostNode.modifiers.findIndex(m => m.kind == ts.SyntaxKind.ExportKeyword) != -1) { + exportAssignment = undefined; + } + const expression = iife.expression.expression; const updatedFunction = ts.updateFunctionExpression( expression, @@ -415,6 +444,10 @@ function updateEnumIife(hostNode: ts.VariableStatement, iife: ts.CallExpression) ), ); + let arg: ts.Expression = ts.createObjectLiteral(); + if (exportAssignment) { + arg = ts.createBinary(exportAssignment, ts.SyntaxKind.BarBarToken, arg); + } const updatedIife = ts.updateCall( iife, ts.updateParen( @@ -422,10 +455,18 @@ function updateEnumIife(hostNode: ts.VariableStatement, iife: ts.CallExpression) updatedFunction, ), iife.typeArguments, - iife.arguments, + [arg], ); - return updateHostNode(hostNode, updatedIife); + let value: ts.Expression = addPureComment(updatedIife); + if (exportAssignment) { + value = ts.createBinary( + exportAssignment, + ts.SyntaxKind.FirstAssignment, + updatedIife); + } + + return updateHostNode(hostNode, value); } function createWrappedEnum( @@ -450,5 +491,5 @@ function createWrappedEnum( innerReturn, ]); - return updateHostNode(hostNode, ts.createParen(iife)); + return updateHostNode(hostNode, addPureComment(ts.createParen(iife))); } diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index 14ce356949..1718dfa783 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -50,7 +50,7 @@ describe('wrap-enums', () => { ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; return ChangeDetectionStrategy; - })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); + })({}); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); @@ -73,7 +73,7 @@ describe('wrap-enums', () => { AnimatorControlState[AnimatorControlState["FINISHED"] = 3] = "FINISHED"; AnimatorControlState[AnimatorControlState["DESTROYED"] = 4] = "DESTROYED"; return AnimatorControlState; - })(AnimatorControlState || (AnimatorControlState = {})); + })({}); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); @@ -155,7 +155,7 @@ describe('wrap-enums', () => { RequestMethod[RequestMethod["Head"] = 5] = "Head"; RequestMethod[RequestMethod["Patch"] = 6] = "Patch"; return RequestMethod; - })(RequestMethod || (RequestMethod = {})); + })({}); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); @@ -171,12 +171,12 @@ describe('wrap-enums', () => { })(ExportEnum = exports.ExportEnum || (exports.ExportEnum = {})); `; const output = tags.stripIndent` - var ExportEnum = /*@__PURE__*/ (function (ExportEnum) { + var ExportEnum = exports.ExportEnum = /*@__PURE__*/ (function (ExportEnum) { ExportEnum[ExportEnum["A"] = 0] = "A"; ExportEnum[ExportEnum["B"] = 1] = "B"; ExportEnum[ExportEnum["C"] = 2] = "C"; return ExportEnum; - })(ExportEnum = exports.ExportEnum || (exports.ExportEnum = {})); + })(exports.ExportEnum || {}); `; expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); From 0a082c32dc5d3624a3f683b742c178cbe937d6fa Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 17 May 2018 08:04:40 +0200 Subject: [PATCH 612/724] fix(@schematics/angular): e2e should use the name PR #906 updated the app schematics to display the name of the app in the title, so the e2e test has to be fixed. The prefix is now useless (it was introduced by #720 to fix the e2e test when it was using prefix), and has been removed. --- packages/schematics/angular/application/index.ts | 1 - packages/schematics/angular/e2e/files/src/app.e2e-spec.ts | 2 +- packages/schematics/angular/e2e/schema.d.ts | 4 ---- packages/schematics/angular/e2e/schema.json | 7 ------- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 176cbbb2b1..80a71d0153 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -275,7 +275,6 @@ export default function (options: ApplicationOptions): Rule { name: `${options.name}-e2e`, relatedAppName: options.name, rootSelector: appRootSelector, - prefix: options.prefix || 'app', }; if (options.projectRoot !== undefined) { e2eOptions.projectRoot = 'e2e'; diff --git a/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts index 142212d50d..d097198b3f 100644 --- a/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts +++ b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts @@ -9,6 +9,6 @@ describe('workspace-project App', () => { it('should display welcome message', () => { page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!'); + expect(page.getParagraphText()).toEqual('Welcome to <%= relatedAppName %>!'); }); }); diff --git a/packages/schematics/angular/e2e/schema.d.ts b/packages/schematics/angular/e2e/schema.d.ts index 5d29ba12d4..2180f69412 100644 --- a/packages/schematics/angular/e2e/schema.d.ts +++ b/packages/schematics/angular/e2e/schema.d.ts @@ -23,8 +23,4 @@ export interface Schema { * The name of the app being tested. */ relatedAppName: string; - /** - * The prefix to apply. - */ - prefix?: string; } diff --git a/packages/schematics/angular/e2e/schema.json b/packages/schematics/angular/e2e/schema.json index 491d77d426..df166cf4a2 100644 --- a/packages/schematics/angular/e2e/schema.json +++ b/packages/schematics/angular/e2e/schema.json @@ -26,13 +26,6 @@ "relatedAppName": { "description": "The name of the app being tested.", "type": "string" - }, - "prefix": { - "type": "string", - "format": "html-selector", - "description": "The prefix to apply to generated selectors.", - "default": "app", - "alias": "p" } }, "required": [ From 8b6788f2902f4d94405d0f649fc2129f94701e28 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 16 May 2018 14:41:22 -0400 Subject: [PATCH 613/724] fix(@angular-devkit/build-angular): make serve build options override Fixes: angular/angular-cli#10886 --- .../build_angular/src/dev-server/index.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 3bcc5b2fd7..32f21603f3 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -436,14 +436,12 @@ export class DevServerBuilder implements Builder { private _getBrowserOptions(options: DevServerBuilderOptions) { const architect = this.context.architect; const [project, target, configuration] = options.browserTarget.split(':'); - // Override browser build watch setting. - const overrides = { watch: options.watch }; - const browserTargetSpec = { project, target, configuration, overrides }; - const builderConfig = architect.getBuilderConfiguration( - browserTargetSpec); - // Update the browser options with the same options we support in serve, if defined. - builderConfig.options = { + const overrides = { + // Override browser build watch setting. + watch: options.watch, + + // Update the browser options with the same options we support in serve, if defined. ...(options.optimization !== undefined ? { optimization: options.optimization } : {}), ...(options.aot !== undefined ? { aot: options.aot } : {}), ...(options.sourceMap !== undefined ? { sourceMap: options.sourceMap } : {}), @@ -453,10 +451,12 @@ export class DevServerBuilder implements Builder { ...(options.baseHref !== undefined ? { baseHref: options.baseHref } : {}), ...(options.progress !== undefined ? { progress: options.progress } : {}), ...(options.poll !== undefined ? { poll: options.poll } : {}), - - ...builderConfig.options, }; + const browserTargetSpec = { project, target, configuration, overrides }; + const builderConfig = architect.getBuilderConfiguration( + browserTargetSpec); + return architect.getBuilderDescription(builderConfig).pipe( concatMap(browserDescription => architect.validateBuilderOptions(builderConfig, browserDescription)), From 84a9768bac5bf9bc162a777ae73c16c4b13468d3 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 17 May 2018 11:02:49 -0400 Subject: [PATCH 614/724] fix(@schematics/angular): skip lib npm install if skip package option --- packages/schematics/angular/library/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 71d25e8e4e..f9467118b1 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -246,7 +246,9 @@ export default function (options: LibraryOptions): Rule { project: options.name, }), (_tree: Tree, context: SchematicContext) => { - context.addTask(new NodePackageInstallTask()); + if (!options.skipPackageJson) { + context.addTask(new NodePackageInstallTask()); + } }, ])(host, context); }; From 3e483441ce0adfd156d24570fa5b2ebec377b566 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 17 May 2018 11:07:11 -0400 Subject: [PATCH 615/724] fix(@schematics/angular): support import of lib secondary entrypoints --- packages/schematics/angular/library/index.ts | 7 +++++++ packages/schematics/angular/library/index_spec.ts | 3 +++ 2 files changed, 10 insertions(+) diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index f9467118b1..ab61a65f6e 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -82,6 +82,13 @@ function updateTsConfig(packageName: string, distRoot: string) { tsconfig.compilerOptions.paths[packageName] = []; } tsconfig.compilerOptions.paths[packageName].push(distRoot); + + // deep import & secondary entrypoint support + const deepPackagePath = packageName + '/*'; + if (!tsconfig.compilerOptions.paths[deepPackagePath]) { + tsconfig.compilerOptions.paths[deepPackagePath] = []; + } + tsconfig.compilerOptions.paths[deepPackagePath].push(distRoot + '/*'); }); }; } diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index 54f299ffc0..28b193655a 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -182,6 +182,9 @@ describe('Library Schematic', () => { expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy(); expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(1); expect(tsConfigJson.compilerOptions.paths.foo[0]).toEqual('dist/foo'); + expect(tsConfigJson.compilerOptions.paths['foo/*']).toBeTruthy(); + expect(tsConfigJson.compilerOptions.paths['foo/*'].length).toEqual(1); + expect(tsConfigJson.compilerOptions.paths['foo/*'][0]).toEqual('dist/foo/*'); }); it(`should append to existing paths mappings`, () => { From cffb2258d74727decf25b7d8da45a8824f885cc5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 4 May 2018 12:29:40 -0700 Subject: [PATCH 616/724] fix(@schematics/update): show warning for allowOutsideOutDir assets Fix https://github.com/angular/angular-cli/issues/10647 --- .../angular/migrations/update-6/index.ts | 24 +++++++++++++------ .../angular/migrations/update-6/index_spec.ts | 6 +++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/schematics/angular/migrations/update-6/index.ts b/packages/schematics/angular/migrations/update-6/index.ts index 16f6e43320..38df549aa8 100644 --- a/packages/schematics/angular/migrations/update-6/index.ts +++ b/packages/schematics/angular/migrations/update-6/index.ts @@ -11,6 +11,7 @@ import { JsonParseMode, Path, join, + logging, normalize, parseJson, parseJsonAst, @@ -90,7 +91,7 @@ function migrateKarmaConfiguration(config: CliConfig): Rule { }; } -function migrateConfiguration(oldConfig: CliConfig): Rule { +function migrateConfiguration(oldConfig: CliConfig, logger: logging.LoggerApi): Rule { return (host: Tree, context: SchematicContext) => { const oldConfigPath = getConfigPath(host); const configPath = normalize('angular.json'); @@ -99,7 +100,7 @@ function migrateConfiguration(oldConfig: CliConfig): Rule { '$schema': './node_modules/@angular/cli/lib/config/schema.json', version: 1, newProjectRoot: 'projects', - projects: extractProjectsConfig(oldConfig, host), + projects: extractProjectsConfig(oldConfig, host, logger), }; const defaultProject = extractDefaultProject(oldConfig); if (defaultProject !== null) { @@ -211,7 +212,9 @@ function extractArchitectConfig(_config: CliConfig): JsonObject | null { return null; } -function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { +function extractProjectsConfig( + config: CliConfig, tree: Tree, logger: logging.LoggerApi, +): JsonObject { const builderPackage = '@angular-devkit/build-angular'; const defaultAppNamePrefix = getDefaultAppNamePrefix(config); @@ -256,7 +259,14 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { if (typeof asset === 'string') { return normalize(appRoot + '/' + asset); } else { - if (asset.output) { + if (asset.allowOutsideOutDir) { + logger.warn(tags.oneLine` + Asset with input '${asset.input}' was not migrated because it + uses the 'allowOutsideOutDir' option which is not supported in Angular CLI 6. + `); + + return null; + } else if (asset.output) { return { glob: asset.glob, input: normalize(appRoot + '/' + asset.input), @@ -409,7 +419,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { }; } - buildOptions.assets = (app.assets || []).map(_mapAssets); + buildOptions.assets = (app.assets || []).map(_mapAssets).filter(x => !!x); buildOptions.styles = (app.styles || []).map(_extraEntryMapper); buildOptions.scripts = (app.scripts || []).map(_extraEntryMapper); architect.build = { @@ -455,7 +465,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject { } testOptions.scripts = (app.scripts || []).map(_extraEntryMapper); testOptions.styles = (app.styles || []).map(_extraEntryMapper); - testOptions.assets = (app.assets || []).map(_mapAssets); + testOptions.assets = (app.assets || []).map(_mapAssets).filter(x => !!x); if (karmaConfig) { architect.test = { @@ -752,7 +762,7 @@ export default function (): Rule { return chain([ migrateKarmaConfiguration(config), - migrateConfiguration(config), + migrateConfiguration(config, context.logger), updateSpecTsConfig(config), updatePackageJson(config), updateTsLintConfig(), diff --git a/packages/schematics/angular/migrations/update-6/index_spec.ts b/packages/schematics/angular/migrations/update-6/index_spec.ts index 7d53cee269..0e220fa587 100644 --- a/packages/schematics/angular/migrations/update-6/index_spec.ts +++ b/packages/schematics/angular/migrations/update-6/index_spec.ts @@ -40,6 +40,12 @@ describe('Migration to v6', () => { 'favicon.ico', { glob: '**/*', input: './assets/', output: './assets/' }, { glob: 'favicon.ico', input: './', output: './' }, + { + 'glob': '**/*.*', + 'input': '../server/', + 'output': '../', + 'allowOutsideOutDir': true, + }, ], index: 'index.html', main: 'main.ts', From d0d6a1e389fc5beceea6346b32cae265cae44514 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 10 May 2018 18:47:38 +0100 Subject: [PATCH 617/724] fix(@angular-devkit/build-angular): emit success false on dev-server rebuilds --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 32f21603f3..09d19da281 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -199,7 +199,7 @@ export class DevServerBuilder implements Builder { this.context.logger.info(statsErrorsToString(json, statsConfig)); } } - obs.next({ success: true }); + obs.next({ success: !stats.hasErrors() }); if (first && options.open) { first = false; From 0f8a38a22475c9752afb836d9a4fe15fac2cd818 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 11 May 2018 13:34:55 +0100 Subject: [PATCH 618/724] test: remove usused test This functionality is tested in lazy-module_spec_large.ts. --- .../browser/custom-lazy-modules_spec_large.ts | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 packages/angular_devkit/build_angular/test/browser/custom-lazy-modules_spec_large.ts diff --git a/packages/angular_devkit/build_angular/test/browser/custom-lazy-modules_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/custom-lazy-modules_spec_large.ts deleted file mode 100644 index 7e0b6647aa..0000000000 --- a/packages/angular_devkit/build_angular/test/browser/custom-lazy-modules_spec_large.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -// import { Architect } from '@angular-devkit/architect'; -// import { join, normalize } from '@angular-devkit/core'; -// import { concatMap, tap, toArray } from 'rxjs/operators'; -// import { host, browserTargetSpec, makeWorkspace } from '../utils'; -// import { lazyModuleFiles, lazyModuleImport } from './rebuild_spec_large'; - - -// TODO: re-enable this test when the custom lazy module changes have been ported over to -// webpack-builder from the CLI. -// describe('Browser Builder custom lazy modules', () => { -// -// const architect = new Architect(normalize(workspaceRoot), host); -// const outputPath = normalize('dist'); - -// beforeEach(done => host.initialize().subscribe(undefined, done.fail, done)); -// afterEach(done => host.restore().subscribe(undefined, done.fail, done)); - -// it('works', (done) => { -// host.writeMultipleFiles(lazyModuleFiles); -// host.writeMultipleFiles(lazyModuleImport); -// host.writeMultipleFiles({ -// 'src/app/app.component.ts': ` -// import { Component, SystemJsNgModuleLoader } from '@angular/core'; - -// @Component({ -// selector: 'app-root', -// templateUrl: './app.component.html', -// styleUrls: ['./app.component.css'], -// }) -// export class AppComponent { -// title = 'app'; -// constructor(loader: SystemJsNgModuleLoader) { -// // Module will be split at build time and loaded when requested below -// loader.load('app/lazy/lazy.module#LazyModule') -// .then((factory) => { /* Use factory here */ }); -// } -// }`, -// }); - -// const overrides = { lazyModules: ['app/lazy/lazy.module'] }; - -// architect.loadWorkspaceFromJson(makeWorkspace(browserTargetSpec)).pipe( -// concatMap(() => architect.run(architect.getTarget({ overrides }))), -// tap((buildEvent) => expect(buildEvent.success).toBe(true)), -// tap(() => -// expect(host.scopedSync().exists(join(outputPath, 'lazy.module.js'))).toBe(true)), -// ).subscribe(undefined, done.fail, done); -// }, 30000); -// }); From cb0839dda596d41f14d79966aa6fbf76143afda5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 May 2018 16:36:31 +0100 Subject: [PATCH 619/724] fix(@angular-devkit/core): throw observable error on delete --- packages/angular_devkit/core/node/host.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 7cdcf6ca6f..1ccdc8377d 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import * as fs from 'fs'; -import { EMPTY, Observable, concat, from as observableFrom } from 'rxjs'; +import { EMPTY, Observable, concat, from as observableFrom, throwError } from 'rxjs'; import { concatMap, ignoreElements, @@ -257,9 +257,17 @@ export class NodeJsSyncHost implements virtualFs.Host { for (const name of fs.readdirSync(getSystemPath(path))) { this.delete(join(path, name)).subscribe(); } - fs.rmdirSync(getSystemPath(path)); + try { + fs.rmdirSync(getSystemPath(path)); + } catch (error) { + return throwError(error); + } } else { - fs.unlinkSync(getSystemPath(path)); + try { + fs.unlinkSync(getSystemPath(path)); + } catch (error) { + return throwError(error); + } } return EMPTY; From d0ba296e32f522b7e8879a3ad74786875c44fc3e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 15 May 2018 17:55:01 +0100 Subject: [PATCH 620/724] test(@angular-devkit/build-angular): increase material icons test timeout It takes triple the time on my machine than other similar tests, and is timing out in CircleCI with the current limit. --- .../build_angular/test/browser/styles_spec_large.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index 99ed697eab..e3873289e9 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -220,7 +220,7 @@ describe('Browser Builder styles', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(true)), ).subscribe(undefined, done.fail, done); - }, Timeout.Basic); + }, Timeout.Complex); extensionsWithVariableSupport.forEach(ext => { it(`supports ${ext} includePaths`, (done) => { From 22626d1052e1b2964bfb7f655e94bf3a96c11eec Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 May 2018 16:39:31 +0100 Subject: [PATCH 621/724] test(@angular-devkit/build-angular): use Timeout.Complex for optimization tests --- .../build_angular/test/browser/bundle-budgets_spec_large.ts | 4 ++-- .../build_angular/test/browser/lazy-module_spec_large.ts | 2 +- .../test/browser/license-extraction_spec_large.ts | 2 +- .../build_angular/test/browser/styles_spec_large.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts index 5169b0e7f7..88ba690752 100644 --- a/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts @@ -38,7 +38,7 @@ describe('Browser Builder bundle budgets', () => { runTargetSpec(host, browserTargetSpec, overrides).pipe( tap((buildEvent) => expect(buildEvent.success).toBe(false)), ).subscribe(undefined, done.fail, done); - }, Timeout.Standard); + }, Timeout.Complex); it('shows warnings', (done) => { const overrides = { @@ -52,5 +52,5 @@ describe('Browser Builder bundle budgets', () => { tap((buildEvent) => expect(buildEvent.success).toBe(true)), tap(() => expect(logger.includes('WARNING')).toBe(true)), ).subscribe(undefined, done.fail, done); - }, Timeout.Standard); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index 61ac885895..1583ea44a3 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -258,5 +258,5 @@ describe('Browser Builder lazy modules', () => { .exists(join(outputPath, 'src-app-lazy-lazy-module-ngfactory.js'))) .toBe(true)), ).subscribe(undefined, done.fail, done); - }, Timeout.Basic); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts index 11edc1621c..aea18cb623 100644 --- a/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/license-extraction_spec_large.ts @@ -30,5 +30,5 @@ describe('Browser Builder license extraction', () => { expect(host.scopedSync().exists(fileName)).toBe(true); }), ).subscribe(undefined, done.fail, done); - }, Timeout.Standard); + }, Timeout.Complex); }); diff --git a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts index e3873289e9..f88d007ef3 100644 --- a/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/styles_spec_large.ts @@ -389,7 +389,7 @@ describe('Browser Builder styles', () => { '/*! important-comment */div{-ms-flex:1;flex:1}'); }), ).subscribe(undefined, done.fail, done); - }, Timeout.Standard); + }, Timeout.Complex); // TODO: consider making this a unit test in the url processing plugins. it(`supports baseHref and deployUrl in resource urls`, (done) => { From 09861ee4f30713e9cff8fcd2c39de8b9aac8b72a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 17 May 2018 14:41:02 +0100 Subject: [PATCH 622/724] feat(@angular-devkit/core): add trimNewlines literal tag --- packages/angular_devkit/core/src/utils/literals.ts | 11 +++++++++++ .../angular_devkit/core/src/utils/literals_spec.ts | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/utils/literals.ts b/packages/angular_devkit/core/src/utils/literals.ts index eff190829a..95805254e0 100644 --- a/packages/angular_devkit/core/src/utils/literals.ts +++ b/packages/angular_devkit/core/src/utils/literals.ts @@ -55,3 +55,14 @@ export function stripIndents(strings: TemplateStringsArray, ...values: any[]) { .join('\n') .trim(); } + +// tslint:disable-next-line:no-any +export function trimNewlines(strings: TemplateStringsArray, ...values: any[]) { + const endResult = String.raw(strings, ...values); + + return endResult + // Remove the newline at the start. + .replace(/^(?:\r?\n)+/, '') + // Remove the newline at the end and following whitespace. + .replace(/(?:\r?\n(?:\s*))$/, ''); +} diff --git a/packages/angular_devkit/core/src/utils/literals_spec.ts b/packages/angular_devkit/core/src/utils/literals_spec.ts index 3b28d52332..0883eb6855 100644 --- a/packages/angular_devkit/core/src/utils/literals_spec.ts +++ b/packages/angular_devkit/core/src/utils/literals_spec.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { oneLine, stripIndent, stripIndents } from './literals'; +import { oneLine, stripIndent, stripIndents, trimNewlines } from './literals'; describe('literals', () => { describe('stripIndent', () => { @@ -43,4 +43,14 @@ describe('literals', () => { expect(test).toBe('hello world how are you? blue red test'); }); }); + + describe('trimNewlines', () => { + it('works', () => { + const test = trimNewlines` + hello world + `; + + expect(test).toBe(' hello world'); + }); + }); }); From 384dca4ee6b266db4e67ba1d0d1c464eb7834c3a Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sun, 20 May 2018 20:36:43 +0200 Subject: [PATCH 623/724] build: update angular package to final version --- package-lock.json | 80 +++++++++++++++++++++++------------------------ package.json | 26 +++++++-------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f40df66e3..5d0c1037f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,41 +5,41 @@ "requires": true, "dependencies": { "@angular/animations": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.0-rc.5.tgz", - "integrity": "sha512-dJAqLU8kTkW6W84q0VH5oX06CwMX4VXKokn2sMqboOZ5iHkZWfA+lO6wTjS+1pQ2jJ4EOc2HSyBovdGo7jPbLQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-6.0.2.tgz", + "integrity": "sha512-QoNJ/L0Xgtrj1KBp8wvxhHwRt+sQ5tBihWm82UbNgN82ZNnfNzQoAqtahbZN5AY7XFmGbDX+lVt3TdO8omXhmg==", "requires": { "tslib": "1.9.0" } }, "@angular/cdk": { - "version": "6.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.0.0-rc.1.tgz", - "integrity": "sha512-V4nJwF9uchgqi1noRSd/Jm0mZ9yzFFeYzZ5mHZ7scXo0c2sXpEclsEjsnzb6YQo4NENEig8qrjOdYI+M7bd5zQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-6.0.2.tgz", + "integrity": "sha512-UY+S0FZkyDoxn5aaj5Ue3fGlOQKEnNBJXasaUQbSYKZiUkyFJkgmcSHRJlJuCAunJAtW3IIOhPSFxLZIj7lCHA==", "requires": { "tslib": "1.9.0" } }, "@angular/common": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.0-rc.5.tgz", - "integrity": "sha512-1NKIKHz7Zqt+OOOp6lF4w/O2/iKjhhYEYpjYG7MRzwQOJmSzxK2KEpw2m80I+rF/SqGakZ46MPthAwa9XC2IBw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-6.0.2.tgz", + "integrity": "sha512-Yc3NnLGs1ltnDhUCOoMCQMRSkJv/sCv+jKx3uSdrvd8Y55APl2boZhZUK4WphPfWIkpvC7odpiLXAmnVgP6vcw==", "requires": { "tslib": "1.9.0" } }, "@angular/compiler": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.0-rc.5.tgz", - "integrity": "sha512-Re2oVZd2HRwkbuu5OR1pkgf3vIUZwzezLuOv/NzRgEY/v67cCeYit16Eg/0iGnwLybD3ptqrBtMls1X/ydssZA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-6.0.2.tgz", + "integrity": "sha512-uKuM7dcTWwcElklT4E/tckp5fnGNUq4wDna3gZWO6fvc7FQK0SUU4l+A6C1d5YdCRgAsv6gxIrk3MxbSF9UwEw==", "requires": { "tslib": "1.9.0" } }, "@angular/compiler-cli": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.0-rc.5.tgz", - "integrity": "sha512-5awnVkoNEqVfjGGzU/K1pTbFdZ2pmbrFqlgcN0lvLpuF7MmNTFDRs/Z/aSNe1BNDZqMbJvpzSH5+GcWuY0BrjA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-6.0.2.tgz", + "integrity": "sha512-6hupeihL+MKYbP0xvHZiaVpYVF1XAlLpI1aTVLUhpzgnR8vgXCwni9iJlr7BZFyicVgApn6l7Oh2xIvMWftYhw==", "requires": { "chokidar": "1.7.0", "minimist": "1.2.0", @@ -66,49 +66,49 @@ } }, "@angular/core": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.0-rc.5.tgz", - "integrity": "sha512-2pZ0HgLBU5BcR8+S1Ju0FLMG15W0TgVS1I7AWE+CO/4TYDsC8/WYfQFuPNZvqwEU6M9yedWKjaNQB/Xzb32Sqg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-6.0.2.tgz", + "integrity": "sha512-+ahJofKZFyaq0kLhKUOCa3Fo4WQ4mkMmYRqwFjKgjPupzPgMh0FkBsojuP1WiBd5KTIkv7U8B4sTziUxRDrKgg==", "requires": { "tslib": "1.9.0" } }, "@angular/http": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.0-rc.5.tgz", - "integrity": "sha512-PNGL4MJ71KD3nWyRsr6SQTRhmAuuwpPFB9O29ibbwGcRvJ9d2RHlvL34GEeduNhD8RzuVV0R4DbpZv8D1F+IIA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-6.0.2.tgz", + "integrity": "sha512-BONrdNMKOaQdXiWnrCAaUiP1akf/nuUG6xm/PJe684SrgcqWHN4JJuwgMhGRGIZZCIKEWcIEaZSp+DbWqnj1kg==", "requires": { "tslib": "1.9.0" } }, "@angular/material": { - "version": "6.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.0-rc.1.tgz", - "integrity": "sha512-53ak9Oi3BJN0ZaYoqWHtgm0dXkmjkZrCWeOuJFy2nM0NtWObv2SUYMd7bss7bSX0GlU/gQD+aBrHF40RwfQjQw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-6.0.2.tgz", + "integrity": "sha512-928g7cnnRIJJx9/pC5GWqypcxrKkfijTCrCC6yeypvcgab1pmsk7m+1uE8VSFGIsUb6x8W3CF5nJUT1viuBIZg==", "requires": { "tslib": "1.9.0" } }, "@angular/platform-browser": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.0-rc.5.tgz", - "integrity": "sha512-65B6mC3qkMCl7iDI8q8t7N9yj6i4gTStupi5j4VeB0TRTnlAnXBFM3fiy43svVyuQE42qVO0MrJQ3wleJmUN5g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-6.0.2.tgz", + "integrity": "sha512-iMBHckhknJ8Wfw9ZVloiw0WPZDtzQFLE2e7D42of7SgXuHloStXUchb0qLr6ZTZwTY0oBPSvDKgJJVmEjZUZvw==", "requires": { "tslib": "1.9.0" } }, "@angular/platform-browser-dynamic": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.0-rc.5.tgz", - "integrity": "sha512-FvOyyhSLbFPtR1YsWX3UI7QoHutUjHE68ilcm0DVL2IOKiop7ofGHyBlUcHuy4JEWzqzHQYtXVDDk2jfI+gTMA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.0.2.tgz", + "integrity": "sha512-g1EC0wIWd4OhcEvUnisTfp3y0eMAXgXbACdtgsrozG//xzyqiRFUnBTYTAP4ecninCEltyZYK7EBGfzp8KwQjw==", "requires": { "tslib": "1.9.0" } }, "@angular/platform-server": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.0-rc.5.tgz", - "integrity": "sha512-dDOP1xHs0brp5uxt6yy04Hf2oM0W3XJfvKRY44MejYlwpyCfotbUw2t2H+Mt8suhr0vt27K/+lceZ8HevlbM1Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-6.0.2.tgz", + "integrity": "sha512-RTa6FTqiHb5R0/i6wjh28PTUBm0a3KfR4nS4RY1XqP1alGpSleUuPQRXxVkcJEZU0vT7DYFvCcXJjIOnGiwVdA==", "requires": { "domino": "2.0.2", "tslib": "1.9.0", @@ -116,17 +116,17 @@ } }, "@angular/router": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.0-rc.5.tgz", - "integrity": "sha512-8IREGDhMVMai8l8AxlIujR2dtkEW4QKQ6Ifv5zd2R2fLEIIsGBSe+jahPpZNKAOc3Nt74HJ1gA96exFPLp0DnQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-6.0.2.tgz", + "integrity": "sha512-XqTtfs/UzT2k2MeVQG1pOP+wR1zcH8V71S6kmWIwFcfyKUgZfIm45sNsZyBZPwY2RUqwCeZYQFjPlVW8wD1PBw==", "requires": { "tslib": "1.9.0" } }, "@angular/service-worker": { - "version": "6.0.0-rc.5", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.0-rc.5.tgz", - "integrity": "sha512-8d+mhADeUt/H0Um9AwqTmBfM3ZS1EA3Bk+qf1JfGAubPrREEWx97P2Lwa7OgY+w/D5JjWbWiNDWE1SsKcSPQiQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-6.0.2.tgz", + "integrity": "sha512-vJ9QGi2O0Ft3tEYwVXm0Y3hV721iqByemYoptVxwGvxyi4fcoeMImrvmc8Z4UCHDRIaziXhLHKOvAgH9ao+VGQ==", "requires": { "tslib": "1.9.0" } @@ -6025,7 +6025,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "lodash": "^4.14.0" + "lodash": "4.17.10" } } } diff --git a/package.json b/package.json index b2182eec87..d3cda97be3 100644 --- a/package.json +++ b/package.json @@ -52,19 +52,19 @@ }, "homepage": "https://github.com/angular/devkit", "dependencies": { - "@angular/animations": "6.0.0-rc.5", - "@angular/cdk": "6.0.0-rc.1", - "@angular/common": "6.0.0-rc.5", - "@angular/compiler": "6.0.0-rc.5", - "@angular/compiler-cli": "6.0.0-rc.5", - "@angular/core": "6.0.0-rc.5", - "@angular/http": "6.0.0-rc.5", - "@angular/material": "6.0.0-rc.1", - "@angular/platform-browser": "6.0.0-rc.5", - "@angular/platform-browser-dynamic": "6.0.0-rc.5", - "@angular/platform-server": "6.0.0-rc.5", - "@angular/router": "6.0.0-rc.5", - "@angular/service-worker": "6.0.0-rc.5", + "@angular/animations": "^6.0.0", + "@angular/cdk": "^6.0.0", + "@angular/common": "^6.0.0", + "@angular/compiler": "^6.0.0", + "@angular/compiler-cli": "^6.0.0", + "@angular/core": "^6.0.0", + "@angular/http": "^6.0.0", + "@angular/material": "^6.0.0", + "@angular/platform-browser": "^6.0.0", + "@angular/platform-browser-dynamic": "^6.0.0", + "@angular/platform-server": "^6.0.0", + "@angular/router": "^6.0.0", + "@angular/service-worker": "^6.0.0", "@ngtools/json-schema": "^1.0.9", "@types/copy-webpack-plugin": "^4.0.1", "@types/express": "^4.11.1", From f0ee2c82a58cbb7731469711f1926c98d152cb8c Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Thu, 17 May 2018 11:37:31 +0100 Subject: [PATCH 624/724] fix(@angular-devkit/build-angular): upgrade coverage reporter --- package-lock.json | 74 +++++++++---------- package.json | 2 +- .../angular/workspace/files/package.json | 2 +- .../hello-world-app/package.json | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d0c1037f2..2cadc0bb69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -686,7 +686,7 @@ "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "aproba": { @@ -2103,9 +2103,9 @@ } }, "compare-versions": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.1.0.tgz", - "integrity": "sha512-4hAxDSBypT/yp2ySFD346So6Ragw5xmBn/e/agIGl3bZr6DLUqnoRZPusxKrXdYRZpgexO9daejmIenlq/wrIQ==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.2.1.tgz", + "integrity": "sha512-2y2nHcopMG/NAyk6vWXlLs86XeM9sik4jmx1tKIgzMi9/RQ2eo758RGpxQO3ErihHmg0RlQITPqgz73y6s7quA==" }, "component-bind": { "version": "1.0.0", @@ -2815,7 +2815,7 @@ "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" }, "dependencies": { "strip-bom": { @@ -2823,7 +2823,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -3686,8 +3686,8 @@ "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", "requires": { - "glob": "7.1.2", - "minimatch": "3.0.4" + "glob": "^7.0.3", + "minimatch": "^3.0.3" } }, "fill-range": { @@ -6006,18 +6006,18 @@ "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", "requires": { - "async": "2.6.0", - "compare-versions": "3.1.0", - "fileset": "2.0.3", - "istanbul-lib-coverage": "1.2.0", - "istanbul-lib-hook": "1.2.0", - "istanbul-lib-instrument": "1.10.1", - "istanbul-lib-report": "1.1.4", - "istanbul-lib-source-maps": "1.2.4", - "istanbul-reports": "1.3.0", - "js-yaml": "3.11.0", - "mkdirp": "0.5.1", - "once": "1.4.0" + "async": "^2.1.4", + "compare-versions": "^3.1.0", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-report": "^1.1.4", + "istanbul-lib-source-maps": "^1.2.4", + "istanbul-reports": "^1.3.0", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" }, "dependencies": { "async": { @@ -6072,7 +6072,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz", "integrity": "sha512-p3En6/oGkFQV55Up8ZPC2oLxvgSxD8CzA0yBrhRZSh3pfv3OFj9aSGVC0yoerAi/O4u7jUVnOGVX1eVFM+0tmQ==", "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -6094,10 +6094,10 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", "requires": { - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "has-flag": { @@ -6110,7 +6110,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -6120,11 +6120,11 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz", "integrity": "sha512-UzuK0g1wyQijiaYQxj/CdNycFhAd2TLtO2obKQMTZrZ1jzEMRY3rvpASEKkaxbRR6brvdovfA03znPa/pXcejg==", "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.2.0", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -6142,7 +6142,7 @@ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "isurl": { @@ -6417,12 +6417,12 @@ } }, "karma-coverage-istanbul-reporter": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.2.tgz", - "integrity": "sha512-sQHexslLF+QHzaKfK8+onTYMyvSwv+p5cDayVxhpEELGa3z0QuB+l0IMsicIkkBNMOJKQaqueiRoW7iuo7lsog==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.0.tgz", + "integrity": "sha512-f9I5fro1Z3efBK1fhEmhb8xTQKiM5tlBSWTjJmdxR8ULy+oeI7fRpczCEaiWzHya0Zfz1/oBTrswEoZsEYXI6g==", "requires": { - "istanbul-api": "1.3.1", - "minimatch": "3.0.4" + "istanbul-api": "^1.3.1", + "minimatch": "^3.0.4" } }, "karma-jasmine": { diff --git a/package.json b/package.json index d3cda97be3..0de906aed7 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-coverage-istanbul-reporter": "^2.0.0", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-source-map-support": "^1.2.0", diff --git a/packages/schematics/angular/workspace/files/package.json b/packages/schematics/angular/workspace/files/package.json index 129d0ea638..f92e661f70 100644 --- a/packages/schematics/angular/workspace/files/package.json +++ b/packages/schematics/angular/workspace/files/package.json @@ -36,7 +36,7 @@ "jasmine-spec-reporter": "~4.2.1", "karma": "~1.7.1", "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~1.4.2", + "karma-coverage-istanbul-reporter": "~2.0.0", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.3.0", diff --git a/tests/@angular_devkit/build_angular/hello-world-app/package.json b/tests/@angular_devkit/build_angular/hello-world-app/package.json index bae1070fa2..ebef854f4f 100644 --- a/tests/@angular_devkit/build_angular/hello-world-app/package.json +++ b/tests/@angular_devkit/build_angular/hello-world-app/package.json @@ -38,7 +38,7 @@ "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-coverage-istanbul-reporter": "~2.0.0", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", From bcc48f3b9dc739eb3b0930130fe441d97183ce13 Mon Sep 17 00:00:00 2001 From: Mark Goho Date: Fri, 4 May 2018 22:56:36 -0400 Subject: [PATCH 625/724] feat(@angular/pwa): add content for when javascript is not available --- packages/angular/pwa/pwa/index.ts | 28 +++++++++++++++++++------- packages/angular/pwa/pwa/index_spec.ts | 1 + 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/angular/pwa/pwa/index.ts b/packages/angular/pwa/pwa/index.ts index 9c421bf860..4d6ad99fa5 100644 --- a/packages/angular/pwa/pwa/index.ts +++ b/packages/angular/pwa/pwa/index.ts @@ -66,27 +66,41 @@ function updateIndexFile(options: PwaOptions): Rule { const lines = content.split('\n'); let closingHeadTagLineIndex = -1; let closingHeadTagLine = ''; - lines.forEach((line, index) => { + let closingBodyTagLineIndex = -1; + let closingBodyTagLine = ''; + lines.forEach((line: string, index: number) => { if (/<\/head>/.test(line) && closingHeadTagLineIndex === -1) { closingHeadTagLine = line; closingHeadTagLineIndex = index; } + + if (/<\/body>/.test(line) && closingBodyTagLineIndex === -1) { + closingBodyTagLine = line; + closingBodyTagLineIndex = index; + } }); - const indent = getIndent(closingHeadTagLine) + ' '; - const itemsToAdd = [ + const headTagIndent = getIndent(closingHeadTagLine) + ' '; + const itemsToAddToHead = [ '', '', ]; - const textToInsert = itemsToAdd - .map(text => indent + text) + const textToInsertIntoHead = itemsToAddToHead + .map(text => headTagIndent + text) .join('\n'); + const bodyTagIndent = getIndent(closingBodyTagLine) + ' '; + const itemsToAddToBody = '' + + const textToInsertIntoBody = bodyTagIndent + itemsToAddToBody; + const updatedIndex = [ ...lines.slice(0, closingHeadTagLineIndex), - textToInsert, - ...lines.slice(closingHeadTagLineIndex), + textToInsertIntoHead, + ...lines.slice(closingHeadTagLineIndex, closingBodyTagLineIndex), + textToInsertIntoBody, + ...lines.slice(closingBodyTagLineIndex), ].join('\n'); host.overwrite(path, updatedIndex); diff --git a/packages/angular/pwa/pwa/index_spec.ts b/packages/angular/pwa/pwa/index_spec.ts index a294872a04..a82d771621 100644 --- a/packages/angular/pwa/pwa/index_spec.ts +++ b/packages/angular/pwa/pwa/index_spec.ts @@ -93,6 +93,7 @@ describe('PWA Schematic', () => { expect(content).toMatch(//); expect(content).toMatch(//); + expect(content).toMatch(/